Commit 84b206ff by 吕明尚

增加页面

parent adfb2b8c
import request from '@/utils/request'
// 查询积分日志列表
export function listIntegralLog(query) {
return request({
url: '/system/IntegralLog/list',
method: 'get',
params: query
})
}
// 查询积分日志详细
export function getIntegralLog(id) {
return request({
url: '/system/IntegralLog/' + id,
method: 'get'
})
}
// 新增积分日志
export function addIntegralLog(data) {
return request({
url: '/system/IntegralLog',
method: 'post',
data: data
})
}
// 修改积分日志
export function updateIntegralLog(data) {
return request({
url: '/system/IntegralLog',
method: 'put',
data: data
})
}
// 删除积分日志
export function delIntegralLog(id) {
return request({
url: '/system/IntegralLog/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询活动列表
export function listActivity(query) {
return request({
url: '/system/activity/list',
method: 'get',
params: query
})
}
// 查询活动详细
export function getActivity(id) {
return request({
url: '/system/activity/' + id,
method: 'get'
})
}
// 新增活动
export function addActivity(data) {
return request({
url: '/system/activity',
method: 'post',
data: data
})
}
// 修改活动
export function updateActivity(data) {
return request({
url: '/system/activity',
method: 'put',
data: data
})
}
// 删除活动
export function delActivity(id) {
return request({
url: '/system/activity/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询余额日志列表
export function listBalanceLog(query) {
return request({
url: '/system/balanceLog/list',
method: 'get',
params: query
})
}
// 查询余额日志详细
export function getBalanceLog(id) {
return request({
url: '/system/balanceLog/' + id,
method: 'get'
})
}
// 新增余额日志
export function addBalanceLog(data) {
return request({
url: '/system/balanceLog',
method: 'post',
data: data
})
}
// 修改余额日志
export function updateBalanceLog(data) {
return request({
url: '/system/balanceLog',
method: 'put',
data: data
})
}
// 删除余额日志
export function delBalanceLog(id) {
return request({
url: '/system/balanceLog/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询时长日志列表
export function listDurationLog(query) {
return request({
url: '/system/durationLog/list',
method: 'get',
params: query
})
}
// 查询时长日志详细
export function getDurationLog(id) {
return request({
url: '/system/durationLog/' + id,
method: 'get'
})
}
// 新增时长日志
export function addDurationLog(data) {
return request({
url: '/system/durationLog',
method: 'post',
data: data
})
}
// 修改时长日志
export function updateDurationLog(data) {
return request({
url: '/system/durationLog',
method: 'put',
data: data
})
}
// 删除时长日志
export function delDurationLog(id) {
return request({
url: '/system/durationLog/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询权益会员订单列表
export function listEquityMembersOrder(query) {
return request({
url: '/system/equityMembersOrder/list',
method: 'get',
params: query
})
}
// 查询权益会员订单详细
export function getEquityMembersOrder(id) {
return request({
url: '/system/equityMembersOrder/' + id,
method: 'get'
})
}
// 新增权益会员订单
export function addEquityMembersOrder(data) {
return request({
url: '/system/equityMembersOrder',
method: 'post',
data: data
})
}
// 修改权益会员订单
export function updateEquityMembersOrder(data) {
return request({
url: '/system/equityMembersOrder',
method: 'put',
data: data
})
}
// 删除权益会员订单
export function delEquityMembersOrder(id) {
return request({
url: '/system/equityMembersOrder/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询权益会员订单配置列表
export function listEquityMembersOrderConfig(query) {
return request({
url: '/system/equityMembersOrderConfig/list',
method: 'get',
params: query
})
}
// 查询权益会员订单配置详细
export function getEquityMembersOrderConfig(id) {
return request({
url: '/system/equityMembersOrderConfig/' + id,
method: 'get'
})
}
// 新增权益会员订单配置
export function addEquityMembersOrderConfig(data) {
return request({
url: '/system/equityMembersOrderConfig',
method: 'post',
data: data
})
}
// 修改权益会员订单配置
export function updateEquityMembersOrderConfig(data) {
return request({
url: '/system/equityMembersOrderConfig',
method: 'put',
data: data
})
}
// 删除权益会员订单配置
export function delEquityMembersOrderConfig(id) {
return request({
url: '/system/equityMembersOrderConfig/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询会员用户列表
export function listMember(query) {
return request({
url: '/system/member/list',
method: 'get',
params: query
})
}
// 查询会员用户详细
export function getMember(id) {
return request({
url: '/system/member/' + id,
method: 'get'
})
}
// 新增会员用户
export function addMember(data) {
return request({
url: '/system/member',
method: 'post',
data: data
})
}
// 修改会员用户
export function updateMember(data) {
return request({
url: '/system/member',
method: 'put',
data: data
})
}
// 删除会员用户
export function delMember(id) {
return request({
url: '/system/member/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询会员配置列表
export function listMemberConfig(query) {
return request({
url: '/system/memberConfig/list',
method: 'get',
params: query
})
}
// 查询会员配置详细
export function getMemberConfig(id) {
return request({
url: '/system/memberConfig/' + id,
method: 'get'
})
}
// 新增会员配置
export function addMemberConfig(data) {
return request({
url: '/system/memberConfig',
method: 'post',
data: data
})
}
// 修改会员配置
export function updateMemberConfig(data) {
return request({
url: '/system/memberConfig',
method: 'put',
data: data
})
}
// 删除会员配置
export function delMemberConfig(id) {
return request({
url: '/system/memberConfig/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询充值记录列表
export function listRecharge(query) {
return request({
url: '/system/recharge/list',
method: 'get',
params: query
})
}
// 查询充值记录详细
export function getRecharge(id) {
return request({
url: '/system/recharge/' + id,
method: 'get'
})
}
// 新增充值记录
export function addRecharge(data) {
return request({
url: '/system/recharge',
method: 'post',
data: data
})
}
// 修改充值记录
export function updateRecharge(data) {
return request({
url: '/system/recharge',
method: 'put',
data: data
})
}
// 删除充值记录
export function delRecharge(id) {
return request({
url: '/system/recharge/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询充值配置列表
export function listRechargeConf(query) {
return request({
url: '/system/rechargeConf/list',
method: 'get',
params: query
})
}
// 查询充值配置详细
export function getRechargeConf(id) {
return request({
url: '/system/rechargeConf/' + id,
method: 'get'
})
}
// 新增充值配置
export function addRechargeConf(data) {
return request({
url: '/system/rechargeConf',
method: 'post',
data: data
})
}
// 修改充值配置
export function updateRechargeConf(data) {
return request({
url: '/system/rechargeConf',
method: 'put',
data: data
})
}
// 删除充值配置
export function delRechargeConf(id) {
return request({
url: '/system/rechargeConf/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询充值优惠券配置列表
export function listRechargeCouponConf(query) {
return request({
url: '/system/rechargeCouponConf/list',
method: 'get',
params: query
})
}
// 查询充值优惠券配置详细
export function getRechargeCouponConf(id) {
return request({
url: '/system/rechargeCouponConf/' + id,
method: 'get'
})
}
// 新增充值优惠券配置
export function addRechargeCouponConf(data) {
return request({
url: '/system/rechargeCouponConf',
method: 'post',
data: data
})
}
// 修改充值优惠券配置
export function updateRechargeCouponConf(data) {
return request({
url: '/system/rechargeCouponConf',
method: 'put',
data: data
})
}
// 删除充值优惠券配置
export function delRechargeCouponConf(id) {
return request({
url: '/system/rechargeCouponConf/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询充值退款申请列表
export function listRechargeRefund(query) {
return request({
url: '/system/rechargeRefund/list',
method: 'get',
params: query
})
}
// 查询充值退款申请详细
export function getRechargeRefund(id) {
return request({
url: '/system/rechargeRefund/' + id,
method: 'get'
})
}
// 新增充值退款申请
export function addRechargeRefund(data) {
return request({
url: '/system/rechargeRefund',
method: 'post',
data: data
})
}
// 修改充值退款申请
export function updateRechargeRefund(data) {
return request({
url: '/system/rechargeRefund',
method: 'put',
data: data
})
}
// 删除充值退款申请
export function delRechargeRefund(id) {
return request({
url: '/system/rechargeRefund/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询会员钱包列表
export function listWallet(query) {
return request({
url: '/system/wallet/list',
method: 'get',
params: query
})
}
// 查询会员钱包详细
export function getWallet(id) {
return request({
url: '/system/wallet/' + id,
method: 'get'
})
}
// 新增会员钱包
export function addWallet(data) {
return request({
url: '/system/wallet',
method: 'post',
data: data
})
}
// 修改会员钱包
export function updateWallet(data) {
return request({
url: '/system/wallet',
method: 'put',
data: data
})
}
// 删除会员钱包
export function delWallet(id) {
return request({
url: '/system/wallet/' + id,
method: 'delete'
})
}
<template>
<div class="app-container">
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="68px" size="small">
<el-form-item label="用户id" prop="consumerId">
<el-input
v-model="queryParams.consumerId"
clearable
placeholder="请输入用户id"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="余额" prop="balance">
<el-input
v-model="queryParams.balance"
clearable
placeholder="请输入余额"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时长" prop="remainingDuration">
<el-input
v-model="queryParams.remainingDuration"
clearable
placeholder="请输入时长"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="积分" prop="remainingIntegral">
<el-input
v-model="queryParams.remainingIntegral"
clearable
placeholder="请输入积分"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否删除" prop="isDelete">
<el-input
v-model="queryParams.isDelete"
clearable
placeholder="请输入是否删除"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" size="mini" type="primary" @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
v-hasPermi="['system:wallet:add']"
icon="el-icon-plus"
plain
size="mini"
type="primary"
@click="handleAdd"
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['system:wallet:edit']"
:disabled="single"
icon="el-icon-edit"
plain
size="mini"
type="success"
@click="handleUpdate"
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['system:wallet:remove']"
:disabled="multiple"
icon="el-icon-delete"
plain
size="mini"
type="danger"
@click="handleDelete"
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['system:wallet:export']"
icon="el-icon-download"
plain
size="mini"
type="warning"
@click="handleExport"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="walletList" @selection-change="handleSelectionChange">
<el-table-column align="center" type="selection" width="55"/>
<el-table-column align="center" label="ID" prop="id"/>
<el-table-column align="center" label="用户id" prop="consumerId"/>
<el-table-column align="center" label="余额" prop="balance"/>
<el-table-column align="center" label="时长" prop="remainingDuration"/>
<el-table-column align="center" label="积分" prop="remainingIntegral"/>
<el-table-column align="center" label="是否删除" prop="isDelete"/>
<el-table-column align="center" label="备注" prop="remark"/>
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
<template slot-scope="scope">
<el-button
v-hasPermi="['system:wallet:edit']"
icon="el-icon-edit"
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-button
v-hasPermi="['system:wallet:remove']"
icon="el-icon-delete"
size="mini"
type="text"
@click="handleDelete(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
<!-- 添加或修改会员钱包对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body width="500px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="用户id" prop="consumerId">
<el-input v-model="form.consumerId" placeholder="请输入用户id"/>
</el-form-item>
<el-form-item label="余额" prop="balance">
<el-input v-model="form.balance" placeholder="请输入余额"/>
</el-form-item>
<el-form-item label="时长" prop="remainingDuration">
<el-input v-model="form.remainingDuration" placeholder="请输入时长"/>
</el-form-item>
<el-form-item label="积分" prop="remainingIntegral">
<el-input v-model="form.remainingIntegral" placeholder="请输入积分"/>
</el-form-item>
<el-form-item label="是否删除" prop="isDelete">
<el-input v-model="form.isDelete" placeholder="请输入是否删除"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入内容" type="textarea"/>
</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 {listWallet, getWallet, delWallet, addWallet, updateWallet} from "@/api/system/wallet";
export default {
name: "Wallet",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 会员钱包表格数据
walletList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
consumerId: null,
balance: null,
remainingDuration: null,
remainingIntegral: null,
isDelete: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
consumerId: [
{required: true, message: "用户id不能为空", trigger: "blur"}
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询会员钱包列表 */
getList() {
this.loading = true;
listWallet(this.queryParams).then(response => {
this.walletList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
consumerId: null,
balance: null,
remainingDuration: null,
remainingIntegral: null,
isDelete: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: 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
getWallet(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) {
updateWallet(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addWallet(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 delWallet(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/wallet/export', {
...this.queryParams
}, `wallet_${new Date().getTime()}.xlsx`)
}
}
};
</script>
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