From 6c0711ef3200ebcb2bdd35b9826eebcd02e2aec7 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期四, 26 三月 2026 16:59:00 +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