From b41552e7d56a7068e9080a475baaef9c173f8b7e Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 22 四月 2026 15:22:31 +0800
Subject: [PATCH] feat(生产报工): 支持多班组成员选择和补产数量录入

---
 src/views/procurementManagement/procurementInvoiceLedger/index.vue |   55 +++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 37 insertions(+), 18 deletions(-)

diff --git a/src/views/procurementManagement/procurementInvoiceLedger/index.vue b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
index b90ef0d..2e1e8fb 100644
--- a/src/views/procurementManagement/procurementInvoiceLedger/index.vue
+++ b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
@@ -62,16 +62,16 @@
           <el-button
             type="primary"
             link
-            @click="downLoadFile(row)"
+            @click="openEdit(row)"
           >
-            闄勪欢
+            缂栬緫
           </el-button>
           <el-button
             type="primary"
             link
-            @click="openEdit(row)"
+            @click="downLoadFile(row)"
           >
-            缂栬緫
+            闄勪欢
           </el-button>
           <el-button
             type="primary"
@@ -151,7 +151,7 @@
       width: 150,
     },
     {
-      label: "閿�鍞悎鍚屽彿",
+      label: "璁㈠崟缂栧彿",
       prop: "salesContractNo",
       width: 150,
     },
@@ -164,6 +164,11 @@
       label: "渚涘簲鍟嗗悕绉�",
       prop: "supplierName",
       width: 240,
+    },
+    {
+      label: "浜у搧澶х被",
+      prop: "productCategory",
+      width: 150,
     },
     {
       label: "瑙勬牸鍨嬪彿",
@@ -180,7 +185,7 @@
       prop: "taxInclusiveTotalPrice",
       width: 200,
       formatData: (cell) => {
-        return cell ? parseFloat(cell).toFixed(2) : 0;
+        return cell ? parseFloat(cell).toFixed(3) : 0;
       },
     },
     {
@@ -193,7 +198,7 @@
       prop: "ticketsAmount",
       width: 200,
       formatData: (cell) => {
-        return cell ? parseFloat(cell).toFixed(2) : 0;
+        return cell ? parseFloat(cell).toFixed(3) : 0;
       },
     },
     {
@@ -201,7 +206,7 @@
       prop: "unTicketsPrice",
       width: 200,
       formatData: (cell) => {
-        return cell ? parseFloat(cell).toFixed(2) : 0;
+        return cell ? parseFloat(cell).toFixed(3) : 0;
       },
     },
     {
@@ -232,21 +237,35 @@
   }
 );
 
-// 涓昏〃鍚堣鏂规硶
 const summarizeMainTable = (param) => {
-  return proxy.summarizeTable(
+  const sums = proxy.summarizeTable(
     param,
-    [
-      "taxInclusiveTotalPrice",
-      "ticketsAmount",
-      "unTicketsPrice",
-      "invoiceAmount",
-    ],
+    ["ticketsAmount", "unTicketsPrice", "invoiceAmount"],
     {
-      ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
-      futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+      ticketsAmount: { decimalPlaces: 3 },
+      unTicketsPrice: { decimalPlaces: 3 },
+      invoiceAmount: { decimalPlaces: 3 },
+      ticketsNum: { noDecimal: true },
+      futureTickets: { noDecimal: true },
     }
   );
+
+  const keySet = new Set();
+  let taxInclusiveSum = 0;
+  (param.data || []).forEach((row) => {
+    const key = `${row.purchaseContractNumber ?? ""}\n${row.salesContractNo ?? ""}\n${row.productCategory ?? ""}\n${row.specificationModel ?? ""}`;
+    if (keySet.has(key)) return;
+    keySet.add(key);
+    const val = Number(row.taxInclusiveTotalPrice);
+    if (!isNaN(val)) taxInclusiveSum += val;
+  });
+  const taxInclusiveIndex = (param.columns || []).findIndex(
+    (c) => c.property === "taxInclusiveTotalPrice"
+  );
+  if (taxInclusiveIndex !== -1) {
+    sums[taxInclusiveIndex] = taxInclusiveSum.toFixed(3);
+  }
+  return sums;
 };
 
 const handleSelectionChange = (val) => {

--
Gitblit v1.9.3