...
|
...
|
@@ -56,16 +56,28 @@ export default { |
|
|
showExpressLoading: false,
|
|
|
showDeliverLoading: false,
|
|
|
showNoExpressLoading: false,
|
|
|
oldRouterName: 'order.detail',
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
orderInfo: {
|
|
|
handler(newValue) {
|
|
|
this.orderInfo.expressNumber = +newValue.expressNumber > 0 ? newValue.expressNumber : '';
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
this.LogisticsService = new LogisticsService();
|
|
|
this.OrderService = new OrderService();
|
|
|
this.$emit('nextStep', 2);
|
|
|
this.getLogisticsList();
|
|
|
this.orderInfo.expressNumber = +this.orderInfo.expressNumber > 0 ? this.orderInfo.expressNumber : '';
|
|
|
},
|
|
|
|
|
|
beforeRouteEnter(to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.oldRouterName = from.name;
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
//获取物流公司列表
|
|
|
getLogisticsList() {
|
...
|
...
|
@@ -84,7 +96,7 @@ export default { |
|
|
this.showExpressLoading = false;
|
|
|
if (ret.code === 200) {
|
|
|
this.$Message.info(ret.message);
|
|
|
this.$router.go(0);
|
|
|
this.goBefore();
|
|
|
} else {
|
|
|
this.$Message.error(ret.message);
|
|
|
}
|
...
|
...
|
@@ -100,7 +112,7 @@ export default { |
|
|
}).then(ret => {
|
|
|
if (ret.code === 200) {
|
|
|
this.$Message.info(ret.message);
|
|
|
this.$router.go(0);
|
|
|
this.goBefore();
|
|
|
} else {
|
|
|
this.$Message.error(ret.message);
|
|
|
}
|
...
|
...
|
@@ -118,13 +130,22 @@ export default { |
|
|
},
|
|
|
//取消操作
|
|
|
cancel() {
|
|
|
this.$router.push({
|
|
|
name: 'order.detail',
|
|
|
params: {},
|
|
|
query: {
|
|
|
orderCode: this.orderCode,
|
|
|
},
|
|
|
});
|
|
|
this.goBefore();
|
|
|
},
|
|
|
goBefore() {
|
|
|
if (this.oldRouterName === 'order.detail') {
|
|
|
this.$router.push({
|
|
|
name: 'order.detail',
|
|
|
params: {},
|
|
|
query: {
|
|
|
orderCode: this.orderCode,
|
|
|
},
|
|
|
});
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
name: 'order.list',
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
};
|
...
|
...
|
|