From 975af7c3bbc8f987bec3cc160fff40022f3fcb2c Mon Sep 17 00:00:00 2001
From: qb <1191961160@qq.com>
Date: Wed, 23 Oct 2024 00:28:31 +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=95bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../distribution/inventory/CreateOrder.vue | 57 ++++++++++---------
src/views/waybill/CreateZeroOrder.vue | 22 +++----
2 files changed, 41 insertions(+), 38 deletions(-)
diff --git a/src/views/distribution/inventory/CreateOrder.vue b/src/views/distribution/inventory/CreateOrder.vue
index f9ea4cb1..49a3099e 100644
--- a/src/views/distribution/inventory/CreateOrder.vue
+++ b/src/views/distribution/inventory/CreateOrder.vue
@@ -519,25 +519,27 @@
:key="item"
>
-
+
+
+
+
+
+
+
({
},
});
+details.deepQuery = deepClone(details.query);
+
/** 是否禁用 */
const isDisabled = computed(() => {
if (getObjType(details.priceTemplate) !== 'object') return false;
@@ -2344,7 +2348,7 @@ const onEditLoad = async () => {
val.goodsListOptions = [];
// 计算运费小计
- if (!val.subtotalFreight) handleComputed(val);
+ // if (!val.subtotalFreight) handleComputed(val);
// 计算件数最大值
info.value.maxNum += val.num;
@@ -3069,7 +3073,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
}
// 是否存在最低计费
- if ((trunkLine || template) && template.trunklineIsMinCost) {
+ if (trunkLine && template && template.trunklineIsMinCost) {
switch (Number(template.trunklineMinCostType)) {
// 价格
case 1:
@@ -3080,7 +3084,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
case 2:
details.query.totalFreight =
trunkLine.minCost > details.totalObj.totalCount
- ? _total + (trunkLine.minCost || 0)
+ ? computeNumber(_total, '+', trunkLine.minCost || 0).result
: _total;
break;
@@ -3088,7 +3092,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
case 3:
details.query.totalFreight =
trunkLine.minCost > details.totalObj.totalVolume
- ? _total + (trunkLine.minCost || 0)
+ ? computeNumber(_total, '+', trunkLine.minCost || 0).result
: _total;
break;
@@ -3096,7 +3100,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
case 4:
details.query.totalFreight =
trunkLine.minCost > details.totalObj.totalWeghit
- ? _total + (trunkLine.minCost || 0)
+ ? computeNumber(_total, '+', trunkLine.minCost || 0).result
: _total;
break;
@@ -3104,13 +3108,14 @@ const handleTrunkLinePrice = (trunkLine, template) => {
break;
}
} else details.query.totalFreight = _total;
+ console.log('_total :>> ', _total);
}
};
/** 处理配送费 */
const handleDispatchPrice = (dispatch, template) => {
// 是否存在模板和维护价格
- if (!dispatch || !template) return;
+ if (!dispatch || !template) return (details.query.deliveryFee = 0);
// 根据订单号分组
const _orderObj = {};
@@ -4354,8 +4359,6 @@ const handleChooseGoods = (item, val) => {
handleCloseSelcet();
};
-details.deepQuery = deepClone(details.query);
-
details.orderStatus = $route.query.orderStatus;
details.submitType = $route.query.orderStatus;
diff --git a/src/views/waybill/CreateZeroOrder.vue b/src/views/waybill/CreateZeroOrder.vue
index 299e99c1..71a3bfb1 100644
--- a/src/views/waybill/CreateZeroOrder.vue
+++ b/src/views/waybill/CreateZeroOrder.vue
@@ -1849,7 +1849,7 @@ const initPageInfo = async () => {
val.goodsListOptions = [];
// 计算运费小计
- if (!val.subtotalFreight) handleComputed(val);
+ // if (!val.subtotalFreight) handleComputed(val);
// 计算件数最大值
details.deepCloneGoodsList.push({ ...val });
@@ -2333,7 +2333,7 @@ const handlePickUpPrice = (pickup, template) => {
case 2:
details.query.pickupFee =
pickup.minCost > details.totalObj.totalCount
- ? _total + (pickup.additionalCost || 0)
+ ? computeNumber(_total, '+', pickup.additionalCost || 0).result
: _total;
break;
@@ -2341,7 +2341,7 @@ const handlePickUpPrice = (pickup, template) => {
case 3:
details.query.pickupFee =
pickup.minCost > details.totalObj.totalVolume
- ? _total + (pickup.additionalCost || 0)
+ ? computeNumber(_total, '+', pickup.additionalCost || 0).result
: _total;
break;
@@ -2349,7 +2349,7 @@ const handlePickUpPrice = (pickup, template) => {
case 4:
details.query.pickupFee =
pickup.minCost > details.totalObj.totalWeghit
- ? _total + (pickup.additionalCost || 0)
+ ? computeNumber(_total, '+', pickup.additionalCost || 0).result
: _total;
break;
@@ -2410,7 +2410,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
case 2:
details.query.totalFreight =
trunkLine.minCost > details.totalObj.totalCount
- ? _total + (trunkLine.additionalCost || 0)
+ ? computeNumber(_total, '+', trunkLine.additionalCost || 0).result
: _total;
break;
@@ -2418,7 +2418,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
case 3:
details.query.totalFreight =
trunkLine.minCost > details.totalObj.totalVolume
- ? _total + (trunkLine.additionalCost || 0)
+ ? computeNumber(_total, '+', trunkLine.additionalCost || 0).result
: _total;
break;
@@ -2426,7 +2426,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
case 4:
details.query.totalFreight =
trunkLine.minCost > details.totalObj.totalWeghit
- ? _total + (trunkLine.additionalCost || 0)
+ ? computeNumber(_total, '+', trunkLine.additionalCost || 0).result
: _total;
break;
@@ -2440,7 +2440,7 @@ const handleTrunkLinePrice = (trunkLine, template) => {
/** 处理配送费 */
const handleDispatchPrice = (dispatch, template) => {
// 是否存在模板和维护价格
- if (!dispatch || !template) return;
+ if (!dispatch || !template) return (details.query.deliveryFee = 0);
console.log('dispatch :>> ', dispatch);
@@ -2470,7 +2470,7 @@ const handleDispatchPrice = (dispatch, template) => {
case 2:
details.query.deliveryFee =
dispatch.minCost > details.totalObj.totalCount
- ? _total + (dispatch.additionalCost || 0)
+ ? computeNumber(_total, '+', dispatch.additionalCost || 0).result
: _total;
break;
@@ -2478,7 +2478,7 @@ const handleDispatchPrice = (dispatch, template) => {
case 3:
details.query.deliveryFee =
dispatch.minCost > details.totalObj.totalVolume
- ? _total + (dispatch.additionalCost || 0)
+ ? computeNumber(_total, '+', dispatch.additionalCost || 0).result
: _total;
break;
@@ -2486,7 +2486,7 @@ const handleDispatchPrice = (dispatch, template) => {
case 4:
details.query.deliveryFee =
dispatch.minCost > details.totalObj.totalWeghit
- ? _total + (dispatch.additionalCost || 0)
+ ? computeNumber(_total, '+', dispatch.additionalCost || 0).result
: _total;
break;