组批次调整、揽件前置

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;
}
}
// 把揽件移动到数组第一位
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;
});

View File

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