资金明细

This commit is contained in:
“wanyongkang”
2024-02-06 15:03:06 +08:00
parent 6039f13f58
commit 700a413134

View File

@@ -4,19 +4,70 @@
* @Author: kangkang * @Author: kangkang
* @Date: 2020-09-30 21:48:44 * @Date: 2020-09-30 21:48:44
* @LastEditors: wanyongkang 937888580@qq.com * @LastEditors: wanyongkang 937888580@qq.com
* @LastEditTime: 2023-08-12 17:43:59 * @LastEditTime: 2024-02-06 14:57:54
--> -->
<template> <template>
<div v-loading="loading"> <div v-loading="loading">
<div class="heior_box"> <div class="heior_box">
<el-button size="small" type="primary" icon="el-icon-sold-out" @click="dataExport" v-if="$local.isRoot()">导出</el-button> <el-button size="small" type="primary" icon="el-icon-sold-out" @click="dataExport" v-if="$local.isRoot()">导出</el-button>
<div class="search-box"> <div class="search-box">
<el-date-picker
v-model="search_month"
type="daterange"
align="right"
size="small"
style="margin-right:5px;width: 200px;"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<el-select size="small" v-model="searchModel.type" placeholder="请选择">
<el-option
label="选择类型"
value="0">
</el-option>
<el-option
label="管理员充值"
value="1">
</el-option>
<el-option
label="管理员扣除"
value="2">
</el-option>
<el-option
label="淘宝充值"
value="3">
</el-option>
<el-option
label="淘宝退款"
value="4">
</el-option>
<el-option
label="账号退款"
value="5">
</el-option>
<el-option
label="账号付款"
value="6">
</el-option>
<el-option
label="用户充值"
value="7">
</el-option>
<el-option
label="用户提现扣除"
value="8">
</el-option>
<el-option
label="提现被拒退还"
value="9">
</el-option>
</el-select>
<el-input v-model="searchModel.keyWord" placeholder="请输入会员号/名称" clearable size="small"> <el-input v-model="searchModel.keyWord" placeholder="请输入会员号/名称" clearable size="small">
<el-button slot="append" icon="el-icon-search" @click="search"></el-button> <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
</el-input> </el-input>
</div> </div>
</div> </div>
<el-table :data="retData.Data" size="medium" :height="$getHeight(300)" row-key="Id" border> <el-table :data="retData.Data" size="medium" :height="$getHeight(100)" row-key="Id" border>
<el-table-column prop="CreateTime" label="日期"></el-table-column> <el-table-column prop="CreateTime" label="日期"></el-table-column>
<el-table-column prop="UserName" label="用户"> <el-table-column prop="UserName" label="用户">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -54,9 +105,13 @@ export default {
loading: false, loading: false,
retData: { TotalCount: 0, Data: [] }, retData: { TotalCount: 0, Data: [] },
searchModel: { searchModel: {
type : '0',
PageIndex: 1, PageIndex: 1,
keyWord: '' keyWord: '',
st: null,
et: null,
}, },
search_month: '',
detailAmountData: [], detailAmountData: [],
formatterCreateType (row, column, cellValue, index) { formatterCreateType (row, column, cellValue, index) {
switch (cellValue) { switch (cellValue) {
@@ -77,21 +132,28 @@ export default {
}, },
methods: { methods: {
search () { search () {
this.searchModel.PageIndex = 1 if (this.search_month && this.search_month.length === 2) {
if (this.searchModel.keyWord.trim().length>8) { this.searchModel.st = this.search_month[0]
this.getAmountDetail() this.searchModel.et = this.search_month[1]
} }
this.searchModel.PageIndex = 1
this.getAmountDetail()
}, },
getAmountDetail () { getAmountDetail () {
this.loading = true this.loading = true
this.$api this.$api
.get('baseinfo/v1/user/AmountDetails', this.searchModel) .get(this.$api.phpURL + 'user/UserScore/get_all_list', this.searchModel)
.then(res => { .then(res => {
this.retData = res this.retData = res
this.loading = false this.loading = false
console.log(this.retData)
}) })
}, },
dataExport () { dataExport () {
if (this.search_month && this.search_month.length === 2) {
this.searchModel.st = this.search_month[0]
this.searchModel.et = this.search_month[1]
}
this.$api.getDownloadFile(this.$api.phpURL + 'user/UserScore/export', this.searchModel, '资金明细.csv') this.$api.getDownloadFile(this.$api.phpURL + 'user/UserScore/export', this.searchModel, '资金明细.csv')
} }
} }