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