From bc79e1fae76dffb3cbc3ddfa9ba23e66e150d098 Mon Sep 17 00:00:00 2001
From: zhang_nuo <zhang_12370@163.com>
Date: 星期五, 28 八月 2026 23:18:27 +0800
Subject: [PATCH] fix: 调整多个业务模块的页面展示与字段

---
 src/views/procurementManagement/procurementLedger/index.vue |   64 ++++++++++++++++++++++++--------
 1 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 6fef889..10ff6e8 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -66,6 +66,10 @@
     </div>
     <div class="table_list">
       <div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
+        <el-button type="success"
+                   plain
+                   v-if="false"
+                   @click="handleBatchGenerate">鎵归噺鐢熸垚鏁版嵁</el-button>
         <el-button type="primary"
                    @click="openForm('add')">鏂板鍙拌处</el-button>
         <el-button type="primary"
@@ -121,7 +125,7 @@
               <el-table-column label="鍙敤鏁伴噺"
                                prop="availableQuality" />
               <el-table-column label="閫�璐ф暟閲�"
-                               prop="returnQuality" />
+                               prop="returnQuantity" />
               <el-table-column label="绋庣巼(%)"
                                prop="taxRate" />
               <el-table-column label="鍚◣鍗曚环(鍏�)"
@@ -144,10 +148,10 @@
                          prop="purchaseContractNumber"
                          width="160"
                          show-overflow-tooltip />
-        <el-table-column label="閿�鍞悎鍚屽彿"
-                         prop="salesContractNo"
-                         width="160"
-                         show-overflow-tooltip />
+<!--        <el-table-column label="閿�鍞悎鍚屽彿"-->
+<!--                         prop="salesContractNo"-->
+<!--                         width="160"-->
+<!--                         show-overflow-tooltip />-->
         <el-table-column label="渚涘簲鍟嗗悕绉�"
                          prop="supplierName"
                          width="160"
@@ -188,6 +192,11 @@
                          show-overflow-tooltip />
         <el-table-column label="鍚堝悓閲戦(鍏�)"
                          prop="contractAmount"
+                         width="200"
+                         show-overflow-tooltip
+                         :formatter="formattedNumber" />
+        <el-table-column label="瀹為檯鍚堝悓閲戦(鍏�)"
+                         prop="netContractAmount"
                          width="200"
                          show-overflow-tooltip
                          :formatter="formattedNumber" />
@@ -721,6 +730,7 @@
     getOptions,
     getPurchaseTemplateList,
     delPurchaseTemplate,
+    batchGeneratePurchaseInboundSteps,
   } from "@/api/procurementManagement/procurementLedger.js";
   import useFormData from "@/hooks/useFormData.js";
   const FileList = defineAsyncComponent(() =>
@@ -934,16 +944,7 @@
     },
   });
   const { form, rules } = toRefs(data);
-  const { form: searchForm } = useFormData({
-    ...data.searchForm,
-    // 璁剧疆褰曞叆鏃ユ湡鑼冨洿涓哄綋澶�
-    entryDate: [
-      dayjs().startOf("day").format("YYYY-MM-DD"),
-      dayjs().endOf("day").format("YYYY-MM-DD"),
-    ],
-    entryDateStart: dayjs().startOf("day").format("YYYY-MM-DD"),
-    entryDateEnd: dayjs().endOf("day").format("YYYY-MM-DD"),
-  });
+  const { form: searchForm } = useFormData(data.searchForm);
 
   // 浜у搧琛ㄥ崟寮规鏁版嵁
   const productFormVisible = ref(false);
@@ -1260,7 +1261,7 @@
   };
   // 涓昏〃鍚堣鏂规硶
   const summarizeMainTable = param => {
-    return proxy.summarizeTable(param, ["contractAmount"]);
+    return proxy.summarizeTable(param, ["contractAmount", "netContractAmount"]);
   };
   // 瀛愯〃鍚堣鏂规硶
   const summarizeProTable = param => {
@@ -1721,6 +1722,37 @@
       });
   };
 
+  const handleBatchGenerate = async () => {
+    if (selectedRows.value.length === 0) {
+      proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+      return;
+    }
+    const ids = selectedRows.value.map((item) => item.id);
+    
+    ElMessageBox.confirm("纭鎵归噺鐢熸垚鏁版嵁锛�", "鎵归噺鐢熸垚", {
+      confirmButtonText: "纭",
+      cancelButtonText: "鍙栨秷",
+      type: "info",
+    })
+      .then(() => {
+        proxy.$modal.loading("姝e湪鎵归噺鐢熸垚鏁版嵁锛岃绋嶅��...");
+        batchGeneratePurchaseInboundSteps({ ids })
+          .then((res) => {
+            proxy.$modal.msgSuccess("鎵归噺鐢熸垚鎴愬姛");
+            getList();
+          })
+          .catch(() => {
+            proxy.$modal.msgError("鎵归噺鐢熸垚澶辫触");
+          })
+          .finally(() => {
+            proxy.$modal.closeLoading();
+          });
+      })
+      .catch(() => {
+        proxy.$modal.msg("宸插彇娑�");
+      });
+  };
+
   // 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
   function getCurrentDate() {
     const today = new Date();

--
Gitblit v1.9.3