From 6e0aa101e90008a0be14a6d60716acc18caf7ffc Mon Sep 17 00:00:00 2001
From: ZN <zhang_12370@163.com>
Date: 星期三, 25 三月 2026 14:37:05 +0800
Subject: [PATCH] fix: 修复发货台账显示与采购/销售台账计算逻辑
---
src/views/procurementManagement/procurementLedger/index.vue | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 1432657..c28276d 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -1699,8 +1699,12 @@
productForm.value.taxInclusiveUnitPrice,
productForm.value.quantity
);
- // 浼樺寲锛氫娇甯︾◣鍜屼笉甯︾◣浠锋牸涓�鑷�
- productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
+
+ // 鏍规嵁绋庣巼璁$畻涓嶅惈绋庢�讳环
+ const taxRate = Number(productForm.value.taxRate) || 0;
+ productForm.value.taxExclusiveTotalPrice = (
+ Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100)
+ ).toFixed(2);
};
const reverseMathNum = field => {
// 纭繚杈撳叆鍊间笉涓鸿礋鏁�
@@ -1715,6 +1719,8 @@
return;
}
}
+
+ const taxRate = Number(productForm.value.taxRate) || 0;
if (field === "taxInclusiveTotalPrice") {
// 宸茬煡鍚◣鎬讳环鍜屾暟閲忥紝鍙嶇畻鍚◣鍗曚环
@@ -1739,11 +1745,16 @@
productForm.value.quantity = "0";
}
}
- // 浼樺寲锛氫娇甯︾◣鍜屼笉甯︾◣浠锋牸涓�鑷�
- productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
+ // 鏍规嵁绋庣巼璁$畻涓嶅惈绋庢�讳环
+ productForm.value.taxExclusiveTotalPrice = (
+ Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100)
+ ).toFixed(2);
} else if (field === "taxExclusiveTotalPrice") {
- // 浼樺寲锛氫娇甯︾◣鍜屼笉甯︾◣浠锋牸涓�鑷�
- productForm.value.taxInclusiveTotalPrice = productForm.value.taxExclusiveTotalPrice;
+ // 鏍规嵁绋庣巼璁$畻鍚◣鎬讳环
+ productForm.value.taxInclusiveTotalPrice = (
+ Number(productForm.value.taxExclusiveTotalPrice) * (1 + taxRate / 100)
+ ).toFixed(2);
+
// 宸茬煡鏁伴噺锛屽弽绠楀惈绋庡崟浠�
if (productForm.value.quantity) {
productForm.value.taxInclusiveUnitPrice = (
--
Gitblit v1.9.3