Commit f2a2b716 by crushh

update: dist

parent fd7ff857
......@@ -55,15 +55,14 @@
<el-radio v-model="ruleForm.memberType" :label="4">
门店筛选
</el-radio>
<el-radio v-model="ruleForm.memberType" :label="3" :disabled="memberTypeTotal>=20">
<el-radio v-model="ruleForm.memberType" :label="3" :disabled="memberTypeTotal>=20&&isAdd">
会员筛选
</el-radio>
</div>
</el-form-item>
<el-form-item v-show="ruleForm.memberType === 4">
<vue-gic-store-new
v-if="isAdd||uuid"
:isAdd="isAdd"
:isAdd="isAdd || !uuid"
:uuid.sync="uuid"
ref="storeGroup"
@store-change="storeChange"
......@@ -80,6 +79,7 @@
ref="peopleFilter"
@findFilter="findFilter"
@getBackData="getBackData"
@editShow="hasEditGicPeople=true"
/>
</el-form-item>
<div>
......@@ -125,6 +125,7 @@ export default {
useId: '',
hasSearchData: '',
sceneValue: 'member', // 场景值
hasEditGicPeople: false,
isEdit: this.$route.meta.type === 'edit',
isAdd: this.$route.meta.type === 'add',
isCopy: this.$route.meta.type === 'copy',
......@@ -160,11 +161,13 @@ export default {
/** 人群筛选器 */
// 获取需要回显的数据, 供保存时候使用
getBackData (val) {
console.log(val);
this.ruleForm.searchJson = val;
},
// 子组件触发父组件事件,返回过滤条件数据
findFilter (value) {
this.ruleForm.filterJson = value;
findFilter (val) {
console.log(val);
this.ruleForm.filterJson = val;
},
getDatail (integralMallProRuleId) {
this.loading = true;
......@@ -184,7 +187,6 @@ export default {
}
} else if (this.ruleForm.memberType == 4) { // 门店筛选器回显
this.uuid = JSON.parse(this.ruleForm.filterJson).storeWidgetId;
console.log(this.uuid);
}
}
}).finally(() => {
......@@ -202,10 +204,6 @@ export default {
} else {
data = this.ruleForm;
}
if (data.memberType == 1) {
delete data.filterJson;
delete data.searchJson;
}
this.btnLoading = true;
request.post('/api-integral-mall/add-update-rule', data).then(res => {
this.$router.go(-1);
......@@ -215,13 +213,24 @@ export default {
}
});
},
submit () {
if (this.ruleForm.memberType == 3) {
this.$refs.peopleFilter.confirmSet().then(async () => {
async submit () {
if (this.ruleForm.memberType == 1) {
this.ruleForm.filterJson = '';
this.ruleForm.searchJson = '';
this.ruleForm.searchId = '';
this.submitRequest();
} else if (this.ruleForm.memberType == 3) {
if (this.hasEditGicPeople) {
this.$refs.peopleFilter.confirmSet().then(async () => {
const res = await this.echoData(this.ruleForm.filterJson);
this.ruleForm.showBack = res.data.result;
this.submitRequest();
});
} else {
const res = await this.echoData(this.ruleForm.filterJson);
this.ruleForm.showBack = res.data.result;
this.submitRequest();
});
}
} else if (this.ruleForm.memberType == 4) {
this.$refs.storeGroup.getStoreConfig().then(async (data) => {
let type = 0;
......@@ -229,18 +238,18 @@ export default {
type = 1;
}
const res = await this.echoData2(this.uuid, data.type);
const { data: { result } } = res;
const { data: { result: { result } } } = res;
console.log(result);
if (result) {
this.ruleForm.showBack = result.result.map(item => item.name).join(',');
this.ruleForm.showBack = result.map(item => item.name).join(',');
} else {
this.ruleForm.showBack = '所有门店';
}
console.log(this.ruleForm.showBack);
this.ruleForm.filterJson = JSON.stringify({ storeMode: type, storeWidgetId: this.uuid });
this.ruleForm.searchJson = '';
this.ruleForm.searchId = this.uuid;
this.submitRequest();
});
} else {
this.submitRequest();
}
},
echoData (filterJson) { // 取得人群筛选器回显文字
......
......@@ -101,6 +101,7 @@
<el-button
type="text"
@click="relatingDetail(row.integralMallProRuleId,'查看')"
v-show="row.relationCount&&row.relationCount!=0"
>
查看
</el-button>
......
......@@ -210,38 +210,42 @@
</el-radio>
</div>
</el-form-item>
<el-form-item label="买家自提时段" required />
<div style="margin-top:-45px;">
<el-form-item
v-for="(v, i) in form.timeRangeList"
:key="i"
:prop="'timeRangeList.' + i + '.timeRange'"
:rules="[{ validator: validateTime, trigger: 'change' }]"
>
<el-time-picker
:clearable="clearableBtn"
class="w-280"
format="HH:mm"
is-range
v-model="v.timeRange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="value => limitTimeSelect(i, value)"
@focus="value => blurLimitTimeSelect(i, value)"
/>
<el-button v-if="i" type="text" @click="deleteTime(i)">
删除
</el-button>
<span v-if="!i" style="font-size:12px;color:#909399;line-height:12px;margin-left:10px;">请使用24小时制输入时间,格式如11:00至14:30</span>
</el-form-item>
<p>
<el-button type="text" style="margin:0px 0 10px 170px" @click="addTime">
添加时间段
</el-button>
</p>
</div>
<el-form-item label="买家自提时段" required>
<div class="timeRangeList">
<div class="tips" style="margin-left: 0;">
当自提时间段的开始时间小于当前时间时,用户可选,因为商家需要在此开始时间之前备好货品
</div>
<el-form-item
v-for="(v, i) in form.timeRangeList"
:key="i"
:prop="'timeRangeList.' + i + '.timeRange'"
:rules="[{ validator: validateTime, trigger: 'change' }]"
>
<el-time-picker
:clearable="clearableBtn"
class="w-280"
format="HH:mm"
is-range
v-model="v.timeRange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="value => limitTimeSelect(i, value)"
@focus="value => blurLimitTimeSelect(i, value)"
/>
<el-button v-if="i" type="text" @click="deleteTime(i)">
删除
</el-button>
<span v-if="!i" style="font-size:12px;color:#909399;line-height:12px;margin-left:10px;">请使用24小时制输入时间,格式如11:00至14:30</span>
</el-form-item>
<p>
<el-button type="text" style="margin:0px 0 10px 170px" @click="addTime">
添加时间段
</el-button>
</p>
</div>
</el-form-item>
</div>
</div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
......@@ -826,7 +830,7 @@ export default {
},
};
</script>
<style scoped>
<style lang="scss" scoped>
.section {
background: #fff;
margin: 24px;
......@@ -884,6 +888,13 @@ export default {
/* .time-range .el-date-editor .el-range__close-icon {
display: none !important;
} */
.timeRangeList {
margin-top: -10px;
/deep/ .el-form-item{
margin-bottom:22px;
margin-left: 0;
}
}
</style>
<style>
.shop-content .dm-store__inputtag--total {
......
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