|
@@ -230,18 +230,14 @@ export default {
|
|
|
}
|
|
|
this.$set(this, `form`, data);
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$set(this, `form`, { status: '0' });
|
|
|
- }
|
|
|
+ } else this.$set(this, `form`, { status: '0' });
|
|
|
this.loadings = false;
|
|
|
},
|
|
|
// 店铺名称远程查询
|
|
|
async querySearch(value) {
|
|
|
this.loading = true;
|
|
|
let res = await this.shopQuery({ name: value });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, 'shopList', res.data);
|
|
|
- }
|
|
|
+ if (this.$checkRes(res)) this.$set(this, 'shopList', res.data);
|
|
|
this.loading = false;
|
|
|
},
|
|
|
// 店铺远程搜索多选
|
|
@@ -262,9 +258,7 @@ export default {
|
|
|
if (data._id) res = await this.update(data);
|
|
|
else res = await this.create(data);
|
|
|
if (this.$checkRes(res, '维护信息成功', `${res.errmsg}`)) this.toBack();
|
|
|
- } else {
|
|
|
- return false;
|
|
|
- }
|
|
|
+ } else return false;
|
|
|
});
|
|
|
},
|
|
|
// 查询其他信息
|
|
@@ -272,37 +266,25 @@ export default {
|
|
|
let res;
|
|
|
// 发行方
|
|
|
res = await this.dictQuery({ code: 'coupon_issue', value: '0' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `issueList`, res.data);
|
|
|
- }
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `issueList`, res.data);
|
|
|
// 失效方式
|
|
|
res = await this.dictQuery({ code: 'coupon_expire_type' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `expire_typeList`, res.data);
|
|
|
- }
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `expire_typeList`, res.data);
|
|
|
// 减免方式
|
|
|
res = await this.dictQuery({ code: 'coupon_discount_type' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `discount_typeList`, res.data);
|
|
|
- }
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `discount_typeList`, res.data);
|
|
|
// 使用限制
|
|
|
res = await this.dictQuery({ code: 'coupon_use_limit' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `use_limitList`, res.data);
|
|
|
- }
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `use_limitList`, res.data);
|
|
|
// 领取限制
|
|
|
res = await this.dictQuery({ code: 'coupon_get_limit' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `get_limitList`, res.data);
|
|
|
- }
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `get_limitList`, res.data);
|
|
|
// 商品类型
|
|
|
res = await this.tree();
|
|
|
if (this.$checkRes(res)) this.$set(this, `tagsList`, res.data);
|
|
|
// 使用状态
|
|
|
res = await this.dictQuery({ code: 'use' });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `statusList`, res.data);
|
|
|
- }
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
|
|
|
},
|
|
|
// 返回
|
|
|
toBack() {
|