余额变动记录
This commit is contained in:
parent
cfab3f7ea9
commit
c44a3930b7
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="用户名称" prop="userName">
|
<el-form-item label="用户名称" prop="userName" v-if="notHasView(views.user)">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.userId"
|
v-model="queryParams.userId"
|
||||||
placeholder="请输入用户名称"
|
placeholder="请输入用户名称"
|
||||||
|
@ -17,6 +17,11 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="业务类型" prop="bstType">
|
||||||
|
<el-select v-model="queryParams.bstType" placeholder="请输入变动原因" clearable @change="handleQuery">
|
||||||
|
<el-option v-for="dict in dict.type.record_balance_bst_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
@ -24,38 +29,38 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-plus"
|
<!-- icon="el-icon-plus"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
@click="handleAdd"
|
<!-- @click="handleAdd"-->
|
||||||
v-hasPermi="['ss:recordBalance:add']"
|
<!-- v-hasPermi="['ss:recordBalance:add']"-->
|
||||||
>新增</el-button>
|
<!-- >新增</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="success"
|
<!-- type="success"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-edit"
|
<!-- icon="el-icon-edit"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="single"
|
<!-- :disabled="single"-->
|
||||||
@click="handleUpdate"
|
<!-- @click="handleUpdate"-->
|
||||||
v-hasPermi="['ss:recordBalance:edit']"
|
<!-- v-hasPermi="['ss:recordBalance:edit']"-->
|
||||||
>修改</el-button>
|
<!-- >修改</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="danger"
|
<!-- type="danger"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-delete"
|
<!-- icon="el-icon-delete"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="multiple"
|
<!-- :disabled="multiple"-->
|
||||||
@click="handleDelete"
|
<!-- @click="handleDelete"-->
|
||||||
v-hasPermi="['ss:recordBalance:remove']"
|
<!-- v-hasPermi="['ss:recordBalance:remove']"-->
|
||||||
>删除</el-button>
|
<!-- >删除</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
|
@ -71,30 +76,42 @@
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="recordBalanceList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
<el-table v-loading="loading" :data="recordBalanceList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="ID" align="center" prop="id" sortable="custom" :sort-orders="orderSorts" v-if="isShow('id')"/>
|
<el-table-column label="记录ID" align="center" prop="id" sortable="custom" :sort-orders="orderSorts" v-if="isShow('id')" width="100"/>
|
||||||
<el-table-column label="用户名称" align="center" prop="userName" sortable="custom" :sort-orders="orderSorts" v-if="isShow('userName')"/>
|
<el-table-column label="用户名称" align="center" prop="userName" sortable="custom" :sort-orders="orderSorts" v-if="isShow('userName')"/>
|
||||||
<el-table-column label="变动前余额" align="center" prop="beforeBalance" sortable="custom" :sort-orders="orderSorts" v-if="isShow('beforeBalance')"/>
|
<el-table-column label="业务类型" align="center" prop="bstType" sortable="custom" :sort-orders="orderSorts" v-if="isShow('bstType')">
|
||||||
<el-table-column label="变动后余额" align="center" prop="afterBalance" sortable="custom" :sort-orders="orderSorts" v-if="isShow('afterBalance')"/>
|
<template slot-scope="d">
|
||||||
<el-table-column label="变动原因" align="center" prop="reason" sortable="custom" :sort-orders="orderSorts" v-if="isShow('reason')"/>
|
<dict-tag :value="d.row.bstType" :options="dict.type.record_balance_bst_type"/>
|
||||||
<el-table-column label="变动时间" align="center" prop="createTime" sortable="custom" :sort-orders="orderSorts" v-if="isShow('createTime')"/>
|
|
||||||
<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="['ss:recordBalance:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['ss:recordBalance:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="变动时间" align="center" prop="createTime" sortable="custom" :sort-orders="orderSorts" v-if="isShow('createTime')"/>
|
||||||
|
<el-table-column label="变动金额" align="center" prop="beforeBalance" sortable="custom" :sort-orders="orderSorts" v-if="isShow('amount')">
|
||||||
|
<template slot-scope="d">{{d.row.amount | money}} 元</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="变动前余额" align="center" prop="beforeBalance" sortable="custom" :sort-orders="orderSorts" v-if="isShow('beforeBalance')">
|
||||||
|
<template slot-scope="d">{{d.row.beforeBalance | money}} 元</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="变动后余额" align="center" prop="afterBalance" sortable="custom" :sort-orders="orderSorts" v-if="isShow('afterBalance')">
|
||||||
|
<template slot-scope="d">{{d.row.afterBalance | money}} 元</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="变动原因" align="center" prop="reason" sortable="custom" :sort-orders="orderSorts" v-if="isShow('reason')" min-width="200"/>
|
||||||
|
<!-- <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="['ss:recordBalance:edit']"-->
|
||||||
|
<!-- >修改</el-button>-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
|
<!-- v-hasPermi="['ss:recordBalance:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
@ -131,7 +148,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listRecordBalance, getRecordBalance, delRecordBalance, addRecordBalance, updateRecordBalance } from "@/api/ss/recordBalance";
|
import { listRecordBalance, getRecordBalance, delRecordBalance, addRecordBalance, updateRecordBalance } from "@/api/ss/recordBalance";
|
||||||
import { $showColumns } from '@/utils/mixins';
|
import { $showColumns, $view } from '@/utils/mixins'
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
|
@ -141,17 +158,28 @@ const defaultSort = {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RecordBalance",
|
name: "RecordBalance",
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns, $view],
|
||||||
|
dicts: ['record_balance_bst_type'],
|
||||||
|
props: {
|
||||||
|
query: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 字段列表
|
// 字段列表
|
||||||
columns: [
|
columns: [
|
||||||
{key: 'id', visible: true, label: 'ID'},
|
{key: 'id', visible: true, label: 'ID'},
|
||||||
{key: 'userName', visible: true, label: '用户名称'},
|
{key: 'userName', visible: true, label: '用户名称'},
|
||||||
{key: 'beforeBalance', visible: true, label: '变动前余额(元)'},
|
{key: 'bstType', visible: true, label: '业务类型'},
|
||||||
{key: 'afterBalance', visible: true, label: '变动后余额(元)'},
|
|
||||||
{key: 'reason', visible: true, label: '变动原因'},
|
|
||||||
{key: 'createTime', visible: true, label: '变动时间'},
|
{key: 'createTime', visible: true, label: '变动时间'},
|
||||||
|
{key: 'amount', visible: true, label: '变动金额'},
|
||||||
|
{key: 'beforeBalance', visible: true, label: '变动前余额'},
|
||||||
|
{key: 'afterBalance', visible: true, label: '变动后余额'},
|
||||||
|
{key: 'reason', visible: true, label: '变动原因'},
|
||||||
],
|
],
|
||||||
// 排序方式
|
// 排序方式
|
||||||
orderSorts: ['ascending', 'descending', null],
|
orderSorts: ['ascending', 'descending', null],
|
||||||
|
@ -206,6 +234,10 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.queryParams = {
|
||||||
|
...this.queryParams,
|
||||||
|
...this.query
|
||||||
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="账户余额">{{userData.balance | money | defaultValue}} 元</el-descriptions-item>
|
<el-descriptions-item label="账户余额">{{userData.balance | money | defaultValue}} 元</el-descriptions-item>
|
||||||
<el-descriptions-item label="总收入">{{userData.totalIncome | money | defaultValue}} 元</el-descriptions-item>
|
<el-descriptions-item label="总收入">{{userData.totalIncome | money | defaultValue}} 元</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="总充值">{{userData.rechargeAmount | money | defaultValue}} 元</el-descriptions-item>
|
||||||
<el-descriptions-item label="总提现">{{userData.withDrawlAmount | money | defaultValue}} 元</el-descriptions-item>
|
<el-descriptions-item label="总提现">{{userData.withDrawlAmount | money | defaultValue}} 元</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user