From 48ee86f7f58bf16be06fc8d7f88fdbdf4ffd6b82 Mon Sep 17 00:00:00 2001 From: wuteng <419274783@qq.com> Date: Wed, 25 Jun 2025 17:39:08 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=BF=90=E5=8D=95=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E3=80=81=E6=8E=A5=E5=8D=95=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E9=A6=99=E6=B8=AF=E5=88=B0=E7=BC=85=E7=94=B8=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/emis/emisWaybill/waybillGot.vue | 14 +++++---- src/views/emis/emisWaybill/waybillModify.vue | 30 +++++++++++--------- src/views/emis/emisWaybill/waybillRecord.vue | 24 ++++++++-------- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/src/views/emis/emisWaybill/waybillGot.vue b/src/views/emis/emisWaybill/waybillGot.vue index 9b390a14..4ddb3e1e 100644 --- a/src/views/emis/emisWaybill/waybillGot.vue +++ b/src/views/emis/emisWaybill/waybillGot.vue @@ -525,12 +525,12 @@ - + 是否为虚拟单 - + @@ -1595,6 +1595,10 @@ methods: { } this.form = response.data; + //处理始发网点为空 始发网点等于寄件网点 + if(!this.form.startSiteCode || this.form.startSiteCode.trim()==''){ + this.form.startSiteCode=this.form.sendSiteCode; + } if(this.form.lockFlag=="T"&&this.action!='got'){ this.$confirm(this.form.lockReason, '提示', { confirmButtonText: '确认', @@ -1806,11 +1810,11 @@ methods: { }, onProductChange(item,transType){ //非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单 - if(!['002','012','014'].includes(item[0])){ + if(!['002','012','014','078'].includes(item[0])){ this.form.masterBillCode = null; this.form.blVirtual = null; } - if(item[0]!=='002' && this.form.remark && this.form.remark!==null){ + if(item && !['002','078'].includes(item[0]) && this.form.remark && this.form.remark!==null){ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } if(item!=null && item.length==2){ @@ -2443,7 +2447,7 @@ methods: { if (val) { this.form.masterBillCode = val.value; this.masterBillProductType = val.productType; - if (this.form.transLine === '002') { + if (['002', '078'].includes(this.form.transLine)) { if (this.form.remark==null || this.form.remark.trim() === '') { //生成备注 this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`; diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 9771e996..02a40eb0 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -527,12 +527,12 @@ - + 是否为虚拟单 - + @@ -1583,6 +1583,10 @@ methods: { } this.form = response.data; + //处理始发网点为空 始发网点等于寄件网点的值 + if(!this.form.startSiteCode || this.form.startSiteCode.trim()==''){ + this.form.startSiteCode=this.form.sendSiteCode; + } if(this.form.lockFlag=="T"&&this.action!='got'){ this.$confirm(this.form.lockReason, '提示', { confirmButtonText: '确认', @@ -1798,11 +1802,11 @@ methods: { }, onProductChange(item,transType){ //非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单 - if(!['002','012','014'].includes(item[0])){ + if(!['002','012','014','078'].includes(item[0])){ this.form.masterBillCode = null; this.form.blVirtual = null; } - if(item[0]!=='002' && this.form.remark && this.form.remark!==null){ + if(item && !['002','078'].includes(item[0]) && this.form.remark && this.form.remark!==null){ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } if(item!=null && item.length==2){ @@ -2438,13 +2442,13 @@ methods: { this.form.billCode="" } }, - //获取虚拟运单关联主单 + //获取虚拟运单关联主单 onMasterBillCodeChange(val) { if (val) { this.form.masterBillCode = val.value; this.masterBillProductType = val.productType; - if (this.form.transLine === '002') { - if (this.form.remark==null || this.form.remark.trim() === '') { + if (['002', '078'].includes(this.form.transLine)) { + if (this.form.remark == null || this.form.remark.trim() === '') { //生成备注 this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`; } else { @@ -2453,19 +2457,19 @@ methods: { this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value); } else { //判断结尾是不是逗号 - if(!this.form.remark.endsWith(',')){ - this.form.remark = this.form.remark +','; + if (!this.form.remark.endsWith(',')) { + this.form.remark = this.form.remark + ','; } - this.form.remark =this.form.remark + '该单为虚拟单:对应主单为' + val.value; + this.form.remark = this.form.remark + '该单为虚拟单:对应主单为' + val.value; } } } else { //删除备注中虚拟单部分 this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } - }else { - //删除备注中虚拟单部分 - this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + } else { + //删除备注中虚拟单部分 + this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } }, //虚拟单变化 diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index d06da126..a876b8e1 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -529,12 +529,12 @@ - + 是否为虚拟单 - + @@ -1803,11 +1803,11 @@ methods: { }, onProductChange(item,transType){ //非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单 - if(item && !['002','012','014'].includes(item[0])){ + if(item && !['002','012','014','078'].includes(item[0])){ this.form.masterBillCode = null; this.form.blVirtual = null; } - if(item && item[0]!=='002' && this.form.remark && this.form.remark!==null){ + if(item && !['002','078'].includes(item[0]) && this.form.remark && this.form.remark!==null){ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } if(item!=null && item.length==2){ @@ -2435,8 +2435,8 @@ methods: { if (val) { this.form.masterBillCode = val.value; this.masterBillProductType = val.productType; - if (this.form.transLine === '002') { - if (this.form.remark==null || this.form.remark.trim() === '') { + if (['002', '078'].includes(this.form.transLine)) { + if (this.form.remark == null || this.form.remark.trim() === '') { //生成备注 this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`; } else { @@ -2445,19 +2445,19 @@ methods: { this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value); } else { //判断结尾是不是逗号 - if(!this.form.remark.endsWith(',')){ - this.form.remark = this.form.remark +','; + if (!this.form.remark.endsWith(',')) { + this.form.remark = this.form.remark + ','; } - this.form.remark =this.form.remark + '该单为虚拟单:对应主单为' + val.value; + this.form.remark = this.form.remark + '该单为虚拟单:对应主单为' + val.value; } } } else { //删除备注中虚拟单部分 this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } - }else { - //删除备注中虚拟单部分 - this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + } else { + //删除备注中虚拟单部分 + this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } }, //虚拟单变化 From 19253d3b26e935156bfccc2e85d62da5723b1ff4 Mon Sep 17 00:00:00 2001 From: wuteng <419274783@qq.com> Date: Wed, 25 Jun 2025 17:56:44 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8E=A5=E5=8D=95=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=81=E5=BD=95=E5=85=A5=E8=B0=83=E6=95=B4=E9=A6=99?= =?UTF-8?q?=E6=B8=AF=E5=88=B0=E7=BC=85=E7=94=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/emis/emisWaybill/waybillGot.vue | 4 ++-- src/views/emis/emisWaybill/waybillModify.vue | 4 ++-- src/views/emis/emisWaybill/waybillRecord.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/emis/emisWaybill/waybillGot.vue b/src/views/emis/emisWaybill/waybillGot.vue index 4ddb3e1e..7a8a950c 100644 --- a/src/views/emis/emisWaybill/waybillGot.vue +++ b/src/views/emis/emisWaybill/waybillGot.vue @@ -1814,7 +1814,7 @@ methods: { this.form.masterBillCode = null; this.form.blVirtual = null; } - if(item && !['002','078'].includes(item[0]) && this.form.remark && this.form.remark!==null){ + if(item && !['002'].includes(item[0]) && this.form.remark && this.form.remark!==null){ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } if(item!=null && item.length==2){ @@ -2447,7 +2447,7 @@ methods: { if (val) { this.form.masterBillCode = val.value; this.masterBillProductType = val.productType; - if (['002', '078'].includes(this.form.transLine)) { + if (['002'].includes(this.form.transLine)) { if (this.form.remark==null || this.form.remark.trim() === '') { //生成备注 this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`; diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 02a40eb0..7cf0f5fe 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -1806,7 +1806,7 @@ methods: { this.form.masterBillCode = null; this.form.blVirtual = null; } - if(item && !['002','078'].includes(item[0]) && this.form.remark && this.form.remark!==null){ + if(item && !['002'].includes(item[0]) && this.form.remark && this.form.remark!==null){ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } if(item!=null && item.length==2){ @@ -2447,7 +2447,7 @@ methods: { if (val) { this.form.masterBillCode = val.value; this.masterBillProductType = val.productType; - if (['002', '078'].includes(this.form.transLine)) { + if (['002'].includes(this.form.transLine)) { if (this.form.remark == null || this.form.remark.trim() === '') { //生成备注 this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`; diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index a876b8e1..cac0cc4d 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -1807,7 +1807,7 @@ methods: { this.form.masterBillCode = null; this.form.blVirtual = null; } - if(item && !['002','078'].includes(item[0]) && this.form.remark && this.form.remark!==null){ + if(item && !['002'].includes(item[0]) && this.form.remark && this.form.remark!==null){ this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } if(item!=null && item.length==2){ @@ -2435,7 +2435,7 @@ methods: { if (val) { this.form.masterBillCode = val.value; this.masterBillProductType = val.productType; - if (['002', '078'].includes(this.form.transLine)) { + if (['002'].includes(this.form.transLine)) { if (this.form.remark == null || this.form.remark.trim() === '') { //生成备注 this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`; From 5ad5911cc81b6b78ff4feeade433e3cff96acc8d Mon Sep 17 00:00:00 2001 From: wuteng <419274783@qq.com> Date: Wed, 25 Jun 2025 18:06:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B4=B9=E7=94=A8=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=8A=A0=E9=A6=99=E6=B8=AF=E5=88=B0=E7=BC=85=E7=94=B8=E7=BA=BF?= =?UTF-8?q?=E8=B7=AF=E8=99=9A=E6=8B=9F=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/emis/emisWaybillAjustApply/adjustPanel.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue index 4fe2002d..927119c0 100644 --- a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue +++ b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue @@ -832,7 +832,7 @@ - + 虚拟单调整 From 9c3d5bccd7b4e927c3f6245820ee5f9aaea74914 Mon Sep 17 00:00:00 2001 From: wuteng <419274783@qq.com> Date: Thu, 26 Jun 2025 10:13:33 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E5=85=B3=E8=81=94=E4=B8=BB=E5=8D=95=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EmisBaseTools/MasterBillCodePicker.vue | 6 +++++- src/views/emis/emisWaybill/waybillGot.vue | 20 +++++++++++-------- src/views/emis/emisWaybill/waybillModify.vue | 14 ++++++++----- src/views/emis/emisWaybill/waybillRecord.vue | 14 ++++++++----- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/views/emis/EmisBaseTools/MasterBillCodePicker.vue b/src/views/emis/EmisBaseTools/MasterBillCodePicker.vue index e869cf3c..86f6dbd0 100644 --- a/src/views/emis/EmisBaseTools/MasterBillCodePicker.vue +++ b/src/views/emis/EmisBaseTools/MasterBillCodePicker.vue @@ -9,6 +9,7 @@ v-model="svalue" :placeholder="placeholder" style="width: 100%" + @blur="onBlur" @focus="onFocus" @change="onChange" > @@ -83,7 +84,10 @@ export default { this.$emit("onMasterBillCodeChange", valObject);//子组件传选中对象到父组件 this.$emit("input", this.svalue); // 子组件值传到父组件 基础双向绑定 }, - + onBlur(val) { + this.$emit("input", this.svalue); + this.dispatch('ElFormItem', 'el.form.blur'); + }, queryData(val) { this.queryParams = {...this.searchParams}; this.queryParams.billCode = val; diff --git a/src/views/emis/emisWaybill/waybillGot.vue b/src/views/emis/emisWaybill/waybillGot.vue index 7a8a950c..fe63a334 100644 --- a/src/views/emis/emisWaybill/waybillGot.vue +++ b/src/views/emis/emisWaybill/waybillGot.vue @@ -530,7 +530,7 @@ 是否为虚拟单 - + @@ -1051,7 +1051,7 @@ data() { { required: true, message: "包装类型不能为空",trigger: ["blur",'change'] } ], //自定义校验 - masterBillCode:[ + masterBillCode:[{ required: true, message: "关联主单不能为空", trigger: ["blur", 'change'] }, {validator: checkmasterProductType, trigger: ['blur', 'change']} ], dispatchMethod: [ @@ -2448,7 +2448,7 @@ methods: { this.form.masterBillCode = val.value; this.masterBillProductType = val.productType; if (['002'].includes(this.form.transLine)) { - if (this.form.remark==null || this.form.remark.trim() === '') { + if (this.form.remark == null || this.form.remark.trim() === '') { //生成备注 this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`; } else { @@ -2457,18 +2457,22 @@ methods: { this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value); } else { //判断结尾是不是逗号 - if(!this.form.remark.endsWith(',')){ - this.form.remark = this.form.remark +','; + if (!this.form.remark.endsWith(',')) { + this.form.remark = this.form.remark + ','; } - this.form.remark =this.form.remark + '该单为虚拟单:对应主单为' + val.value; + this.form.remark = this.form.remark + '该单为虚拟单:对应主单为' + val.value; } } } else { //删除备注中虚拟单部分 + if (this.form.remark) { + this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + } + } + } else { + if (this.form.remark) { this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } - }else{ - this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); } }, //虚拟单变化 diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 7cf0f5fe..149d3faf 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -532,7 +532,7 @@ 是否为虚拟单 - + @@ -1050,8 +1050,8 @@ data() { packType: [ { required: true, message: "包装类型不能为空",trigger: ["blur",'change'] } ], - //自定义校验 - masterBillCode:[ + //自定义校验 + masterBillCode:[{ required: true, message: "关联主单不能为空", trigger: ["blur", 'change'] }, {validator: checkmasterProductType, trigger: ['blur', 'change']} ], dispatchMethod: [ @@ -2465,11 +2465,15 @@ methods: { } } else { //删除备注中虚拟单部分 - this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + if(this.form.remark){ + this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + } } } else { //删除备注中虚拟单部分 - this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + if(this.form.remark){ + this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + } } }, //虚拟单变化 diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index cac0cc4d..f6788c41 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -534,7 +534,7 @@ 是否为虚拟单 - + @@ -1055,8 +1055,8 @@ data() { { required: true, message: "包装类型不能为空",trigger: ["blur",'change'] } ], //自定义校验 - masterBillCode:[ - {validator: checkmasterProductType, trigger: ['blur', 'change']} + masterBillCode: [{ required: true, message: "关联主单不能为空", trigger: ["blur", 'change'] }, + { validator: checkmasterProductType, trigger: ['blur', 'change'] } ], dispatchMethod: [ { required: true, message: "派件方式不能为空", trigger: ["blur",'change'] } @@ -2453,11 +2453,15 @@ methods: { } } else { //删除备注中虚拟单部分 - this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + if (this.form.remark) { + this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + } } } else { //删除备注中虚拟单部分 - this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + if(this.form.remark){ + this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, ''); + } } }, //虚拟单变化