From a4d5b918a16f628dcb2e9699f5d1e3d2863cf471 Mon Sep 17 00:00:00 2001 From: linfso Date: Tue, 13 May 2025 17:50:31 +0800 Subject: [PATCH] md --- .../panel/BigBatchEditForm.vue | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue index b2ed73a5..9ae533fb 100644 --- a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue +++ b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue @@ -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;