Browse Source

优化车辆配载和三方中转添加订单

dev
qb 1 month ago
parent
commit
33b47f3fa9
  1. 13
      src/views/distribution/artery/AddVehicleStowage.vue
  2. 41
      src/views/distribution/artery/addTripartiteTransfer.vue

13
src/views/distribution/artery/AddVehicleStowage.vue

@ -1902,6 +1902,19 @@ const handleAddWaybill = async (index: number) => {
item.totalNum = item.totalNum || 20;
item.planNum = item.stockNum;
item.loadingNum = 0;
let isContinue = false;
for (let i = 0; i < details.orderCodeList.length; i++) {
const val = details.orderCodeList[i];
if (item.orderCode + ',' + item.waybillNo !== val) continue;
isContinue = true;
break;
}
if (isContinue) continue;
_orderMap.push(item.orderCode + ',' + item.waybillNo);
_node.lineCarsOrderList.push(item);
}

41
src/views/distribution/artery/addTripartiteTransfer.vue

@ -1080,17 +1080,36 @@ const currentChange = pageNum => {
/** 加入调度池 */
const handleAddWaybill = () => {
details.selectionList.forEach(val => {
val.planNum = val.stockNum;
val.loadingNum = 0;
details.newData.push(val);
});
details.orderCodeList = [
...new Set([
...details.orderCodeList,
...details.selectionList.map(val => val.orderCode + ',' + val.waybillNo),
]),
];
const _orderMap = [];
for (let i = 0; i < details.selectionList.length; i++) {
const item = details.selectionList[i];
item.planNum = item.stockNum;
item.loadingNum = 0;
let isContinue = false;
for (let i = 0; i < details.orderCodeList.length; i++) {
const val = details.orderCodeList[i];
if (item.orderCode + ',' + item.waybillNo !== val) continue;
isContinue = true;
break;
}
if (isContinue) continue;
_orderMap.push(item.orderCode + ',' + item.waybillNo);
details.newData.push(item);
}
// details.selectionList.forEach(val => {
// val.planNum = val.stockNum;
// val.loadingNum = 0;
// details.newData.push(val);
// });
details.orderCodeList = [...new Set([...details.orderCodeList, ..._orderMap])];
console.log('details.orderCodeList :>> ', details.orderCodeList);
const orderCodes = details.selectionList.map(val => val.orderCode);

Loading…
Cancel
Save