Browse Source

修复干线开单计算bug

dev-xx
qb 5 months ago
parent
commit
03d2c89303
  1. 18
      src/views/distribution/inventory/CreateOrder.vue
  2. 4
      src/views/waybill/CreateZeroOrder.vue

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

@ -3148,9 +3148,11 @@ const handlePickUpPrice = (pickup, template) => {
let _total = 0;
for (let i = 0; i < details.goodsList.length; i++) {
_total += computeNumber(_total, '+', details.goodsList[i].subtotalPickup || 0).result;
_total = computeNumber(_total, '+', details.goodsList[i].subtotalPickup || 0).result;
}
console.log('_total :>> ', _total);
//
if (
(pickup || template) &&
@ -3236,30 +3238,30 @@ const handleTrunkLinePrice = (trunkLine, template) => {
switch (Number(template.trunklineMinCostType)) {
//
case 1:
details.query.totalFreight = template.minCost > _total ? template.minCost : _total;
details.query.totalFreight = trunkLine.minCost > _total ? trunkLine.minCost : _total;
break;
//
case 2:
details.query.totalFreight =
template.minCost > details.totalObj.totalCount
? _total + (template.additionalCost || 0)
trunkLine.minCost > details.totalObj.totalCount
? _total + (trunkLine.minCost || 0)
: _total;
break;
//
case 3:
details.query.totalFreight =
template.minCost > details.totalObj.totalVolume
? _total + (template.additionalCost || 0)
trunkLine.minCost > details.totalObj.totalVolume
? _total + (trunkLine.minCost || 0)
: _total;
break;
//
case 4:
details.query.totalFreight =
template.minCost > details.totalObj.totalWeghit
? _total + (template.additionalCost || 0)
trunkLine.minCost > details.totalObj.totalWeghit
? _total + (trunkLine.minCost || 0)
: _total;
break;

4
src/views/waybill/CreateZeroOrder.vue

@ -2316,7 +2316,7 @@ const handlePickUpPrice = (pickup, template) => {
let _total = 0;
for (let i = 0; i < details.goodsList.length; i++) {
_total += computeNumber(_total, '+', details.goodsList[i].subtotalPickup || 0).result;
_total = computeNumber(_total, '+', details.goodsList[i].subtotalPickup || 0).result;
}
//
@ -2452,7 +2452,7 @@ const handleDispatchPrice = (dispatch, template) => {
for (let i = 0; i < details.goodsList.length; i++) {
const value = details.goodsList[i];
if (value.subtotalDispatch)
_total += computeNumber(_total, '+', value.subtotalDispatch || 0).result;
_total = computeNumber(_total, '+', value.subtotalDispatch || 0).result;
}
//

Loading…
Cancel
Save