From 2ee69f2c07b7cdc5b1f209d3b4d9606374b94c25 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 02 十一月 2026 16:52:04 +0800
Subject: [PATCH] feat(erp): 采购/销售明细按含税单价口径联算,采购申请与申请采购单合并入口

---
 src/views/erp/purchase/order/modules/print.vue |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/views/erp/purchase/order/modules/print.vue b/src/views/erp/purchase/order/modules/print.vue
index f0cf2c9..23fd6ac 100644
--- a/src/views/erp/purchase/order/modules/print.vue
+++ b/src/views/erp/purchase/order/modules/print.vue
@@ -84,18 +84,19 @@
     : erpPriceMultiply(price, count);
 }
 
-/** 鏄庣粏琛岋細閲戦 = 鍗曚环 脳 鏁伴噺锛涚◣棰� = 閲戦 脳 绋庣巼锛涘惈绋庨噾棰� = 閲戦 + 绋庨 */
+/** 鏄庣粏琛岋紙鍗曚环涓哄惈绋庡崟浠凤級锛氬惈绋庢�讳环 = 鍗曚环 脳 鏁伴噺锛涚◣棰� = 鍚◣鎬讳环 脳 绋庣巼 梅锛�100 + 绋庣巼锛夛紱涓嶅惈绋庨噾棰� = 鍚◣鎬讳环 鈭� 绋庨 */
 const printRows = computed(() =>
   (printData.value.items || []).map((item) => {
-    const totalProductPrice =
-      item.totalProductPrice ??
-      multiplyPrice(item.productPrice, item.count) ??
-      0;
+    const totalPrice =
+      item.totalPrice ?? multiplyPrice(item.productPrice, item.count) ?? 0;
+    const taxPercent = item.taxPercent ?? 0;
     const taxPrice =
       item.taxPrice ??
-      multiplyPrice(totalProductPrice, (item.taxPercent ?? 0) / 100) ??
-      0;
-    const totalPrice = item.totalPrice ?? totalProductPrice + taxPrice;
+      (taxPercent > 0
+        ? Number(((totalPrice * taxPercent) / (100 + taxPercent)).toFixed(2))
+        : 0);
+    const totalProductPrice =
+      item.totalProductPrice ?? Number((totalPrice - taxPrice).toFixed(2));
     return { ...item, totalProductPrice, taxPrice, totalPrice };
   }),
 );
@@ -223,10 +224,10 @@
               鏁伴噺
             </th>
             <th class="border border-solid border-[#dcdfe6] bg-[#f5f7fa] p-2 text-right font-bold">
-              鍗曚环(鍏�)
+              鍚◣鍗曚环(鍏�)
             </th>
             <th class="border border-solid border-[#dcdfe6] bg-[#f5f7fa] p-2 text-right font-bold">
-              閲戦(鍏�)
+              涓嶅惈绋庨噾棰�(鍏�)
             </th>
             <th class="border border-solid border-[#dcdfe6] bg-[#f5f7fa] p-2 text-right font-bold">
               绋庣巼(%)

--
Gitblit v1.9.3