From 19f73dc4a398c5d89b6568ede10bf2804a43bbf8 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期三, 22 四月 2026 14:00:00 +0800
Subject: [PATCH] 阳光彩印web 修改销售合同号为订单编号

---
 src/views/procurementManagement/procurementInvoiceLedger/index.vue |   42 ++++++++++++++++++++++++++++--------------
 1 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/src/views/procurementManagement/procurementInvoiceLedger/index.vue b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
index 00ae65a..2e1e8fb 100644
--- a/src/views/procurementManagement/procurementInvoiceLedger/index.vue
+++ b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
@@ -151,7 +151,7 @@
       width: 150,
     },
     {
-      label: "閿�鍞悎鍚屽彿",
+      label: "璁㈠崟缂栧彿",
       prop: "salesContractNo",
       width: 150,
     },
@@ -185,7 +185,7 @@
       prop: "taxInclusiveTotalPrice",
       width: 200,
       formatData: (cell) => {
-        return cell ? parseFloat(cell).toFixed(2) : 0;
+        return cell ? parseFloat(cell).toFixed(3) : 0;
       },
     },
     {
@@ -198,7 +198,7 @@
       prop: "ticketsAmount",
       width: 200,
       formatData: (cell) => {
-        return cell ? parseFloat(cell).toFixed(2) : 0;
+        return cell ? parseFloat(cell).toFixed(3) : 0;
       },
     },
     {
@@ -206,7 +206,7 @@
       prop: "unTicketsPrice",
       width: 200,
       formatData: (cell) => {
-        return cell ? parseFloat(cell).toFixed(2) : 0;
+        return cell ? parseFloat(cell).toFixed(3) : 0;
       },
     },
     {
@@ -237,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