Commit 293d0782 by chenxin

fix:营销活动 使用处修改(替换营销场景)

parent ab4dc1ad
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.24118e47322da30d070a22d382e119af.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.33.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.09.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.2.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.41.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.2.02.js></script><script type=text/javascript src=/marketing/static/js/manifest.250b30833d47ce2f7066.js></script><script type=text/javascript src=/marketing/static/js/vendor.f6e5442e18ed1c7d4a4d.js></script><script type=text/javascript src=/marketing/static/js/main.18ccdba44569570ebf52.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=./static/img/favicon.ico><title>GIC后台</title><link rel=stylesheet type=text/css href=static/fonts/iconfont.css><link rel=stylesheet type=text/css href=static/css/common.css><link rel=stylesheet href=//web-1251519181.file.myqcloud.com/components/element.2.12.0.css><link href=/marketing/static/css/main.7c36ff2b852b15a29cf02afa08970de5.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/element.2.12.0.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.33.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.09.js></script><script src=//web-1251519181.file.myqcloud.com/components/store.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/member-group.2.2.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-card.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/people.2.0.42.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js></script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/selector.1.2.02.js></script><script type=text/javascript src=/marketing/static/js/manifest.46bafbc9d002fb81d5a1.js></script><script type=text/javascript src=/marketing/static/js/vendor.cbb380c2053ab598e892.js></script><script type=text/javascript src=/marketing/static/js/main.bae64b31ec7e014030bb.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(n,a,c){for(var f,i,u,s=0,d=[];s<n.length;s++)i=n[s],t[i]&&d.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(r&&r(n,a,c);d.length;)d.shift()();if(c)for(s=0;s<c.length;s++)u=o(o.s=c[s]);return u};var n={},t={12:0};function o(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(n,o){r=t[e]=[n,o]});r[2]=n;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"evaluation",6:"ecm",7:"recharge",8:"msg",9:"calllog"}[e]||e)+"."+{0:"80b5bca04846c73ffe02",1:"f9438825fcc9c8ff3771",2:"1f2a3adeca7b98fac7ae",3:"f96151cc874ac96e733e",4:"fb40f5f2c9f696d90bdd",5:"5ff6f4df7f498dc6a8a0",6:"f96b2b2c4bde2ceefbaa",7:"ffc4d6e3b0f6e628f842",8:"c4543ab32e7d1cdad942",9:"0227f7c8f0a9a9fe5817"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),n},o.m=e,o.c=n,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="/marketing/",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(t,o,c){for(var f,i,u,d=0,s=[];d<t.length;d++)i=t[d],n[i]&&s.push(n[i][0]),n[i]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(r&&r(t,o,c);s.length;)s.shift()();if(c)for(d=0;d<c.length;d++)u=a(a.s=c[d]);return u};var t={},n={13:0};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.e=function(e){var r=n[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var t=new Promise(function(t,a){r=n[e]=[t,a]});r[2]=t;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"message",4:"ewash",5:"evaluation",6:"ecm",7:"activity",8:"recharge",9:"msg",10:"calllog"}[e]||e)+"."+{0:"7698c79f5a4f1c09eaf9",1:"245aaec89e1dbfda61e1",2:"77faf8eff61b3a6addbb",3:"c0e6a889504759ce6a24",4:"288399308a1612fd839a",5:"dae31f13dcb87d6e487e",6:"3c26bf165de3de6afe04",7:"80483bcad3a3fcf89e54",8:"d3304681f13b1275eccf",9:"277de150e09f4110519f",10:"2e28c020a9f9c0e96471"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var r=n[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return c.onerror=c.onload=i,o.appendChild(c),t},a.m=e,a.c=t,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/marketing/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div v-loading="readOnly && loading" :class="{ 'inline-block': onlySelect }">
<template v-if="!onlySelect">
<div v-if="!readOnly">
<span class="dm-input_label">营销活动</span>
<el-select remote filterable clearable v-loadmore="getMore" :remote-method="remoteMethod" @change="updateActId" class="w250 act-select" size="small" v-model="marketingActivityId" :disabled="readOnly" placeholder="选择营销活动">
<el-option v-for="item in tableList" :key="item.marketingActivityId" :label="item.name" :value="item.marketingActivityId"></el-option>
</el-select>
<el-button type="text" class="ml10" @click="$router.push('/activity/add')">去新建</el-button>
</div>
<div v-else>
<span class="dm-input_label">营销活动</span>
<p class="inline-block">{{ info.name || '--' }} <span v-if="info.status === 0" class="fz12 gray ml10">当前计划使用的营销活动已删除</span></p>
</div>
</template>
<el-select v-else remote filterable clearable v-loadmore="getMore" :remote-method="remoteMethod" @change="updateActId" size="small" v-model="marketingActivityId" :disabled="readOnly" placeholder="选择营销活动">
<el-option v-for="item in tableList" :key="item.marketingActivityId" :label="item.name" :value="item.marketingActivityId"></el-option>
</el-select>
</div>
</template>
<script>
import { activityList, getActivityInfo } from '@/service/api/activityApi.js';
export default {
name: 'activity-use-select',
props: {
actId: {
default: '',
type: String
},
readOnly: {
default: false,
type: Boolean
},
onlySelect: {
default: false,
type: Boolean
}
}, // onlySelect: 只有下拉 用于列表处
data() {
return {
loading: false,
marketingActivityId: '',
info: {},
tableList: [],
total: 0,
listParams: {
expireType: -1, // -1: 进行中/未开始 1: 已过期 0: 使用中
search: '',
currentPage: 1,
pageSize: 10
},
nomore: false // 没有更多
};
},
watch: {
actId: {
handler(val) {
// 只读时获取详情
if (val && this.readOnly) {
this.getActivityInfo();
}
},
immediate: true
}
},
directives: {
loadmore: {
inserted(el, binding) {
// 获取element-ui定义好的scroll盒子
const SELECTDOWN_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap');
SELECTDOWN_DOM.addEventListener('scroll', function() {
const CONDITION = this.scrollHeight - this.scrollTop <= this.clientHeight;
if (CONDITION) {
binding.value();
}
});
}
}
},
methods: {
// 获取详情
getActivityInfo() {
this.loading = true;
getActivityInfo({ marketingActivityId: this.actId })
.then(res => {
this.loading = false;
this.info = res.result || {};
})
.catch(() => {
this.loading = false;
});
},
updateActId(val) {
this.$emit('update:actId', val);
this.$emit('actUpdate'); // 触发父组件更新
if (!val) {
this.remoteMethod('');
}
},
// 模糊搜索
remoteMethod(search) {
this.listParams.search = search;
this.listParams.currentPage = 1;
this.tableList = [];
// this.marketingActivityId = '';
// this.updateActId('');
this.getList();
},
// 下一页
getMore() {
if (this.nomore) {
return;
}
this.listParams.currentPage = this.listParams.currentPage * 1 + 1;
this.getList();
},
getList() {
if (this.nomore) {
return;
}
this.loading = true;
this.nomore = false;
activityList(this.listParams)
.then(res => {
this.loading = false;
const tableList = this.tableList.concat(res.result.result) || [];
const total = res.result.totalCount;
this.tableList = tableList;
this.total = total;
this.nomore = total <= tableList.length || total - tableList.length < this.listParams.pagesize; // 没有下一页了
// console.log('total:', total, 'length:', tableList.length, this.nomore);
})
.catch(() => {
this.loading = false;
});
}
},
mounted() {
!this.readOnly && this.getList();
}
};
</script>
<style lang="scss" scoped>
.dm-input_label {
padding-right: 8px;
}
</style>
......@@ -194,7 +194,10 @@ export default {
},
popoverTagRemove(tag) {
this.currentValue.splice(this.currentValue.findIndex(val => val === tag.value), 1);
this.currentValue.splice(
this.currentValue.findIndex(val => val === tag.value),
1
);
this.$refs.select.$emit('change', JSON.parse(JSON.stringify(this.currentValue)));
},
......
......@@ -28,9 +28,7 @@
</template>
</el-table-column>
<el-table-column prop="cardLimit" :show-overflow-tooltip="false" label="领取限制" width="90">
<template slot-scope="scope">
{{ scope.row.cardLimit }}张/人
</template>
<template slot-scope="scope"> {{ scope.row.cardLimit }}张/人 </template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="90" align="left" prop="storeMode" label="适用门店">
<template slot-scope="scope">
......
......@@ -10,29 +10,11 @@ export const activityList = params => requests(PREFIX + 'marketing-activity-page
// 营销活动-- 删除
export const delActivity = params => requests(PREFIX + 'del-marketing-activity', params);
// 营销活动-- 删除
export const stopActivity = params => requests(PREFIX + 'expire-marketing-activity', params);
// 营销活动 - 获取详情
export const getActivityInfo = params => requests(PREFIX + 'get-marketing-activity-detail', params);
// 智能营销--ECM营销引擎-- 新建/修改 [保存]计划信息
// 营销活动-- 新建/修改 [保存]计划信息
export const saveActivity = params => requests(PREFIX + 'save-edit-marketing-activity', params);
// // 智能营销--下线
// export const offlineEcmPlan = params => requests(PREFIX + 'ecm-plan-offline', params);
// // 智能营销--记录--批次记录页面
// export const ecmBatchSendInfos = params => requests(PREFIX + 'ecm-batch-send-infos', params);
// // 智能营销--记录--批次人员列表
// export const ecmBatchSendDetails = params => requests(PREFIX + 'ecm-batch-send-details', params);
// // 智能营销--实时发送记录类型
// export const ecmCurrentSendInfos = params => requests(PREFIX + 'ecm-current-send-infos', params);
// // 智能营销--实时发送人员列表
// export const ecmCurrentSendDetails = params => requests(PREFIX + 'ecm-current-send-details', params);
// // 智能营销--记录--批次人员列表 导出csv
// export const exportBatchSendDetails = config.api + PREFIX + 'export-batch-send-details';
// // 智能营销--实时人员列表--导出csv
// export const exportCurrentSendDetails = config.api + PREFIX + 'export-current-send-details';
......@@ -5,9 +5,9 @@
<dm-input v-model="ruleForm.name" class="w300" placeholder="请输入活动名称" :byteType="1" :maxlength="10"></dm-input>
</el-form-item>
<el-form-item prop="dateTime" label="活动时间">
<el-date-picker v-model="ruleForm.beginDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="开始日期"></el-date-picker>
<el-date-picker :disabled="disabled" v-model="ruleForm.beginDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="开始日期"></el-date-picker>
<span style="color:#909299;margin-left:5px;margin-right:5px;">~</span>
<el-date-picker v-model="ruleForm.endDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="结束日期"></el-date-picker>
<el-date-picker :disabled="disabled" v-model="ruleForm.endDate" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submit">确认{{ isAdd ? '新建' : '保存' }}</el-button>
......@@ -28,9 +28,9 @@ export default {
if (!date1 || !date2) {
callback(new Error('活动时间不能为空'));
}
// if (new Date(date2).getTime() < new Date()) {
// callback(new Error('结束时间不能小于当前时间'));
// }
if (new Date(date2).getTime() < new Date()) {
callback(new Error('结束时间不能小于当前时间'));
}
if (new Date(date2).getTime() - new Date(date1).getTime() > 60 * 60 * 24 * 365 * 1000) {
callback(new Error(rule.message || '时间跨度不能超过一年'));
}
......@@ -52,6 +52,11 @@ export default {
isEdit: this.$route.meta.type === 'edit'
};
},
computed: {
disabled() {
return this.isEdit && new Date() > new Date(this.ruleForm.beginDate);
}
},
methods: {
submit() {
this.$refs.form.validate(valid => {
......@@ -62,6 +67,11 @@ export default {
if (this.isEdit) {
params.marketingActivityId = this.marketingActivityId;
}
if (this.disabled) {
// 不能改的时候不传活动时间
delete params.beginDate;
delete params.endDate;
}
this.loading = true;
saveActivity(params)
.then(res => {
......@@ -102,6 +112,7 @@ export default {
if (this.isAdd) {
breadcrumbName = '智能营销新增';
}
this.$store.commit('aside_handler', false);
this.$store.commit('mutations_breadcrumb', [{ name: '营销活动列表', path: '/activity/list' }, { name: breadcrumbName, path: '' }]); // eslint-disable-line
}
};
......
<template>
<section class="dm-wrap">
<div class="clearfix pb22">
<el-date-picker class="w400" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-input v-model="listParams.search" class="w300" placeholder="请输入活动名称/创建人" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/activity/add')">新建营销活动</el-button>
<el-button class="fr mr10" @click="$router.push('/activity/history-list')">查看历史活动</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading">
<el-table-column v-for="(v, i) in tableHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="i" :prop="v.prop" :label="v.label" :formatter="v.formatter">
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] || '--' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="210px" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="$router.push(`/activity/data-view/${scope.row.marketingActivityId}`)">数据概览</el-button>
<el-button type="text" @click="$router.push(`/activity/edit/${scope.row.marketingActivityId}`)">编辑</el-button>
<dm-delete @confirm="delData(scope.row)" tips="是否删除该营销活动?">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import talbeMethods from '@/mixins/tableMethods.js';
import { activityList, delActivity } from '@/service/api/activityApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
// import { enableAccessControl, confirmInfo } from '@/utils/auth.js';
export default {
name: 'activity-list',
data() {
return {
loading: false,
tableList: [],
dateTime: '',
tableHeader: [
{ label: '活动名称', prop: 'name', minWidth: '150', tooltip: true, align: 'left' },
{
label: '创建时间',
minWidth: '100',
align: 'left',
formatter: function(row) {
return `<p class="cell-time">
${formatDateTimeByType(row.createTime, 'yyyy-MM-dd-HH-mm-ss', true).y}<br />
<span>${formatDateTimeByType(row.createTime, 'yyyy-MM-dd-HH-mm-ss', true).h}</span>
</p>`;
}
},
{
label: '活动时间',
minWidth: '160',
align: 'left',
formatter: function(row) {
return `<p class="cell-time">
${formatDateTimeByType(row.beginDate, 'yyyy-MM-dd-HH-mm-ss')}<br />
<span>${formatDateTimeByType(row.endDate, 'yyyy-MM-dd-HH-mm-ss')}</span>
</p>`;
}
},
{ label: '创建人', prop: 'creatorName', minWidth: '120', align: 'left' },
{ label: '状态', prop: 'stateDesc', minWidth: '120', align: 'left' },
{ label: '合计营销人次', prop: 'aa', minWidth: '120', tooltip: true, align: 'left' }
],
listParams: {
expireType: 1, // -1: 进行中/未开始 1: 已过期 0: 使用中
beginTime: '',
endTime: '',
search: '', //否 String 输入发送人搜索
currentPage: 1, //是 Number 当前页面
pageSize: 20 //是 Number 每页显示条数
},
total: 0
};
},
mixins: [talbeMethods],
created() {
this.$store.commit('aside_handler', false);
this.$store.commit('mutations_breadcrumb', [{ name: '营销活动列表', path: '/activity/list' }, { name: '历史营销活动列表' }]); // eslint-disable-line
this.getTableList();
},
methods: {
async getTableList() {
try {
this.loading = true;
this.dataTimeFormat();
let res = await activityList(this.listParams);
if (res.errorCode === 0 && res.result) {
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
} else {
this.tableList = [];
this.total = 0;
}
} catch (err) {}
this.loading = false;
},
delData({ marketingActivityId }) {
this.loading = true;
delActivity({ marketingActivityId })
.then(res => {
this.loading = false;
this.$tips({ type: 'success', message: '删除成功!' });
this.getTableList();
})
.catch(err => {
this.loading = false;
this.$tips({ type: 'error', message: '删除失败!' });
});
},
/**-------辅助方法---------- */
dataTimeFormat() {
if (this.dateTime) {
this.listParams.beginTime = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
this.listParams.endTime = formatDateTimeByType(this.dateTime[1], 'yyyy-MM-dd');
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
}
}
}
};
</script>
......@@ -31,7 +31,7 @@
</template>
<script>
import talbeMethods from '@/mixins/tableMethods.js';
import { activityList, delActivity } from '@/service/api/activityApi.js';
import { activityList, delActivity, stopActivity } from '@/service/api/activityApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
// import { enableAccessControl, confirmInfo } from '@/utils/auth.js';
export default {
......@@ -72,6 +72,7 @@ export default {
{ label: '合计营销人次', prop: 'aa', minWidth: '120', tooltip: true, align: 'left' }
],
listParams: {
expireType: -1, // -1: 进行中/未开始 1: 已过期 0: 使用中
beginTime: '',
endTime: '',
search: '', //否 String 输入发送人搜索
......@@ -104,9 +105,8 @@ export default {
this.loading = false;
},
stopData({ marketingActivityId }) {
return;
this.loading = true;
delActivity({ marketingActivityId })
stopActivity({ marketingActivityId })
.then(res => {
this.loading = false;
this.$tips({ type: 'success', message: '操作成功!' });
......
......@@ -49,9 +49,7 @@
</template>
</el-table-column>
<el-table-column align="left" width="150" prop="callTime" label="通话时长(秒)">
<template slot-scope="scope">
{{ scope.row.callTime }}
</template>
<template slot-scope="scope"> {{ scope.row.callTime }}</template>
</el-table-column>
<el-table-column align="left" width="150" prop="callFee" label="录音">
<template slot-scope="scope">
......
......@@ -8,17 +8,13 @@
<el-form-item label="投放卡券">
<el-input class="w250" v-model="form.cardName" disabled></el-input>
</el-form-item>
<el-form-item label="发送时间">
<el-form-item label="发送时间" class="mb20">
<el-select class="w250" v-model="form.putOnType" :disabled="isInfo">
<el-option v-for="(v, i) in putOnTypeOptions" :key="i" :value="v.value" :label="v.label"></el-option>
</el-select>
<el-date-picker :disabled="isInfo" class="w250" v-if="form.putOnType" v-model="form.putOnTime" type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label="营销场景">
<el-select class="w250" v-model="form.sceneSettingId" :disabled="isInfo">
<el-option v-for="(v, i) in sceneSettingOptions" :key="i" :value="v.sceneSettingId" :label="v.sceneName"></el-option>
</el-select>
</el-form-item>
<activity-select class="ml30" :actId.sync="form.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
</div>
<div class="dm-form__wrap">
<h3 class="dm-title__label">会员设置</h3>
......@@ -145,9 +141,9 @@
</el-form>
</template>
<script>
import activitySelect from '@/components/activity-select';
import { checkPutonMemberIds, saveUpdatePutonCard, getCardDetail, getCardPutonDetail } from '@/service/api/cardApi.js';
import { listTemplateVariables } from '@/service/api/msgApi.js';
import { sceneSettingList } from '@/service/api/commonApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import itemCard from './partials/item-card.vue';
import varDialog from './partials/variables.vue';
......@@ -155,7 +151,8 @@ export default {
name: 'card-group',
components: {
'item-card': itemCard,
'var-dialog': varDialog
'var-dialog': varDialog,
activitySelect
},
data() {
return {
......@@ -176,7 +173,7 @@ export default {
saveTag: false,
form: {
memberType: 0,
sceneSettingId: '',
marketingActivityId: '',
putOnTime: '',
putOnType: 0,
memberSearchDTO: '',
......@@ -240,7 +237,6 @@ export default {
},
created() {
this.listTemplateVariables();
this.sceneSettingList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '/card' }, { name: '卡券库', path: '/card/list' }, { name: '卡券群发', path: '' }]); // eslint-disable-line
this.$store.commit(
'mutations_layoutTips',
......@@ -258,13 +254,6 @@ export default {
this.$store.commit('mutations_layoutTips', '');
},
methods: {
// 拉取营销场景
async sceneSettingList() {
let res = await sceneSettingList();
if (res.errorCode === 0) {
this.sceneSettingOptions = res.result || [];
}
},
// 获取变量列表
async listTemplateVariables() {
try {
......@@ -290,7 +279,7 @@ export default {
this.form.putOnName = form.putOnName;
this.form.putOnType = form.putOnType;
this.form.memberType = form.memberType;
this.form.sceneSettingId = form.sceneSettingId;
this.form.marketingActivityId = form.marketingActivityId;
this.form.sceneSettingName = form.sceneSettingName;
this.form.memberSearchDTO = form.searchParams;
this.form.cardId = form.cardId;
......@@ -545,7 +534,7 @@ export default {
let params = {
putOnName: this.form.putOnName, // 1.活动名称
cardId: this.form.cardId, // 2.投放卡券,卡券主键ID
sceneSettingId: this.form.sceneSettingId, // 3.营销场景
marketingActivityId: this.form.marketingActivityId, // 3.营销场景
memberType: this.form.memberType, // 4.选择会员类型: 会员筛选: 0; 指定会员: 1
// memberSearchDTO:this.form.memberSearchDTO, // JSON.Stringify 人群筛选器
memberSearchDTO: this.form.memberType ? this.form.memberGroupIds : this.form.memberSearchDTO,
......@@ -610,13 +599,13 @@ export default {
type: 'warning'
})
.then(() => {
this.$router.go(-1);
this.$router.push('/card/list');
})
.catch(err => {
this.getCardPutonDetail();
});
} else {
this.$router.go(-1);
this.$router.go('/card/list');
}
} else {
this.$tips({ type: 'error', message: '操作失败' });
......
......@@ -21,9 +21,7 @@
</template>
</el-table-column>
<el-table-column prop="cardLimit" :show-overflow-tooltip="false" label="领取限制" width="90">
<template slot-scope="scope">
{{ scope.row.cardLimit }}张/人
</template>
<template slot-scope="scope"> {{ scope.row.cardLimit }}张/人 </template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="90" align="left" prop="storeMode" label="适用门店">
<template slot-scope="scope">
......
......@@ -16,9 +16,7 @@
<el-table-column width="120" align="left" prop="getedQuantity" label="领取数量"></el-table-column>
<el-table-column width="120" align="left" prop="usageQuantity" label="使用数量"></el-table-column>
<el-table-column width="120" align="left" prop="col4" label="核销率">
<template slot-scope="scope">
{{ ((scope.row.usageQuantity * 100) / (scope.row.getedQuantity === 0 ? 1 : scope.row.getedQuantity)).toFixed(2) }}%
</template>
<template slot-scope="scope"> {{ ((scope.row.usageQuantity * 100) / (scope.row.getedQuantity === 0 ? 1 : scope.row.getedQuantity)).toFixed(2) }}% </template>
</el-table-column>
<el-table-column width="120" align="left" prop="saleAmount" label="销售额"></el-table-column>
<el-table-column label="操作" align="left" width="160px" fixed="right">
......
import { getEcmInfo, saveEcmInfo } from '@/service/api/ecmApi.js';
import activitySelect from '@/components/activity-select';
import { listTemplateVariables } from '@/service/api/msgApi.js';
import { sceneSettingList } from '@/service/api/commonApi.js';
import { klflStrategy } from '@/service/api/gameApi.js'; // 会员等级列表接口
import xxSysp_mix from '@/mixins/selector.js'; // 商品选择器方法mixins
import marketingEvent from './marketing-event/index.vue';
......@@ -34,7 +34,7 @@ export default {
effectType: 0,
effectTime: 0,
effectAction: 'subscribe',
sceneSettingId: '',
marketingActivityId: '',
sceneSettingName: '',
expireType: 0,
cardId: '',
......@@ -129,7 +129,8 @@ export default {
components: {
'marketing-event': marketingEvent,
'item-card': itemCard,
'var-dialog': varDialog
'var-dialog': varDialog,
activitySelect
},
watch: {
checked(val) {
......@@ -211,11 +212,6 @@ export default {
console.log(err);
}
},
// 获取营销场景
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
},
// 获取ecm信息
async getEcmInfo(isResetTemplate = false) {
this.loading = true;
......@@ -235,7 +231,7 @@ export default {
this.form.effectType = result.effectType;
this.form.effectTime = result.effectTime;
this.form.effectAction = result.effectAction;
this.form.sceneSettingId = result.sceneSettingId;
this.form.marketingActivityId = result.marketingActivityId;
this.form.sceneSettingName = result.sceneSettingName;
this.form.memberType = result.memberType;
this.form.expireType = result.expireType;
......@@ -573,7 +569,7 @@ export default {
}
if (this.isAdd) {
params.sceneSettingId = this.form.sceneSettingId; // 否 String 营销场景
params.marketingActivityId = this.form.marketingActivityId; // 否 String 营销场景
}
// 如果适用人群-人群筛选器可编辑:需要调用await this.$refs.threshold.triggerPeopleSet(); 强制触发回显,否则数据保存有错误
// await this.triggerPeopleSet();
......@@ -643,13 +639,13 @@ export default {
type: 'warning'
})
.then(() => {
this.$router.go(-1);
this.$router.push('/ecm/list');
})
.catch(err => {
this.getEcmInfo();
});
} else {
this.$router.go(-1);
this.$router.push('/ecm/list');
}
} else {
this.$tips({ type: 'error', message: res.message || '操作失败' });
......@@ -876,7 +872,6 @@ export default {
// 设置面包屑
let breadcrumbName = '智能营销编辑';
if (this.isAdd) {
this.sceneSettingList();
breadcrumbName = '智能营销新增';
}
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }, { name: breadcrumbName, path: '' }]); // eslint-disable-line
......
......@@ -48,14 +48,8 @@
</div>
</el-checkbox-group>
</el-form-item>
<el-form-item label="营销场景">
<span v-if="isEdit">{{ form.sceneSettingName }}</span>
<el-select v-else class="w400" v-model="form.sceneSettingId" placeholder="选择营销场景">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
</el-form-item>
<activity-select style="margin-left:42px" :actId.sync="form.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
</section>
{{ xxSysp.goodsList_copy }}
<!-- 消费触发配置 -->
<section class="dm-form__wrap" v-if="!form.effectType && form.effectAction === 'consume'">
<h3 class="dm-title__label">
......@@ -406,4 +400,7 @@ export default ecmForm;
color: #1890ff;
}
}
/deep/ .act-select {
width: 400px !important;
}
</style>
......@@ -7,9 +7,7 @@
<el-select class="dm-select" clearable v-model="listParams.marketingType" placeholder="选择营销方式" @change="search">
<el-option v-for="(v, i) in marketingTypeOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
<el-select class="dm-select" clearable v-model="listParams.sceneSettingId" placeholder="选择营销场景" @change="search">
<el-option v-for="v in sceneSettingIdOptions" :key="v.sceneSettingId" :label="v.sceneName" :value="v.sceneSettingId"></el-option>
</el-select>
<activity-select class="vertical-middle w150 mr5" :actId.sync="listParams.marketingActivityId" onlySelect @actUpdate="search"></activity-select>
<el-select class="dm-select" clearable v-model="listParams.onlineStatus" placeholder="选择上线状态" @change="search">
<el-option v-for="(v, i) in onlineOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select>
......@@ -42,8 +40,8 @@
</section>
</template>
<script>
import activitySelect from '@/components/activity-select';
import { loadEcmList, deleteEcm, offlineEcmPlan } from '@/service/api/ecmApi.js';
import { sceneSettingList } from '@/service/api/commonApi.js';
const marketingTypeOptions = [{ value: '', label: '所有发送类型' }, { value: 'card', label: '卡券营销' }, { value: 'message', label: '短信营销' }, { value: 'teletext', label: '图文营销' }, { value: 'text', label: '文本营销' }, { value: 'teltask', label: '话务' }, { value: 'image', label: '微信图片' }]; // eslint-disable-line
export default {
name: 'ecm',
......@@ -51,12 +49,11 @@ export default {
return {
effectTypeOption: [{ value: '', label: '所有时效' }, { value: 0, label: '实时' }, { value: 1, label: '定时' }], // eslint-disable-line
onlineOptions: [{ value: '', label: '所有上线状态' }, { value: 0, label: '待上线' }, { value: 1, label: '已上线' }, { value: 2, label: '已下线' }], // eslint-disable-line
sceneSettingIdOptions: [],
marketingTypeOptions,
listParams: {
effectType: '', // 全部失效的默认值是-1,提交时判断''改为-1
marketingType: '',
sceneSettingId: '',
marketingActivityId: '',
onlineStatus: '',
searchName: '',
currentPage: 1,
......@@ -77,7 +74,15 @@ export default {
}
},
{ label: '营销方式', prop: 'marketingType', minWidth: '160', align: 'left' },
{ label: '营销场景', prop: 'sceneSettingName', width: '160', align: 'left' },
{
label: '营销场景',
prop: 'marketingActivityName',
width: '160',
align: 'left',
formatter(row) {
return row.marketingActivityName || '--';
}
},
{ label: '营销人次', prop: 'timesForPeople', width: '160', align: 'left' },
{
label: '上线状态',
......@@ -104,9 +109,11 @@ export default {
tableList: []
};
},
components: {
activitySelect
},
created() {
this.loadEcmList();
this.sceneSettingList();
this.$store.commit('aside_handler', false);
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '智能营销', path: '/ecm' }]); // eslint-disable-line
},
......@@ -173,11 +180,6 @@ export default {
} catch (err) {
this.$tips({ type: 'error', message: '下线失败!' });
}
},
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
this.sceneSettingIdOptions.unshift({ sceneName: '所有营销场景', sceneSettingId: '' });
}
}
};
......
......@@ -27,9 +27,7 @@
</template>
</el-table-column>
<el-table-column prop="cardLimit" :show-overflow-tooltip="false" label="领取限制" width="90">
<template slot-scope="scope">
{{ scope.row.cardLimit }}张/人
</template>
<template slot-scope="scope"> {{ scope.row.cardLimit }}张/人 </template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="90" align="left" prop="storeMode" label="适用门店">
<template slot-scope="scope">
......
......@@ -5,6 +5,7 @@
<el-form-item label="游戏名称" prop="gameName">
<dm-input v-model="form.gameName" class="w400" :disabled="isInfo" :maxlength="25"></dm-input>
</el-form-item>
<activity-select style="margin-left:32px" class="mb20" :actId.sync="form.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<el-form-item label="游戏时间" prop="dateTime">
<el-date-picker :picker-options="pickerOptions" class="w400" :default-time="['00:00:00', '23:59:59']" v-model="form.dateTime" :disabled="isInfo" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
......@@ -95,14 +96,10 @@
</template>
</el-table-column>
<el-table-column prop="prizeQuantity" label="商品数量" align="left" :min-width="160">
<template slot-scope="scope" v-if="scope.row.prizeType !== 3">
<el-input-number controls-position="right" v-model="scope.row.prizeCount" type="number" :min="0" :disabled="isInfo" class="width50" size="small"></el-input-number>
</template>
<template slot-scope="scope" v-if="scope.row.prizeType !== 3"> <el-input-number controls-position="right" v-model="scope.row.prizeCount" type="number" :min="0" :disabled="isInfo" class="width50" size="small"></el-input-number></template>
</el-table-column>
<el-table-column prop="date" :render-header="labelTips" align="left" width="100">
<template slot-scope="scope" v-if="scope.row.prizeType !== 3">
{{ (totalCount * scope.row.prizeCount || 0).toFixed(2) }}%
</template>
<template slot-scope="scope" v-if="scope.row.prizeType !== 3"> {{ (totalCount * scope.row.prizeCount || 0).toFixed(2) }}% </template>
</el-table-column>
</el-table>
</el-form-item>
......@@ -120,6 +117,7 @@
</template>
<script>
import activitySelect from '@/components/activity-select';
import { detailLottery, saveLottery, downloadWheelSkinPsd } from '@/service/api/gameApi.js';
import { numberToChinese, formatDateTimeByType } from '@/utils/index.js';
import dmUploadAvatar from '@/components/upload/avatar';
......@@ -144,6 +142,7 @@ export default {
defaltSelected: [] // 会员分组默认穿梭窗已选入数据
},
form: {
marketingActivityId: '',
gameId: '',
gameName: '',
dateTime: [],
......@@ -239,7 +238,8 @@ export default {
components: {
dmUploadAvatar,
dmShare,
dmThreshold
dmThreshold,
activitySelect
},
created() {
if (this.isEdit || this.isInfo) {
......@@ -297,6 +297,7 @@ export default {
this.canEdit = this.isEdit ? res.result.canEdit : true; // 不是本人禁用按钮
this.creatorId = gameDetail.creatorId;
this.form = Object.assign(this.form, {
marketingActivityId: gameDetail.marketingActivityId,
gameId: gameDetail.gameId,
gameName: gameDetail.gameName, //1
dateTime: [gameDetail.gameStartTime || '', gameDetail.gameEndTime || ''], //2
......@@ -429,6 +430,7 @@ export default {
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
marketingActivityId: this.form.marketingActivityId,
gameId: this.form.gameId, // 游戏主键ID (新建传空, 修改必传)
gameName: this.form.gameName, // 1.游戏名称
gameStartTimeStr: this.form.dateTime ? formatDateTimeByType(this.form.dateTime[0], 'yyyy-MM-dd-HH-mm-ss') : '', // 2.游戏时间 startDate
......@@ -450,7 +452,6 @@ export default {
gameType: 1, // 活动类型,1:大转盘,2:刮刮卡
shareFlag: this.form.shareFlag || 0
};
// 游戏分享
let shareSetting = {};
if (this.form.shareFlag) {
......@@ -600,4 +601,7 @@ export default {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
}
}
/deep/ .act-select {
width: 400px !important;
}
</style>
......@@ -5,6 +5,7 @@
<el-form-item label="游戏名称" class="width50" prop="gameName">
<dm-input v-model="form.gameName" class="w400" :disabled="isInfo" :maxlength="25"></dm-input>
</el-form-item>
<activity-select style="margin-left:32px" class="mb20" :actId.sync="form.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<el-form-item label="游戏时间" class="width50" prop="dateTime">
<el-date-picker class="w400" v-model="form.dateTime" :disabled="isInfo" :default-time="['00:00:00', '23:59:59']" :picker-options="pickerOptions" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</el-form-item>
......@@ -73,14 +74,10 @@
</template>
</el-table-column>
<el-table-column prop="prizeQuantity" label="商品数量" align="left" :min-width="160">
<template slot-scope="scope" v-if="scope.row.prizeType !== 3">
<el-input-number controls-position="right" v-model="scope.row.prizeCount" type="number" :min="0" :disabled="isInfo" class="width50" size="small"></el-input-number>
</template>
<template slot-scope="scope" v-if="scope.row.prizeType !== 3"> <el-input-number controls-position="right" v-model="scope.row.prizeCount" type="number" :min="0" :disabled="isInfo" class="width50" size="small"></el-input-number></template>
</el-table-column>
<el-table-column prop="date" :render-header="labelTips" align="left" width="100">
<template slot-scope="scope" v-if="scope.row.prizeType !== 3">
{{ (totalCount * scope.row.prizeCount || 0).toFixed(2) }}%
</template>
<template slot-scope="scope" v-if="scope.row.prizeType !== 3"> {{ (totalCount * scope.row.prizeCount || 0).toFixed(2) }}% </template>
</el-table-column>
<el-table-column prop="date" label="操作" align="left" width="80">
<template slot-scope="scope">
......@@ -106,6 +103,7 @@
</template>
<script>
import activitySelect from '@/components/activity-select';
import { detailLottery, saveLottery, downloadWheelSkinPsd } from '@/service/api/gameApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import dmUploadAvatar from '@/components/upload/avatar';
......@@ -130,6 +128,7 @@ export default {
defaltSelected: [] // 会员分组默认穿梭窗已选入数据
},
form: {
marketingActivityId: '',
gameId: '',
gameName: '',
dateTime: [],
......@@ -207,7 +206,8 @@ export default {
components: {
dmUploadAvatar,
dmShare,
dmThreshold
dmThreshold,
activitySelect
},
created() {
if (this.isEdit || this.isInfo) {
......@@ -264,6 +264,7 @@ export default {
this.canEdit = this.isEdit ? res.result.canEdit : true; // 不是本人禁用按钮
this.creatorId = gameDetail.creatorId;
this.form = Object.assign(this.form, {
marketingActivityId: gameDetail.marketingActivityId,
gameId: gameDetail.gameId,
gameName: gameDetail.gameName,
dateTime: [gameDetail.gameStartTime || '', gameDetail.gameEndTime || ''],
......@@ -384,6 +385,7 @@ export default {
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
marketingActivityId: this.form.marketingActivityId,
gameId: this.form.gameId, // 游戏主键ID (新建传空, 修改必传)
gameName: this.form.gameName, // 1.游戏名称
gameStartTimeStr: this.form.dateTime ? formatDateTimeByType(this.form.dateTime[0], 'yyyy-MM-dd-HH-mm-ss') : '', // 2.游戏时间 startDate
......@@ -533,4 +535,7 @@ export default {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
}
}
/deep/ .act-select {
width: 400px !important;
}
</style>
......@@ -5,6 +5,7 @@
<el-form-item label="游戏名称" prop="gameName" class="width50">
<dm-input v-model="form.gameName" class="w400" :maxlength="10"></dm-input>
</el-form-item>
<activity-select style="margin-left:40px" class="mb20" :actId.sync="form.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<el-form-item label="游戏背景" class="clearfix">
<div class="left-bg fl">
<div class="bg-head gray-bg">示例</div>
......@@ -184,6 +185,7 @@
</template>
<script>
import activitySelect from '@/components/activity-select';
import { klflDetail, klflSave, klflStrategyList, klflPrizeList, klflStrategySort, klflStrategyDel, klflDownTemp } from '@/service/api/gameApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import dmUploadImg from '@/components/upload/img';
......@@ -217,6 +219,7 @@ export default {
defaltSelected: [] // 会员分组默认穿梭窗已选入数据
},
form: {
marketingActivityId: '',
gameActivityId: this.$route.params.id,
gameName: '',
bgImg: {
......@@ -271,7 +274,7 @@ export default {
strategyType: 'add',
gamePrizeStrategyId: '',
prizeList: [{ prizeCount: 0, prizeStock: 0, card: { cardName: '' }, proGift: { mainPicUrl: { code: '', imgUrl: '' } }, codeId: '', gameCode: '', codeStock: '' }],
prizeReferTypeOptions: [{ value: 1, label: '积分' }, { value: 2, label: '卡券' }, { value: 3, label: '礼品' }],
prizeReferTypeOptions: [{ value: 1, label: '积分' }, { value: 2, label: '卡券' }, { value: 3, label: '礼品' }], // eslint-disable-line
systemBakImgList: [{ imageUrl: '' }],
systemBtnImgList: [{ imageUrl: '' }],
currentBg: { imageUrl: '' },
......@@ -305,7 +308,8 @@ export default {
calculate,
codeDialog,
dmShare,
dmThreshold
dmThreshold,
activitySelect
},
computed: {
asideShow() {
......@@ -495,6 +499,7 @@ export default {
console.log(result.game);
if (result.game) {
this.creatorId = result.game.creatorId;
this.form.marketingActivityId = result.game.marketingActivityId;
this.form.gameActivityId = result.game.gameActivityId;
this.form.gameName = result.game && result.game.gameName;
this.form.dateTime = result.game && [result.game.gameStartTime || '', result.game.gameEndTime || ''];
......@@ -606,6 +611,7 @@ export default {
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
marketingActivityId: this.form.marketingActivityId,
gameName: this.form.gameName,
backgroudImgUrl: this.currentBg.imageUrl,
backgroudImgFieldCode: this.currentBg.imgFieldCode,
......@@ -805,4 +811,7 @@ export default {
<style lang="scss" scoped>
@import './form.scss';
/deep/ .act-select {
width: 400px !important;
}
</style>
......@@ -5,6 +5,7 @@
<el-form-item label="游戏名称" prop="gameName" class="width50">
<dm-input v-model="form.gameName" class="w400" :disabled="isInfo" :maxlength="25"></dm-input>
</el-form-item>
<activity-select style="margin-left:51px" class="mb20" :actId.sync="form.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<el-form-item label="游戏时间" prop="dateTime" class="width50">
<el-date-picker class="w400" :disabled="isInfo" v-model="form.dateTime" :picker-options="pickerOptions" type="datetimerange" :default-time="['00:00:00', '23:59:59']" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</el-form-item>
......@@ -17,14 +18,10 @@
<p class="gray fz13">用户按游戏得分由高到低依次获得奖项。</p>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column prop="awardName" label="奖项" align="left" width="90">
<template slot-scope="scope">
{{ (scope.$index + 1) | numberToChinese }}等奖
</template>
<template slot-scope="scope"> {{ (scope.$index + 1) | numberToChinese }}等奖 </template>
</el-table-column>
<el-table-column prop="winnerCount" label="奖品数量" align="left" width="220">
<template slot-scope="scope"
><el-input-number controls-position="right" v-model="scope.row.winnerCount" :precision="0" :min="1" size="small" class="w150" :disabled="isInfo"></el-input-number></template
>
<template slot-scope="scope"><el-input-number controls-position="right" v-model="scope.row.winnerCount" :precision="0" :min="1" size="small" class="w150" :disabled="isInfo"></el-input-number></template>
</el-table-column>
<el-table-column prop="prizeName" label="商品名称" align="left" :min-width="180">
<template slot-scope="scope">
......@@ -109,6 +106,7 @@
</template>
<script>
import activitySelect from '@/components/activity-select';
import { ptyxDetail, savePtyx, getGameSystemMusic, downloadPtyxSkinPsd } from '@/service/api/gameApi.js';
import { numberToChinese, formatDateTimeByType } from '@/utils/index.js';
import dmUploadAvatar from '@/components/upload/avatar';
......@@ -141,6 +139,7 @@ export default {
defaltSelected: [] // 会员分组默认穿梭窗已选入数据
},
form: {
marketingActivityId: '',
gameName: '',
puzzleImg: { imgUrl: '', code: '' }, // puzzleImg,logoImg
gameIntroduction: '',
......@@ -239,7 +238,8 @@ export default {
ptyxSkin,
audioUpload,
dmShare,
dmThreshold
dmThreshold,
activitySelect
},
methods: {
//添加奖品
......@@ -278,6 +278,7 @@ export default {
this.creatorId = gameInfo.creatorId;
this.form = Object.assign(this.form, {
gameActivityId: gameInfo.gameActivityId,
marketingActivityId: gameInfo.marketingActivityId,
gameName: gameInfo.gameName,
puzzleImg: {
code: gameInfo.puzzleImgFieldCode,
......@@ -431,6 +432,7 @@ export default {
if (!this.isEdit) {
gameInfo.activityPuzzleId = '';
}
gameInfo.marketingActivityId = this.form.marketingActivityId || '';
gameInfo.gameActivityId = this.form.gameActivityId || '';
gameInfo.gameName = this.form.gameName || '';
gameInfo.puzzleImgFieldCode = this.form.puzzleImg.code || '';
......@@ -662,3 +664,9 @@ export default {
}
};
</script>
<style lang="scss" scoped>
/deep/ .act-select {
width: 400px !important;
}
</style>
......@@ -5,6 +5,7 @@
<el-form-item label="游戏名称" prop="gameName" class="width50">
<dm-input v-model="form.gameName" class="w400" :maxlength="25"></dm-input>
</el-form-item>
<activity-select style="margin-left:32px" class="mb20" :actId.sync="form.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<el-form-item label="LOGO上传" prop="logoImg" class="width50">
<dm-upload-avatar :model.sync="form.logoImg" width="auto" label="上传图片" tips=" 请上传高度为80px的PNG透明背景图片"></dm-upload-avatar>
</el-form-item>
......@@ -72,6 +73,7 @@
</template>
<script>
import activitySelect from '@/components/activity-select';
import { znmDetail, znmSave, znmStrategyList, znmStrategySort, znmStrategyDel } from '@/service/api/gameApi.js';
import { numberToChinese, formatDateTimeByType } from '@/utils/index.js';
import dmUploadAvatar from '@/components/upload/avatar';
......@@ -99,6 +101,7 @@ export default {
defaltSelected: [] // 会员分组默认穿梭窗已选入数据
},
form: {
marketingActivityId: '',
gameActivityId: '',
gameName: '',
attendLimitCounts: 1,
......@@ -156,7 +159,8 @@ export default {
dmUploadAvatar,
strategy,
dmShare,
dmThreshold
dmThreshold,
activitySelect
},
computed: {
asideShow() {
......@@ -232,6 +236,7 @@ export default {
const gameDetail = res.result.gameDetail;
this.creatorId = gameDetail.creatorId;
this.form = Object.assign(this.form, {
marketingActivityId: gameDetail.marketingActivityId,
gameActivityId: gameDetail.gameActivityId,
gameName: gameDetail.gameName,
attendLimitCounts: gameDetail.attendLimitCounts,
......@@ -318,6 +323,7 @@ export default {
this.$refs[formName].validate(valid => {
if (valid) {
let params = {
marketingActivityId: this.form.marketingActivityId,
gameName: this.form.gameName, // 是 String 游戏名称
attendLimitCounts: this.form.attendLimitCounts, // 游戏次数限制
logoImgUrl: this.form.logoImg.imgUrl, // 是 String LOGO上传 url
......@@ -436,3 +442,9 @@ export default {
}
};
</script>
<style lang="scss" scoped>
/deep/ .act-select {
width: 400px !important;
}
</style>
......@@ -24,8 +24,9 @@
<span class="regular-font-color">{{ info.sendType === 0 ? '普通短信' : '营销短信' }}</span>
</el-col>
<el-col :span="8">
<span class="primary-font-color">营销场景:</span>
<span class="regular-font-color">{{ info.sceneSettingName }}</span>
<!-- <span class="primary-font-color">营销场景:</span>
<span class="regular-font-color">{{ info.sceneSettingName }}</span> -->
<activity-select :actId.sync="info.marketingActivityId" readOnly></activity-select>
</el-col>
<el-col :span="24">
<span class="primary-font-color">短信模板:</span>
......@@ -100,6 +101,7 @@
</div>
</template>
<script>
import activitySelect from '@/components/activity-select';
import { LoadMessageDetail, LoadMessageDetailList, exportSmsExcel } from '@/service/api/messageApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import errorCodeDialog from './errorCode';
......@@ -185,7 +187,8 @@ export default {
}
},
components: {
errorCodeDialog
errorCodeDialog,
activitySelect
},
methods: {
async LoadMessageDetail(id) {
......
......@@ -2,11 +2,7 @@
<el-form v-loading="loading">
<section class="dm-form__wrap">
<h3 class="dm-title__label">场景设置</h3>
<el-form-item label="营销场景">
<el-select class="w250" v-model="info.sceneSettingId" placeholder="选择营销场景">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
</el-form-item>
<activity-select class="mb20" :actId.sync="info.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<el-form-item label="发送时间">
<el-select class="w250" v-model="info.sendType">
<el-option v-for="(v, i) in sendTypeOptions" :key="i" :value="v.value" :label="v.label"></el-option>
......@@ -48,8 +44,8 @@
</el-form>
</template>
<script>
import activitySelect from '@/components/activity-select';
import { saveSendSmsService, checkMessageSendCount } from '@/service/api/messageApi.js';
import { sceneSettingList } from '@/service/api/wechatApi.js';
import smsTemp from '@/components/libs/smsTemp';
import { formatDateTimeByType } from '@/utils/index.js';
......@@ -57,7 +53,6 @@ export default {
name: 'add-record',
data() {
return {
sceneSettingIdOptions: [],
loading: false,
sendTypeOptions: [{ value: 0, label: '立即发送' }, { value: 1, label: '选择时间发送' }], // eslint-disable-line
smsTempList: [],
......@@ -98,7 +93,7 @@ export default {
getSaveData: '',
info: {
memberType: 0,
sceneSettingId: '',
marketingActivityId: '',
sendTime: '',
sendType: 0,
memberSearchDTO: '',
......@@ -116,7 +111,8 @@ export default {
};
},
components: {
smsTemp
smsTemp,
activitySelect
},
computed: {
asideShow() {
......@@ -124,17 +120,11 @@ export default {
}
},
created() {
this.sceneSettingList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '短信营销', path: '' }, { name: '短信群发', path: '/message/record' }, { name: '新建群发', path: '' }]); // eslint-disable-line
},
methods: {
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
},
onSmsItemInfo(val) {
this.smsType = val.type;
console.log(val);
},
//提交表单验证人数 人员筛选和会员分组 需要
async checkMessageSendCount() {
......@@ -183,7 +173,7 @@ export default {
})
.then(() => {
const params = {
sceneSettingId: this.info.sceneSettingId,
marketingActivityId: this.info.marketingActivityId,
memberType: this.info.memberType,
smsTemplateId: this.info.gicSmsTemplateId,
gicSmsTemplateId: this.info.gicSmsTemplateId,
......@@ -201,7 +191,7 @@ export default {
saveSendSmsService(params)
.then(res => {
if (res.errorCode === 0) {
this.$router.go(-1);
this.$router.push('/message/record');
this.$tips({ type: 'success', message: '提交成功' });
} else {
this.$tips({ type: 'error', message: '提交失败' });
......
......@@ -5,9 +5,7 @@
<el-select class="dm-select" v-model="listParams.sendStatus" placeholder="选择发送状态" @change="refresh">
<el-option v-for="item in sendStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select class="dm-select" v-model="listParams.sceneSettingId" placeholder="选择营销场景" @change="refresh">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
<activity-select class="vertical-middle w150 mr5" :actId.sync="listParams.marketingActivityId" onlySelect @actUpdate="refresh"></activity-select>
<el-checkbox class="vertical-middle" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="refresh" />
<el-input v-model="listParams.search" class="w200" placeholder="输入模板名称/ID/内容" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="primary" @click="$router.push('/message/record/add')">新建群发</el-button>
......@@ -41,21 +39,21 @@
</section>
</template>
<script>
import activitySelect from '@/components/activity-select';
import { LoadMessageList, invalidsmsRecord } from '@/service/api/messageApi.js';
import { sceneSettingList } from '@/service/api/wechatApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import timeCounts from '@/components/timeCount/index.vue';
import tableMethods from '@/mixins/tableMethods.js';
export default {
name: 'sms-record',
components: {
timeCounts
timeCounts,
activitySelect
},
mixins: [tableMethods],
data() {
return {
sendStatusOptions: [{ value: '', label: '所有状态', type: '' }, { value: 0, label: '定时执行', type: 'warning' }, { value: 1, label: '执行完毕', type: 'success' }, { value: 2, label: '执行失败', type: 'danger' }, { value: 3, label: '无可用模板', type: 'danger' }, { value: 5, label: '执行中', type: 'primary--flash' }, { value: -1, label: '已失效', type: 'danger' }], // eslint-disable-line
sceneSettingIdOptions: [{ sceneSettingId: -1, sceneName: '所有营销场景' }],
recordLoading: false,
messageList: [],
recordHeader: [
......@@ -112,7 +110,7 @@ export default {
],
listParams: {
sendStatus: '',
sceneSettingId: -1,
marketingActivityId: '',
sendBeginTime: '',
sendEndTime: '',
search: '',
......@@ -127,7 +125,6 @@ export default {
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '短信营销', path: '' }, { name: '短信群发', path: '' }]); // eslint-disable-line
this.getTableList();
this.sceneSettingList();
},
methods: {
formatDateTimeByType,
......@@ -163,10 +160,6 @@ export default {
this.$tips({ type: 'error', message: '禁用失败!' });
});
},
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = this.sceneSettingIdOptions.concat(res.result || []);
},
filterStatus(val) {
let result = { label: '执行错误', type: 'warning' };
this.sendStatusOptions.forEach(v => {
......
......@@ -28,9 +28,7 @@
</el-table-column>
<el-table-column align="left" width="150" prop="telephone" label="接收号码"></el-table-column>
<el-table-column align="left" width="100" prop="countNum" label="计费条数">
<template slot-scope="scope"
>{{ scope.row.countNum }}
</template>
<template slot-scope="scope">{{ scope.row.countNum }}</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" align="left" min-width="180" prop="storeName" label="主门店">
<template slot-scope="scope">
......@@ -65,9 +63,7 @@
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="短信内容" align="left" min-width="200" prop="paramInfo">
<template slot-scope="scope"
>您的验证码是:{{ scope.row.paramInfo }}
</template>
<template slot-scope="scope">您的验证码是:{{ scope.row.paramInfo }} </template>
</el-table-column>
<el-table-column label="状态" align="left" width="100" prop="status">
<template slot-scope="scope">
......@@ -135,14 +131,10 @@
</template>
</el-table-column>
<el-table-column align="left" width="150" prop="callTime" label="时间(秒)">
<template slot-scope="scope"
>{{ scope.row.callTime }}</template
>
<template slot-scope="scope">{{ scope.row.callTime }}</template>
</el-table-column>
<el-table-column align="left" width="150" prop="callFee" label="消费金额(元)">
<template slot-scope="scope"
>{{ Number(scope.row.callFee / 1000).toFixed(2) }}</template
>
<template slot-scope="scope">{{ Number(scope.row.callFee / 1000).toFixed(2) }}</template>
</el-table-column>
</el-table>
<el-table tooltipEffect="light" :data="tableList" style="width:100%" v-loading="loading" v-if="$route.params.type === 'record'">
......@@ -186,14 +178,10 @@
</template>
</el-table-column>
<el-table-column align="left" width="150" prop="callTime" label="时间(分钟)">
<template slot-scope="scope">
{{ scope.row.callTime }}分钟
</template>
<template slot-scope="scope"> {{ scope.row.callTime }}分钟 </template>
</el-table-column>
<el-table-column align="left" width="150" prop="callFee" label="消费金额(元)">
<template slot-scope="scope">
{{ Number(scope.row.storageFee / 100).toFixed(2) }}
</template>
<template slot-scope="scope"> {{ Number(scope.row.storageFee / 100).toFixed(2) }}</template>
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
......
......@@ -15,9 +15,7 @@
</template>
</el-table-column>
<el-table-column label="金额" align="left" prop="totalFee">
<template slot-scope="scope">
{{ (scope.row.totalFee / 100).toFixed(2) }}
</template>
<template slot-scope="scope"> {{ (scope.row.totalFee / 100).toFixed(2) }}</template>
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
......
<template>
<div v-loading="loading">
<section class="dm-form__wrap">
<div class="mb20">
<span class="dm-input_label">营销场景:</span>
<span v-if="isEdit || isInfo">{{ info.sceneSettingName }}</span>
<el-select v-else class="w250" size="small" v-model="info.sceneSettingId" :disabled="isEdit || isInfo" placeholder="选择营销场景">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
</div>
<activity-select class="mb20" :actId.sync="info.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<div>
<span class="dm-input_label">发送时间:</span>
<el-select class="w250" v-model="info.sendType" :disabled="isInfo">
......@@ -84,12 +78,13 @@
</div>
</template>
<script>
import activitySelect from '@/components/activity-select';
import dmImgText from '@/components/libs/imgTextTemp';
import dmImgBox from '@/components/libs/imgTemp/index-box.vue';
import { getIsShowSelf } from '@/service/api/commonApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import { checkMessageSendCount } from '@/service/api/messageApi.js';
import { sceneSettingList, sendRecordSaveService, wechatImageTextEdit, getWechatMarketingDetail, sendRecordPreview } from '@/service/api/wechatApi.js';
import { sendRecordSaveService, wechatImageTextEdit, getWechatMarketingDetail, sendRecordPreview } from '@/service/api/wechatApi.js';
// import wxText from '@/components/wxText/wxText'
import wxText from '@/components/wx-text/index.vue';
......@@ -98,6 +93,7 @@ export default {
components: {
dmImgText,
dmImgBox,
activitySelect,
'wx-text': wxText
},
computed: {
......@@ -130,7 +126,6 @@ export default {
customToolbar: [['link']],
currentImgText: { itemList: [] },
formatDateTimeByType,
sceneSettingIdOptions: [],
// 人群筛选器可传参数
sceneValue: 'member', // 场景值
useId: '', // 模板id
......@@ -139,7 +134,7 @@ export default {
getSaveData: '',
saveTag: false,
info: {
sceneSettingId: '',
marketingActivityId: '',
sceneSettingName: '',
searchJson: '',
sendTime: '',
......@@ -183,13 +178,11 @@ export default {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理' }, { name: '微信营销', path: '' }, { name: '发送记录', path: '/wechat' }, { name: '微信群发', path: '' }]);
if (this.imgTextFlag) {
this.wechatImageTextEdit();
this.sceneSettingList();
}
if (this.isEdit || this.isInfo) {
this.getWechatMarketingDetail();
}
if (this.isAdd) {
this.sceneSettingList();
this.handleIsShowSelf();
}
},
......@@ -210,7 +203,7 @@ export default {
if (res.errorCode === 0 && res.result.wechatDTO) {
const result = res.result.wechatDTO;
this.creatorId = result.creatorId;
this.info.sceneSettingId = result.sceneSettingId;
this.info.marketingActivityId = result.marketingActivityId;
this.info.sceneSettingName = result.sceneSettingName;
this.info.sendTime = result.sendTime;
this.info.sendType = result.sendType;
......@@ -248,10 +241,6 @@ export default {
console.log(err);
}
},
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
},
//获取图文
getImgTextData(val) {
this.info.imageTextId = val.imageTextId;
......@@ -336,7 +325,7 @@ export default {
.then(() => {
this.loading = true;
let params = {
sceneSettingId: this.info.sceneSettingId,
marketingActivityId: this.info.marketingActivityId,
memberType: this.info.memberType,
contentType: this.info.contentType,
sendType: this.info.sendType,
......@@ -442,7 +431,7 @@ export default {
.then(() => {
this.loading = true;
let params = {
sceneSettingId: this.info.sceneSettingId,
marketingActivityId: this.info.marketingActivityId,
memberType: this.info.memberType,
contentType: this.info.contentType,
sendType: this.info.sendType,
......
......@@ -8,9 +8,7 @@
<el-select class="vertical-middle w150" v-model="listParams.sendStatus" placeholder="选择发送状态" @change="search">
<el-option v-for="item in sendStatusOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select class="vertical-middle w150" v-model="listParams.sceneSettingId" placeholder="选择营销场景" @change="search">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
<activity-select class="vertical-middle w150 mr5" :actId.sync="listParams.marketingActivityId" onlySelect @actUpdate="search"></activity-select>
<el-checkbox class="vertical-middle" v-model="listParams.hideInvalid" :true-label="1" :false-label="0" label="隐藏已失效" border @change="search"></el-checkbox>
<el-checkbox class="vertical-middle ml0" v-if="$store.state.marketing.isShowSelf" v-model="listParams.showSelfFlag" :true-label="1" :false-label="0" label="仅看本人" border @change="search" />
<el-input v-model="listParams.clerkName" clearable class="vertical-middle w200" placeholder="请输入发送人名称" @change="search"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
......@@ -58,7 +56,8 @@
</section>
</template>
<script>
import { sendRecordList, sceneSettingList, delWechatMarketingRecord, invalidWechatMarketingRecord } from '@/service/api/wechatApi.js';
import activitySelect from '@/components/activity-select';
import { sendRecordList, delWechatMarketingRecord, invalidWechatMarketingRecord } from '@/service/api/wechatApi.js';
import { getIsShowSelf } from '@/service/api/commonApi.js';
import dmDialog from './dialog';
import { formatDateTimeByType } from '@/utils/index.js';
......@@ -67,13 +66,13 @@ export default {
name: 'wechat-record',
components: {
dmDialog,
'time-counts': timeCounts
'time-counts': timeCounts,
activitySelect
},
data() {
return {
contentTypeOptions: [{ value: '', label: '所有类型' }, { value: 0, label: '图文消息' }, { value: 1, label: '文本消息' }, { value: 2, label: '图片' }], // eslint-disable-line
sendStatusOptions: [{ value: '', label: '所有状态' }, { value: 0, label: '待发送' }, { value: 1, label: '已发送' }, { value: 2, label: '已失效' }], // eslint-disable-line
sceneSettingIdOptions: [],
canSend: false,
loading: false,
recordList: [],
......@@ -132,7 +131,15 @@ export default {
}
}
},
{ label: '营销场景', prop: 'sceneSettingName', align: 'left' },
{
label: '营销场景',
prop: 'marketingActivityName',
width: '160',
align: 'left',
formatter(row) {
return row.marketingActivityName || '--';
}
},
{ label: '发送人数', prop: 'sendMemberCount', width: '100', align: 'left' },
{ label: '送达人数', prop: 'sendCount', width: '100', align: 'left' },
{
......@@ -166,7 +173,7 @@ export default {
listParams: {
contentType: '', //否 number 图文类型(0:图文消息,1:文本消息, 2: 图片)
sendStatus: '', //否 number 发送状态(0:待发送,1:已发送,2:已失效)
sceneSettingId: '', //否 String 营销场景ID (全部:null)
marketingActivityId: '', //否 String 营销场景ID (全部:null)
hideInvalid: 0, //否 Number 隐藏失效: 1 (不隐藏: 0)
clerkName: '', //否 String 输入发送人搜索
currentPage: 1, //是 Number 当前页面
......@@ -182,7 +189,6 @@ export default {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理' }, { name: '微信营销', path: '' }, { name: '发送记录', path: '' }]);
this.sendRecordList();
this.handleIsShowSelf();
this.sceneSettingList();
},
methods: {
formatDateTimeByType,
......@@ -205,11 +211,6 @@ export default {
this.total = res.result.totalCount;
this.loading = false;
},
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
this.sceneSettingIdOptions.unshift({ sceneName: '所有营销场景', sceneSettingId: '' });
},
handleIsShowSelf() {
getIsShowSelf({ page: 'teletext' }).then(res => {
if (res.result.teletextFlag === true) {
......
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