From 0fd269224211075e9657d6cb285b10805cd5d24f Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 03 四月 2026 13:43:29 +0800
Subject: [PATCH] refactor: 更新发货状态页面和相关逻辑

---
 src/pages/sales/salesAccount/out.vue |  161 +++++++++++++++++------------------------------------
 1 files changed, 53 insertions(+), 108 deletions(-)

diff --git a/src/pages/sales/salesAccount/out.vue b/src/pages/sales/salesAccount/out.vue
index d4fc5be..fe7a8ba 100644
--- a/src/pages/sales/salesAccount/out.vue
+++ b/src/pages/sales/salesAccount/out.vue
@@ -1,7 +1,7 @@
 <template>
   <view class="receipt-payment-detail">
     <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
-    <PageHeader title="鍙戣揣鐘舵��"
+    <PageHeader title="浜у搧鏄庣粏"
                 @back="goBack" />
     <!-- 缁熻淇℃伅 -->
     <view class="summary-info">
@@ -37,16 +37,48 @@
         <up-divider></up-divider>
         <view class="item-details">
           <view class="detail-row">
+            <text class="detail-label">妤煎眰缂栧彿</text>
+            <text class="detail-value">{{ dv(item.floorCode) }}</text>
+          </view>
+          <view class="detail-row">
             <text class="detail-label">浜у搧澶х被</text>
-            <text class="detail-value">{{ item.productCategory }}</text>
+            <text class="detail-value">{{ dv(item.productCategory) }}</text>
           </view>
           <view class="detail-row">
             <text class="detail-label">瑙勬牸鍨嬪彿</text>
