添加:兑换码激活
This commit is contained in:
parent
90266328f5
commit
82826229ef
|
|
@ -456,6 +456,10 @@ export function exchangeCodeBatchList() {
|
|||
export function exchangeCodeEditForm() {
|
||||
return request.get('user/exchangeCode/editForm')
|
||||
}
|
||||
// 会员卡兑换码 - 激活表单
|
||||
export function exchangeCodeActivateForm() {
|
||||
return request.get('user/exchangeCode/activateForm')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,14 @@
|
|||
</el-form>
|
||||
<el-button size="small" type="primary" @click="getList(1)">搜索</el-button>
|
||||
<el-button size="small" type="success" @click="addExchangeCode">添加</el-button>
|
||||
<el-button size="small" type="warning" @click="activateExchangeCode">激活</el-button>
|
||||
<el-button size="small" type="info" @click="exports">导出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!--表格信息-->
|
||||
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini">
|
||||
<el-table-column label="ID" prop="id" min-width="80" align="center"/>
|
||||
<el-table-column label="归属批次" min-width="150" align="center">
|
||||
<el-table-column label="归属批次" min-width="130" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.batch_title }}<br />
|
||||
{{ scope.row.batch_unique }}
|
||||
|
|
@ -38,14 +39,25 @@
|
|||
<el-tag v-else-if="scope.row.status == 2" type="success" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" min-width="100" align="center">
|
||||
<el-table-column label="状态" min-width="150" align="center">
|
||||
<template slot="header" slot-scope="scope">
|
||||
状态<br />
|
||||
激活时间 / 使用时间
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 0" type="info">待激活</el-tag>
|
||||
<el-tag v-else-if="scope.row.status == 1" type="primary">已激活</el-tag>
|
||||
<template v-else-if="scope.row.status == 1">
|
||||
<el-tag type="primary">
|
||||
已激活<br />
|
||||
{{scope.row.activate}}
|
||||
</el-tag>
|
||||
</template>
|
||||
<el-tag v-else-if="scope.row.status == 2" type="success">已使用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="添加时间" prop="create_time" min-width="130" align="center"/>
|
||||
<el-table-column label="绑定商户" prop="mer_name" min-width="100" align="center"/>
|
||||
<el-table-column label="绑定会员卡" prop="svip_name" min-width="100" align="center"/>
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<div class="block">
|
||||
|
|
@ -65,7 +77,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {exchangeCodeBatchList, exchangeCodeEditForm, exchangeCodeList} from "@/api/user";
|
||||
import {exchangeCodeActivateForm, exchangeCodeBatchList, exchangeCodeEditForm, exchangeCodeList} from "@/api/user";
|
||||
import createWorkBook from "@/utils/newToExcel";
|
||||
|
||||
export default {
|
||||
|
|
@ -111,11 +123,11 @@ export default {
|
|||
},
|
||||
pageUserChange(page) {
|
||||
this.tableFrom.page = page;
|
||||
this.getUserList('');
|
||||
this.getList('');
|
||||
},
|
||||
handleUserSizeChange(val) {
|
||||
this.tableFrom.limit = val;
|
||||
this.getUserList('');
|
||||
this.getList('');
|
||||
},
|
||||
// 批次列表
|
||||
getBatchList(){
|
||||
|
|
@ -130,6 +142,10 @@ export default {
|
|||
addExchangeCode(){
|
||||
this.$modalForm(exchangeCodeEditForm()).then(() => this.getList(''));
|
||||
},
|
||||
// 激活
|
||||
activateExchangeCode(){
|
||||
this.$modalForm(exchangeCodeActivateForm()).then(() => this.getList(''));
|
||||
},
|
||||
// 导出 - 导出信息
|
||||
async exports(){
|
||||
let _this = this;
|
||||
|
|
|
|||
Loading…
Reference in New Issue