From bb3e2ec1d826fc009ba62e073804d50679c33c3f Mon Sep 17 00:00:00 2001 From: linfso Date: Mon, 23 Dec 2024 09:55:06 +0800 Subject: [PATCH] md --- src/views/emis/emisWaybill/waybillRecord.vue | 42 ++++++++++---------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index 224cb568..b721fa76 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -1033,42 +1033,44 @@ computed: { }, watch: { $route () { - if(this.$route.query.addFrom=="userOrder"){ + if(this.$route.query.action=='add'){ + this.action="add"; - this.addFrom="userOrder"; - this.billCode=this.$route.query.billCode; - // this.$route.meta.title = "接单"; + if(this.$route.query.addFrom=="userOrder"){ + this.addFrom="userOrder"; + this.billCode=this.$route.query.billCode; + // this.$route.meta.title = "接单"; + }else{ + this.addFrom=null; + this.billCode=null; + } this.initData(); } + } }, -// beforeRouteEnter(to,from,next){ -// if(to.query.name){ -// to.meta.title = to.query.name; -// } -// next() -// }, created() { this.action=this.$route.query.action; if(!this.action){ this.action="add"; - } - if(this.action=='add' && this.$route.query.addFrom=="userOrder"){ + if(this.action=='add' ){ this.billCode=this.$route.query.billCode; this.addFrom="userOrder"; - const title = '接单'; - const route = Object.assign({}, this.$route, { title: `${title}` }) - this.$store.dispatch('tagsView/updateVisitedView', route) + if(this.$route.query.addFrom=="userOrder"){ + const title = '接单'; + const route = Object.assign({}, this.$route, { title: `${title}` }) + this.$store.dispatch('tagsView/updateVisitedView', route) + }else{ + this.billCode=null; + const title = '运单录入'; + const route = Object.assign({}, this.$route, { title: `${title}` }) + this.$store.dispatch('tagsView/updateVisitedView', route) + } } - else if(this.action=='add'){ - const title = '运单录入'; - const route = Object.assign({}, this.$route, { title: `${title}` }) - this.$store.dispatch('tagsView/updateVisitedView', route) - } else if(this.action=='modify'){ const title = '运单修改'; const route = Object.assign({}, this.$route, { title: `${title}` })