Commit cf39bdd1 by 黑潮

Merge branch 'feature/11月迭代' of git.gicdev.com:marketing-web/marketing into feature/11月迭代

parents 5a7f335c 5812cf0b
<!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.9ffb0a7638f173779b3c6fdc142a3efe.css rel=stylesheet></head><body><div id=app></div><script>(function() {
<!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.302768bfb2cad28345a044264c696330.css rel=stylesheet></head><body><div id=app></div><script>(function() {
var src = '/component/static/import-component.js?timestrap=' + new Date().getTime();
var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'gicdev.demogic.com' : host;
document.write('<script src="//' + host + src + '"><\/script>');
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/upload-file.1.0.6.js></script><script src=//web-1251519181.file.myqcloud.com/components/steps.1.0.1.js></script><script type=text/javascript src=/marketing/static/js/manifest.8ebe4e9d0c357910e042.js></script><script type=text/javascript src=/marketing/static/js/vendor.60b9dda16393a2ab9e6a.js></script><script type=text/javascript src=/marketing/static/js/main.bdffb6195f17055d0182.js></script></body></html>
\ No newline at end of file
})();</script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script src=//web-1251519181.file.myqcloud.com/components/track.1.0.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/upload-file.1.0.6.js></script><script src=//web-1251519181.file.myqcloud.com/components/steps.1.0.1.js></script><script type=text/javascript src=/marketing/static/js/manifest.de809e33b855b1a45f87.js></script><script type=text/javascript src=/marketing/static/js/vendor.60b9dda16393a2ab9e6a.js></script><script type=text/javascript src=/marketing/static/js/main.91b4dc8f221e951b1df8.js></script></body></html>
\ No newline at end of file
@font-face {
font-family: "iconfont"; /* Project id 688955 */
src: url('iconfont.woff2?t=1634537158782') format('woff2'),
url('iconfont.woff?t=1634537158782') format('woff'),
url('iconfont.ttf?t=1634537158782') format('truetype');
src: url('iconfont.woff2?t=1636701873582') format('woff2'),
url('iconfont.woff?t=1636701873582') format('woff'),
url('iconfont.ttf?t=1636701873582') format('truetype');
}
.iconfont {
......@@ -13,6 +13,70 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-chenggong:before {
content: "\e67f";
}
.icon-shibai:before {
content: "\e681";
}
.icon-dengji-:before {
content: "\e6a3";
}
.icon-dengji-1:before {
content: "\e6a4";
}
.icon-dengji-2:before {
content: "\e6a2";
}
.icon-dengji-3:before {
content: "\e6a5";
}
.icon-dengji-4:before {
content: "\e6a6";
}
.icon-dengji-5:before {
content: "\e67a";
}
.icon-dengji-6:before {
content: "\e67b";
}
.icon-dengji-7:before {
content: "\e67c";
}
.icon-dengji-8:before {
content: "\e67d";
}
.icon-dengji-9:before {
content: "\e67e";
}
.icon-yonghuliebiao:before {
content: "\e679";
}
.icon-yichang:before {
content: "\e677";
}
.icon-SwapOutlined:before {
content: "\e672";
}
.icon-BellOutlined:before {
content: "\e673";
}
.icon-chakanxiangqing:before {
content: "\e892";
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,118 @@
"description": "",
"glyphs": [
{
"icon_id": "1046178",
"name": "成功",
"font_class": "chenggong",
"unicode": "e67f",
"unicode_decimal": 59007
},
{
"icon_id": "1046180",
"name": "失败",
"font_class": "shibai",
"unicode": "e681",
"unicode_decimal": 59009
},
{
"icon_id": "7128865",
"name": "等级-3",
"font_class": "dengji-",
"unicode": "e6a3",
"unicode_decimal": 59043
},
{
"icon_id": "7128866",
"name": "等级-6",
"font_class": "dengji-1",
"unicode": "e6a4",
"unicode_decimal": 59044
},
{
"icon_id": "7128868",
"name": "等级-1",
"font_class": "dengji-2",
"unicode": "e6a2",
"unicode_decimal": 59042
},
{
"icon_id": "7128870",
"name": "等级-5",
"font_class": "dengji-3",
"unicode": "e6a5",
"unicode_decimal": 59045
},
{
"icon_id": "7128874",
"name": "等级-8",
"font_class": "dengji-4",
"unicode": "e6a6",
"unicode_decimal": 59046
},
{
"icon_id": "9829436",
"name": "等级-10",
"font_class": "dengji-5",
"unicode": "e67a",
"unicode_decimal": 59002
},
{
"icon_id": "9829439",
"name": "等级-7",
"font_class": "dengji-6",
"unicode": "e67b",
"unicode_decimal": 59003
},
{
"icon_id": "9829440",
"name": "等级-9",
"font_class": "dengji-7",
"unicode": "e67c",
"unicode_decimal": 59004
},
{
"icon_id": "9829441",
"name": "等级-4",
"font_class": "dengji-8",
"unicode": "e67d",
"unicode_decimal": 59005
},
{
"icon_id": "9829444",
"name": "等级-2",
"font_class": "dengji-9",
"unicode": "e67e",
"unicode_decimal": 59006
},
{
"icon_id": "25597267",
"name": "用户列表",
"font_class": "yonghuliebiao",
"unicode": "e679",
"unicode_decimal": 59001
},
{
"icon_id": "11495063",
"name": "异常",
"font_class": "yichang",
"unicode": "e677",
"unicode_decimal": 58999
},
{
"icon_id": "20893458",
"name": "SwapOutlined",
"font_class": "SwapOutlined",
"unicode": "e672",
"unicode_decimal": 58994
},
{
"icon_id": "22596519",
"name": "BellOutlined",
"font_class": "BellOutlined",
"unicode": "e673",
"unicode_decimal": 58995
},
{
"icon_id": "9002691",
"name": "查看详情",
"font_class": "chakanxiangqing",
......
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 n=window.webpackJsonp;window.webpackJsonp=function(r,a,o){for(var f,i,u,d=0,s=[];d<r.length;d++)i=r[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,o);s.length;)s.shift()();if(o)for(d=0;d<o.length;d++)u=c(c.s=o[d]);return u};var r={},t={17:0};function c(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,c){n=t[e]=[r,c]});n[2]=r;var a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,c.nc&&o.setAttribute("nonce",c.nc),o.src=c.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"ecm",4:"message",5:"ewash",6:"scan",7:"evaluation",8:"activity",9:"cdKey",10:"recharge",11:"popup",12:"signIn",13:"msg",14:"calllog"}[e]||e)+"."+{0:"f2e2af9187c12d0ba59f",1:"3b86a0aae836a4902b4a",2:"231a47e936ac4a19c856",3:"2ffa1ed480951d46cf75",4:"8f848e220eedd82b4b6b",5:"bffa605581d984954eb1",6:"eaef4eb42cc00f1ff8be",7:"87d09b2c6144e701a625",8:"5ddb72b68fcdf6943011",9:"fc15e74c2c19c49fb041",10:"1c278ec93e87a0f303fd",11:"8a6f5420b7705ebd535f",12:"8514e049c302322e6e95",13:"e09d0035cc67bc302d86",14:"89c077231d00054d09d3"}[e]+".js";var f=setTimeout(i,12e4);function i(){o.onerror=o.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=i,a.appendChild(o),r},c.m=e,c.c=r,c.d=function(e,n,r){c.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,"a",n),n},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.p="/marketing/",c.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,d=0,s=[];d<r.length;d++)i=r[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)u=o(o.s=a[d]);return u};var r={},t={17:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+({0:"card",1:"game",2:"wechat",3:"ecm",4:"message",5:"ewash",6:"scan",7:"evaluation",8:"activity",9:"cdKey",10:"recharge",11:"popup",12:"signIn",13:"msg",14:"calllog"}[e]||e)+"."+{0:"4451729cb112535eabe5",1:"97d9e6f555b75cfc1950",2:"96d9332443660c785a7a",3:"bb1923676910b2b102ef",4:"7c9e085a2bbef4e17c2a",5:"f329f2273a464eda74ba",6:"cffef7f5f899a0d42894",7:"93bfd6b1194529e87682",8:"b48d03d4568429fd77fd",9:"fc15e74c2c19c49fb041",10:"540167ee92d78ef94f0b",11:"a75f2e6629191fa6c6d8",12:"8514e049c302322e6e95",13:"012f851d2d6f6430d9bf",14:"89c077231d00054d09d3"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/marketing/",o.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.
......@@ -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';
......
......@@ -68,7 +68,8 @@ const initForm = {
bannerImageField: '015f1e5a-3b2f-42f5-b638-6a29c17e8f7e',
useJumpFlag: 0, // (0: 不跳转, 1: 跳转)
bannerJumpUrl: {},
giveRule: '1.卡券新老用户同享。\n2.用户使用卡券下单,订单取消后,卡券将自动失效'
giveRule: '1.卡券新老用户同享。\n2.用户使用卡券下单,订单取消后,卡券将自动失效',
wmCouponJson: {}
};
const sale_limit = { fee: 0, goods: '', flag: false, type: 0 }; //最低消费
const goods = { ok: '', no: '', flag: false };
......@@ -522,6 +523,7 @@ export default {
let manualGetFlagSettingRes = await getCardManualSetting(); // 获取商户卡券自动领取配置
this.couponAutoGetFlag = manualGetFlagSettingRes.result.couponAutoGetFlag || 0;
this.couponAutoGetStock = manualGetFlagSettingRes.result.couponAutoGetStock;
this.wmCouponJson = JSON.parse(manualGetFlagSettingRes.result.wmCouponJson || '{}');
let res = null;
if (this.isCopy) {
res = await copyCardDetailService({ coupCardId: this.$route.params.id });
......
......@@ -211,6 +211,7 @@
<li>开启后可与其它卡券叠加或在门店活动中使用(需要单独对接)</li>
<li>修改后请注意调整卡券使用说明</li>
</ul>
<el-alert v-if="form.cardApplyChannel.some(el => el == 'WMmicroMall') && wmCouponJson.couponOnlyFlag == 1" class="f-alert" type="warning" show-icon :closable="false" title="开启后,当此券同步至微盟侧,可在微盟侧修改调整卡券相应配置,比如修改使用规则等。注意,微盟侧修改后不会同步给达摩,请谨慎操作。"></el-alert>
</div>
</el-form-item>
<el-form-item prop="cardLimit" label="领券限制">
......@@ -402,7 +403,7 @@ export default cardForm;
color: #f5222d;
}
.f-alert {
width: 780px !important;
width: 900px !important;
/deep/ .el-alert__content {
height: 18px;
line-height: 18px;
......
<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="dialogTitle" width="600px" @close="resetDialog">
<el-form v-if="!isExiteErrorPhone" 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>
<ul class="errorList">
<li v-for="(item, index) in dialogData.form.errorPhoneList" :key="index">{{ item }}</li>
</ul>
<div class="btn_group" style="margin: 30px 0 10px">
<span class="tips"><i class="iconfont icon-tishi"></i>异常名单将会自动过滤,请自行记录。</span>
<el-button type="primary" @click="dialogData.visible = false">确认</el-button>
</div>
</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);
if (!this.isExiteErrorPhone) {
this.$tips({ type: 'success', message: '添加成功' });
this.dialogData.visible = false;
} else {
this.$tips({ type: 'warning', message: '部分添加成功' });
}
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));
const result = arr.filter(el => reg.test(el));
return result.toString();
},
resetDialog() {
this.dialogData.form.reason = '';
this.dialogData.form.reasonType = 0;
this.dialogData.form.phoneList = '';
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(() => {});
}
},
computed: {
isExiteErrorPhone() {
return this.dialogData.form.errorPhoneList.length;
},
dialogTitle() {
return this.isExiteErrorPhone ? '手机号码格式异常名单' : this.dialogData.title;
}
}
};
</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;
}
.errorList {
li {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
height: 22px;
line-height: 22px;
width: 130px;
background: #fff1f0;
border-radius: 2px;
border: 1px solid #ffa39e;
margin: 10px 10px 0 0;
padding: 0 5px;
box-sizing: border-box;
color: #f5222d;
&:nth-child(4n) {
margin-right: 0;
}
}
}
.tips {
display: inline-block;
width: 300px;
height: 32px;
line-height: 32px;
text-align: center;
background: #f7f8fa;
border-radius: 2px;
margin-right: 16px;
box-sizing: border-box;
padding: 0 12px;
i {
color: #2f54eb;
margin-right: 5px;
}
}
</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 v-if="quantity != -1" 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