From 6749fc51f07d9824640c4c2508ff242b8850a323 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 21 四月 2026 10:44:01 +0800
Subject: [PATCH] 湟水峡 1.bug修改

---
 src/views/procurementManagement/procurementInvoiceLedger/index.vue |   67 ++++++++++++++++++++++-----------
 1 files changed, 45 insertions(+), 22 deletions(-)

diff --git a/src/views/procurementManagement/procurementInvoiceLedger/index.vue b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
index b90ef0d..f0ea539 100644
--- a/src/views/procurementManagement/procurementInvoiceLedger/index.vue
+++ b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
@@ -34,6 +34,17 @@
           @change="getTableData"
         />
       </el-form-item>
+      <el-form-item label="鏉ョエ閲戦">
+        <el-input-number
+          v-model="filters.ticketsAmount"
+          style="width: 180px"
+          placeholder="璇疯緭鍏�"
+          :min="0"
+          :precision="2"
+          clearable
+          @change="getTableData"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="getTableData">鎼滅储</el-button>
         <el-button @click="resetFilters"> 閲嶇疆 </el-button>
@@ -62,16 +73,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"
@@ -143,6 +154,7 @@
     purchaseContractNumber: undefined, // 閲囪喘鍚堝悓鍙�
     supplierName: undefined, // 渚涘簲鍟�
     createdAt: [], // 鏉ョエ鏃ユ湡
+    ticketsAmount: undefined, // 鏉ョエ閲戦
   },
   [
     {
@@ -156,14 +168,14 @@
       width: 150,
     },
     {
-      label: "椤圭洰鍚嶇О",
-      prop: "projectName",
-      width: 240,
-    },
-    {
       label: "渚涘簲鍟嗗悕绉�",
       prop: "supplierName",
       width: 240,
+    },
+    {
+      label: "浜у搧澶х被",
+      prop: "productCategory",
+      width: 150,
     },
     {
       label: "瑙勬牸鍨嬪彿",
@@ -184,12 +196,12 @@
       },
     },
     {
-      label: "寮�绁ㄦ棩鏈�",
+      label: "鏉ョエ鏃ユ湡",
       prop: "createdAt",
       width: 110,
     },
     {
-      label: "寮�绁ㄩ噾棰�",
+      label: "鏉ョエ閲戦",
       prop: "ticketsAmount",
       width: 200,
       formatData: (cell) => {
@@ -232,21 +244,32 @@
   }
 );
 
-// 涓昏〃鍚堣鏂规硶
 const summarizeMainTable = (param) => {
-  return proxy.summarizeTable(
+  const sums = proxy.summarizeTable(
     param,
-    [
-      "taxInclusiveTotalPrice",
-      "ticketsAmount",
-      "unTicketsPrice",
-      "invoiceAmount",
-    ],
+    ["ticketsAmount", "unTicketsPrice", "invoiceAmount"],
     {
-      ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
-      futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+      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(2);
+  }
+  return sums;
 };
 
 const handleSelectionChange = (val) => {
@@ -419,7 +442,7 @@
 const handleDelete = (row) => {
 	let ids = [];
 	ids.push(row.id);
-	ElMessageBox.confirm("璇ュ紑绁ㄥ彴璐﹀皢琚垹闄�,鏄惁纭鍒犻櫎", {
+	ElMessageBox.confirm("璇ユ潵绁ㄥ彴璐﹀皢琚垹闄�,鏄惁纭鍒犻櫎", {
 		confirmButtonText: "纭",
 		cancelButtonText: "鍙栨秷",
 		type: "warning",

--
Gitblit v1.9.3