From a4c5c3a4da2be3e9151de6ca6e919e7c749cec67 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 08 九月 2026 11:28:39 +0800
Subject: [PATCH] 天津潜宇塑胶app 1.部署修改

---
 src/pages/procurementManagement/procurementLedger/index.vue |   88 +++++++++++++++++++++++++++++++++++---------
 1 files changed, 70 insertions(+), 18 deletions(-)

diff --git a/src/pages/procurementManagement/procurementLedger/index.vue b/src/pages/procurementManagement/procurementLedger/index.vue
index b2784d6..36ced14 100644
--- a/src/pages/procurementManagement/procurementLedger/index.vue
+++ b/src/pages/procurementManagement/procurementLedger/index.vue
@@ -50,6 +50,10 @@
               <text class="detail-value">{{ item.salesContractNo }}</text>
             </view> -->
             <view class="detail-row">
+              <text class="detail-label">閿�鍞悎鍚屽彿</text>
+              <text class="detail-value">{{ item.salesContractNo || '-' }}</text>
+            </view>
+            <view class="detail-row">
               <text class="detail-label">渚涘簲鍟嗗悕绉�</text>
               <text class="detail-value">{{ item.supplierName }}</text>
             </view>
@@ -62,8 +66,28 @@
               <text class="detail-value">{{ item.paymentMethod }}</text>
             </view>
             <view class="detail-row">
+              <text class="detail-label">鍏ュ簱鐘舵��</text>
+              <view class="detail-value">
+                <u-tag :type="getStockInStatusType(item.stockInStatus)">
+                  {{ item.stockInStatus || '-' }}
+                </u-tag>
+              </view>
+            </view>
+            <view class="detail-row">
               <text class="detail-label">鍚堝悓閲戦(鍏�)</text>
-              <text class="detail-value highlight">{{ item.contractAmount }}</text>
+              <text class="detail-value highlight">{{ formattedNumber(item.contractAmount) }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">瀹為檯鍚堝悓閲戦(鍏�)</text>
+              <text class="detail-value highlight">{{ formattedNumber(item.netContractAmount) }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">绛捐鏃ユ湡</text>
+              <text class="detail-value">{{ item.executionDate || '-' }}</text>
+            </view>
+            <view class="detail-row">
+              <text class="detail-label">澶囨敞</text>
+              <text class="detail-value">{{ item.remarks || '-' }}</text>
             </view>
             <up-divider></up-divider>
             <view class="detail-info">
@@ -77,20 +101,16 @@
               </view>
             </view>
             <!-- 浠呴潪鈥滃鎵归�氳繃鈥濈殑鍙拌处灞曠ず鍒犻櫎鎸夐挳 -->
-            <view
-              class="detail-row"
-              v-if="item.approvalStatus !== 3"
-              style="justify-content: flex-end; margin-top: 8px;"
-            >
-              <up-button
-                type="error"
-                size="small"
-                plain
-                @click.stop="handleDelete(item)"
-              >
+            <!-- <view class="detail-row"
+                  v-if="item.approvalStatus !== 3"
+                  style="justify-content: flex-end; margin-top: 8px;">
+              <up-button type="error"
+                         size="small"
+                         plain
+                         @click.stop="handleDelete(item)">
                 鍒犻櫎
               </up-button>
-            </view>
+            </view> -->
           </view>
         </view>
       </view>
@@ -100,12 +120,12 @@
       <text>鏆傛棤閲囪喘鍙拌处鏁版嵁</text>
     </view>
     <!-- 娴姩鎿嶄綔鎸夐挳 -->
-    <view class="fab-button"
+    <!-- <view class="fab-button"
           @click="handleInfo('add')">
       <up-icon name="plus"
                size="24"
                color="#ffffff"></up-icon>
-    </view>
+    </view> -->
   </view>
 </template>
 
@@ -114,7 +134,10 @@
   import { onShow } from "@dcloudio/uni-app";
   import useUserStore from "@/store/modules/user";
   import PageHeader from "@/components/PageHeader.vue";
-  import { purchaseListPage, delPurchase } from "@/api/procurementManagement/procurementLedger";
+  import {
+    purchaseListPage,
+    delPurchase,
+  } from "@/api/procurementManagement/procurementLedger";
   const userStore = useUserStore();
   const approvalStatusText = {
     1: "寰呭鏍�",
@@ -131,6 +154,31 @@
       4: "error", // 瀹℃壒澶辫触 - 绾㈣壊
     };
     return typeMap[status] || "";
+  };
+
+  const getStockInStatusType = status => {
+    const typeMap = {
+      寰呭叆搴�: "info",
+      鍏ュ簱涓�: "warning",
+      瀹屽叏鍏ュ簱: "success",
+    };
+    return typeMap[status] || "info";
+  };
+
+  const getStockInApprovalStatusType = status => {
+    const typeMap = {
+      寰呭叆搴�: "info",
+      鍏ュ簱涓�: "warning",
+      瀹屽叏鍏ュ簱: "success",
+    };
+    return typeMap[status] || "info";
+  };
+
+  const formattedNumber = value => {
+    if (value === undefined || value === null || value === "") {
+      return "0.00";
+    }
+    return parseFloat(value).toFixed(2);
   };
   // 鎼滅储鍏抽敭璇�
   const purchaseContractNumber = ref("");
@@ -154,7 +202,7 @@
       purchaseContractNumber: purchaseContractNumber.value,
     })
       .then(res => {
-        ledgerList.value = res.data.records;
+        ledgerList.value = res?.data?.records || [];
         closeToast();
       })
       .catch(() => {
@@ -180,6 +228,7 @@
     try {
       // 璁剧疆鎿嶄綔绫诲瀷
       uni.setStorageSync("operationType", type);
+      uni.removeStorageSync("editData");
 
       // 濡傛灉鏄煡鐪嬫垨缂栬緫鎿嶄綔
       if (type !== "add") {
@@ -265,7 +314,10 @@
               // 鍙湁鍦ㄧ湡姝e紓甯告椂锛屾墠鍦ㄨ繖閲屽厹搴曟彁绀�
               const msg =
                 (error && error.msg) ||
-                (error && error.response && error.response.data && error.response.data.msg) ||
+                (error &&
+                  error.response &&
+                  error.response.data &&
+                  error.response.data.msg) ||
                 (error && error.message) ||
                 "鍒犻櫎澶辫触";
               uni.showToast({

--
Gitblit v1.9.3