货物组批次参数调整

This commit is contained in:
wuteng 2025-06-19 17:51:19 +08:00
parent 883b077d6f
commit d3b99b8ccd
2 changed files with 33 additions and 28 deletions

View File

@ -37,6 +37,14 @@ export function addEmisTmsSiteBatch(data) {
data: data
})
}
//货物组批次保存
export function addAllEmisTmsSiteBatch(data) {
return request({
url: '/emis/emisTmsSiteBatch/addAll',
method: 'post',
data: data
})
}
// 修改一级网点TMS组批次
export function updateEmisTmsSiteBatch(data) {

View File

@ -360,7 +360,7 @@
import { listEmisTmsSiteBatch,
getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch,
addEmisTmsSiteBatch, updateEmisTmsSiteBatch,
scanSiteBatch
scanSiteBatch, addAllEmisTmsSiteBatch
} from "@/api/emis/emisTmsSiteBatch";
import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl";
@ -1028,7 +1028,7 @@ export default {
if (valid) {
this.handleAddCoPack();
}
});
});
},
async handleAddCoPack(){
@ -1046,18 +1046,8 @@ export default {
if(this.isCopy){
this.form.id=null;
}
console.log("==this.form==>",this.form);
let response = await addEmisTmsSiteBatch(this.form);
if(!response || response.code != 200){
this.isDoing=false;
this.$modal.msgError(response && response.msg || '新增组批次失败')
return;
}
this.form.batchDtlList=[];
this.form.loadingList=[];
for(let i = 0; i< this.emisCoPackDetail.length;i++){
let packDetail = {
batchNo:this.form.batchNo,
@ -1068,13 +1058,13 @@ export default {
scanMan: this.emisCoPackDetail[i].scanMan,
scanSite: this.emisCoPackDetail[i].scanSite,
};
let response = await addEmisTmsSiteBatchDtl(packDetail);
if(!response || response.code != 200){
this.isDoing=false;
this.$modal.msgError(response && response.msg || '组批次明细新增失败')
return;
}
this.form.batchDtlList.push(packDetail);
// let response = await addEmisTmsSiteBatchDtl(packDetail);
// if(!response || response.code != 200){
// this.isDoing=false;
// this.$modal.msgError(response && response.msg || '组批次明细新增失败')
// return;
// }
this.waitPackList=[];
}
@ -1091,15 +1081,22 @@ export default {
remark:"",
tenantId:"",
}
let resLD = await addEmisTmsSiteBatchLoading(batchLoadingData);
if(!resLD || resLD.code != 200){
this.isDoing=false;
this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
return;
}
this.form.loadingList.push(batchLoadingData);
// let resLD = await addEmisTmsSiteBatchLoading(batchLoadingData);
// if(!resLD || resLD.code != 200){
// this.isDoing=false;
// this.$modal.msgError(resLD && resLD.msg || '组批次配载明细新增失败')
// return;
// }
}
}
let response = await addAllEmisTmsSiteBatch(this.form);
if(!response || response.code != 200){
this.isDoing=false;
this.$modal.msgError(response && response.msg || '新增组批次失败')
return;
}
// 批次重算
try{
let resScan=await scanSiteBatch(this.form.batchNo);