From d867e19fbe1e9e63464f376b183886941906f618 Mon Sep 17 00:00:00 2001 From: linfso Date: Sat, 25 May 2024 22:50:01 +0800 Subject: [PATCH] md --- src/views/emis/emisWaybill/waybillModify.vue | 60 +++++++++++++------- src/views/emis/emisWaybill/waybillRecord.vue | 59 ++++++++++++------- 2 files changed, 81 insertions(+), 38 deletions(-) diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 727339d3..5380a9a2 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -8,6 +8,7 @@
+ @@ -486,7 +487,7 @@ - + { + this.billCode=null; + this.form.billCode=null; this.initData(); }); } @@ -1105,16 +1108,19 @@ methods: { distinguishCancelAndClose: true, closeOnClickModal: false }).then(() => { + this.billCode=null; + this.form.billCode=null; this.initData(); }); } }, onDestCountryChange(item){ - this.form.reciever.country=item.code; + if(item){ + this.form.reciever.country=item.code; + } }, onSelectMonthUser(item){ - console.log(item); this.form.payee=item.payee; this.form.salesmen=item.salesmen; }, @@ -1169,7 +1175,6 @@ methods: { initData() { this.reset(); - console.log(this.billCode) if(this.billCode && this.billCode!=undefined) { this.loading = true; getWaybillDetail(this.billCode).then(response => { @@ -1181,6 +1186,9 @@ methods: { this.form.printTypeCheckList=[1,5] this.form.destinationCountry=this.form.reciever.country; + if(this.form.packType){ + this.form.packType=this.form.packType.split(","); + } }); }else{ @@ -1196,7 +1204,7 @@ methods: { // this.form.billWeight=1.0; // this.form.totalVolume=0.0; this.form.parcelQty=1; - this.form.packType='2'; + this.form.packType=['2']; this.form.blOverWeight='0'; this.form.blGenSubbill=1; this.form.paymentType='1'; @@ -1341,20 +1349,38 @@ methods: { } if(this.action=="modify" && this.billCode !=this.form.billCode){ - this.$modal.msgError("当前单号"+this.form.billCode+"与编辑单号"+this.billCode+"不一致,不允许提交"); - return ; + this.$confirm("当前单号"+this.form.billCode+"与修改单号"+this.billCode+"不一致,不允许提交!", '提示', { + confirmButtonText: '确认', + cancelButtonText: '返回', + type: 'warning' + }).then(() => { + this.calcDestSite(); + }).catch(() => { + + }) + }else{ + this.realSaveOrderInfo(); } - realSubmitOrder(this.form).then(response => { - this.$modal.msgSuccess("下单成功"); - - // 弹出打印预览界面 - this.handlePrintPreview(); - - // this.$emit("on-changed"); - }); } }); + }, + realSaveOrderInfo(){ + + // 调整包装类型为多选 + if(this.form.packType){ + this.form.packType=this.form.packType.join(","); + } + + + realSubmitOrder(this.form).then(response => { + this.$modal.msgSuccess("下单成功"); + + // 弹出打印预览界面 + this.handlePrintPreview(); + + // this.$emit("on-changed"); + }); }, // 弹出地址簿选择 handleSelectCustomerAddress(addressType){ @@ -1422,7 +1448,6 @@ methods: { if(this.form.reciever.province){ getDestSite(queryParams).then(response => { - console.log(response); this.form.destinationCode = response.data.destCode+''; this.form.dispatchSiteCode= response.data.siteCode; this.form.dispatchSite = response.data.siteName; @@ -1672,9 +1697,6 @@ methods: { cancelButtonText: '取消', type: 'warning' }).then(() => { - // let newList = this.form.cargoList.filter(item => item.goodsName !== row.goodsName); - // this.form.cargoList=newList; - console.log(index); this.form.cargoList.splice(index,1) this.handleCalcVolume(row); }).catch(() => { diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index 916675d9..fe3c7659 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -487,7 +487,7 @@ - + { + this.billCode=null; + this.form.billCode=null; this.initData(); }); } @@ -1106,16 +1108,19 @@ methods: { distinguishCancelAndClose: true, closeOnClickModal: false }).then(() => { + this.billCode=null; + this.form.billCode=null; this.initData(); }); } }, onDestCountryChange(item){ - this.form.reciever.country=item.code; + if(item){ + this.form.reciever.country=item.code; + } }, onSelectMonthUser(item){ - console.log(item); this.form.payee=item.payee; this.form.salesmen=item.salesmen; }, @@ -1170,7 +1175,6 @@ methods: { initData() { this.reset(); - console.log(this.billCode) if(this.billCode && this.billCode!=undefined) { this.loading = true; getWaybillDetail(this.billCode).then(response => { @@ -1182,6 +1186,9 @@ methods: { this.form.printTypeCheckList=[1,5] this.form.destinationCountry=this.form.reciever.country; + if(this.form.packType){ + this.form.packType=this.form.packType.split(","); + } }); }else{ @@ -1197,7 +1204,7 @@ methods: { // this.form.billWeight=1.0; // this.form.totalVolume=0.0; this.form.parcelQty=1; - this.form.packType='2'; + this.form.packType=['2']; this.form.blOverWeight='0'; this.form.blGenSubbill=1; this.form.paymentType='1'; @@ -1342,20 +1349,38 @@ methods: { } if(this.action=="modify" && this.billCode !=this.form.billCode){ - this.$modal.msgError("当前单号"+this.form.billCode+"与编辑单号"+this.billCode+"不一致,不允许提交"); - return ; + this.$confirm("当前单号"+this.form.billCode+"与修改单号"+this.billCode+"不一致,不允许提交!", '提示', { + confirmButtonText: '确认', + cancelButtonText: '返回', + type: 'warning' + }).then(() => { + this.calcDestSite(); + }).catch(() => { + + }) + }else{ + this.realSaveOrderInfo(); } - realSubmitOrder(this.form).then(response => { - this.$modal.msgSuccess("下单成功"); - - // 弹出打印预览界面 - this.handlePrintPreview(); - - // this.$emit("on-changed"); - }); } }); + }, + realSaveOrderInfo(){ + + // 调整包装类型为多选 + if(this.form.packType){ + this.form.packType=this.form.packType.join(","); + } + + + realSubmitOrder(this.form).then(response => { + this.$modal.msgSuccess("下单成功"); + + // 弹出打印预览界面 + this.handlePrintPreview(); + + // this.$emit("on-changed"); + }); }, // 弹出地址簿选择 handleSelectCustomerAddress(addressType){ @@ -1423,7 +1448,6 @@ methods: { if(this.form.reciever.province){ getDestSite(queryParams).then(response => { - console.log(response); this.form.destinationCode = response.data.destCode+''; this.form.dispatchSiteCode= response.data.siteCode; this.form.dispatchSite = response.data.siteName; @@ -1673,9 +1697,6 @@ methods: { cancelButtonText: '取消', type: 'warning' }).then(() => { - // let newList = this.form.cargoList.filter(item => item.goodsName !== row.goodsName); - // this.form.cargoList=newList; - console.log(index); this.form.cargoList.splice(index,1) this.handleCalcVolume(row); }).catch(() => {