Commit 5c2819d5 by crushh

update: 合并

parents e7073c60 c91cf973
......@@ -123,6 +123,9 @@ a:hover {
.ml30{
margin-left: 30px!important;
}
.ml58{
margin-left: 58px!important;
}
.ml80{
margin-left: 80px!important;
}
......
......@@ -46,7 +46,7 @@ export default {
else return;
const size = binding.value.limit && binding.value.limit.maxSize ? binding.value.limit.maxSize : 2; // 默认最大2M限制
if (el.files[0].size > size * 1024 * 1024) {
binding.value.$tips({ type: 'warning', message: `上传图片不能大于${size}M` });
binding.value.$tips({ type: 'warning', message: `上传${binding.value.acceptType.indexOf('image') >= 0 ? '图片' : '文件'}不能大于${size}M` });
binding.value.loading = false;
return;
}
......
......@@ -158,7 +158,9 @@ export default {
default: 0
},
useQfxx: Boolean,
showDeleteTooltip: Boolean
showDeleteTooltip: Boolean,
consumType: 1, // 1 单笔订单金额触发,2 累计订单金额触发
scence: String
},
data() {
return {
......@@ -183,6 +185,26 @@ export default {
},
computed: {
showOptionList() {
if (this.effectType == 0 && this.consumType == 2) {
// 消费触发-累计 只有 积分和卡券事件 且积分事件只能添加一次
let arr = ['card', 'integral'];
if (this.list && this.list.length) {
if (this.list.map(item => item.comName).includes('item-integral')) {
arr = ['card'];
}
}
this.options.forEach(item => {
if (arr.includes(item.value)) {
item.show = true;
} else {
item.show = false;
}
});
} else {
this.options.forEach(item => {
item.show = true;
});
}
if (this.useStored) {
this.options.forEach(item => {
if (item.value == 'grade') {
......@@ -226,44 +248,33 @@ export default {
}
},
watch: {
// useStored: {
// handler() {
// console.log('useStored');
// if (this.useStored) {
// // this.options = [ ...this.options, { name: '会员卡升级', value: 'grade', key: 9, img: require('./assets/img/grade.svg'), disabled: false }]; //eslint-disable-line
// this.options.forEach(item => {
// if (item.value == 'grade') {
// item.show = false;
// }
// });
// } else {
// // this.options = this.options.filter(item => item.value !== 'grade');
// this.options.forEach(item => {
// if (item.value == 'grade') {
// item.show = true;
// }
// });
// }
// }
// },
// useQywx: {
// handler() {
// console.log('qywx');
// if (this.useQywx) {
// this.options.forEach(item => {
// if (item.value == 'qywx') {
// item.show = false;
// }
// });
// } else {
// this.options.forEach(item => {
// if (item.value == 'qywx') {
// item.show = true;
// }
// });
// }
// },
// },
effectType(newType, oldType) {
// 触点切换成单次或重复,清空已选择的图文;
// 单次和重复间切换时,不需要清空操作;
// 单次切换触点或者重复切换触点,清空已选择的图文;
// 0:触点 1:重复 2:单次
if (oldType == 0 || newType == 0) {
this.list.forEach(el => {
if (el.comName == 'item-teletext') {
this.delItem(el);
}
});
}
// 单次切换成触点或者重复切换成触点,清空已选择的群发营销事件;
// 单次和重复之间切换,不需要清空操作;
if (newType == 0) {
this.list.forEach(el => {
if (el.comName == 'item-qfxx') {
this.delItem(el);
}
});
}
},
consumType(val) {
this.list.forEach(el => {
this.delItem(el);
});
},
list() {
if (this.list.some(item => item.comName === 'item-grade')) {
this.options.forEach(item => {
......@@ -448,6 +459,7 @@ export default {
params.integralType = val.integralType;
if (params.integralType === 1) {
params.integralCount = val.integralCount;
params.title = val.integralCount + '积分';
}
if (params.integralType === 2) {
params.multipleNum = val.multipleNum;
......@@ -466,7 +478,7 @@ export default {
params = { ...params, ...val };
}
// 接口请求 保存
saveUpdateMarketingType({ marketingType: JSON.stringify(params) })
saveUpdateMarketingType({ marketingType: JSON.stringify(params), type: this.scence })
.then(res => {
this.getMarketingList();
})
......@@ -494,7 +506,7 @@ export default {
// 删除操作
delItem(item) {
console.log(item);
deleteMarketingType({ ecmMarketingTypeRelationId: item.item.ecmMarketingTypeRelationId, ecmPlanId: this.ecmPlanId })
deleteMarketingType({ ecmMarketingTypeRelationId: item.item.ecmMarketingTypeRelationId, ecmPlanId: this.ecmPlanId, type: this.scence })
.then(res => {
if (res.errorCode === 0) {
this.getMarketingList();
......
......@@ -497,7 +497,7 @@ export default {
};
params.marketingTemplate = JSON.stringify(marketingTemplate);
}
params.type = 'scan';
this.$refs[formName].validate(valid => {
if (valid) {
this.saveEcmInfo(params);
......
......@@ -63,7 +63,7 @@
<h3 class="title mt46">营销事件</h3>
<div>
<!-- 只有实时才是单图文 -->
<marketing-event style="margin-top:0;" show-out-coupon-icon :readOnly="isInfo" ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume'" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1"></marketing-event>
<marketing-event style="margin-top:0;" show-out-coupon-icon :readOnly="isInfo" ref="marketingEvent" @has-card="hasCard" v-if="ecmPlanId" :singleFlag="form.effectType === 0" :integralMultiple="form.effectAction === 'consume'" :ecmPlanId="ecmPlanId" :isSupportVar="form.effectType === 0" :code="code" :enabledMessageState="enabledMessageState" :cardLimitType="-1" scence="scan"></marketing-event>
<!-- 只有存在卡券的情况下出现卡券通知方式 -->
<section v-if="currentCard.comName">
<h3 class="title mt46">卡券通知方式配置</h3>
......
......@@ -74,7 +74,7 @@ export default {
minWidth: '140',
align: 'left',
formatter(row) {
const date = formatDateTimeByType(row.beginDate, 'yyyy-MM-dd-HH-mm-ss') + ' ~ <br/>' + formatDateTimeByType(row.endDate, 'yyyy-MM-dd-HH-mm-ss');
const date = formatDateTimeByType(row.beginDate, 'yyyy-MM-dd-HH-mm-ss') + ' ~ <br />' + formatDateTimeByType(row.endDate, 'yyyy-MM-dd-HH-mm-ss');
return date;
}
},
......
......@@ -158,7 +158,7 @@ export default {
// 删除
async delData(row) {
try {
let res = await deleteEcm({ ecmPlanId: row.ecmPlanId });
let res = await deleteEcm({ ecmPlanId: row.ecmPlanId, type: 'scan' });
if (res.errorCode === 0) {
this.$tips({ type: 'success', message: '删除成功!' });
if (this.tableList.length === 1 && this.listParams.currentPage !== 1) {
......
......@@ -21,7 +21,7 @@
<!-- <el-button icon="el-icon-upload2" class="dash-btn">点击上传</el-button> -->
<el-button type="text" class="ml10" @click="download">点击下载文件模板</el-button>
</div>
<p style="margin-top:8px;color:#909399;font-size:12px;line-height:1;">手机号数量单次最多不超过5000条</p>
<p style="margin-top:8px;color:#909399;font-size:12px;line-height:1;">手机号数量单次最多不超过5000条,上传文件不能大于2M</p>
</el-form-item>
</el-form>
<p class="title mb15 mt40">短信模板设置</p>
......
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