This commit is contained in:
linfso 2024-12-23 09:55:06 +08:00
parent 738040de0f
commit bb3e2ec1d8

View File

@ -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}` })