Commit 291b8c06 by chenxin

feat:暂存卡券包

parent 66e88615
......@@ -44,7 +44,7 @@
<!-- 组件引用cdn -->
<script src="//web-1251519181.file.myqcloud.com/components/header.2.0.33.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.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.6.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.0.01.js"></script>
......
......@@ -58,6 +58,49 @@ export default {
]
},
{
path: 'merge',
name: '卡券包',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/merge.vue'),
meta: {},
redirect: 'merge/list',
children: [
{
path: 'list',
name: '卡券包列表',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/merge-list.vue'),
meta: {
path: '/card/merge/list'
}
},
{
path: 'record-list',
name: '卡券包领取记录',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/merge-record-list.vue'),
meta: {
path: '/card/merge/record-list'
}
},
{
path: 'add',
name: '新建卡券包',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/merge-form.vue'),
meta: {
path: '/card/merge/list',
type: 'add'
}
},
{
path: 'add',
name: '编辑卡券包',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/merge-form.vue'),
meta: {
path: '/card/merge/list',
type: 'edit'
}
}
]
},
{
path: 'groupsend',
name: '新建卡券群发',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/group-send.vue'),
......@@ -168,14 +211,14 @@ export default {
meta: {
path: '/card/check'
}
},
{
path: 'destroy',
name: '卡券销毁',
component: () => import(/* webpackChunkName: "card" */ '../../views/card/destroy-list.vue'),
meta: {
path: '/card/destroy'
}
}
// {
// path: 'destroy',
// name: '卡券销毁',
// component: () => import(/* webpackChunkName: "card" */ '../../views/card/destroy-list.vue'),
// meta: {
// path: '/card/destroy'
// }
// }
]
};
......@@ -63,14 +63,14 @@ export default {
path: '/message/record'
}
},
// {
// path: 'import-send',
// name: '导入发送列表',
// component: () => import(/* webpackChunkName: "message" */ '../../views/message/importSendList.vue'),
// meta: {
// path: '/message/importSend'
// }
// },
{
path: 'import-send',
name: '导入发送列表',
component: () => import(/* webpackChunkName: "message" */ '../../views/message/importSendList.vue'),
meta: {
path: '/message/importSend'
}
},
{
path: 'import-send/add',
name: '手工导入群发',
......
......@@ -5,7 +5,7 @@
<el-select class="dm-select w160" v-model="listParams.cardType" clearable placeholder="所有销毁方式" @change="refresh">
<el-option v-for="(item, index) in destoryType" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input v-model="listParams.searchParam" class="w300" placeholder="请输入卡券名称名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input v-model="listParams.searchParam" class="w300" placeholder="请输入卡券名称" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-button class="fr" type="danger" @click="visible = true">卡券销毁</el-button>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading">
......
<template>
<div class="dm-wrap" :loading="loading">
<el-form ref="form" :model="ruleForm" label-width="140px" :rules="rules">
<el-form-item prop="cardName" label="卡券包名称">
<dm-input v-model="ruleForm.cardName" class="w300" placeholder="请输入卡券包名称" :disabled="isEdit" :byteType="1" :maxlength="9"></dm-input>
</el-form-item>
<el-form-item label="发送时间">
<el-select class="w300" v-model="ruleForm.sendType">
<el-option v-for="(v, i) in sendTypeOptions" :key="i" :value="v.value" :label="v.label"></el-option>
</el-select>
<el-date-picker v-if="ruleForm.sendType" class="w300" 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-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 label="新增卡券">
<el-button @click="showCardDialog = true">选择卡券</el-button>
</el-form-item>
</el-form>
<vue-gic-card :showCardDialog="showCardDialog" @selectCard="selectCard" :cardLimit="1" :cardType="null"></vue-gic-card>
</div>
</template>
<script>
import { sceneSettingList } from '@/service/api/wechatApi.js';
export default {
name: 'merge-form',
data() {
return {
loading: false,
showCardDialog: false,
ruleForm: {
cardName: '',
sendType: 0,
sceneSettingId: ''
},
dateTime: [],
rules: {},
pickerOptions: {
disabledDate(now) {
return now.getTime() < Date.now() - 24 * 60 * 60 * 1000;
}
},
sceneSettingIdOptions: [],
sendTypeOptions: [{ value: 0, label: '立即发送' }, { value: 1, label: '选择时间发送' }], // eslint-disable-line
isAdd: this.$route.meta.type === 'add',
isEdit: this.$route.meta.type === 'edit'
};
},
methods: {
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
},
//选择卡券后置
selectCard(val) {
if (val) {
this.ruleForm.cardId = val.coupCardId;
this.ruleForm.cardName = val.cardName;
this.$refs.ruleForm.validateField('cardId');
}
this.showCardDialog = false;
}
},
mounted() {
this.sceneSettingList();
},
created() {
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券包', path: '' }, { name: this.isAdd ? '新建卡券包' : '编辑卡券包', path: '' }]); // eslint-disable-line
}
};
</script>
<template>
<section class="dm-wrap">
<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.cardType" clearable placeholder="所有营销场景" @change="refresh">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
<el-input v-model="listParams.searchParam" 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%" v-loading="loading">
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="cardName" label="卡券包名称"></el-table-column>
<el-table-column :show-overflow-tooltip="true" 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" width="100" align="left" prop="createTime" label="有效期">
<template slot-scope="scope"> {{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd') }}-{{ formatDateTimeByType(scope.row.createTime, 'yyyy-MM-dd') }} </template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="cardName" label="卡券数量"></el-table-column>
<el-table-column :show-overflow-tooltip="true" width="100" align="left" prop="createTime" label="场景值">
<template slot-scope="scope">{{ scope.row.aa || '--' }}</template>
</el-table-column>
<el-table-column label="操作" align="left" width="120px" fixed="right">
<template slot-scope="scope">
<el-button type="text">修改</el-button>
<dm-delete @confirm="del(scope.row)" tips="是否删除该卡券包?">
<el-button type="text">删除</el-button>
</dm-delete>
</template>
</el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import { coupcardCheckList } 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';
export default {
name: 'destory-list',
mixins: [talbeMethods, filterAvater],
data() {
return {
formatDateTimeByType,
visible: false,
dateTime: [],
listParams: {
beginTime: '',
endTime: '',
searchParam: '',
currentPage: 1,
pageSize: 20
},
sceneSettingIdOptions: [],
total: 0,
loading: false,
tableList: [],
projectName: 'marketing', // 当前项目名
dialogVisible: false,
excelUrl: '', // 下载数据的地址
params: {} // 传递的参数
};
},
created() {
this.getTableList();
this.sceneSettingList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券包', path: '' }, { name: '卡券包列表', path: '' }]); // eslint-disable-line
},
methods: {
del() {
console.log('???');
},
// 加载列表
async getTableList() {
return;
this.loading = true;
this.dataTimeFormat();
try {
let res = await coupcardCheckList(this.listParams);
this.tableList = res.result.result || [];
this.total = res.result.totalCount || 0;
} catch (err) {
this.$tips({ type: 'error', message: '加载列表失败' });
}
this.loading = false;
},
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
},
/**-------辅助方法---------- */
dataTimeFormat() {
if (this.dateTime) {
this.listParams.beginTime = formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd');
this.listParams.endTime = formatDateTimeByType(this.dateTime[1], 'yyyy-MM-dd');
} else {
this.listParams.beginTime = '';
this.listParams.endTime = '';
}
}
}
};
</script>
<template>
<section class="dm-wrap">
<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.aa" class="w300" placeholder="请输入投放渠道" clearable @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-select class="dm-select w160" v-model="listParams.cardType" clearable placeholder="所有营销场景" @change="refresh">
<el-option v-for="item in sceneSettingIdOptions" :key="item.sceneSettingId" :label="item.sceneName" :value="item.sceneSettingId"></el-option>
</el-select>
</div>
<el-table tooltipEffect="light" :data="tableList" style="width: 100%" v-loading="loading">
<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="120" header-align="left" align="left" prop="memberId" label="会员信息">
<template slot-scope="scope">
<a :href="'/member/#/wechatmemberDetail?memberId=' + scope.row.memberId" target="_blank">
<img class="vertical-middle table__avatar--40" :src="scope.row.imageUrl || defaultAvatar" width="60" height="60" />
<div class="inline-block vertical-middle">
<p class="table-name--ellipsis">{{ scope.row.memberName || '--' }}</p>
<p class="fz13 gray">{{ scope.row.phoneNumber || '--' }}</p>
</div>
</a>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="cardName" label="卡券包名称"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="cardName" label="领取位置"></el-table-column>
<el-table-column :show-overflow-tooltip="true" min-width="120" align="left" prop="cardName" label="投放渠道"></el-table-column>
</el-table>
<el-pagination v-show="tableList.length" background class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"></el-pagination>
</section>
</template>
<script>
import { coupcardCheckList } 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';
export default {
name: 'destory-list',
mixins: [talbeMethods, filterAvater],
data() {
return {
formatDateTimeByType,
visible: false,
listParams: {
search: '',
aa: '',
currentPage: 1,
pageSize: 20
},
sceneSettingIdOptions: [],
total: 0,
loading: false,
tableList: [],
projectName: 'marketing', // 当前项目名
dialogVisible: false,
excelUrl: '', // 下载数据的地址
params: {} // 传递的参数
};
},
created() {
this.getTableList();
this.sceneSettingList();
this.$store.commit('mutations_breadcrumb', [{ name: '营销管理', path: '' }, { name: '卡券营销', path: '' }, { name: '卡券包', path: '' }, { name: '卡券包领取记录', path: '' }]); // eslint-disable-line
},
methods: {
del() {
console.log('???');
},
// 加载列表
async getTableList() {
return;
this.loading = true;
try {
let res = await coupcardCheckList(this.listParams);
this.tableList = res.result.result || [];
this.total = res.result.totalCount || 0;
} catch (err) {
this.$tips({ type: 'error', message: '加载列表失败' });
}
this.loading = false;
},
async sceneSettingList() {
let res = await sceneSettingList();
this.sceneSettingIdOptions = res.result || [];
}
}
};
</script>
<template>
<router-view></router-view>
</template>
<script>
export default {
data() {
return {};
}
};
</script>
......@@ -27,7 +27,7 @@
<el-button @click="close">取 消</el-button>
<el-button type="primary" @click="submit">确认销毁</el-button>
</span>
<vue-gic-card :showCardDialog="showCardDialog" @selectCard="selectCard" :cardLimit="3" :cardType="null"></vue-gic-card>
<vue-gic-card :showCardDialog="showCardDialog" appendToBody @selectCard="selectCard" :cardLimit="3" :cardType="null"></vue-gic-card>
</el-dialog>
</template>
......
......@@ -66,7 +66,7 @@ export default {
} else if (this.cardLimitType === 3) {
return '领取限制领取<100的卡券不支持选择,系统已过滤,符合条件共';
} else if (this.cardLimitType === -1) {
return '无卡券领取限制,符合条件共';
return '该选择器可筛选所有领取限制卡券,共';
} else {
return '领取限制>1的卡券不支持选择,系统已过滤,符合条件共';
}
......
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