组批次调整、揽件前置

This commit is contained in:
wuteng 2025-06-23 21:51:52 +08:00
parent df1a166859
commit 2cd3335877
2 changed files with 21 additions and 6 deletions

View File

@ -118,7 +118,14 @@ export default {
break; break;
} }
} }
// 把揽件移动到数组第一位
const index = this.scanRecordList.findIndex(item => item.scanType == 10);
if (index !== -1) {
const item = this.scanRecordList[index];
this.scanRecordList.splice(index, 1);
this.scanRecordList.unshift(item);
}
this.loading = false; this.loading = false;
}); });

View File

@ -1189,8 +1189,8 @@ export default {
return; return;
} }
let item = billRes.rows[0]; let item = billRes.rows[0];
this.emisCoPackDetail.push(item); if(this.coPackType=="edit")
if(this.coPackType=="edit"){ {
let packDetail = { let packDetail = {
batchNo: this.form.batchNo, batchNo: this.form.batchNo,
billCode: item.billCode, billCode: item.billCode,
@ -1202,11 +1202,19 @@ export default {
createBy: this.$store.getters.empCode, createBy: this.$store.getters.empCode,
createTime: parseTime(new Date()) createTime: parseTime(new Date())
}; };
let response = await addEmisTmsSiteBatchDtl(packDetail); try{
if(!response || response.code != 200){ let response = await addEmisTmsSiteBatchDtl(packDetail);
this.$modal.msgError(response && response.msg || '组批次明细新增失败') }catch(e){
console.log('e',e)
return; return;
} }
this.emisCoPackDetail.push(item);
// if(!response || response.code != 200){
// this.$modal.msgError(response && response.msg || '组批次明细新增失败')
// return;
// }
}else{
this.emisCoPackDetail.push(item);
} }
} }
} }