Commit 6245bb88 by 黑潮

Merge branch 'feature/12月迭代'

parents 44d2c01a 15f5784f
......@@ -163,6 +163,7 @@ import { listTemplateVariables } from '@/service/api/msgApi.js';
import { formatDateTimeByType } from '@/utils/index.js';
import itemCard from './partials/item-card.vue';
import varDialog from './partials/variables.vue';
import { _debounce } from '@/utils/index';
export default {
name: 'card-group',
components: {
......@@ -491,7 +492,10 @@ export default {
},
// 保存校验
async submit(formName) {
submit: _debounce(async function(formName) {
if (this.loading) {
return;
}
if (this.form.putOnType == 1 && !this.form.putOnTime) {
this.$tips({ type: 'warning', message: '请设置发送时间' });
return;
......@@ -524,9 +528,10 @@ export default {
return false;
}
});
},
}),
// 计算发送多少人
async sendCard() {
this.loading = true;
let params = {
// memberSearchDTO:this.form.memberSearchDTO,
memberSearchDTO: this.form.memberType ? this.form.memberGroupIds : this.form.memberSearchDTO,
......@@ -536,8 +541,8 @@ export default {
};
// console.log(this.form.memberGroupIds);
let res = await checkPutonMemberIds(params);
if (res.errorCode === 0) {
let res = await checkPutonMemberIds(params).finally(() => (this.loading = false));
if (res && res.errorCode === 0) {
let sumPerson = res.result.totalSendCount;
let html = ``;
console.log(this.cardInfo);
......
......@@ -293,8 +293,9 @@ export default {
// 区分人员筛选和会员分组,需要传这个flag
groupType: this.form.memberType
};
const res = await checkMessageSendCount(params);
if (res.errorCode === 0) {
this.loading = true;
const res = await checkMessageSendCount(params).finally(() => (this.loading = false));
if (res && res.errorCode === 0) {
this.$confirm(
`<div>
<div class="inline-block w300 vertical-middle ">
......@@ -650,6 +651,9 @@ export default {
},
// 保存 校验
submit: _debounce(async function(formName) {
if (this.loading) {
return;
}
if (this.$refs.marketingEvent.list.length < 1) {
this.$tips({ type: 'warning', message: '请至少保存一条营销事件' });
return;
......@@ -994,6 +998,7 @@ export default {
.then(res => {
if (res.errorCode === 0) {
if (this.isEdit) {
this.loading = false;
this.$confirm('操作成功, 是否返回列表?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -1003,7 +1008,6 @@ export default {
this.$router.push('/ecm/list');
})
.catch(err => {
this.loading = false;
this.getEcmInfo();
});
} else {
......
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