Commit f97c953a by liuchenxi

update: 短信营销

parent e1d835ce
......@@ -36,7 +36,8 @@ export default {
type: String,
default: 'pb22'
},
activeId: String
activeId: String,
type: Number || String
},
data() {
return {
......@@ -53,11 +54,14 @@ export default {
watch: {
activeId(val) {
this.activeSmsId = val;
},
type: {
handler: function() {
this.LoadTempList();
},
immediate: true
}
},
created() {
this.LoadTempList();
},
methods: {
rowClick(row) {
this.activeSmsId = row.gicSmsTemplateId;
......@@ -74,6 +78,7 @@ export default {
},
async LoadTempList() {
this.loading = true;
this.listParams.type = this.type;
let res = await LoadTempList(this.listParams);
this.smsTempList = res.result.result || [];
this.total = res.result.totalCount;
......
......@@ -88,6 +88,14 @@ export default {
type: 'info',
path: '/message/import-send'
}
},
{
path: 'black-list',
name: '黑名单管理',
component: () => import(/* webpackChunkName: "message" */ '../../views/message/blackList.vue'),
meta: {
path: '/message/black-list'
}
}
]
};
......@@ -55,6 +55,15 @@ export const smsSmportPlanLogPage = params => requests(PREFIX + 'sms-import-plan
// 短信群发-保存导入短信群发
export const saveImportSmsPlan = params => requests(PREFIX + 'save-import-sms-plan', params);
// 短信群发-分页查询黑名单
export const getBlackList = params => requests(PREFIX + '/page-black-user-list', params);
// 短信群发-新增黑名单列表
export const addBlackList = params => requests(PREFIX + '/add-black-user-list', params);
// 短信群发-移除黑名单
export const removeBlackList = params => requests(PREFIX + '/remove-black-user', params);
// 短信群发-导入短信群发手机号文件
export const importSmsSendPhone = PREFIX + 'import-sms-send-phone';
......
......@@ -13,7 +13,7 @@
<dm-input v-model="form.title" :maxlength="10" placeholder="用于商户自己区分,对短信收件人不可见"></dm-input>
</el-form-item>
<el-form-item label="短信类型" prop="type">
<el-radio-group v-model="form.type">
<el-radio-group v-model="form.type" @change="showMoreFlag = false">
<el-radio v-for="(v, i) in typeOptions" :key="i" :label="v.value">{{ v.label }}</el-radio>
</el-radio-group>
<div class="rule">
......@@ -24,7 +24,14 @@
<p class="pd90">汉字、字母、数字、标点符号(不区分全角/半角)以及空格等都按1个字计算;</p>
<p class="pd90">换行/Enter会导致短信分多条计算;</p>
<p>2、格式规范:不能包含【】、¥、★、^_^&等特殊符号,防止乱码,不能添加链接;</p>
<p>3、政策规范:不能发送房产、移民、贷款、政治、色情、暴力等违法类短信;</p>
<p>
3、政策规范:不能发送房产、移民、贷款、政治、色情、暴力等违法类短信;
<el-button v-show="!showMoreFlag" type="text" @click="showMoreFlag = true" style="margin-left: 5px">查看更多<i class="iconfont icon-zhankai- arrow_icon"/></el-button>
</p>
<p v-show="showMoreFlag">
不允许发送如邀请注册、关注注册、邀请成为会员、拉新、注册拉新、推广拉新、股票、移民、面试招聘、彩票、返利、抽奖、贷款、催款、征信、投资理财、赌博、中奖、毒品、党政、法律维权、众筹、慈善捐款、宗教、迷信、殡葬、刷单、空包网、一元夺宝、大富翁游戏、游戏、寻宝、一元秒杀、A 货、医疗、整形、美容、会所、酒吧、足浴、暴力、恐吓、色情、皮草、助考、装修、建材、家私、商标注册、加群、加 Q 、加微信、相亲、交友、信用卡提额、返现返利、代开发票、邀请好评、酒类、教育、房产、金融、红包、奖池、积分推广、积分兑换、直播推广、召回、抖音直播、领取礼品、关注公众号、到店领取、免费领取、会展推广、APP下载等内容。
<el-button v-show="showMoreFlag" type="text" @click="showMoreFlag = false" style="margin-left: 5px">收起</el-button>
</p>
</div>
<div class="content" v-else>
<p>1、字数规范:单条短信按70字算(含签名、后缀和变量的实际取值);</p>
......@@ -33,7 +40,14 @@
<p class="pd90">换行/Enter会导致短信分多条计算;</p>
<p>2、格式规范:不能包含【】、¥、★、^_^&等特殊符号,防止乱码;</p>
<p>3、变量规范:不支持全变量模板,不支持中文变量参数,不支持变量嵌套(如{1{3}});</p>
<p>4、政策规范:不能发送房产、移民、贷款、政治、色情、暴力等违法类短信;</p>
<p>
4、政策规范:不能发送房产、移民、贷款、政治、色情、暴力等违法类短信;
<el-button v-show="!showMoreFlag" type="text" @click="showMoreFlag = true" style="margin-left: 5px">查看更多<i class="iconfont icon-zhankai- arrow_icon"/></el-button>
</p>
<p v-show="showMoreFlag">
不允许发送如邀请注册、关注注册、邀请成为会员、拉新、注册拉新、推广拉新、股票、移民、面试招聘、彩票、返利、抽奖、贷款、催款、征信、投资理财、赌博、中奖、毒品、党政、法律维权、众筹、慈善捐款、宗教、迷信、殡葬、刷单、空包网、一元夺宝、大富翁游戏、游戏、寻宝、一元秒杀、A 货、医疗、整形、美容、会所、酒吧、足浴、暴力、恐吓、色情、皮草、助考、装修、建材、家私、商标注册、加群、加 Q 、加微信、相亲、交友、信用卡提额、返现返利、代开发票、邀请好评、酒类、教育、房产、金融、红包、奖池、积分推广、积分兑换、直播推广、召回、抖音直播、领取礼品、关注公众号、到店领取、免费领取、会展推广、APP下载等内容。
<el-button v-show="showMoreFlag" type="text" @click="showMoreFlag = false" style="margin-left: 5px">收起</el-button>
</p>
</div>
</div>
</el-form-item>
......@@ -41,7 +55,7 @@
<dm-input ref="textarea" type="textarea" placeholder="请输入短信内容" :rows="8" v-model="form.content" resize="none" :maxlength="450" @input="resetValidateStatus"></dm-input>
<div class="other_fn">
<div class="left" v-if="form.type">
<el-popover placement="bottom-start" width="460" trigger="click">
<el-popover placement="bottom-start" width="650" trigger="click">
<el-button slot="reference" type="text">添加变量参数</el-button>
<div class="popver_content">
<p>模板示列如下,其中{数字}为可插入的变量值,参照表如下:注意考虑变量值的文本长度,以免超出67字/条的文本上限。</p>
......@@ -59,7 +73,7 @@
</template>
</div>
<div v-else></div>
<el-button type="primary" style="border-radius: 0" :disabled="!form.content" @click="validateContent">校验屏蔽词</el-button>
<el-button type="primary" style="border-radius: 0" :disabled="!contentLength" @click="validateContent">校验屏蔽词</el-button>
</div>
<div class="tip" style="margin-top: 8px;line-height: 17px">
已输入 <span style="color: #303133">{{ contentLength }}</span> 字{{ isEcmMsg ? '(不包含变量参数)' : '' }}<br />
......@@ -69,7 +83,7 @@
<div class="validate_res success" v-if="validateStatus == 1"><i class="iconfont icon-chenggong mr6 icon_size" />校验通过</div>
<div class="validate_res error" v-else-if="validateStatus == 0">
<p><i class="iconfont icon-shibai mr6 icon_size" />校验失败</p>
<div class="reason">1.失败原因</div>
<div class="reason">{{ validaErrorMsg }}</div>
</div>
</el-form-item>
<el-form-item label="申请说明" prop="remark">
......@@ -255,7 +269,9 @@ export default {
28: '最近消费品牌名称',
29: '入会后的生日次数'
},
validateStatus: null
validateStatus: null, // 校验状态 null未校验 0失败 1成功
showMoreFlag: false, // 展示更多文案flag
validaErrorMsg: '' // 校验失败内容
};
},
computed: {
......@@ -297,7 +313,7 @@ export default {
if (this.templateVar[para]) return `{${this.templateVar[para]}}`;
else return match;
});
return this.isEcmMsg ? this.form.sign + content + (this.isEcmMsg ? '回T退订' : '') : this.form.sign + this.form.content;
return this.isEcmMsg ? this.form.sign + (content || '{内容区}') + (this.isEcmMsg ? '回T退订' : '') : this.form.sign + this.form.content;
},
isEcmMsg() {
return this.form.type == 1;
......@@ -311,13 +327,14 @@ export default {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '短信营销', path: '' }, { name: '模板库', path: '/message/temp' }, { name: '新增模板', path: '' }]); // eslint-disable-line
}
this.getUserData();
// this.getMsgSign();
this.getMsgSign();
},
methods: {
submit: _debounce(function(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
if (!this.validateStatus) return this.$message.error('请校验短信内容屏蔽词');
if (this.validateStatus == null) return this.$message.error('请校验短信内容屏蔽词');
else if (this.validateStatus == 0) return this.$message.error('短信内容校验失败,请检查');
this.saveTempService();
} else {
return false;
......@@ -343,7 +360,6 @@ export default {
this.loading = true;
let res = await LoadTempInfo({ gicSmsTemplateId: this.$route.params.id });
this.form = {
sign: '', // 要删除--------------------------------------------
type: res.result.smsType,
content: res.result.smsContent,
remark: res.result.remark,
......@@ -416,6 +432,7 @@ export default {
})
.catch(err => {
this.validateStatus = 0;
this.validaErrorMsg = err.data.message;
});
},
// 重置校验屏蔽词的状态
......@@ -523,6 +540,10 @@ export default {
padding-left: 90px;
}
}
.arrow_icon {
margin-left: 4px;
font-size: 12px;
}
}
}
.other_fn {
......@@ -552,7 +573,7 @@ export default {
}
ul {
li {
width: 50%;
width: 33%;
display: inline-block;
margin-top: 10px;
.item {
......
<template>
<section class="dm-form__wrap">
<div class="top">
<div class="left">
<el-input v-model="search.phone" placeholder="请输入手机号码" prefix-icon="el-icon-search" style="width: 260px" @change="getTableData" />
<el-date-picker v-model="search.time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="getTableData"> </el-date-picker>
</div>
<div class="right">
<el-button type="primary" @click="dialogData.visible = true">添加黑名单客户</el-button>
</div>
</div>
<div class="content mt20">
<el-table :data="tableData.data" element-loading-text="拼命加载中">
<el-table-column v-for="(v, i) in tableData.tableHeader" :key="i" :prop="v.prop" :min-width="v.minWidth" :label="v.label" :formatter="v.formatter" :fixed="v.fixed" show-overflow-tooltip>
<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="操作">
<template slot-scope="{ row }">
<el-button type="text" @click="removeBlack(row.blackId)">移出黑名单</el-button>
</template>
</el-table-column>
</el-table>
<dm-pagination background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="tableData.currentPage" :page-sizes="tableData.pageSizeList" :page-size="tableData.pageSize" layout="total, sizes, prev, pager, next" :total="tableData.total" hide-on-single-page />
</div>
<el-dialog :visible.sync="dialogData.visible" :title="dialogData.title" width="600px" @close="resetDialog">
<el-form ref="form" :model="dialogData.form" :rules="dialogData.form.rules" label-width="110px">
<el-form-item label="黑名单内容:" prop="phoneList">
<el-input type="textarea" v-model="dialogData.form.phoneList" placeholder="回车换行,一行输入一个手机号码,最多可以添加1000个号码" :maxlength="1000" :rows="4" show-word-limit class="w410" resize="none" />
</el-form-item>
<el-form-item label="填写添加原因:" prop="reasonType">
<el-radio-group v-model="dialogData.form.reasonType">
<el-radio :label="0">用户向店员反馈</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group>
<el-input v-if="dialogData.form.reasonType" type="textarea" v-model="dialogData.form.reason" placeholder="请输入原因内容" :maxlength="200" :rows="4" show-word-limit class="w410 mt8" resize="none" />
</el-form-item>
<div class="btn_group">
<el-button @click="dialogData.visible = false">取消</el-button>
<el-button type="primary" @click="submit">确认</el-button>
</div>
</el-form>
<!-- <div v-else>当次错误手机号</div> -->
</el-dialog>
</section>
</template>
<script>
import { formatDateTimeByType } from '@/utils';
import { getBlackList, addBlackList, removeBlackList } from '@/service/api/messageApi';
export default {
name: 'blackList',
created() {
this.$store.commit('mutations_breadcrumb', [
{ name: '营销管理', path: '' },
{ name: '短信营销', path: '' },
{ name: '黑名单管理', path: '' }
]); // eslint-disable-line
this.getTableHeader();
this.getTableData();
},
data() {
const validateReason = (rules, value, cb) => {
const { reasonType, reason } = this.dialogData.form;
if (reasonType) {
if (reason) cb();
else cb(new Error('请填写添加黑名单原因'));
} else cb();
};
return {
search: {
phone: '',
time: []
},
tableData: {
data: [],
currentPage: 1,
pageSizeList: [20, 40, 60, 80],
pageSize: 20,
tableHeader: [],
total: 0
},
dialogData: {
title: '添加黑名单用户',
visible: false,
form: {
rules: {
phoneList: { required: true, message: '请输入手机号', trigger: 'blur' },
reasonType: { validator: validateReason, trigger: 'blur' }
},
phoneList: '',
reasonType: 0,
reason: '',
errorPhoneList: ''
}
}
};
},
methods: {
// table methods
getTableHeader() {
this.tableData.tableHeader = [
{ label: '手机号', prop: 'phoneNumber' },
{ label: '黑名单原因', prop: 'reason' },
{
label: '添加时间',
prop: 'createTime',
formatter(scope) {
return `<span>${formatDateTimeByType(scope.createTime, 'yyyy-MM-dd-HH-mm-ss', true).y}<br />${formatDateTimeByType(scope.createTime, 'yyyy-MM-dd-HH-mm-ss', true).h}</span>`;
}
},
{ label: '操作人', prop: 'creatorName' }
];
},
async getTableData() {
const { currentPage, pageSize } = this.tableData;
const { phone, time } = this.search;
const para = {
currentPage,
pageSize,
phoneNumber: phone,
startTime: new Date(time[0]).getTime() || '',
endTime: new Date(time[1]).getTime() || ''
};
const result = await getBlackList(para);
this.tableData.data = result.result.result || [];
this.tableData.total = result.result.totalCount || 0;
},
handleSizeChange(val) {
this.tableData.pageSize = val;
this.tableData.currentPage = 1;
this.getTableData();
},
handleCurrentChange(val) {
this.tableData.currentPage = val;
this.getTableData();
},
// other
submit() {
this.$refs.form.validate(async value => {
if (value) {
const para = {};
const { reason, reasonType } = this.dialogData.form;
para.phoneNumber = this.validatePhoneList();
para.reasonType = reasonType;
para.reason = reasonType ? reason : null;
await addBlackList(para);
this.$tips({ type: 'success', message: '添加成功' });
// if (!this.dialogData.form.errorPhoneList) {
this.dialogData.visible = false;
this.getTableData();
// }
}
});
},
validatePhoneList() {
// 返回正确手机号的Array
const reg = /^1[0-9]{10}$/;
const arr = this.dialogData.form.phoneList.split('\n');
this.dialogData.form.errorPhoneList = arr.filter(el => !reg.test(el)).toString();
const result = arr.filter(el => reg.test(el));
return result.toString();
},
resetDialog() {
this.$refs.form.resetFields();
this.dialogData.form.reason = '';
// this.dialogData.form.errorPhoneList = '';
},
removeBlack(v) {
this.$confirm('确认将该手机号移出黑名单吗?', '提示', {
confirmButtonText: '确认',
cancelBUttonText: '取消',
type: 'warning'
})
.then(async () => {
await removeBlackList({ blackId: v });
this.$tips({ type: 'success', message: '移出成功' });
this.getTableData();
})
.catch(() => {});
}
}
};
</script>
<style scoped lang="scss">
.top {
display: flex;
justify-content: space-between;
align-items: center;
}
.w410 {
width: 410px;
}
.btn_group {
display: flex;
justify-content: flex-end;
}
.mt8 {
margin-top: 8px;
}
</style>
<template>
<el-form v-loading="loading" label-width="110px">
<section class="dm-form__wrap">
<h3 class="dm-title__label">场景设置</h3>
<el-form-item label="数据对话">
<template slot="label">
<span>数据对话</span>
<el-tooltip class="item" effect="dark" content="数据对话为原营销活动。可不选择,选择后会将该营销活动的数据置于选择的数据对话中一起分析" :open-delay="300">
<i style="cursor:pointer;color:#c0c4cc;font-size:14px;" class="el-icon-question"></i>
</el-tooltip>
</template>
<dm-activity-select :actId.sync="info.marketingActivityId" :readOnly="isEdit || isInfo"></dm-activity-select>
</el-form-item>
<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>
</el-select>
<el-date-picker class="w250" v-if="info.sendType" v-model="info.sendTime" type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
</section>
<section class="dm-form__wrap">
<h3 class="dm-title__label">会员设置</h3>
<h3 class="dm-title__label">群发客户</h3>
<div class="pt10 pb20">
<span class="dm-input_label">选择会员</span>
<el-radio v-model="info.memberType" :label="0">会员筛选</el-radio>
<span class="dm-input_label">选择客户</span>
<el-radio v-model="info.memberType" :label="0">客户筛选</el-radio>
<el-radio v-model="info.memberType" :label="1">
指定会员
<el-tooltip class="item" effect="dark" content="指定会员下最多选择1000人" open-delay="200">
指定客户
<el-tooltip class="item" effect="dark" content="指定下最多选择1000人" open-delay="200">
<i class="el-icon-info ml5 minor-font-color"></i>
</el-tooltip>
</el-radio>
<el-radio v-model="info.memberType" :label="2">会员分组</el-radio>
<el-radio v-model="info.memberType" :label="2">客户分组</el-radio>
</div>
<div v-show="info.memberType === 0">
<vue-gic-people :projectName="projectName" :isAdd="true" :triggerReset="true" :useId="useId" :hasSearchData="hasSearchData" :sceneValue="sceneValue" ref="peopleFilter" @findFilter="findFilter" @getBackData="getBackData" @editHide="editHide" @editShow="editShow" @hideBtn="hideBtn" />
......@@ -44,12 +26,37 @@
<section class="dm-form__wrap">
<h3 class="dm-title__label">
短信模板设置
<div class="dm-title__label--tips"><i class="el-icon-info pr8 blue"></i>短信运营商限制:为避免骚扰用户,营销短信只允许在8点到22点发送</div>
</h3>
<div class="mb20">
<span class="dm-input_label">短信类型:</span>
<el-radio-group v-model="smsType" @change="info.gicSmsTemplateId = ''">
<el-radio :label="1">营销短信</el-radio>
<el-radio :label="0">普通短信</el-radio>
</el-radio-group>
</div>
<div class="border-radius2" style="padding:15px;">
<sms-temp pbSize="pb15" :activeId.sync="info.gicSmsTemplateId" @emitSmsItemInfo="onSmsItemInfo"></sms-temp>
<sms-temp pbSize="pb15" :activeId.sync="info.gicSmsTemplateId" :type="smsType"></sms-temp>
</div>
</section>
<section class="dm-form__wrap" style="padding-bottom: 60px">
<h3 class="dm-title__label">场景设置</h3>
<el-form-item label="数据对话">
<template slot="label">
<span>数据对话</span>
<el-tooltip class="item" effect="dark" content="数据对话为原营销活动。可不选择,选择后会将该营销活动的数据置于选择的数据对话中一起分析" :open-delay="300">
<i style="cursor:pointer;color:#c0c4cc;font-size:14px;" class="el-icon-question"></i>
</el-tooltip>
</template>
<dm-activity-select :actId.sync="info.marketingActivityId" :readOnly="isEdit || isInfo"></dm-activity-select>
</el-form-item>
<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>
</el-select>
<el-date-picker class="w250" v-if="info.sendType" v-model="info.sendTime" type="datetime" placeholder="选择日期时间" align="right" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<span v-show="smsType && info.sendType" style="color:#909399;font-size:12px;padding-left:110px">因运营商限制,营销短信发送时间为每日8:00-22:00,尽量避免夜间发送,减少用户投诉。</span>
</section>
<div class="btn-wrap_fixed" :class="{ on: asideShow }">
<el-button type="primary" @click="sendSms">提 交</el-button>
<el-button @click="$router.go(-1)">返 回</el-button>
......@@ -67,7 +74,7 @@ export default {
data() {
return {
loading: false,
sendTypeOptions: [{ value: 0, label: '立即发送' }, { value: 1, label: '选择时间发送' }], // eslint-disable-line
sendTypeOptions: [{ value: 0, label: '立即发送' }, { value: 1, label: '定时发送' }], // eslint-disable-line
smsTempList: [],
pickerOptions: {
shortcuts: [
......@@ -114,7 +121,7 @@ export default {
smsTemplateId: '',
gicSmsTemplateId: ''
},
smsType: 0, // 短信类型 1为营销短信 营销短信要做判断
smsType: 1, // 短信类型 1为营销短信 营销短信要做判断
// 会员分组可传参数
defaltSelected: [], // 默认穿梭窗已选入数据
......@@ -135,9 +142,6 @@ export default {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '短信营销', path: '' }, { name: '短信群发', path: '/message/record' }, { name: '新建群发', path: '' }]); // eslint-disable-line
},
methods: {
onSmsItemInfo(val) {
this.smsType = val.type;
},
//提交表单验证人数 人员筛选和会员分组 需要
async checkMessageSendCount() {
if (this.info.memberType === 0 || this.info.memberType === 2) {
......@@ -195,7 +199,8 @@ export default {
gicSmsTemplateId: this.info.gicSmsTemplateId,
sendType: this.info.sendType,
memberSearchDTO: this.info.memberSearchDTO,
searchJson: this.getSaveData
searchJson: this.getSaveData,
type: this.smsType
};
// return;
if (this.info.memberType === 1) {
......@@ -203,6 +208,7 @@ export default {
}
if (this.info.sendType) {
params.sendTime = formatDateTimeByType(this.info.sendTime, 'yyyy-MM-dd-HH-mm-ss');
console.log(params.sendTime);
}
saveSendSmsService(params).then(res => {
this.$router.push('/message/record');
......@@ -238,20 +244,7 @@ export default {
}
// 编辑情况下的判断
if (this.smsType === 1 && (nowHour >= 22 || nowHour < 8)) {
this.$alert(
`<div>
<i class="el-icon-warning warning-color fz30 vertical-middle mr20"></i>
<p class="inline-block vertical-middle w300">短信运营商限制:为避免骚扰用户,营销短信只允许在8点到22点发送</p>
</div>`,
'提示',
{
dangerouslyUseHTMLString: true,
showCancelButton: true,
showConfirmButton: false,
cancelButtonText: '关闭'
}
);
return;
return this.$tips({ type: 'warning', message: '营销短信只能在8:00-22:00发送' });
}
if (!this.info.memberType && this.toggleTag && !this.getSaveData) {
......
......@@ -9,6 +9,13 @@
<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>
<span class="fr" style="color:#909399;padding:9px 30px 0 0;display:flex;align-items:center">
预估剩余条数
<span style="color:#303133;font-weight:700;margin:0 6px"> {{ quantity }} </span>
<el-tooltip content="据当前账户余额估算,仅供参考,请以实际发送条数为准。" placement="top">
<i class="iconfont icon-tishi" style="color:#909399;margin-left:6px" />
</el-tooltip>
</span>
</div>
<el-table tooltipEffect="light" :data="messageList" style="width: 100%">
<el-table-column :min-width="100" align="left" label="发送时间" prop="sendTime">
......@@ -45,6 +52,7 @@
</template>
<script>
import { LoadMessageList, invalidsmsRecord } from '@/service/api/messageApi.js';
import { getSign } from '@/service/api/commonApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import timeCounts from '@/components/timeCount/index.vue';
import tableMethods from '@/mixins/tableMethods.js';
......@@ -122,12 +130,14 @@ export default {
showSelfFlag: ''
},
dateTime: ['', ''],
total: 0
total: 0,
quantity: 0
};
},
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '短信营销', path: '' }, { name: '短信群发', path: '' }]); // eslint-disable-line
this.getTableList();
this.getQuantity();
},
methods: {
formatDateTimeByType,
......@@ -169,6 +179,12 @@ export default {
if (val === v.value) result = v;
});
return result;
},
// 获取剩余条数
getQuantity() {
getSign().then(res => {
this.quantity = res.result.quantity || 0;
});
}
}
};
......
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