兑换券

This commit is contained in:
齐天大圣 2023-11-07 09:31:13 +08:00
parent a80d0af65e
commit 557aba50c7
4 changed files with 962 additions and 0 deletions

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询兑换券列表
export function listExchange(query) {
return request({
url: '/system/exchange/list',
method: 'get',
params: query
})
}
// 查询兑换券详细
export function getExchange(id) {
return request({
url: '/system/exchange/' + id,
method: 'get'
})
}
// 新增兑换券
export function addExchange(data) {
return request({
url: '/system/exchange',
method: 'post',
data: data
})
}
// 修改兑换券
export function updateExchange(data) {
return request({
url: '/system/exchange',
method: 'put',
data: data
})
}
// 删除兑换券
export function delExchange(id) {
return request({
url: '/system/exchange/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询兑换券领取记录列表
export function listRecord(query) {
return request({
url: '/system/record/list',
method: 'get',
params: query
})
}
// 查询兑换券领取记录详细
export function getRecord(id) {
return request({
url: '/system/record/' + id,
method: 'get'
})
}
// 新增兑换券领取记录
export function addRecord(data) {
return request({
url: '/system/record',
method: 'post',
data: data
})
}
// 修改兑换券领取记录
export function updateRecord(data) {
return request({
url: '/system/record',
method: 'put',
data: data
})
}
// 删除兑换券领取记录
export function delRecord(id) {
return request({
url: '/system/record/' + id,
method: 'delete'
})
}

View File

@ -0,0 +1,390 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="所属连锁店id" prop="chainStorId">
<el-input
v-model="queryParams.chainStorId"
placeholder="请输入所属连锁店id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属店铺id" prop="storeId">
<el-input
v-model="queryParams.storeId"
placeholder="请输入所属店铺id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否在线 0在线 1 下线" prop="isonline">
<el-input
v-model="queryParams.isonline"
placeholder="请输入是否在线 0在线 1 下线"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="兑换券名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入兑换券名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="兑换礼品名" prop="giftName">
<el-input
v-model="queryParams.giftName"
placeholder="请输入兑换礼品名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="卡券有效期" prop="validity">
<el-input
v-model="queryParams.validity"
placeholder="请输入卡券有效期"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="使用说明" prop="useInstructions">
<el-input
v-model="queryParams.useInstructions"
placeholder="请输入使用说明"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="二维码链接" prop="qrCodeLink">
<el-input
v-model="queryParams.qrCodeLink"
placeholder="请输入二维码链接"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="参与次数" prop="count">
<el-input
v-model="queryParams.count"
placeholder="请输入参与次数"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="到期时间" prop="outTime">
<el-date-picker clearable
v-model="queryParams.outTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择到期时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:exchange:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:exchange:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:exchange:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:exchange:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="exchangeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键id" align="center" prop="id" />
<el-table-column label="所属连锁店id" align="center" prop="chainStorId" />
<el-table-column label="所属店铺id" align="center" prop="storeId" />
<el-table-column label="是否在线 0在线 1 下线" align="center" prop="isonline" />
<el-table-column label="兑换券状态 0启用 1 禁用" align="center" prop="status" />
<el-table-column label="兑换券名称" align="center" prop="name" />
<el-table-column label="兑换券类型 0兑换券 1洗车券 2洗车卡" align="center" prop="type" />
<el-table-column label="兑换礼品名" align="center" prop="giftName" />
<el-table-column label="卡券有效期" align="center" prop="validity" />
<el-table-column label="使用说明" align="center" prop="useInstructions" />
<el-table-column label="二维码链接" align="center" prop="qrCodeLink" />
<el-table-column label="参与次数" align="center" prop="count" />
<el-table-column label="到期时间" align="center" prop="outTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.outTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:exchange:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:exchange:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改兑换券对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属连锁店id" prop="chainStorId">
<el-input v-model="form.chainStorId" placeholder="请输入所属连锁店id" />
</el-form-item>
<el-form-item label="所属店铺id" prop="storeId">
<el-input v-model="form.storeId" placeholder="请输入所属店铺id" />
</el-form-item>
<el-form-item label="是否在线 0在线 1 下线" prop="isonline">
<el-input v-model="form.isonline" placeholder="请输入是否在线 0在线 1 下线" />
</el-form-item>
<el-form-item label="兑换券名称" prop="name">
<el-input v-model="form.name" placeholder="请输入兑换券名称" />
</el-form-item>
<el-form-item label="兑换礼品名" prop="giftName">
<el-input v-model="form.giftName" placeholder="请输入兑换礼品名" />
</el-form-item>
<el-form-item label="卡券有效期" prop="validity">
<el-input v-model="form.validity" placeholder="请输入卡券有效期" />
</el-form-item>
<el-form-item label="使用说明" prop="useInstructions">
<el-input v-model="form.useInstructions" placeholder="请输入使用说明" />
</el-form-item>
<el-form-item label="二维码链接" prop="qrCodeLink">
<el-input v-model="form.qrCodeLink" placeholder="请输入二维码链接" />
</el-form-item>
<el-form-item label="参与次数" prop="count">
<el-input v-model="form.count" placeholder="请输入参与次数" />
</el-form-item>
<el-form-item label="到期时间" prop="outTime">
<el-date-picker clearable
v-model="form.outTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择到期时间">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listExchange, getExchange, delExchange, addExchange, updateExchange } from "@/api/system/exchange";
export default {
name: "Exchange",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
exchangeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
chainStorId: null,
storeId: null,
isonline: null,
status: null,
name: null,
type: null,
giftName: null,
validity: null,
useInstructions: null,
qrCodeLink: null,
count: null,
outTime: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询兑换券列表 */
getList() {
this.loading = true;
listExchange(this.queryParams).then(response => {
this.exchangeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
chainStorId: null,
storeId: null,
isonline: null,
status: null,
name: null,
type: null,
giftName: null,
validity: null,
useInstructions: null,
qrCodeLink: null,
count: null,
outTime: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加兑换券";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getExchange(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改兑换券";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateExchange(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addExchange(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除兑换券编号为"' + ids + '"的数据项?').then(function() {
return delExchange(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/exchange/export', {
...this.queryParams
}, `exchange_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@ -0,0 +1,484 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="兑换券id" prop="cardExchangeId">
<el-input
v-model="queryParams.cardExchangeId"
placeholder="请输入兑换券id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工id" prop="mtStaffId">
<el-input
v-model="queryParams.mtStaffId"
placeholder="请输入员工id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工姓名" prop="realName">
<el-input
v-model="queryParams.realName"
placeholder="请输入员工姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工手机号码" prop="staffMobile">
<el-input
v-model="queryParams.staffMobile"
placeholder="请输入员工手机号码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="会员id" prop="mtUserId">
<el-input
v-model="queryParams.mtUserId"
placeholder="请输入会员id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="会员名字" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入会员名字"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="会员手机号码" prop="mobile">
<el-input
v-model="queryParams.mobile"
placeholder="请输入会员手机号码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="会员头像" prop="photo">
<el-input
v-model="queryParams.photo"
placeholder="请输入会员头像"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="券名称" prop="exchangeName">
<el-input
v-model="queryParams.exchangeName"
placeholder="请输入券名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="券码" prop="ticketCode">
<el-input
v-model="queryParams.ticketCode"
placeholder="请输入券码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="券来源" prop="exchangeFrom">
<el-input
v-model="queryParams.exchangeFrom"
placeholder="请输入券来源"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="到期时间" prop="outTime">
<el-date-picker clearable
v-model="queryParams.outTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择到期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="核销时间" prop="cancelTime">
<el-date-picker clearable
v-model="queryParams.cancelTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择核销时间">
</el-date-picker>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker clearable
v-model="queryParams.startTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-date-picker clearable
v-model="queryParams.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:record:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:record:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:record:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:record:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="recordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键id" align="center" prop="id" />
<el-table-column label="兑换券id" align="center" prop="cardExchangeId" />
<el-table-column label="员工id" align="center" prop="mtStaffId" />
<el-table-column label="员工姓名" align="center" prop="realName" />
<el-table-column label="员工手机号码" align="center" prop="staffMobile" />
<el-table-column label="会员id" align="center" prop="mtUserId" />
<el-table-column label="会员名字" align="center" prop="name" />
<el-table-column label="会员手机号码" align="center" prop="mobile" />
<el-table-column label="会员头像" align="center" prop="photo" />
<el-table-column label="券名称" align="center" prop="exchangeName" />
<el-table-column label="券码" align="center" prop="ticketCode" />
<el-table-column label="券来源" align="center" prop="exchangeFrom" />
<el-table-column label="使用状态 0 :未使用 1已使用 " align="center" prop="status" />
<el-table-column label="到期时间" align="center" prop="outTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.outTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="核销时间" align="center" prop="cancelTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.cancelTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" prop="startTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" prop="endTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:record:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:record:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改兑换券领取记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="兑换券id" prop="cardExchangeId">
<el-input v-model="form.cardExchangeId" placeholder="请输入兑换券id" />
</el-form-item>
<el-form-item label="员工id" prop="mtStaffId">
<el-input v-model="form.mtStaffId" placeholder="请输入员工id" />
</el-form-item>
<el-form-item label="员工姓名" prop="realName">
<el-input v-model="form.realName" placeholder="请输入员工姓名" />
</el-form-item>
<el-form-item label="员工手机号码" prop="staffMobile">
<el-input v-model="form.staffMobile" placeholder="请输入员工手机号码" />
</el-form-item>
<el-form-item label="会员id" prop="mtUserId">
<el-input v-model="form.mtUserId" placeholder="请输入会员id" />
</el-form-item>
<el-form-item label="会员名字" prop="name">
<el-input v-model="form.name" placeholder="请输入会员名字" />
</el-form-item>
<el-form-item label="会员手机号码" prop="mobile">
<el-input v-model="form.mobile" placeholder="请输入会员手机号码" />
</el-form-item>
<el-form-item label="会员头像" prop="photo">
<el-input v-model="form.photo" placeholder="请输入会员头像" />
</el-form-item>
<el-form-item label="券名称" prop="exchangeName">
<el-input v-model="form.exchangeName" placeholder="请输入券名称" />
</el-form-item>
<el-form-item label="券码" prop="ticketCode">
<el-input v-model="form.ticketCode" placeholder="请输入券码" />
</el-form-item>
<el-form-item label="券来源" prop="exchangeFrom">
<el-input v-model="form.exchangeFrom" placeholder="请输入券来源" />
</el-form-item>
<el-form-item label="到期时间" prop="outTime">
<el-date-picker clearable
v-model="form.outTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择到期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="核销时间" prop="cancelTime">
<el-date-picker clearable
v-model="form.cancelTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择核销时间">
</el-date-picker>
</el-form-item>
<el-form-item label="开始时间" prop="startTime">
<el-date-picker clearable
v-model="form.startTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-date-picker clearable
v-model="form.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择结束时间">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listRecord, getRecord, delRecord, addRecord, updateRecord } from "@/api/system/record";
export default {
name: "Record",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
recordList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
cardExchangeId: null,
mtStaffId: null,
realName: null,
staffMobile: null,
mtUserId: null,
name: null,
mobile: null,
photo: null,
exchangeName: null,
ticketCode: null,
exchangeFrom: null,
status: null,
outTime: null,
cancelTime: null,
startTime: null,
endTime: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询兑换券领取记录列表 */
getList() {
this.loading = true;
listRecord(this.queryParams).then(response => {
this.recordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
cardExchangeId: null,
mtStaffId: null,
realName: null,
staffMobile: null,
mtUserId: null,
name: null,
mobile: null,
photo: null,
exchangeName: null,
ticketCode: null,
exchangeFrom: null,
status: null,
outTime: null,
cancelTime: null,
startTime: null,
endTime: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加兑换券领取记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getRecord(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改兑换券领取记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateRecord(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除兑换券领取记录编号为"' + ids + '"的数据项?').then(function() {
return delRecord(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/record/export', {
...this.queryParams
}, `record_${new Date().getTime()}.xlsx`)
}
}
};
</script>