Browse Source

修复开单录单bug

dev-xx
qb 4 months ago
parent
commit
975af7c3bb
  1. 57
      src/views/distribution/inventory/CreateOrder.vue
  2. 22
      src/views/waybill/CreateZeroOrder.vue

57
src/views/distribution/inventory/CreateOrder.vue

@ -519,25 +519,27 @@
:key="item"
>
<!-- 加减按钮 -->
<!-- <div style="width: 55px; flex: none" class="flex-c-c">
<el-button
v-if="index === 0"
@click="handleAdd"
icon="Plus"
type="primary"
size="small"
circle
></el-button>
<el-button
v-else
@click="handleRemove(index)"
icon="Minus"
type="primary"
size="small"
circle
></el-button>
</div> -->
<template v-if="details.submitType === 'notaveData'">
<div style="width: 55px; flex: none" class="flex-c-c">
<el-button
v-if="index === 0"
@click="handleAdd"
icon="Plus"
type="primary"
size="small"
circle
></el-button>
<el-button
v-else
@click="handleRemove(index)"
icon="Minus"
type="primary"
size="small"
circle
></el-button>
</div>
</template>
<div>
<el-form-item
@ -1947,6 +1949,8 @@ const details = reactive<any>({
},
});
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;

22
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;

Loading…
Cancel
Save