添加:兑换码作废功能
This commit is contained in:
parent
16694b3e82
commit
9c51402dca
|
|
@ -456,10 +456,14 @@ export function exchangeCodeBatchList() {
|
||||||
export function exchangeCodeEditForm() {
|
export function exchangeCodeEditForm() {
|
||||||
return request.get('user/exchangeCode/editForm')
|
return request.get('user/exchangeCode/editForm')
|
||||||
}
|
}
|
||||||
// 会员卡兑换码 - 激活表单
|
// 会员卡兑换码 - 分配表单
|
||||||
export function exchangeCodeActivateForm() {
|
export function exchangeCodeActivateForm() {
|
||||||
return request.get('user/exchangeCode/activateForm')
|
return request.get('user/exchangeCode/activateForm')
|
||||||
}
|
}
|
||||||
|
// 会员卡兑换码 - 作废
|
||||||
|
export function exchangeCodeCancelForm() {
|
||||||
|
return request.get('user/exchangeCode/cancelForm')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
<el-button size="small" type="primary" @click="getList(1)">搜索</el-button>
|
<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="success" @click="addExchangeCode">添加兑换码</el-button>
|
||||||
<el-button size="small" type="warning" @click="activateExchangeCode">分配给商户</el-button>
|
<el-button size="small" type="warning" @click="activateExchangeCode">分配给商户</el-button>
|
||||||
|
<el-button size="small" type="danger" @click="cancelExchangeCode">作废兑换码</el-button>
|
||||||
<el-button size="small" type="info" @click="exports">导出兑换码</el-button>
|
<el-button size="small" type="info" @click="exports">导出兑换码</el-button>
|
||||||
<el-button size="small" type="info" @click="exports('down')">下载二维码</el-button>
|
<el-button size="small" type="info" @click="exports('down')">下载二维码</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -38,6 +39,7 @@
|
||||||
<el-tag v-if="scope.row.status == 0" type="info" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
<el-tag v-if="scope.row.status == 0" type="info" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
||||||
<el-tag v-else-if="scope.row.status == 1" type="primary" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
<el-tag v-else-if="scope.row.status == 1" type="primary" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
||||||
<el-tag v-else-if="scope.row.status == 2" type="success" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
<el-tag v-else-if="scope.row.status == 2" type="success" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.status == 3" type="danger" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" min-width="150" align="center">
|
<el-table-column label="状态" min-width="150" align="center">
|
||||||
|
|
@ -59,6 +61,9 @@
|
||||||
{{scope.row.use_time}}
|
{{scope.row.use_time}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="scope.row.status == 3">
|
||||||
|
<el-tag type="danger">已作废</el-tag>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="添加时间" prop="create_time" min-width="130" align="center"/>
|
<el-table-column label="添加时间" prop="create_time" min-width="130" align="center"/>
|
||||||
|
|
@ -102,7 +107,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {exchangeCodeActivateForm, exchangeCodeBatchList, exchangeCodeEditForm, exchangeCodeList} from "@/api/user";
|
import {
|
||||||
|
exchangeCodeActivateForm,
|
||||||
|
exchangeCodeBatchList,
|
||||||
|
exchangeCodeCancelForm,
|
||||||
|
exchangeCodeEditForm,
|
||||||
|
exchangeCodeList
|
||||||
|
} from "@/api/user";
|
||||||
import createWorkBook from "@/utils/newToExcel";
|
import createWorkBook from "@/utils/newToExcel";
|
||||||
import QRCodeOld from "qrcodejs2";
|
import QRCodeOld from "qrcodejs2";
|
||||||
import QRCode from "qrcode";
|
import QRCode from "qrcode";
|
||||||
|
|
@ -189,6 +200,10 @@ export default {
|
||||||
activateExchangeCode(){
|
activateExchangeCode(){
|
||||||
this.$modalForm(exchangeCodeActivateForm()).then(() => this.getList(''));
|
this.$modalForm(exchangeCodeActivateForm()).then(() => this.getList(''));
|
||||||
},
|
},
|
||||||
|
// 作废
|
||||||
|
cancelExchangeCode(){
|
||||||
|
this.$modalForm(exchangeCodeCancelForm()).then(() => this.getList(''));
|
||||||
|
},
|
||||||
// 导出 - 导出信息
|
// 导出 - 导出信息
|
||||||
async exports(type = 'excel'){
|
async exports(type = 'excel'){
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue