|
|
|
@ -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); |
|
|
|
|