From 71234f08cfeb183c605c00ef586e160919e2f69d Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 28 一月 2026 16:56:41 +0800
Subject: [PATCH] 进销存升级 1.供应商往来查询接口调整 2.采购报表添加导出接口联调 3.采购管理来票登记附件上传修改
---
src/views/salesManagement/receiptPayment/index.vue | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index 66af76a..a2a0b2f 100644
--- a/src/views/salesManagement/receiptPayment/index.vue
+++ b/src/views/salesManagement/receiptPayment/index.vue
@@ -433,7 +433,8 @@
specificationModel: row.specificationModel || "",
pendingInvoiceTotal: Number(row.pendingInvoiceTotal || 0),
taxRate: row.taxRate ?? "",
- receiptPaymentAmount: "",
+ // 榛樿鏈鍥炴閲戦 = 寰呭洖娆鹃噾棰�
+ receiptPaymentAmount: Number(row.pendingInvoiceTotal || 0),
receiptPaymentType: "",
registrant: userStore.nickName,
receiptPaymentDate: "",
@@ -518,6 +519,29 @@
// 淇濆瓨鍥炴璁板綍
const saveReceiptPayment = (row) => {
+ // 瀛愯〃鍥炴閲戦鍚堣鏍¢獙锛氭墍鏈夊洖娆捐褰曢噾棰濅箣鍜屼笉鑳藉ぇ浜庣埗鏁版嵁鍚堝悓閲戦
+ // 杩欓噷鐖舵暟鎹�滃悎鍚岄噾棰濃�濇寜锛氬凡鍥炴閲戦( invoiceTotal ) + 寰呭洖娆鹃噾棰�( pendingInvoiceTotal ) 璁$畻
+ const findParentRowByChildId = (childId) => {
+ return tableData.value.find((p) =>
+ Array.isArray(p.children) && p.children.some((c) => c.id === childId)
+ );
+ };
+ const parentRow = findParentRowByChildId(row.id);
+ if (parentRow) {
+ const contractAmount =
+ Number(parentRow.invoiceTotal || 0) + Number(parentRow.pendingInvoiceTotal || 0);
+ const sumReceipt = (parentRow.children || []).reduce((sum, item) => {
+ const val = Number(item?.receiptPaymentAmount ?? 0);
+ return sum + (Number.isFinite(val) ? val : 0);
+ }, 0);
+ if (sumReceipt > contractAmount) {
+ proxy.$modal.msgError(
+ `鍥炴閲戦鍚堣(${sumReceipt.toFixed(2)})涓嶈兘澶т簬鍚堝悓閲戦(${contractAmount.toFixed(2)})`
+ );
+ return;
+ }
+ }
+
let updateData = {
id: row.id,
receiptPaymentType: row.receiptPaymentType,
--
Gitblit v1.9.3