This commit is contained in:
linfso 2025-05-13 17:50:31 +08:00
parent b9fb5de71b
commit a4d5b918a1

View File

@ -664,6 +664,8 @@ export default {
},
async initData() {
console.log("==this.isCopy=>",this.isCopy);
if(this.batchId !=null) {
this.showBatchInfo(this.batchId);
this.coPackType = "edit";
@ -677,6 +679,7 @@ export default {
this.form.batchType='1';
this.coPackType = "add";
this.form.batchNo = null;
let resPack = await getTmsGroupBatchNo();
this.form.batchNo = resPack.data;
@ -727,15 +730,27 @@ export default {
async showBatchInfo(batchId){
this.coPackType="edit";
let response = await getEmisTmsSiteBatch(batchId);
if(!response || response.code != 200){
this.$modal.msgError(response && response.msg || "未知错误");
return;
}
this.form = {...response.data};
let batchNo=this.form.batchNo+'';
if(this.isCopy){
this.form.batchNo = null;
let resPack = await getTmsGroupBatchNo();
this.form.batchNo = resPack.data;
this.form.id = null;
this.coPackType = "add";
this.form.batchDate=parseTime(new Date());
}
this.emisCoPackDetail=[];
let resList = await listEmisTmsSiteBatchDtl({batchNo: this.form.batchNo});
let resList = await listEmisTmsSiteBatchDtl({batchNo: batchNo});
if(!resList || resList.code != 200){
this.$modal.msgError(resList && resList.msg || "未知错误");
return;
@ -749,7 +764,7 @@ export default {
this.form.packStatus = this.tempCoPackInfo.packStatus;
this.form.scanDate = this.tempCoPackInfo.scanDate;
let resLoadingList = await listEmisTmsSiteBatchLoading({batchNo: this.form.batchNo});
let resLoadingList = await listEmisTmsSiteBatchLoading({batchNo: batchNo});
if(!resLoadingList || resLoadingList.code != 200){
this.$modal.msgError(resLoadingList && resLoadingList.msg || "未知错误");
return;
@ -777,13 +792,9 @@ export default {
this.openForm= true;
this.titleForm = "修改组批次";
if(this.isCopy){
let resPack = await getTmsGroupBatchNo();
this.form.batchNo = resPack.data;
this.form.id = null;
this.coPackType = "add";
this.form.batchDate=parseTime(new Date());
}
console.log("===>111==>this.form===>",this.form);
},
getWaybillList(){
@ -1031,6 +1042,10 @@ export default {
this.form.id=null;
}
console.log("==this.form==>",this.form);
let response = await addEmisTmsSiteBatch(this.form);
if(!response || response.code != 200){
this.isDoing=false;