From 3aba73bcb697191ebd2e8e3410ea3345c681c963 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 11 二月 2026 13:16:11 +0800
Subject: [PATCH] fix: 合同金额去重添加产品大类、规格型号
---
src/views/procurementManagement/procurementInvoiceLedger/index.vue | 44 ++++++++++++++++++++++++++++++--------------
1 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/src/views/procurementManagement/procurementInvoiceLedger/index.vue b/src/views/procurementManagement/procurementInvoiceLedger/index.vue
index b90ef0d..d82e3e7 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"
@@ -166,6 +166,11 @@
width: 240,
},
{
+ label: "浜у搧澶х被",
+ prop: "productCategory",
+ width: 150,
+ },
+ {
label: "瑙勬牸鍨嬪彿",
prop: "specificationModel",
width: 150,
@@ -232,21 +237,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) => {
--
Gitblit v1.9.3