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/sale/order/modules/print.vue |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/views/erp/sale/order/modules/print.vue b/src/views/erp/sale/order/modules/print.vue
index fb64923..acb5c66 100644
--- a/src/views/erp/sale/order/modules/print.vue
+++ b/src/views/erp/sale/order/modules/print.vue
@@ -99,16 +99,21 @@
 }
 
 /**
- * 鏄庣粏琛岋紙鍚庣涓嶈繑鍥炴槑缁嗚鐨� totalProductPrice/totalPrice锛岄渶鎸夊崟浠访楁暟閲忚绠楋細
- * 閲戦 = 鍗曚环 脳 鏁伴噺锛涚◣棰� = 閲戦 脳 绋庣巼锛涘惈绋庨噾棰� = 閲戦 + 绋庨锛�
+ * 鏄庣粏琛岋紙鍗曚环涓哄惈绋庡崟浠凤級锛�
+ * 鍚◣鎬讳环 = 鍗曚环 脳 鏁伴噺锛涚◣棰� = 鍚◣鎬讳环 脳 绋庣巼 梅锛�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;
+      item.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 };
   }),
 );
@@ -262,12 +267,12 @@
             <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