|
@@ -175,6 +175,23 @@ export default {
|
|
}
|
|
}
|
|
return arr.join(';');
|
|
return arr.join(';');
|
|
},
|
|
},
|
|
|
|
+ // 保存
|
|
|
|
+ async toSave({ data }) {
|
|
|
|
+ data.shop = this.user.shop.id;
|
|
|
|
+ let res;
|
|
|
|
+ if (data.id) res = await this.update(data);
|
|
|
|
+ else res = await this.create(data);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$message({ type: `success`, message: `维护信息成功` });
|
|
|
|
+ this.toBack();
|
|
|
|
+ this.search();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 执行返回
|
|
|
|
+ toBack() {
|
|
|
|
+ this.form = {};
|
|
|
|
+ this.view = 'list';
|
|
|
|
+ },
|
|
// 上架
|
|
// 上架
|
|
async toPuton({ data }) {
|
|
async toPuton({ data }) {
|
|
this.$confirm('是否确认上架该商品?', '提示', {
|
|
this.$confirm('是否确认上架该商品?', '提示', {
|