...
|
...
|
@@ -133,7 +133,7 @@ export default { |
|
|
from: {
|
|
|
type: String,
|
|
|
default() {
|
|
|
return 'offsale';
|
|
|
return 'product.offsale';
|
|
|
}
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -167,6 +167,8 @@ export default { |
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.from = this.$route.query.from || 'product.offsale';
|
|
|
|
|
|
service.getProduct(this.$route.params.id).then((result) => {
|
|
|
_.update(result, 'goodsSeason', (s) => `${s}`);
|
|
|
if (!_.has(result, 'materialList')) {
|
...
|
...
|
@@ -501,12 +503,7 @@ export default { |
|
|
desc: '该商品保存成功!'
|
|
|
});
|
|
|
|
|
|
if (this.from === 'offsale') {
|
|
|
this.goOffSale();
|
|
|
} else {
|
|
|
this.goOnlineSale();
|
|
|
}
|
|
|
|
|
|
this.go(this.from);
|
|
|
} else {
|
|
|
this.$Notice.error({
|
|
|
title: '保存错误',
|
...
|
...
|
@@ -516,11 +513,8 @@ export default { |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
goOffSale() {
|
|
|
this.$router.push({ name: 'product.offsale' });
|
|
|
},
|
|
|
goOnlineSale() {
|
|
|
this.$router.push({ name: 'product.online' });
|
|
|
go(from) {
|
|
|
this.$router.push({ name: from });
|
|
|
},
|
|
|
submit() {
|
|
|
this.validate()
|
...
|
...
|
|