Commit dab8606e by 黑潮

update: 营销分析设置

parent 0b970d90
......@@ -220,6 +220,9 @@ a:hover {
.w110{
width: 110px!important;
}
.w140{
width: 140px !important;
}
.w150{
width: 150px!important;
}
......@@ -518,4 +521,3 @@ img::after {
// ::-webkit-scrollbar {
// display: none;
// }
......@@ -150,7 +150,13 @@ export default {
},
storedChecked: false,
discount_limit: { type: 1, count: undefined, flag: false }, // 适用商品折扣
useStoredFlag: 0 //显示储值触发和会员卡升级事件
useStoredFlag: 0, //显示储值触发和会员卡升级事件
analyseConfig: {
crowd_flag: 1,
crowd_send: 4,
crowd_no_send: 1,
marke_days: 14
}
};
},
components: {
......@@ -401,6 +407,9 @@ export default {
this.form.storedLowest = cost.lowest_cost;
this.form.storedMax = cost.max_cost;
}
if ([1, 2].includes(this.form.effectType) && result.analyseJson) {
this.analyseConfig = JSON.parse(result.analyseJson);
}
}
if (!this.form.templateUseEnable) return;
let template = null;
......@@ -767,6 +776,9 @@ export default {
};
params.marketingTemplate = JSON.stringify(marketingTemplate);
}
if ([1, 2].includes(this.form.effectType)) {
params.analyseJson = JSON.stringify(this.analyseConfig);
}
this.saveEcmInfo(params);
} else {
this.$tips({ type: 'warning', message: '表单填写不完整' });
......@@ -1001,6 +1013,13 @@ export default {
.filter(v => v)
.join(',');
}
},
onChangeAnalyseConfig(isOpen) {
if (!isOpen) {
this.analyseConfig.crowd_send = 4;
this.analyseConfig.crowd_no_send = 1;
this.analyseConfig.marke_days = 14;
}
}
},
filters: {
......
......@@ -359,6 +359,31 @@
</div>
</el-form-item>
</section>
<!-- 营销分析设置 -->
<section class="dm-form__wrap" v-if="[1, 2].includes(form.effectType)">
<h3 class="dm-title__label">营销分析设置</h3>
<div style="padding-bottom:10px;color:#303133">
<div>
<label class="w140 text-right inline-block mr10">设置参照组</label>
<el-switch :disabled="!isAdd" v-model="analyseConfig.crowd_flag" :active-value="1" :inactive-value="0" @change="onChangeAnalyseConfig"></el-switch>
</div>
<template v-if="analyseConfig.crowd_flag == 1">
<div class="mt20">
<label class="w140 text-right inline-block mr10">实验组 (触发任务人群)</label>
<el-input-number :disabled="!isAdd" controls-position="right" class="w150" :min="1" v-model="analyseConfig.crowd_send"></el-input-number>
<span class="ml10 mr10">:</span>
<el-input-number :disabled="!isAdd" controls-position="right" class="w150" :min="1" v-model="analyseConfig.crowd_no_send"></el-input-number>
<span class="ml10">参照组 (触发任务人群)</span>
</div>
<div class="mt20">
<label class="w140 text-right inline-block mr10">设置营销效果时长</label>
<el-input-number :disabled="!isAdd" controls-position="right" class="w150" :min="1" v-model="analyseConfig.marke_days"></el-input-number>
<span class="ml10">天之内</span>
</div>
<div style="margin-top:6px;color:#A5A7AD;font-size:12px;margin-left:150px">最长 30 天,最短 1 天 (以自然日计算)</div>
</template>
</div>
</section>
<!-- 操作区 -->
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="submit('form')" v-if="!isInfo">保 存</el-button>
......
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