md
This commit is contained in:
parent
65bbe6a1c9
commit
b9529cab30
@ -888,16 +888,30 @@ export default {
|
|||||||
this.$modal.msgError("请输入单号");
|
this.$modal.msgError("请输入单号");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let billCodeArr=this.inputBatchBillCode.trim().split(/[;\;\,\,\n]/)||[];
|
|
||||||
|
// 剔除重复值,并剔除已存在列表中的数据
|
||||||
|
let addBillCodeArr=this.inputBatchBillCode.trim().split(/[;\;\,\,\n]/)||[];
|
||||||
|
let oldBillCodeArr=this.waitBatchDtlList.map(item=>{return item.billCode});
|
||||||
|
|
||||||
|
// 唯一值处理
|
||||||
|
const uniqueSet = new Set([...addBillCodeArr, ...oldBillCodeArr]);
|
||||||
|
const uniqueArr = [...uniqueSet];
|
||||||
|
|
||||||
|
// 剔除已存在的值
|
||||||
|
const billCodeArr = uniqueArr.filter(
|
||||||
|
item => !oldBillCodeArr.some(oldItem => item === oldItem)
|
||||||
|
);
|
||||||
|
|
||||||
for(let i = 0; i < billCodeArr.length; i++){
|
for(let i = 0; i < billCodeArr.length; i++){
|
||||||
let billcode = billCodeArr[i].trim();
|
let billcode = billCodeArr[i].trim();
|
||||||
if(this.waitBatchDtlList.filter(wb => wb.billCode == billcode).length == 0){
|
|
||||||
getEmisWaybillByBillCode(billcode).then(res=>{
|
getEmisWaybillByBillCode(billcode).then(res=>{
|
||||||
let item=res.data;
|
let item=res.data;
|
||||||
this.waitBatchDtlList.push(item);
|
this.waitBatchDtlList.push(item);
|
||||||
this.computeTotal();
|
this.computeTotal();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
// if(this.waitBatchDtlList.filter(wb => wb.billCode == billcode).length == 0){
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
this.titleBatch="";
|
this.titleBatch="";
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user