-            <text class="detail-value">{{ item.specificationModel }}</text>
+            <text class="detail-value">{{ dv(item.specificationModel) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">鍗曚綅</text>
-            <text class="detail-value">{{ item.unit }}</text>
+            <text class="detail-label">鍘氬害</text>
+            <text class="detail-value">{{ dv(item.thickness) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">瀹�(mm)</text>
+            <text class="detail-value">{{ dv(item.width) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">楂�(mm)</text>
+            <text class="detail-value">{{ dv(item.height) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">鍛ㄩ暱(cm)</text>
+            <text class="detail-value">{{ dv(item.perimeter) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">鎬婚潰绉�(cm虏)</text>
+            <text class="detail-value">{{ dv(item.actualTotalArea) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">鍔犲伐瑕佹眰</text>
+            <text class="detail-value">{{ dv(item.processRequirement) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">澶囨敞</text>
+            <text class="detail-value">{{ dv(item.remark) }}</text>
+          </view>
+          <view class="detail-row">
+            <text class="detail-label">閲嶇</text>
+            <text class="detail-value">{{ dv(item.heavyBox) }}</text>
           </view>
           <view class="detail-row">
             <text class="detail-label">浜у搧鐘舵��</text>
@@ -56,17 +88,12 @@
                   class="detail-value danger">涓嶈冻</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">鍙戣揣鐘舵��</text>
-            <u-tag size="mini"
-                   :type="getShippingStatusType(item)">{{ getShippingStatusText(item) }}</u-tag>
-          </view>
-          <view class="detail-row">
             <text class="detail-label">蹇�掑叕鍙�</text>
-            <text class="detail-value">{{ item.expressCompany }}</text>
+            <text class="detail-value">{{ dv(item.expressCompany) }}</text>
           </view>
           <view class="detail-row">
             <text class="detail-label">蹇�掑崟鍙�</text>
-            <text class="detail-value">{{ item.expressNumber }}</text>
+            <text class="detail-value">{{ dv(item.expressNumber) }}</text>
           </view>
           <view class="detail-row">
             <text class="detail-label">鍙戣揣杞︾墝</text>
@@ -79,36 +106,28 @@
           </view>
           <view class="detail-row">
             <text class="detail-label">鍙戣揣鏃ユ湡</text>
-            <text class="detail-value">{{ item.shippingDate || '-' }}</text>
+            <text class="detail-value">{{ dv(item.shippingDate) }}</text>
           </view>
           <view class="detail-row">
             <text class="detail-label">鏁伴噺</text>
-            <text class="detail-value">{{ item.quantity }}</text>
+            <text class="detail-value">{{ dv(item.quantity) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">绋庣巼锛�%锛�</text>
-            <text class="detail-value">{{ item.taxRate }}</text>
+            <text class="detail-label">绋庣巼(%)</text>
+            <text class="detail-value">{{ dv(item.taxRate) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">鍚◣鍗曚环锛堝厓锛�</text>
-            <text class="detail-value">{{ item.taxInclusiveUnitPrice }}</text>
+            <text class="detail-label">鍚◣鍗曚环(鍏�)</text>
+            <text class="detail-value">{{ dv(item.taxInclusiveUnitPrice) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">鍚◣鎬讳环锛堝厓锛�</text>
-            <text class="detail-value">{{ item.taxInclusiveTotalPrice }}</text>
+            <text class="detail-label">鍚◣鎬讳环(鍏�)</text>
+            <text class="detail-value">{{ dv(item.taxInclusiveTotalPrice) }}</text>
           </view>
           <view class="detail-row">
-            <text class="detail-label">涓嶅惈绋庢�讳环锛堝厓锛�</text>
-            <text class="detail-value">{{ item.taxExclusiveTotalPrice }}</text>
+            <text class="detail-label">涓嶅惈绋庢�讳环(鍏�)</text>
+            <text class="detail-value">{{ dv(item.taxExclusiveTotalPrice) }}</text>
           </view>
-          <up-divider></up-divider>
-          <u-button class="detail-button"
-                    size="small"
-                    type="primary"
-                    :disabled="!canShip(item)"
-                    @click="goout(item)">
-            鍙戣揣
-          </u-button>
         </view>
       </view>
     </view>
@@ -120,7 +139,7 @@
 </template>
 
 <script setup>
-  import { ref, computed, onMounted } from "vue";
+  import { ref, onMounted } from "vue";
   import { productList } from "@/api/salesManagement/salesLedger";
 
   // 瀹㈡埛淇℃伅
@@ -129,63 +148,15 @@
   // 琛ㄦ牸鏁版嵁
   const tableData = ref([]);
 
+  const dv = v =>
+    v === null || v === undefined || v === "" ? "-" : v;
+
   // 杩斿洖涓婁竴椤�
   const goBack = () => {
     uni.removeStorageSync("supplierId");
     uni.navigateBack();
   };
-  const getShippingStatusType = row => {
-    // 濡傛灉宸插彂璐э紙鏈夊彂璐ф棩鏈熸垨杞︾墝鍙凤級锛屾樉绀虹豢鑹�
-    if (row.shippingDate || row.shippingCarNumber) {
-      return "success";
-    }
 
-    // 鑾峰彇鍙戣揣鐘舵�佸瓧娈�
-    const status = row.shippingStatus;
-
-    // 濡傛灉鐘舵�佷负绌烘垨鏈畾涔夛紝榛樿涓虹伆鑹诧紙寰呭彂璐э級
-    if (status === null || status === undefined || status === "") {
-      return "info";
-    }
-
-    // 鐘舵�佹槸瀛楃涓�
-    const statusStr = String(status).trim();
-    const typeTextMap = {
-      寰呭彂璐�: "info",
-      寰呭鏍�: "info",
-      瀹℃牳涓�: "warning",
-      瀹℃牳鎷掔粷: "danger",
-      瀹℃牳閫氳繃: "success",
-      宸插彂璐�: "success",
-    };
-    return typeTextMap[statusStr] || "info";
-  };
-  const getShippingStatusText = row => {
-    // 濡傛灉宸插彂璐э紙鏈夊彂璐ф棩鏈熸垨杞︾墝鍙凤級锛屾樉绀�"宸插彂璐�"
-    if (row.shippingDate || row.shippingCarNumber) {
-      return "宸插彂璐�";
-    }
-
-    // 鑾峰彇鍙戣揣鐘舵�佸瓧娈�
-    const status = row.shippingStatus;
-
-    // 濡傛灉鐘舵�佷负绌烘垨鏈畾涔夛紝榛樿涓�"寰呭彂璐�"
-    if (status === null || status === undefined || status === "") {
-      return "寰呭彂璐�";
-    }
-
-    // 鐘舵�佹槸瀛楃涓�
-    const statusStr = String(status).trim();
-    const statusTextMap = {
-      寰呭彂璐�: "寰呭彂璐�",
-      寰呭鏍�: "寰呭鏍�",
-      瀹℃牳涓�: "瀹℃牳涓�",
-      瀹℃牳鎷掔粷: "瀹℃牳鎷掔粷",
-      瀹℃牳閫氳繃: "瀹℃牳閫氳繃",
-      宸插彂璐�: "宸插彂璐�",
-    };
-    return statusTextMap[statusStr] || "寰呭彂璐�";
-  };
   // 鑾峰彇椤甸潰鍙傛暟
   const getPageParams = () => {
     // 浠庢湰鍦板瓨鍌ㄨ幏鍙栦緵搴斿晢ID
@@ -194,13 +165,6 @@
       supplierId.value = storedSupplierId;
     }
   };
-  const goout = item => {
-    uni.setStorageSync("goOutData", JSON.stringify(item));
-    uni.navigateTo({
-      url: "/pages/sales/salesAccount/goOut",
-    });
-  };
-
   // 鏌ヨ鍒楄〃
   const getList = () => {
     showLoadingToast("鍔犺浇涓�...");
@@ -220,25 +184,6 @@
         });
       });
   };
-  const canShip = row => {
-    // 浜у搧鐘舵�佸繀椤绘槸鍏呰冻锛坅pproveStatus === 1锛�
-    if (row.approveStatus !== 1) {
-      return false;
-    }
-
-    // 鑾峰彇鍙戣揣鐘舵��
-    const shippingStatus = row.shippingStatus;
-
-    // 濡傛灉宸插彂璐э紙鏈夊彂璐ф棩鏈熸垨杞︾墝鍙凤級锛屼笉鑳藉啀娆″彂璐�
-    if (row.shippingDate || row.shippingCarNumber) {
-      return false;
-    }
-
-    // 鍙戣揣鐘舵�佸繀椤绘槸"寰呭彂璐�"鎴�"瀹℃牳鎷掔粷"
-    const statusStr = shippingStatus ? String(shippingStatus).trim() : "";
-    return statusStr === "寰呭彂璐�" || statusStr === "瀹℃牳鎷掔粷";
-  };
-
   // 鏄剧ず鍔犺浇鎻愮ず
   const showLoadingToast = message => {
     uni.showLoading({

--
Gitblit v1.9.3