613d2a9c
Andy
add icon
|
1
|
<template>
|
dde8f987
Andy
add 账户设置 前端页面
|
2
|
<div class="">
|
e4acf226
Andy
add 我的钱包前端页面 table
|
3
|
<!--卡片-->
|
dde8f987
Andy
add 账户设置 前端页面
|
4
|
<el-row :gutter="16" class="">
|
e4acf226
Andy
add 我的钱包前端页面 table
|
5
6
7
8
9
10
11
12
|
<el-col :span="12">
<el-card class="box-card">
<el-row :gutter="24">
<el-col :span="8" style="text-align: center">
<svg-icon icon-class="recharge" class="svg-icon" style="width: 48px;height: 48px" />
</el-col>
<el-col :span="12" :offset="4">
<el-row :gutter="16"><el-col :span="24">充值账户(元)</el-col></el-row>
|
46081f33
王飞
交互
|
13
|
<el-row :gutter="16" class="common-color font-size24" style="margin-top: 4px"><el-col :span="24">{{rechargeBalance|fen2Yuan}}</el-col></el-row>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
14
15
16
17
18
19
20
21
22
23
24
25
|
</el-col>
</el-row>
</el-card>
</el-col>
<el-col :span="12">
<el-card class="box-card">
<el-row :gutter="24">
<el-col :span="8" style="text-align: center">
<svg-icon icon-class="give" style="width: 48px;height: 48px" />
</el-col>
<el-col :span="12" :offset="4">
<el-row :gutter="16"><el-col :span="24">赠送账户(元)</el-col></el-row>
|
46081f33
王飞
交互
|
26
|
<el-row :gutter="16" class="common-color font-size24" style="margin-top: 4px"><el-col :span="24">{{presentBalance|fen2Yuan}}</el-col></el-row>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
27
28
29
30
31
32
33
|
</el-col>
</el-row>
</el-card>
</el-col>
</el-row>
<!--账户明细 sta-->
<el-card shadow="always" class="card-second-top margin-top-24">
|
f53f45e7
Andy
add 我的卡券 账户前端页面 t...
|
34
|
<el-tabs :tab-position="tabPosition" >
|
e4acf226
Andy
add 我的钱包前端页面 table
|
35
36
|
<el-tab-pane label="充值记录">
<el-table
|
46081f33
王飞
交互
|
37
|
:data="rechargeTableData"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
38
39
40
|
style="width: 100%;"
:show-overflow-tooltip="true">
<el-table-column
|
46081f33
王飞
交互
|
41
|
prop="acctType"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
42
43
|
label="账户类型"
:show-overflow-tooltip="true">
|
46081f33
王飞
交互
|
44
45
46
47
|
<template slot-scope="scope">
<span v-if="scope.row.acctType == 1">账户余额</span>
<span v-if="scope.row.acctType == 7">充值赠送</span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
48
49
|
</el-table-column>
<el-table-column
|
46081f33
王飞
交互
|
50
|
prop="rechargeFee"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
51
52
|
label="充值金额"
:show-overflow-tooltip="true">
|
46081f33
王飞
交互
|
53
54
55
|
<template slot-scope="scope">
<span>{{(scope.row.rechargeFee) |fen2Yuan}} </span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
56
57
|
</el-table-column>
<el-table-column
|
46081f33
王飞
交互
|
58
|
prop="rechargeBalance"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
59
|
label="充值后余额">
|
46081f33
王飞
交互
|
60
61
62
|
<template slot-scope="scope">
<span>{{(scope.row.rechargeBalance) |fen2Yuan}} </span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
63
64
|
</el-table-column>
<el-table-column
|
46081f33
王飞
交互
|
65
|
prop="rechargeTime"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
66
67
|
label="充值时间"
:show-overflow-tooltip="true">
|
46081f33
王飞
交互
|
68
69
70
|
<template slot-scope="scope">
<span>{{(scope.row.rechargeTime) |string2Date(7)}} </span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
71
72
73
|
</el-table-column>
</el-table>
<el-pagination
|
dcf87b64
Andy
table bug修复
|
74
|
:page-size="5"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
75
76
|
:pager-count="11"
layout="prev, pager, next"
|
46081f33
王飞
交互
|
77
78
79
80
81
|
:total="total"
@size-change="handleSizeChange"
@current-change="handleSizeChange"
@prev-click="handleSizeChange"
@next-click="handleSizeChange">
|
e4acf226
Andy
add 我的钱包前端页面 table
|
82
83
84
85
|
</el-pagination>
</el-tab-pane>
<el-tab-pane label="支出记录">
<el-table
|
46081f33
王飞
交互
|
86
|
:data="payOutTableData"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
87
88
89
|
style="width: 100%;"
:show-overflow-tooltip="true">
<el-table-column
|
46081f33
王飞
交互
|
90
|
prop="acctType"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
91
92
|
label="账户类型"
:show-overflow-tooltip="true">
|
46081f33
王飞
交互
|
93
94
95
96
|
<template slot-scope="scope">
<span v-if="scope.row.acctType == 1">账户余额</span>
<span v-if="scope.row.acctType == 7">充值赠送</span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
97
98
|
</el-table-column>
<el-table-column
|
46081f33
王飞
交互
|
99
|
prop="tradeFee"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
100
101
|
label="交易金额"
:show-overflow-tooltip="true">
|
46081f33
王飞
交互
|
102
103
104
|
<template slot-scope="scope">
<span>{{(scope.row.tradeFee) |fen2Yuan}} </span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
105
106
|
</el-table-column>
<el-table-column
|
46081f33
王飞
交互
|
107
|
prop="tradeBalance"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
108
|
label="交易后余额">
|
46081f33
王飞
交互
|
109
110
111
|
<template slot-scope="scope">
<span>{{(scope.row.tradeBalance) |fen2Yuan}} </span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
112
113
|
</el-table-column>
<el-table-column
|
46081f33
王飞
交互
|
114
|
prop="tradeDetialType"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
115
|
label="交易类型">
|
46081f33
王飞
交互
|
116
117
118
119
120
121
122
123
124
125
|
<template slot-scope="scope">
<span v-if="scope.row.tradeDetialType == 101">停车支付</span>
<span v-if="scope.row.tradeDetialType == 102">停车预付</span>
<span v-if="scope.row.tradeDetialType == 103">停车补缴</span>
<span v-if="scope.row.tradeDetialType == 104">共享车位</span>
<span v-if="scope.row.tradeDetialType == 201">余额充值</span>
<span v-if="scope.row.tradeDetialType == 202">押金充值</span>
<span v-if="scope.row.tradeDetialType == 301">会员卡购买</span>
<span v-if="scope.row.tradeDetialType == 302">会员卡续费</span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
126
127
|
</el-table-column>
<el-table-column
|
46081f33
王飞
交互
|
128
|
prop="tradeTime"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
129
130
|
label="交易时间"
:show-overflow-tooltip="true">
|
46081f33
王飞
交互
|
131
132
133
|
<template slot-scope="scope">
<span>{{(scope.row.tradeTime) |string2Date(7)}} </span>
</template>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
134
135
136
|
</el-table-column>
</el-table>
<el-pagination
|
dcf87b64
Andy
table bug修复
|
137
|
:page-size="5"
|
e4acf226
Andy
add 我的钱包前端页面 table
|
138
139
|
:pager-count="21"
layout="prev, pager, next"
|
46081f33
王飞
交互
|
140
141
142
143
144
|
:total="total2"
@size-change="handleSizeChange2"
@current-change="handleSizeChange2"
@prev-click="handleSizeChange2"
@next-click="handleSizeChange2">
|
e4acf226
Andy
add 我的钱包前端页面 table
|
145
146
147
148
|
</el-pagination>
</el-tab-pane>
</el-tabs>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
149
150
|
</el-card>
</div>
|
613d2a9c
Andy
add icon
|
151
152
153
154
|
</template>
<script>
// import { getList } from '@/api/table'
|
e4acf226
Andy
add 我的钱包前端页面 table
|
155
156
157
|
import pagination from '@/components/Pagination/index.vue';
import LoadingBar from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
|
46081f33
王飞
交互
|
158
159
|
import {getAcctPersonGroupByAcctType,queryCustRechargeFeeStaticMsg,queryAcctPayOutForPage} from '@/api/account';
import {fen2Yuan,string2Date} from '@/filters/index';
|
613d2a9c
Andy
add icon
|
160
|
export default {
|
e4acf226
Andy
add 我的钱包前端页面 table
|
161
162
163
|
components:{
'i-pagination': pagination
},
|
613d2a9c
Andy
add icon
|
164
165
166
167
168
|
filters: {
},
data() {
return {
|
46081f33
王飞
交互
|
169
170
|
rechargeBalance:0,
presentBalance:0,
|
613d2a9c
Andy
add icon
|
171
|
list: null,
|
f53f45e7
Andy
add 我的卡券 账户前端页面 t...
|
172
|
tabPosition:'top',
|
e4acf226
Andy
add 我的钱包前端页面 table
|
173
174
175
|
listLoading: true,
btnLoading:false,
loading:false,
|
46081f33
王飞
交互
|
176
|
rechargeTableData: [
|
e4acf226
Andy
add 我的钱包前端页面 table
|
177
|
],
|
46081f33
王飞
交互
|
178
|
payOutTableData: [
|
e4acf226
Andy
add 我的钱包前端页面 table
|
179
180
|
],
/** 分页*/
|
46081f33
王飞
交互
|
181
|
total: 0,
|
e4acf226
Andy
add 我的钱包前端页面 table
|
182
|
currentPage: 1,
|
dcf87b64
Andy
table bug修复
|
183
|
pageSize: 5,
|
46081f33
王飞
交互
|
184
185
|
total2: 0,
currentPage2: 1,
|
dcf87b64
Andy
table bug修复
|
186
|
pageSize2: 5,
|
613d2a9c
Andy
add icon
|
187
188
|
}
},
|
46081f33
王飞
交互
|
189
190
191
192
|
mounted: function() {
this.getAcctPersonGroupByAcctType();
this.queryCustRechargeFeeStaticMsg();
this.queryAcctPayOutForPage();
|
e4acf226
Andy
add 我的钱包前端页面 table
|
193
|
},
|
613d2a9c
Andy
add icon
|
194
|
|
613d2a9c
Andy
add icon
|
195
|
methods: {
|
46081f33
王飞
交互
|
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
/**
* 获取查询参数
*/
getQueryParams: function() {
let userInfo = this.$store.state.user.userInfo;
let beginTime = new Date();
let endTime = new Date();
beginTime.setFullYear(2017);
let req = {
beginTime:beginTime,
endTime:endTime,
sysCode:'10003',
custId:userInfo.custId,
// custId:'501519113641649119232',//账户支出
//custId:'501522943145292840960',//账户充值
}
return req;
},
/**
* 查询车主账户信息
*/
getAcctPersonGroupByAcctType: function() {
let req = this.getQueryParams();
getAcctPersonGroupByAcctType(req).then(response =>{
if(response.code=='8888'){
let data = response.data;
let rechargeBalance = 0;
let presentBalance = 0;
data.forEach(item=>{
if(item.acctType == 1){
rechargeBalance += item.acctBalance;
}
if(item.acctType == 7){
presentBalance += item.acctBalance;
}
});
this.rechargeBalance = rechargeBalance;
this.presentBalance = presentBalance;
}else{
console.log(response);
}
|
e4acf226
Andy
add 我的钱包前端页面 table
|
239
|
|
46081f33
王飞
交互
|
240
|
});
|
e4acf226
Andy
add 我的钱包前端页面 table
|
241
|
},
|
46081f33
王飞
交互
|
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
|
/**
* 查询车主充值记录
*/
queryCustRechargeFeeStaticMsg: function() {
let req = this.getQueryParams();
req.baseRequest={
pageNum:this.currentPage,
pageSize:this.pageSize,
},
queryCustRechargeFeeStaticMsg(req).then(response =>{
if(response.code=='8888'){
this.rechargeTableData = response.data.rows;
this.total = response.data.total;
}else{
console.log(response);
}
});
},
/**
* 查询车主支出记录
*/
queryAcctPayOutForPage: function() {
let req = this.getQueryParams();
req.baseRequest={
pageNum:this.currentPage2,
pageSize:this.pageSize2,
},
queryAcctPayOutForPage (req).then(response =>{
if(response.code=='8888'){
this.payOutTableData = response.data.rows;
this.total2 = response.data.total;
}else{
console.log(response);
}
});
},
// 获取子组件页码方法
handleSizeChange: function(page) {
console.log(page)
this.currentPage = page;
|
e4acf226
Andy
add 我的钱包前端页面 table
|
286
|
/** 调用表格数据.*/
|
46081f33
王飞
交互
|
287
288
|
this.queryCustRechargeFeeStaticMsg();
|
e4acf226
Andy
add 我的钱包前端页面 table
|
289
|
},
|
46081f33
王飞
交互
|
290
291
292
293
294
295
296
297
298
299
300
301
|
// 获取子组件页码方法
handleSizeChange2: function(page) {
console.log(page)
this.currentPage2 = page;
/** 调用表格数据.*/
this.queryAcctPayOutForPage();
},
},
|
613d2a9c
Andy
add icon
|
302
|
|
613d2a9c
Andy
add icon
|
303
304
|
}
</script>
|
e4acf226
Andy
add 我的钱包前端页面 table
|
305
306
307
308
309
310
311
312
|
<style lang="scss" scoped >
.serch-wrap{
background-color: #FFF;
padding: 15px;
}
.el-card__header{
padding:10px 20px!important;;
}
|
e4acf226
Andy
add 我的钱包前端页面 table
|
313
|
</style>
|