From 8026fa1d855f1bffe3e93f6633e683ecc4481fe9 Mon Sep 17 00:00:00 2001
From: qb <1191961160@qq.com>
Date: Thu, 20 Feb 2025 11:34:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=8D=95=E5=BD=95?=
 =?UTF-8?q?=E5=8D=95=E9=85=8D=E9=80=81=E8=B4=B9=E4=B8=8D=E8=AE=A1=E7=AE=97?=
 =?UTF-8?q?bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/views/distribution/inventory/CreateOrder.vue | 10 ++++++----
 src/views/waybill/CreateZeroOrder.vue            | 10 ++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/views/distribution/inventory/CreateOrder.vue b/src/views/distribution/inventory/CreateOrder.vue
index 9752f5ff..e28aba0e 100644
--- a/src/views/distribution/inventory/CreateOrder.vue
+++ b/src/views/distribution/inventory/CreateOrder.vue
@@ -2868,11 +2868,13 @@ const destinationWarehouseNameChange = val => {
  * row -- 行数据
  * onlyComputedTrunline -- 是否只计算干线的价格
  */
-const handleComputed = (row: any, onlyComputedTrunline = false) => {
+const handleComputed = (row: any, onlyComputedTrunline = false, chargeType = null) => {
   const { template, trunkLine } = details.priceTemplate;
 
-  if (Boolean(isDisabled.value && template && trunkLine && !onlyComputedTrunline))
-    handleSpecialBrandPrice(row, trunkLine, template, !onlyComputedTrunline);
+  if (Boolean(isDisabled.value && template && trunkLine)) {
+    if (!chargeType && !onlyComputedTrunline)
+      handleSpecialBrandPrice(row, trunkLine, template, onlyComputedTrunline);
+  }
 
   details.query.goodsCode = '-' + details.totalObj.totalCount;
 
@@ -4592,7 +4594,7 @@ const handleAssignmentItemPrice = (value, isOnload = false, chargeType?: number
   }
 
   // 计算每行价格
-  if (!isOnload) handleComputed(value, !isOnload);
+  if (!isOnload) handleComputed(value, isOnload, chargeType);
 };
 
 /** 获取价格
diff --git a/src/views/waybill/CreateZeroOrder.vue b/src/views/waybill/CreateZeroOrder.vue
index 1a7d89ce..1c8d01f2 100644
--- a/src/views/waybill/CreateZeroOrder.vue
+++ b/src/views/waybill/CreateZeroOrder.vue
@@ -2158,11 +2158,13 @@ const handleFindGoods = async (goodsName, item, isClearId = 0) => {
  * row -- 行数据
  * onlyComputedTrunline -- 是否只计算干线的价格
  */
-const handleComputed = (row: any, onlyComputedTrunline = false) => {
+const handleComputed = (row: any, onlyComputedTrunline = false, chargeType = null) => {
   const { template, trunkLine } = details.priceTemplate;
 
-  if (Boolean(isDisabled.value && template && trunkLine && !onlyComputedTrunline))
-    handleSpecialBrandPrice(row, trunkLine, template, !onlyComputedTrunline);
+  if (Boolean(isDisabled.value && template && trunkLine)) {
+    if (!chargeType && !onlyComputedTrunline)
+      handleSpecialBrandPrice(row, trunkLine, template, onlyComputedTrunline);
+  }
 
   details.query.goodsCode = '-' + details.totalObj.totalCount;
 
@@ -3684,7 +3686,7 @@ const handleAssignmentItemPrice = (value, isOnload = false, chargeType?: number
   }
 
   // 计算每行价格
-  if (!isOnload) handleComputed(value, !isOnload);
+  if (!isOnload) handleComputed(value, isOnload, chargeType);
 };
 
 /** 获取价格