Commit 3cd29e66 by 黑潮

update: 营销分析设置

parent 7a64c5d8
......@@ -44,3 +44,5 @@ export const exportBatchSendDetails = config.api + PREFIX + 'export-batch-send-d
export const exportCurrentSendDetails = config.api + PREFIX + 'export-current-send-details';
export const getUseStoredFalg = params => requests(PREFIX + 'get-ecm-store-flag', params);
export const getXsxsFalg = params => requests(PREFIX + 'get-xsxs-open-flag', params);
import { _debounce } from '@/utils/index';
import { getEcmInfo, saveEcmInfo, getUseStoredFalg } from '@/service/api/ecmApi.js';
import { getEcmInfo, saveEcmInfo, getUseStoredFalg, getXsxsFalg } from '@/service/api/ecmApi.js';
import { getCardManualSetting } from '@/service/api/cardApi.js';
import { listTemplateVariables } from '@/service/api/msgApi.js';
import { klflStrategy } from '@/service/api/gameApi.js'; // 会员等级列表接口
......@@ -152,11 +152,13 @@ export default {
discount_limit: { type: 1, count: undefined, flag: false }, // 适用商品折扣
useStoredFlag: 0, //显示储值触发和会员卡升级事件
analyseConfig: {
statusFlag: 0,
crowd_flag: 1,
crowd_send: 4,
crowd_no_send: 1,
marke_days: 14
}
},
xsxsFlag: 0
};
},
components: {
......@@ -651,6 +653,18 @@ export default {
return;
}
}
if ([1, 2].includes(this.form.effectType) && this.xsxsFlag == 1) {
if (this.analyseConfig.crowd_send === undefined) {
this.$tips({ type: 'warning', message: '请填写实验组' });
return;
} else if (this.analyseConfig.crowd_no_send === undefined) {
this.$tips({ type: 'warning', message: '请填写参照组' });
return;
} else if (this.analyseConfig.marke_days === undefined) {
this.$tips({ type: 'warning', message: '请填写营销效果时长' });
return;
}
}
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
......@@ -1056,6 +1070,9 @@ export default {
this.effectActionOptions.push({ value: 'stored', label: '储值触发' });
}
});
getXsxsFalg().then(res => {
this.xsxsFlag = res.result;
});
// 设置面包屑
let breadcrumbName = '智能营销编辑';
if (this.isAdd) {
......
......@@ -360,31 +360,32 @@
</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">
<section class="dm-form__wrap" v-if="xsxsFlag == 1 && [1, 2].includes(form.effectType)">
<h3 class="dm-title__label">
<span class="inline-block mr10">营销分析设置</span>
<el-switch :disabled="!isAdd" v-model="analyseConfig.statusFlag" :active-value="1" :inactive-value="0" @change="onChangeAnalyseConfig"></el-switch>
</h3>
<div v-if="analyseConfig.statusFlag == 1" 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>
<el-tooltip class="item" effect="dark" placement="top" content="说明:同一用户在同一计划中不会既存在实验组中,又存在参照组中。首次触发时,用户被归入到实验组中,再次被触发时,只能归入实验组。先满足此条件,再满足实验组比例。故一些重复触发的任务,最终呈现的人数比例可能和配置的比例不一致。" :open-delay="300">
<i style="cursor:pointer;color:#c0c4cc;font-size:14px;" class="el-icon-question"></i>
</el-tooltip>
</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 v-if="analyseConfig.crowd_flag == 1" 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>
<el-tooltip class="item" effect="dark" placement="top" content="说明:同一用户在同一计划中不会既存在实验组中,又存在参照组中。首次触发时,用户被归入到实验组中,再次被触发时,只能归入实验组。先满足此条件,再满足实验组比例。故一些重复触发的任务,最终呈现的人数比例可能和配置的比例不一致。" :open-delay="300">
<i style="cursor:pointer;color:#c0c4cc;font-size:14px;" class="el-icon-question"></i>
</el-tooltip>
</div>
<div class="mt20">
<label class="w140 text-right inline-block mr10">设置营销效果时长</label>
<el-input-number :disabled="!isAdd" controls-position="right" class="w150" :min="3" :max="31" 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">最长 31 天,最短 3 天 (以自然日计算)</div>
</div>
</section>
<!-- 操作区 -->
......
......@@ -210,6 +210,18 @@ export default {
},
addItem() {
let qywx = { ...this.form };
if (qywx.chatFlag == 0 && qywx.smsFlag == 0 && qywx.telFlag == 0) {
this.$message.warning('请至少配置一种任务完成方式');
return;
}
if (qywx.chatFlag != 0) {
this.$message.warning('请添加会话素材');
return;
}
if (qywx.smsFlag != 0) {
this.$message.warning('请添加短信模板');
return;
}
delete qywx.title;
if (qywx.smsFlag == 0) {
qywx.smsContent = null;
......
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