Commit 37b8d407 by 黑潮

update: 卡券包领取记录

parent 9417fd03
......@@ -6,6 +6,7 @@ import axios from 'axios';
// const router = new VueRouter();
import router from '../../router/index';
import store from '../../store/index';
import Vue from 'vue';
// 加载最小时间
const MINI_TIME = 300;
......@@ -124,7 +125,12 @@ const requests = (url, data = {}, contentTypeIsJSON = false, isSilence = false,
popRequest(_random);
if (res.data.errorCode !== 0) {
reject(res);
handlerErr(res.data.errorCode, res.data.message, alertError);
// handlerErr(res.data.errorCode, res.data.message, alertError);
if (res.data.message.indexOf('抱歉') >= 0) {
Vue.prototype.$alert(res.data.message, '提示');
} else {
handlerErr(res.data.errorCode, res.data.message, alertError);
}
} else {
resolve(res.data);
}
......
......@@ -39,7 +39,7 @@
<dm-delete v-if="scope.row.canEdit" @confirm="del(scope.row)" tips="是否删除该卡券包?">
<el-button type="text">删除</el-button>
</dm-delete>
<el-button v-if="scope.row.canEdit" type="text" @click="$router.push(`/card/merge/record-list?name=${scope.row.name}`)">领取记录</el-button>
<el-button v-if="scope.row.canEdit" type="text" @click="$router.push(`/card/merge/record-list?cardPackageId=${scope.row.cardPackageId}&name=${scope.row.name}`)">领取记录</el-button>
</template>
</el-table-column>
</el-table>
......
<template>
<section class="dm-wrap" v-loading="loading">
<div class="pb22 clearfix">
<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-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-input v-model="listParams.receiveCode" class="w300" placeholder="请输入投放渠道" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input> -->
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%">
......@@ -48,6 +48,7 @@ export default {
formatDateTimeByType,
visible: false,
listParams: {
cardPackageId: '',
search: '',
marketingActivityId: '',
receiveCode: '',
......@@ -65,9 +66,9 @@ export default {
};
},
created() {
this.listParams.search = this.$route.query.name;
this.listParams.cardPackageId = this.$route.query.cardPackageId;
this.getTableList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券包', path: '' }, { name: '卡券包领取记录', path: '' }]); // eslint-disable-line
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券包', path: '' }, { name: `${this.$route.query.name || ''}-卡券包领取记录`, path: '' }]); // eslint-disable-line
},
methods: {
// 加载列表
......
......@@ -204,18 +204,10 @@ export default {
if (this.info.sendType) {
params.sendTime = formatDateTimeByType(this.info.sendTime, 'yyyy-MM-dd-HH-mm-ss');
}
saveSendSmsService(params)
.then(res => {
if (res.errorCode === 0) {
this.$router.push('/message/record');
this.$tips({ type: 'success', message: res.message || '提交成功' });
} else {
this.$tips({ type: 'error', message: '提交失败' });
}
})
.catch(err => {
this.$tips({ type: 'error', message: '提交失败' });
});
saveSendSmsService(params).then(res => {
this.$router.push('/message/record');
this.$tips({ type: 'success', message: res.message || '提交成功' });
});
})
.catch(() => {
this.$tips({ type: 'info', message: '已取消提交' });
......
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