Commit 237608ef by crushh

update: dist

parent 6305bb28
......@@ -60,10 +60,10 @@
/> -->
<dm-store-selector
:creatorId="ruleForm.creatorId"
ref="storeGroup"
ref="storeGroup"
@store-change="storeChange"
v-if="uuid"
:uuid.sync="uuid">
v-if="canShowStoreSelector"
:uuid="uuid">
</dm-store-selector>
</el-form-item>
<vue-gic-people
......@@ -164,6 +164,9 @@ export default {
return !(this.memberType == 3 || this.memberType == 2) && this.memberTypeTotal >= 20;
}
},
canShowStoreSelector () {
return this.uuid || this.isAdd || this.memberType == 3 || this.memberType == 2;
},
},
mounted () {
if (!this.isAdd) {
......@@ -192,27 +195,28 @@ export default {
this.loading = true;
request.get('/api-integral-mall/get-rule', { params: { integralMallProRuleId } }).then(res => {
if (res.data.result) {
this.ruleForm = res.data.result;
this.memberType = this.ruleForm.memberType;
if (this.ruleForm.memberType == 3) { // 人群筛选器回显
this.hasSearchData = this.ruleForm.filterJson;
this.useId = this.ruleForm.searchId;
const data = res.data.result;
this.memberType = data.memberType;
if (data.memberType == 3) { // 人群筛选器回显
this.hasSearchData = data.filterJson;
this.useId = data.searchId;
if (this.isCopy) {
const form = new FormData();
form.append('requestProject', 'integral-mall');
form.append('id', this.ruleForm.searchId);
form.append('id', data.searchId);
request.post('/api-plug/get-screening-detail', form).then(res => {
this.ruleForm.searchJson = res.data.result && res.data.result.detail;
data.searchJson = res.data.result && res.data.result.detail;
});
}
} else if (this.ruleForm.memberType == 4) { // 门店筛选器回显
this.uuid = JSON.parse(this.ruleForm.filterJson).storeWidgetId;
} else if (this.ruleForm.memberType == 2) {
this.selectedGroupIds = this.ruleForm.filterJson;
} else if (data.memberType == 4) { // 门店筛选器回显
this.uuid = JSON.parse(data.filterJson).storeWidgetId;
} else if (data.memberType == 2) {
this.selectedGroupIds = data.filterJson;
}
if (this.isCopy) {
this.ruleForm.creatorId = localStorage.getItem('useId');
data.creatorId = localStorage.getItem('useId');
}
this.ruleForm = data;
}
}).finally(() => {
this.loading = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment