Commit 6ee9a10b by chenxin

Merge branch 'dev'

parents c61868d4 3c040047
<!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.e9587749b22a4ee443faf4692760b9e3.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.35.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.10.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.16.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.10.js></script><script type=text/javascript src=/marketing/static/js/manifest.e3b092a4bec6b955316a.js></script><script type=text/javascript src=/marketing/static/js/vendor.cbb380c2053ab598e892.js></script><script type=text/javascript src=/marketing/static/js/main.7074a638005afd93e34d.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.6271c1acc0ff51ea707a022fea0029f6.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.35.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.10.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.16.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.10.js></script><script type=text/javascript src=/marketing/static/js/manifest.50293d5de3fc8f53fb7f.js></script><script type=text/javascript src=/marketing/static/js/vendor.cbb380c2053ab598e892.js></script><script type=text/javascript src=/marketing/static/js/main.0f6b91fdc1412fd8590e.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.
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(t,o,a){for(var i,f,u,d=0,s=[];d<t.length;d++)f=t[d],n[f]&&s.push(n[f][0]),n[f]=0;for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);for(r&&r(t,o,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)u=c(c.s=a[d]);return u};var t={},n={13:0};function c(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,c),n.l=!0,n.exports}c.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,c){r=n[e]=[t,c]});r[2]=t;var o=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,c.nc&&a.setAttribute("nonce",c.nc),a.src=c.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:"6fec0dc48b24d979cc33",1:"551e4a6470ee56b6586a",2:"6fabe3cfe08d9a15700e",3:"c4d912ed85678de36563",4:"a42f563aac5bcc14777b",5:"0eec7492ca9c38552171",6:"4701d06cfc88a5409f14",7:"316afc54650a54995ef9",8:"5d0636cab891043cbf62",9:"f3c2a227d1d0d4b1e360",10:"e1d12b2946a48cf5d8cb"}[e]+".js";var i=setTimeout(f,12e4);function f(){a.onerror=a.onload=null,clearTimeout(i);var r=n[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return a.onerror=a.onload=f,o.appendChild(a),t},c.m=e,c.c=t,c.d=function(e,r,t){c.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="/marketing/",c.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var r=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var f,i,u,s=0,l=[];s<t.length;s++)i=t[s],n[i]&&l.push(n[i][0]),n[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(r&&r(t,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)u=o(o.s=a[s]);return u};var t={},n={13:0};function o(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,o),n.l=!0,n.exports}o.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,o){r=n[e]=[t,o]});r[2]=t;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:"message",4:"ewash",5:"evaluation",6:"ecm",7:"activity",8:"recharge",9:"msg",10:"calllog"}[e]||e)+"."+{0:"01f46fd665cf81f811a7",1:"5603aa6bc3c455d7b51e",2:"f0b4c0e5c36f5ed6b7a8",3:"dbb7db1bf14e057fd6e0",4:"f98b19861199506e9f5c",5:"532be8ee883e509fee13",6:"393c92cf9310bf3051e4",7:"c7e6a74eba07ee933137",8:"cc0950432812606ca31b",9:"df16b0b3f7288e21ec0d",10:"4b68b26d138f9bc39980"}[e]+".js";var f=setTimeout(i,12e4);function i(){a.onerror=a.onload=null,clearTimeout(f);var r=n[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return a.onerror=a.onload=i,c.appendChild(a),t},o.m=e,o.c=t,o.d=function(e,r,t){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},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
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.
......@@ -3,7 +3,7 @@
<template v-if="!onlySelect">
<div v-if="!readOnly">
<span class="dm-input_label">营销活动<span v-if="colon"></span></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-select remote filterable clearable v-loadmore="getMore" :remote-method="remoteMethod" @change="updateActId" class="w250 act-select" size="small" v-model="marketingActivityId" :disabled="readOnly || disabled" 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="toAdd">去新建</el-button>
......@@ -56,7 +56,8 @@ export default {
currentPage: 1,
pageSize: 10
},
nomore: false // 没有更多
nomore: false, // 没有更多
disabled: false // 给外部使用,或条件
};
},
watch: {
......@@ -64,6 +65,7 @@ export default {
handler(val) {
// 只读时获取详情
if (val && this.readOnly) {
this.marketingActivityId = val;
this.getActivityInfo();
}
},
......@@ -95,6 +97,19 @@ export default {
this.$router.push('/activity/add');
}
},
// 外部设置反显
setInfo(actId) {
this.loading = true;
getActivityInfo({ marketingActivityId: actId })
.then(res => {
this.loading = false;
this.tableList = res.result ? [res.result] : [];
this.marketingActivityId = actId;
})
.catch(() => {
this.loading = false;
});
},
// 获取详情
getActivityInfo() {
this.loading = true;
......
......@@ -16,7 +16,7 @@ export default {
props: {
placeholder: {
type: String,
default: '请选择门店分组'
default: '所有门店'
},
model: {
type: Object,
......@@ -55,7 +55,12 @@ export default {
});
},
handleNodeClick(data, node, comp) {
this.newModel = data;
if (data.parentGroupId == 0) {
// 所有门店
this.newModel = '';
} else {
this.newModel = data;
}
},
submit() {
this.popoverShow = false;
......
......@@ -150,7 +150,7 @@ export default {
component: () => import(/* webpackChunkName: "card" */ '../../views/card/form.vue'),
meta: {
type: 'info',
path: '/card/record/get'
path: '/card/list'
}
},
{
......@@ -159,7 +159,7 @@ export default {
component: () => import(/* webpackChunkName: "card" */ '../../views/card/form.vue'),
meta: {
type: 'copy',
path: '/card/record/get'
path: '/card/list'
}
},
{
......
......@@ -270,3 +270,49 @@ export const findAnyComponent = (context, componentName, root = null) => {
export const deepClone = obj => {
return JSON.parse(JSON.stringify(obj));
};
// 防抖
export const _debounce = (fn, delay) => {
var delay = delay || 200;
var timer;
return function() {
var that = this;
var args = arguments;
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(function() {
timer = null;
fn.apply(that, args);
}, delay);
};
};
// 节流
export const _throttle = (fn, delay) => {
let timer = null;
let remaining = 0; // eslint-disable-line
let previous = new Date(); // eslint-disable-line
return function() {
const now = new Date();
const remaining = now - previous;
const args = arguments;
const context = this; // eslint-disable-line
if (remaining >= delay) {
if (timer) {
clearTimeout(timer);
}
fn.apply(context, args);
previous = now;
} else {
if (!timer) {
timer = setTimeout(function() {
fn.apply(context, args);
previous = new Date();
}, delay - remaining);
}
}
};
};
......@@ -21,6 +21,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import { formatDateTimeByType } from '@/utils/index.js';
import { saveActivity, getActivityInfo } from '@/service/api/activityApi';
export default {
......@@ -70,7 +71,7 @@ export default {
}
},
methods: {
submit() {
submit: _debounce(function() {
this.$refs.form.validate(valid => {
if (!valid) {
return;
......@@ -95,7 +96,7 @@ export default {
this.loading = false;
});
});
},
}),
getInfo() {
this.loading = true;
getActivityInfo({ marketingActivityId: this.marketingActivityId })
......
/**
* 卡券新增编辑
*/
import { _debounce } from '@/utils/index';
import dmUploadImg from '@/components/upload/img';
import imgTextDrag from './partials/imgtext-drag';
import { formatDateTimeByType, deepClone } from '@/utils/index.js';
......@@ -303,7 +304,7 @@ export default {
const useCondition = (this.form.useCondition = JSON.parse(card.useCondition));
this.sale_limit.fee = useCondition.sale_limit ? useCondition.sale_limit.fee || 0 : 0;
this.sale_limit.goods = useCondition.sale_limit ? useCondition.sale_limit.goods || '' : '';
this.sale_limit.flag = this.sale_limit.fee || this.sale_limit.goods;
this.sale_limit.flag = Boolean(this.sale_limit.fee || this.sale_limit.goods);
if (this.sale_limit.fee) {
this.sale_limit.type = 1;
this.sale_limit.flag = true;
......@@ -460,14 +461,14 @@ export default {
this.form.erpDemoCode = this.form.erpDemoCode.replace(/[^\w\.\/]/gi, '');
},
//提交保存
async submitForm(formName) {
submitForm: _debounce(async function(formName) {
// 可以选微盟且渠道含微盟微商城 -- 微盟券号不能为空
if (this.form.cardApplyChannel.indexOf('WMmicroMall') !== -1 && this.countFlag) {
if (!this.weimobDemoCodeList.length) {
this.$tips({ type: 'warning', message: '适用渠道包含微盟微商城,微盟券号不能为空' });
return;
}
if (this.weimobDemoCodeList.some(v => !v.save)) {
if (this.weimobDemoCodeList.some(v => !v.save && v.pid)) {
this.$tips({ type: 'warning', message: '微盟券号含有未保存的数据' });
return;
}
......@@ -538,7 +539,7 @@ export default {
return false;
}
});
},
}),
//卡券营销--卡券库--保存卡券
async saveUpdateCard() {
if (this.submitLoading) {
......
......@@ -2,7 +2,7 @@
<div class="dm-wrap" v-loading="loading">
<el-form ref="form" :model="ruleForm" label-width="140px" :rules="rules">
<el-form-item prop="name" label="卡券包名称">
<dm-input v-model="ruleForm.name" class="w300" placeholder="请输入卡券包名称" :byteType="1" :maxlength="10"></dm-input>
<dm-input v-model="ruleForm.name" class="w250" placeholder="请输入卡券包名称" :byteType="1" :maxlength="10"></dm-input>
</el-form-item>
<el-form-item prop="effectiveMode" label="有效时间">
<!-- <el-select class="w300" v-model="ruleForm.effectiveMode">
......@@ -15,11 +15,13 @@
<br />
<el-date-picker v-if="ruleForm.effectiveMode" class="w300 mt10" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label="营销场景">
<!-- <el-form-item label="营销场景">
<el-select class="w300" v-model="ruleForm.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>
</el-form-item> -->
<activity-select v-if="!ruleForm.marketingActivityId" style="margin-left:71px;margin-bottom:22px;" :actId.sync="ruleForm.marketingActivityId" :readOnly="isEdit || isInfo"></activity-select>
<activity-select v-else ref="actSelect" style="margin-left:71px;margin-bottom:22px;" :actId.sync="ruleForm.marketingActivityId" :readOnly="isInfo"></activity-select>
<el-form-item prop="cardIds" label="新增卡券">
<el-button @click="showCardDialog = true">添加卡券</el-button>
<el-table v-if="ruleForm.cardIds" class="mt20" :data="tableData" style="width: 100%">
......@@ -66,6 +68,7 @@
</template>
<script>
import activitySelect from '@/components/activity-select';
import { saveCoupPackage, coupPackageDetail, getCoupListInfo } from '@/service/api/cardApi.js';
import { sceneSettingList } from '@/service/api/wechatApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
......@@ -88,6 +91,7 @@ export default {
cardIds: '', // 卡券ids,多个id用逗号隔开
name: '',
effectiveMode: 0,
marketingActivityId: '',
sceneSettingId: ''
},
dateTime: [],
......@@ -107,6 +111,9 @@ export default {
isEdit: this.$route.meta.type === 'edit'
};
},
components: {
activitySelect
},
methods: {
formatDateTimeByType,
del({ coupCardId }) {
......@@ -191,6 +198,12 @@ export default {
}
this.getCoupListInfo();
this.loading = false;
if (res.result.marketingActivityId) {
this.$nextTick(() => {
this.$refs.actSelect.setInfo(res.result.marketingActivityId);
this.$refs.actSelect.disabled = true;
});
}
})
.catch(err => {
this.$tips({ type: 'error', message: err.message || '获取详情失败' });
......
......@@ -2,22 +2,12 @@
<section class="dm-wrap" v-loading="loading">
<div class="pb22 clearfix">
<el-date-picker class="w400" v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh"></el-date-picker>
<el-select class="dm-select w160" v-model="listParams.sceneSettingId" clearable 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-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('/card/merge/add')">新建卡券包</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
<el-table-column :show-overflow-tooltip="true" min-width="140" align="left" prop="name" label="卡券包名称"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="100" align="left" prop="createTime" label="创建时间">
<template slot-scope="scope">
<p class="cell-time">
{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm', true).y }}<br />
<span>{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm', true).h }}</span>
</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="140" align="left" prop="createTime" label="有效期">
<template slot-scope="scope">
<span v-if="scope.row.effectiveMode">
......@@ -28,9 +18,17 @@
<span v-else>不限</span>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="cardSize" label="卡券数量"></el-table-column>
<el-table-column :show-overflow-tooltip="true" width="120" align="left" prop="sceneSettingName" label="场景值">
<template slot-scope="scope">{{ scope.row.sceneSettingName || '--' }}</template>
<el-table-column :show-overflow-tooltip="true" min-width="140" align="left" prop="cardSize" label="卡券数量"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="140" align="left" prop="createTime" label="创建时间">
<template slot-scope="scope">
<p class="cell-time">
{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm', true).y }}<br />
<span>{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd-HH-mm', true).h }}</span>
</p>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="marketingActivityName" label="营销活动">
<template slot-scope="scope">{{ scope.row.marketingActivityName || '--' }}</template>
</el-table-column>
<el-table-column label="操作" align="left" width="120px" fixed="right">
<template slot-scope="scope">
......@@ -45,8 +43,8 @@
</section>
</template>
<script>
import activitySelect from '@/components/activity-select';
import { pageCoupPackage, deleteCoupPackage } from '@/service/api/cardApi.js';
import { sceneSettingList } from '@/service/api/wechatApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import talbeMethods from '@/mixins/tableMethods.js';
import filterAvater from '@/mixins/filterAvater.js';
......@@ -60,14 +58,13 @@ export default {
visible: false,
dateTime: [],
listParams: {
sceneSettingId: '',
marketingActivityId: '',
beginTime: '',
endTime: '',
search: '',
currentPage: 1,
pageSize: 20
},
sceneSettingIdOptions: [],
total: 0,
loading: false,
tableList: [],
......@@ -77,9 +74,11 @@ export default {
params: {} // 传递的参数
};
},
components: {
activitySelect
},
created() {
this.getTableList();
this.sceneSettingList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券包', path: '' }, { name: '卡券包列表', path: '' }]); // eslint-disable-line
},
methods: {
......@@ -109,10 +108,6 @@ export default {
}
this.loading = false;
},
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
},
/**-------辅助方法---------- */
dataTimeFormat() {
if (this.dateTime) {
......
......@@ -37,6 +37,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import file from '@/components/upload/file';
import { getCoupDestoryDetail, importDestoryCoupCode, saveCoupDestoryPlan, downloadDestroyCodeTemplate } from '@/service/api/cardApi.js';
export default {
......@@ -112,7 +113,10 @@ export default {
this.$refs.ruleForm.resetFields();
this.$emit('update:show', false);
},
submit() {
submit: _debounce(function() {
if (this.loading) {
return;
}
this.$refs.ruleForm.validate(valid => {
if (!valid) {
return;
......@@ -123,7 +127,7 @@ export default {
saveCoupDestoryPlan(params)
.then(res => {
this.loading = false;
this.$message({ message: `${this.type === 'add' ? '新增' : '保存'}成功`, type: 'success' });
this.$message({ message: '操作成功', type: 'success' });
this.close();
this.$emit('refresh');
})
......@@ -131,7 +135,7 @@ export default {
this.loading = false;
});
});
},
}),
cleanCard() {
this.ruleForm.cardId = '';
this.ruleForm.cardName = '';
......
......@@ -21,7 +21,7 @@
</div>
</div>
<div class="drag-item--editor__right fl pl20">
<dm-input type="textarea" :rows="10" v-model="v.copyText" :maxlength="5000"></dm-input>
<dm-input type="textarea" :rows="10" v-model="v.copyText" :maxlength="500"></dm-input>
</div>
<div class="text-right pt20 fr">
<el-button size="small" @click="cancel(v, i)">取消</el-button>
......
......@@ -2,12 +2,12 @@
<section class="card-record-get" v-loading="recordLoading">
<!-- 条件筛选区 -->
<div class="pb22">
<el-input v-model="listParams.search" class="w250" placeholder="请输入会员信息/卡券代码" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input clearable v-model="listParams.search" style="width:240px" placeholder="请输入会员信息/卡券代码" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<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" />
<card-select-filter ref="cdf" :cId.sync="listParams.coupCardId" class="w250" @cIdUpdate="refresh" :disabled="listParams.allCouponFlag" />
<div class="inline-block ml5">
<span class="mr5">查看全部卡券</span><el-switch v-model="listParams.allCouponFlag" @change="changeAllCouponFlag" :active-value="1" :inactive-value="0" />
<span class="gray fz12 ml5" style="display:inline-block;width:200px;line-height:18px">*由于数据量较大,查询全部卡券领取记录速度较慢,请耐心等候</span>
<span class="gray fz12 ml5" style="display:inline-block;width:220px;line-height:18px;position:relative;top:8px">*查询全部卡券领取记录单次仅支持区间范围7天的查询,速度较慢,请耐心等候</span>
</div>
<el-button class="fr" type="primary" icon="iconfont icon-icon_yunxiazai fz14" @click="exportReceivedRecordExcel"> 导出订单</el-button>
</div>
......@@ -124,7 +124,7 @@ export default {
dateTime: [],
dateTimeCopy: [],
dateTime2: ['', ''],
limit: false, // 限制筛选时间前后七天
// limit: false, // 限制筛选时间前后七天
cardStatusOptions: [{ value: '', label: '全部卡券状态' }, { value: 4, label: '待核销' }, { value: 5, label: '已核销' }, { value: 6, label: '已过期' }, { value: 7, label: '已销毁' }, { value: 8, label: '已占用' }], // eslint-disable-line
recordLoading: false,
recordList: [],
......@@ -177,11 +177,16 @@ export default {
changeAllCouponFlag(val) {
if (val) {
this.listParams.coupCardId = '';
if (new Date(this.dateTime[1]).getTime() - new Date(this.dateTime[0]).getTime() > 7 * 24 * 60 * 60 * 1000) {
// 设置为默认值
this.dateTime = [Date.now() - 7 * 24 * 60 * 60 * 1000, Date.now()];
}
}
this.refresh();
},
changeTime(date) {
if (this.limit && new Date(this.dateTime[1]).getTime() - new Date(this.dateTime[0]).getTime() > 7 * 24 * 60 * 60 * 1000) {
// 单张卡券可以设置领取n久
if (this.listParams.allCouponFlag && new Date(this.dateTime[1]).getTime() - new Date(this.dateTime[0]).getTime() > 7 * 24 * 60 * 60 * 1000) {
this.$tips({ message: '领取时间段范围不能超过7天', type: 'warning' });
this.dateTime = [...this.dateTimeCopy];
return;
......@@ -240,7 +245,7 @@ export default {
// if (dateLimitRes.result == 1) {
// 默认1周
this.dateTime = [Date.now() - 7 * 24 * 60 * 60 * 1000, Date.now()];
this.limit = true;
// this.limit = true;
// } else {
// // 默认一个月
// this.limit = false;
......
<template>
<section class="card-record-send" v-loading="loading">
<div class="pb22">
<el-input class="w300" v-model="listParams.search" placeholder="输入卡券名称/备注名/活动名" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input class="w300" v-model="listParams.search" clearable placeholder="输入卡券名称/备注名/活动名" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<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" />
</div>
<el-table tooltipEffect="light" :data="recordList" style="width: 100%" row-key="putonTime">
<el-table tooltipEffect="dark" :data="recordList" style="width: 100%">
<el-table-column width="120" align="left" prop="putonTime" label="投放时间" fixed="left">
<template slot-scope="scope">
<p class="cell-time">
......@@ -122,7 +122,7 @@ export default {
this.loading = true;
cardRecordPage(this.listParams).then(res => {
if (res.errorCode === 0) {
this.recordList = res.result.result;
this.recordList = res.result.result || [];
this.total = res.result.totalCount;
}
this.loading = false;
......
import { _debounce } from '@/utils/index';
import { getEcmInfo, saveEcmInfo } from '@/service/api/ecmApi.js';
import activitySelect from '@/components/activity-select';
import { listTemplateVariables } from '@/service/api/msgApi.js';
......@@ -429,7 +430,7 @@ export default {
},
// 保存 校验
async submit(formName) {
submit: _debounce(async function(formName) {
// // 这里强制获取人群筛选器的配置项
// await this.$refs.peopleFilter.confirmSet();
// 判断时间
......@@ -617,16 +618,16 @@ export default {
return false;
}
});
},
}),
// 保存
saveEcmInfo(params) {
if (this.loading) {
return;
}
if (this.isEdit && this.form.cardNoticeType === 1) {
this.$tips({ type: 'warning', message: `修改卡券目前不支持微信客服/群发接口` });
return false;
}
if (this.loading) {
return;
}
this.loading = true;
saveEcmInfo(params)
.then(res => {
......
......@@ -23,14 +23,14 @@
<div class="rate-item" :class="{ pb20: index !== 2 }" v-for="(item, index) in rate" :key="index">
<div class="rate-top">
<span class="pr10">{{ item.name }} (共{{ item.sum }}人)</span>
<span class="fz18 bold"> {{ Number(item.score / item.sum).toFixed(2) }}</span>
<span class="fz18 bold"> {{ item.sum ? Number(item.score / item.sum).toFixed(2) : 0 }}</span>
</div>
<ul class="rate-bottom gray-bg">
<li v-for="(v, i) in item.list" :key="i">
<el-rate class="inline-block" v-model="v.socre" disabled></el-rate>
<span class="rate-text">{{ v.socre * 2 }}</span>
<div class="progress" :style="{ width: (v.count / item.sum) * 100 + 'px' }"></div>
<span class="progress-text fz12 vertical-middle pl5"> {{ Number((v.count * 100) / item.sum).toFixed(2) }}%</span>
<span class="progress-text fz12 vertical-middle pl5"> {{ item.sum ? Number((v.count * 100) / item.sum).toFixed(2) : 0 }}%</span>
</li>
</ul>
</div>
......@@ -111,122 +111,58 @@ export default {
list = list.sort((a, b) => {
return a.temperature - b.temperature;
});
console.log(list);
this.$nextTick(_ => {
this.initCharts(list, 'mountNode');
});
}
if (type === 2) {
const scoreList = res.result.evaluateScoreList;
let fwtdScore = 0;
let fwtdCount2 = 0;
let fwtdCount4 = 0;
let fwtdCount6 = 0;
let fwtdCount8 = 0;
let fwtdCount10 = 0;
let fwtdSum = 1;
let zycdScore = 0;
let zycdSum = 1;
let zycdCount2 = 0;
let zycdCount4 = 0;
let zycdCount6 = 0;
let zycdCount8 = 0;
let zycdCount10 = 0;
let mdhjScore = 0;
let mdhjSum = 1;
let mdhjCount2 = 0;
let mdhjCount4 = 0;
let mdhjCount6 = 0;
let mdhjCount8 = 0;
let mdhjCount10 = 0;
scoreList.map((v, i) => {
if (i == 0) {
fwtdSum = 0;
zycdSum = 0;
mdhjSum = 0;
}
let name = scoreList[i][0];
let count = scoreList[i][2];
let score = scoreList[i][1];
if (name.indexOf('service') != -1) {
fwtdSum += count;
fwtdScore += score * count;
if (parseInt(score) == 2) {
fwtdCount2 = count;
}
if (parseInt(score) == 4) {
fwtdCount4 = count;
}
if (parseInt(score) == 6) {
fwtdCount6 = count;
}
if (parseInt(score) == 8) {
fwtdCount8 = count;
}
if (parseInt(score) == 10) {
fwtdCount10 = count;
}
}
if (name.indexOf('major') != -1) {
zycdSum += count;
zycdScore += score * count;
if (parseInt(score) == 2) {
zycdCount2 = count;
}
if (parseInt(score) == 4) {
zycdCount4 = count;
}
if (parseInt(score) == 6) {
zycdCount6 = count;
}
if (parseInt(score) == 8) {
zycdCount8 = count;
}
if (parseInt(score) == 10) {
zycdCount10 = count;
}
}
if (name.indexOf('store') != -1) {
mdhjSum += count;
mdhjScore += score * count;
if (parseInt(score) == 2) {
mdhjCount2 = count;
}
if (parseInt(score) == 4) {
mdhjCount4 = count;
}
if (parseInt(score) == 6) {
mdhjCount6 = count;
}
if (parseInt(score) == 8) {
mdhjCount8 = count;
}
if (parseInt(score) == 10) {
mdhjCount10 = count;
}
}
});
// 后端没数据返回[],必须写默认值
let scoreList = ['{"2":0,"4":0,"6":0,"8":0,"10":0}', '{"2":0,"4":0,"6":0,"8":0,"10":0}', '{"2":0,"4":0,"6":0,"8":0,"10":0}'];
if (res.result.evaluateScoreList && res.result.evaluateScoreList.length) {
scoreList = res.result.evaluateScoreList && res.result.evaluateScoreList;
}
const fwtd = JSON.parse(scoreList[0]);
this.rate[0].name = '服务态度评分';
this.rate[0].score = fwtdScore;
this.rate[0].sum = fwtdSum;
this.rate[0].list = [{ socre: 1, count: fwtdCount2 }, { socre: 2, count: fwtdCount4 }, { socre: 3, count: fwtdCount6 }, { socre: 4, count: fwtdCount8 }, { socre: 5, count: fwtdCount10 }]; // eslint-disable-line
this.rate[0].score = Object.keys(fwtd).reduce((t, v) => t + fwtd[v] * v, 0) || 0;
this.rate[0].sum = Object.keys(fwtd).reduce((t, v) => t + fwtd[v], 0) || 0;
this.rate[0].list =
Object.keys(fwtd).map((v, idx) => {
return {
socre: idx + 1,
count: fwtd[v]
};
}) || 0;
this.rate[1].name = '专业程度评分';
this.rate[1].score = zycdScore;
this.rate[1].sum = zycdSum;
this.rate[1].list = [{ socre: 1, count: zycdCount2 }, { socre: 2, count: zycdCount4 }, { socre: 3, count: zycdCount6 }, { socre: 4, count: zycdCount8 }, { socre: 5, count: zycdCount10 }]; // eslint-disable-line
const zycd = JSON.parse(scoreList[1]);
this.rate[1].name = '门店环境评分';
this.rate[1].score = Object.keys(zycd).reduce((t, v) => t + zycd[v] * v, 0) || 0;
this.rate[1].sum = Object.keys(zycd).reduce((t, v) => t + zycd[v], 0) || 0;
this.rate[1].list =
Object.keys(zycd).map((v, idx) => {
return {
socre: idx + 1,
count: zycd[v]
};
}) || 0;
const mdhj = JSON.parse(scoreList[2]);
this.rate[2].name = '门店环境评分';
this.rate[2].score = mdhjScore;
this.rate[2].sum = mdhjSum;
this.rate[2].list = [{ socre: 1, count: mdhjCount2 }, { socre: 2, count: mdhjCount4 }, { socre: 3, count: mdhjCount6 }, { socre: 4, count: mdhjCount8 }, { socre: 5, count: mdhjCount10 }]; // eslint-disable-line
this.rate[2].score = Object.keys(mdhj).reduce((t, v) => t + mdhj[v] * v, 0) || 0;
this.rate[2].sum = Object.keys(mdhj).reduce((t, v) => t + mdhj[v], 0) || 0;
this.rate[2].list =
Object.keys(mdhj).map((v, idx) => {
return {
socre: idx + 1,
count: mdhj[v]
};
}) || 0;
}
if (type === 3) {
const goodTagList = res.result.goodTagList;
const badTagList = res.result.badTagList;
const goodTagList = res.result.goodTagList || [];
const badTagList = res.result.badTagList || [];
//正面快评生成
let goodList = [];
const goodTotal = goodTagList.map(v => v[0]).reduce((total, num) => total + num);
const goodTotal = goodTagList.length ? goodTagList.map(v => v[0]).reduce((total, num) => total + num) : 0;
goodTagList.map((v, i) => {
goodList.push({ item: v[1], count: parseInt(v[0]), percent: parseFloat((v[0] / goodTotal).toFixed(2)) });
});
......@@ -244,7 +180,7 @@ export default {
//负面快评生成
let badList = [];
const badTotal = badTagList.map(v => v[0]).reduce((total, num) => total + num);
const badTotal = badTagList.length ? badTagList.map(v => v[0]).reduce((total, num) => total + num) : 0;
badTagList.map((v, i) => {
badList.push({ item: v[1], count: parseInt(v[0]), percent: parseFloat((v[0] / badTotal).toFixed(2)) });
});
......@@ -269,7 +205,6 @@ export default {
},
//生成饼图
initPieChart(data, nodeName) {
console.log(data);
let chart = new G2.Chart({
container: nodeName,
forceFit: true,
......@@ -281,6 +216,11 @@ export default {
val = (val * 100).toFixed(2) + '%';
return val;
}
},
count: {
formatter: function formatter(val) {
return val;
}
}
});
chart.coord('theta', {
......@@ -306,18 +246,17 @@ export default {
chart
.intervalStack()
.position('percent')
.position('count')
.color('item')
.label('percent', {
.label('count', {
formatter: function formatter(val, item) {
return item.point.item + ': ' + val;
}
})
.tooltip('item*percent', function(item, percent) {
percent = percent * 100 + '%';
return {
name: item,
value: percent
value: percent * 100 + '%'
};
})
.style({
......
......@@ -86,7 +86,7 @@ export default {
return (row.hpl ? Number(row.hpl).toFixed(2) : '0.00') + '%';
}
},
{ label: '不良评价数', prop: '_badCount', width: '120', sortable: 'custom', align: 'left' }
{ label: '不良评价数', prop: 'badCount', width: '120', sortable: 'custom', align: 'left' }
],
tableList: [],
total: 0
......@@ -102,7 +102,11 @@ export default {
},
async storeEvaluateDetail() {
this.loading = true;
let res = await storeEvaluateDetail(this.listParams);
const params = { ...this.listParams };
if (!params.storeDetailSortName) {
delete params.storeDetailSortName;
}
let res = await storeEvaluateDetail(params);
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
this.loading = false;
......@@ -120,7 +124,7 @@ export default {
sortList(obj) {
this.listParams.sortType = obj.order === 'ascending' ? 'asc' : 'desc';
this.listParams.storeDetailSortName = obj.prop || '';
if (obj.prop === '_badCount') {
if (obj.prop === 'badCount') {
this.listParams.storeDetailSortName = 'badCount';
}
this.storeEvaluateDetail();
......
......@@ -93,11 +93,15 @@ export default {
async storeScoreDetail() {
this.loading = true;
this.tableList = [];
let res = await storeScoreDetail(this.listParams);
const params = { ...this.listParams };
if (!params.storeDetailSortName) {
delete params.storeDetailSortName;
}
let res = await storeScoreDetail(params);
this.tableList = res.result.result || [];
this.total = res.result.totalCount;
this.tableList.unshift({
totalCount: '总计:' + this.tableList.length + '家',
totalCount: '总计:' + res.result.totalCount + '家',
evaluateCount: res.result.params.totalCountValue,
fwtdAvg: res.result.params.fwtdValue.toFixed(2),
zycdAvg: res.result.params.zycdValue.toFixed(2),
......
......@@ -138,6 +138,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import adjustStock from '../common/adjust-stock';
import activitySelect from '@/components/activity-select';
import { detailLottery, saveLottery, downloadWheelSkinPsd, updateGamePrize } from '@/service/api/gameApi.js';
......@@ -473,7 +474,10 @@ export default {
this.loading = false;
},
//提交保存
async saveLottery(formName) {
saveLottery: _debounce(async function(formName) {
if (this.loading) {
return;
}
if (!this.canEdit) {
return;
}
......@@ -670,7 +674,7 @@ export default {
return false;
}
});
},
}),
labelTips(h, { column, $index }) {
return (
<el-tooltip class="item" effect="dark" content="中奖几率=奖品总几率*(该奖品数/所有有效的奖品总数)" placement="top-start">
......
......@@ -122,6 +122,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import adjustStock from '../common/adjust-stock';
import activitySelect from '@/components/activity-select';
import { detailLottery, saveLottery, downloadWheelSkinPsd, updateGamePrize, deleteGamePrize } from '@/service/api/gameApi.js';
......@@ -467,7 +468,10 @@ export default {
this.backupTableList = deepClone(gameDetail.prizeList);
},
//提交保存
async saveLottery(formName) {
saveLottery: _debounce(async function(formName) {
if (this.loading) {
return;
}
if (!this.canEdit) {
return;
}
......@@ -641,7 +645,7 @@ export default {
return false;
}
});
},
}),
// 表格提示
labelTips(h, { column, $index }) {
return (
......
......@@ -185,6 +185,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import activitySelect from '@/components/activity-select';
import { klflDetail, klflSave, klflStrategyList, klflPrizeList, klflStrategySort, klflStrategyDel, klflDownTemp, getCouponStock } from '@/service/api/gameApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
......@@ -602,7 +603,10 @@ export default {
});
},
//提交保存
async klflSave(formName) {
klflSave: _debounce(async function(formName) {
if (this.loading) {
return;
}
if (!this.canEdit) {
return;
}
......@@ -778,7 +782,7 @@ export default {
return false;
}
});
},
}),
//策略排序
sortGame(id, type, flag) {
if (flag) return;
......
......@@ -106,6 +106,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import activitySelect from '@/components/activity-select';
import { ptyxDetail, savePtyx, getGameSystemMusic, downloadPtyxSkinPsd } from '@/service/api/gameApi.js';
import { numberToChinese, formatDateTimeByType } from '@/utils/index.js';
......@@ -381,7 +382,10 @@ export default {
});
},
//提交保存
async savePtyx(formName) {
savePtyx: _debounce(async function(formName) {
if (this.loading) {
return;
}
if (!this.canEdit) {
return;
}
......@@ -563,7 +567,7 @@ export default {
return false;
}
});
},
}),
//播放音乐
playMusic(index) {
let currentMusic = this.gameMusicOptions[index];
......
......@@ -73,6 +73,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import activitySelect from '@/components/activity-select';
import { znmDetail, znmSave, znmStrategyList, znmStrategySort, znmStrategyDel } from '@/service/api/gameApi.js';
import { numberToChinese, formatDateTimeByType } from '@/utils/index.js';
......@@ -293,7 +294,10 @@ export default {
}
},
//提交保存
async znmSave(formName) {
znmSave: _debounce(async function(formName) {
if (this.loading) {
return;
}
if (!this.canEdit) {
return;
}
......@@ -410,7 +414,7 @@ export default {
return false;
}
});
},
}),
// 显示卡券弹窗
showCard(type) {
console.log(type);
......@@ -419,7 +423,6 @@ export default {
},
// 子组件触发方法
selectCard(val) {
console.log(val);
if (val && val.cardName) {
this[cardType] = val;
console.log(this[cardType]);
......
......@@ -72,6 +72,7 @@
</div>
</template>
<script>
import { _debounce } from '@/utils/index';
import { saveTempService, LoadTempInfo } from '@/service/api/messageApi.js';
export default {
name: 'add-temp',
......@@ -110,7 +111,7 @@ export default {
}
},
methods: {
submit(formName) {
submit: _debounce(function(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
this.saveTempService();
......@@ -118,8 +119,11 @@ export default {
return false;
}
});
},
}),
async saveTempService() {
if (this.loading) {
return;
}
try {
this.loading = true;
await saveTempService(this.form);
......
......@@ -44,6 +44,7 @@
</el-form>
</template>
<script>
import { _debounce } from '@/utils/index';
import activitySelect from '@/components/activity-select';
import { saveSendSmsService, checkMessageSendCount } from '@/service/api/messageApi.js';
import smsTemp from '@/components/libs/smsTemp';
......@@ -206,7 +207,10 @@ export default {
});
},
//提交表单
async sendSms() {
sendSms: _debounce(async function() {
if (this.loading) {
return;
}
if (this.info.sendType == 1 && !this.info.sendTime) {
this.$tips({ type: 'warning', message: '请设置发送时间' });
return;
......@@ -260,7 +264,7 @@ export default {
return;
}
this.checkMessageSendCount();
},
}),
checkAccountState() {
if (localStorage.getItem('accountStatus') == 3) {
this.$alert(
......
......@@ -35,6 +35,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import smsTemp from '@/components/libs/smsTemp';
import { formatDateTimeByType } from '@/utils/index.js';
import file from '@/components/upload/file';
......@@ -78,7 +79,10 @@ export default {
onSmsItemInfo(val) {
this.smsType = val.type;
},
submitForm() {
submitForm: _debounce(function() {
if (this.loading) {
return;
}
if (this.ruleForm.sendType == 1 && !this.ruleForm.sendTime) {
this.$tips({ type: 'warning', message: '请设置发送时间' });
return;
......@@ -107,7 +111,7 @@ export default {
.catch(() => {
this.loading = false;
});
},
}),
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
......
......@@ -22,6 +22,9 @@
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] }}</span>
<el-tooltip v-if="v.showTP && scope.row.status == 2" :open-delay="300" class="item" effect="dark" content="该模板消息微信侧状态异常,请进入公众号后台查看" placement="top-start">
<i class="el-icon-warning" style="color:#f56c6c;cursor:pointer;"></i>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="140px" fixed="right">
......@@ -55,6 +58,7 @@ export default {
prop: 'bindStatusDesc',
minWidth: '120',
align: 'left',
showTP: 1,
formatter: function(row) {
return `<span class="${row.bindStatusDesc === '已绑定' ? 'dm-status--primary' : 'dm-status--error'}">${row.bindStatusDesc || '--'}</span>`;
}
......
......@@ -136,6 +136,11 @@ export default {
listParams: {
beginTime: '',
endTime: ''
},
pickerOptions: {
disabledDate(val) {
return Date.now() >= val.getTime() + 3 * 30 * 24 * 60 * 60 * 1000;
}
}
};
},
......
......@@ -215,7 +215,12 @@ export default {
taskTypeOptions: [],
sumFee: 0,
sumCount: 0,
placeholder: ''
placeholder: '',
pickerOptions: {
disabledDate(val) {
return Date.now() >= val.getTime() + 3 * 30 * 24 * 60 * 60 * 1000;
}
}
};
},
created() {
......
......@@ -111,6 +111,7 @@
</template>
<script>
import { _debounce } from '@/utils/index';
import VueUeditorWrap from '@/components/ueditorWrap';
import dmImgBox from '@/components/libs/imgTemp/index-box.vue';
import cardTemp from '@/components/libs/cardTemp';
......@@ -324,7 +325,7 @@ export default {
}
this.loading = false;
},
submit() {
submit: _debounce(function() {
if (this.subLoading) {
return;
}
......@@ -345,7 +346,7 @@ export default {
});
if (flag) return;
this.saveUpdateWechatImageText();
},
}),
async saveUpdateWechatImageText() {
let params = {};
......
......@@ -82,6 +82,7 @@
</div>
</template>
<script>
import { _debounce } from '@/utils/index';
import activitySelect from '@/components/activity-select';
import dmImgText from '@/components/libs/imgTextTemp';
import dmImgBox from '@/components/libs/imgTemp/index-box.vue';
......@@ -263,7 +264,7 @@ export default {
// this.info.imageMediaId = data.imageMediaId;
// },
// type: 1预览 2提交群发
async submit(type) {
submit: _debounce(async function(type) {
// console.log(this.info);
// // 这里强制获取人群筛选器的配置项
// await this.$refs.peopleFilter.confirmSet();
......@@ -322,9 +323,12 @@ export default {
} else if (type === 2) {
this.checkMessageSendCount();
}
},
}),
// 提交预览
async handleSendRecordPreview() {
if (this.loading) {
return;
}
this.$confirm('预览将不会保存群发信息, 且只发送一个会员, 每日调用次数100', '提示', {
confirmButtonText: '确定',
cancelBUttonText: '取消',
......@@ -392,6 +396,9 @@ export default {
},
//提交表单验证人数 只有人员筛选需要
async checkMessageSendCount() {
if (this.loading) {
return;
}
if (this.info.memberType === 0 || this.info.memberType === 2) {
const params = {
memberSearchDTO: this.info.memberType ? this.info.memberGroupIds : this.info.memberSearchDTO,
......
<template>
<section class="dm-wrap">
<el-form ref="form" :model="form" :rules="rules" label-width="80px" v-loading="loading">
<section class="dm-wrap" v-loading="loading">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="标题" prop="titleName" class="w450">
<dm-input v-model="form.titleName" :maxlength="64"></dm-input>
</el-form-item>
......@@ -102,6 +102,9 @@ export default {
},
//保存操作
async saveVideoService() {
if (this.loading) {
return;
}
try {
this.loading = true;
let params = {
......
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