4b045f7c
刘淇
江阴初始化项目
|
1
|
<template>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
2
|
<view>
|
0b55ba4d
chenbiao
add 余额明细 接口联调
|
3
|
<!-- scrollable speed="50" 滚动 -->
|
6ce8921e
刘淇
通告滚动
|
4
|
<uni-notice-bar scrollable backgroundColor="#f0ad4e" color="#fff" single :text="detailText | tranNull"></uni-notice-bar>
|
0b55ba4d
chenbiao
add 余额明细 接口联调
|
5
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
6
7
8
9
10
11
|
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-left">
消费类型
</view>
<view class="uni-list-cell-db">
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
12
|
<picker @change="bindPickerChange" :value="index" :range="kindArray" :range-key="'kindName'">
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
13
14
15
16
17
18
19
20
21
22
23
24
|
<view class="uni-input">{{kindArray[index].kindName}}</view>
</picker>
</view>
</view>
</view>
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-left">
充值方式
</view>
<view class="uni-list-cell-db">
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
25
|
<picker @change="bindPickerChangeWay" :value="indexWay" :range="arrayWay" :range-key="'typeName'">
|
10ba946f
chenbiao
add 余额明细 接口联调
|
26
|
<view class="uni-input">{{arrayWay[indexWay].typeName}}</view>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
27
28
29
30
31
32
33
34
35
36
37
38
39
|
</picker>
</view>
</view>
</view>
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-left">
开始时间
</view>
<view class="uni-list-cell-db">
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange">
|
10ba946f
chenbiao
add 余额明细 接口联调
|
40
|
<view class="uni-input">{{beginDate}}</view>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
</picker>
</view>
</view>
</view>
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-left">
结束时间
</view>
<view class="uni-list-cell-db">
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange">
<view class="uni-input">{{overDate}}</view>
</picker>
</view>
</view>
</view>
<view class="border-bg"></view>
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
61
|
<view class="" v-if="orderList.length > 0">
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
62
|
|
2e99af66
chenbiao
add 账单详情 接口联调
|
63
64
65
66
67
68
69
|
<uni-list class="rechargeWrap pos-rel" clickable v-for="(item, index) in orderList" :key="index" >
<view class="" @click="toOutDetail(item)">
<view class="recordCon uni-list-cell-pd">
<text class="color-black">{{item.changeFeeDetail}}</text>
<text>{{item.payStateDesc}}</text>
</view>
<view class="recordCon uni-list-cell-pd">
|
882bb478
刘淇
充值方式
|
70
71
72
73
74
75
76
77
78
79
80
|
<!--<text v-if="item.typeName == '购买卡券'" class="color-green">{{item.typeName}}</text>-->
<!--<text v-if="item.typeName == '微信充值'" class="color-green">{{item.typeName}}</text>-->
<!--<text v-if="item.typeName == '支付停车费'" class="color-red">{{item.typeName}}</text>-->
<!--<text v-if="item.typeName == '支付宝充值'" class="color-blue">{{item.typeName}}</text>-->
<!--<text v-if="item.typeName == '平台现金充值'" class="color-red">{{item.typeName}}</text>-->
<text v-if="item.kind == '1'" class="color-green">支付宝</text>
<text v-if="item.typeName == '2'" class="color-green">微信</text>
<text v-if="item.typeName == '3'" class="color-red">平台现金</text>
|
2e99af66
chenbiao
add 账单详情 接口联调
|
81
82
83
84
85
86
|
<text>{{item.opTime}}</text>
</view>
<view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">
</view>
</view>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
87
|
</uni-list>
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
88
|
<uni-load-more :status="status" />
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
89
|
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
90
|
</view>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
91
|
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
92
93
94
95
96
|
<view v-else class="margin-top-30">
<image class="marginAuto" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image>
<view class="text-center">
暂无记录
</view>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
97
|
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
98
99
|
</view>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
100
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
101
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
102
|
</view>
|
4b045f7c
刘淇
江阴初始化项目
|
103
104
105
|
</template>
<script>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
106
107
108
109
110
111
|
export default {
data() {
const currentDate = this.getDate({
format: true
})
return {
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
112
113
|
detailText: '',
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
114
115
116
117
118
|
title: 'picker',
kindArray: [],
arrayWay: [],
index: 0,
indexWay: 0,
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
119
120
|
kind: '',
type: '',
|
10ba946f
chenbiao
add 余额明细 接口联调
|
121
|
beginDate: currentDate,
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
122
|
overDate: currentDate,
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
123
|
orderList: [],
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
124
|
// isLoadAll: false,
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
125
|
totalPages: 1, // 总页数
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
126
|
page: 1,
|
b79857f8
刘淇
商户券明细
|
127
|
pageSize: 10,
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
128
|
status: 'no-more',
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
129
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
130
131
132
133
134
135
|
}
},
onLoad(params) {
wx.showShareMenu({
withShareTicket: true
});
|
10ba946f
chenbiao
add 余额明细 接口联调
|
136
|
this.getKindType();
|
b79857f8
刘淇
商户券明细
|
137
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
138
139
|
},
onShow() {
|
b79857f8
刘淇
商户券明细
|
140
|
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
141
142
143
|
},
// 下拉刷新触发
onPullDownRefresh(val) {
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
144
|
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
145
|
this.page = 1
|
b79857f8
刘淇
商户券明细
|
146
|
this.pageSize = this.pageSize
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
147
|
this.totalPages = 1
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
148
|
this.orderList = []
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
149
|
console.log('下拉刷新', val)
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
150
|
this.fetchData()
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
151
152
153
|
},
// 上拉加载触发
onReachBottom() {
|
6bbfedb1
刘淇
商户券明细
|
154
155
156
|
console.log(this.totalPages)
console.log(this.orderList.length)
|
ca970168
刘淇
商户券明细
|
157
158
159
160
161
162
|
if (this.totalPages == this.orderList.length) {
this.status = 'no-more'
console.log('111')
return
} else {
this.page++;
|
6bbfedb1
刘淇
商户券明细
|
163
|
this.fetchData();
|
ca970168
刘淇
商户券明细
|
164
|
}
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
165
|
},
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
166
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
methods: {
getKindType() {
let that = this;
that.$myRequest({
url: that.$common.walletKindType,
method: 'POST',
data: that.$common.requestSign()
}).then(res => {
|
10ba946f
chenbiao
add 余额明细 接口联调
|
183
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
184
|
let data = res.data;
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
185
|
that.kindArray = data;
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
186
|
that.kind = data[0].kind;
|
10ba946f
chenbiao
add 余额明细 接口联调
|
187
|
that.arrayWay = data[0].typeList;
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
188
|
that.type = data[0].typeList[0].type;
|
10ba946f
chenbiao
add 余额明细 接口联调
|
189
|
console.log(data)
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
190
191
|
console.log(that.kind, that.type)
that.getDetailSummary();
|
b79857f8
刘淇
商户券明细
|
192
|
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
193
|
that.fetchData()
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
194
195
196
197
198
|
})
},
bindPickerChange: function(e) {
let that = this;
that.index = e.detail.value
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
199
|
that.kind = that.kindArray[that.index].kind;
|
10ba946f
chenbiao
add 余额明细 接口联调
|
200
|
that.arrayWay = that.kindArray[that.index].typeList;
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
201
|
that.type = that.kindArray[that.index].typeList[0].type;
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
202
203
|
console.log(that.kind, that.type)
that.getDetailSummary();
|
2e99af66
chenbiao
add 账单详情 接口联调
|
204
205
206
207
208
|
that.page = 1
that.pageSize = this.pageSize
that.totalPages = 1
that.orderList = []
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
209
|
that.fetchData()
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
210
211
212
|
},
bindPickerChangeWay: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
213
|
this.indexWay = e.detail.value;
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
214
215
216
|
this.type = this.arrayWay[this.indexWay].type;
console.log(this.kind, this.type)
this.getDetailSummary();
|
2e99af66
chenbiao
add 账单详情 接口联调
|
217
218
219
220
|
this.page = 1
this.pageSize = this.pageSize
this.totalPages = 1
this.orderList = []
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
221
|
this.fetchData()
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
222
223
|
},
bindStartDateChange: function(e) {
|
10ba946f
chenbiao
add 余额明细 接口联调
|
224
|
this.beginDate = e.detail.value
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
225
|
this.getDetailSummary();
|
2e99af66
chenbiao
add 账单详情 接口联调
|
226
227
228
229
|
this.page = 1
this.pageSize = this.pageSize
this.totalPages = 1
this.orderList = []
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
230
|
this.fetchData()
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
231
232
233
|
},
bindEndDateChange: function(e) {
this.overDate = e.detail.value
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
234
|
this.getDetailSummary();
|
2e99af66
chenbiao
add 账单详情 接口联调
|
235
236
237
238
|
this.page = 1
this.pageSize = this.pageSize
this.totalPages = 1
this.orderList = []
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
239
|
this.fetchData()
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
255
256
257
|
getDetailSummary() {
let that = this;
let data = {
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
258
259
|
kind: that.kind,
type: that.type,
|
1b662e23
刘淇
充值明细 签名
|
260
261
|
beginDate: that.beginDate + " 00:00:00",
endDate: that.overDate + " 23:59:59"
|
10ba946f
chenbiao
add 余额明细 接口联调
|
262
263
264
265
266
267
268
|
};
console.log(data)
that.$myRequest({
url: that.$common.detailSummary,
method: 'POST',
data: that.$common.requestSign(data)
}).then(res => {
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
269
|
|
10ba946f
chenbiao
add 余额明细 接口联调
|
270
|
let data = res.data;
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
271
|
if (data.rechargeSummary) {
|
10ba946f
chenbiao
add 余额明细 接口联调
|
272
273
|
that.detailText = data.rechargeSummary
}
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
274
|
if (data.paySummary) {
|
10ba946f
chenbiao
add 余额明细 接口联调
|
275
276
|
that.detailText = data.paySummary
}
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
277
|
|
10ba946f
chenbiao
add 余额明细 接口联调
|
278
|
})
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
279
280
|
},
|
b8bb7d4e
chenbiao
add 余额明细 接口联调
|
281
|
fetchData() {
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
282
|
let that = this
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
283
|
that.status = 'loading'
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
284
|
let paramsData = {
|
1b662e23
刘淇
充值明细 签名
|
285
286
|
pageNum: that.page.toString(),
pageSize: that.pageSize.toString(),
|
4d3d7875
chenbiao
add 余额明细 接口联调
|
287
288
|
kind: that.kind,
type: that.type,
|
1b662e23
刘淇
充值明细 签名
|
289
290
|
beginDate: that.beginDate + " 00:00:00",
endDate: that.overDate + " 23:59:59"
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
291
|
}
|
0b55ba4d
chenbiao
add 余额明细 接口联调
|
292
|
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
293
294
295
296
297
|
that.$myRequest({
url: that.$common.walletDetailsPage,
method: 'POST',
data: that.$common.requestSign(paramsData)
}).then(res => {
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
298
299
|
if (res.data.pageTotals < 10) {
this.status = 'no-more'
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
300
|
} else {
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
301
|
this.status = 'more'
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
302
|
}
|
a8e36028
chenbiao
add 我的钱包 小程序支付 接口联调
|
303
304
|
that.totalPages = res.data.pageTotals;
that.orderList = that.orderList.concat(res.data.dataList)
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
305
|
})
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
306
|
},
|
2e99af66
chenbiao
add 账单详情 接口联调
|
307
308
309
310
311
312
|
toOutDetail(i){
console.log('详情')
uni.navigateTo({
url: '../rechargeDetail/outDetail?optionData='+JSON.stringify(i)
});
}
|
b9ec5385
chenbiao
add 余额明细 刷新下拉分页请求
|
313
|
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
314
315
|
}
}
|
4b045f7c
刘淇
江阴初始化项目
|
316
317
318
|
</script>
<style lang="scss" scoped>
|
00a21ab7
chenbiao
add 余额明细 接口联调
|
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
.rechargeWrap {
position: relative;
.rechargeArrow {
position: absolute;
right: 10px;
top: 30px;
font-size: 20px;
color: #999;
}
}
.recordCon {
padding-right: 35px;
color: #999;
display: flex;
justify-content: space-between;
}
|
0b55ba4d
chenbiao
add 余额明细 接口联调
|
337
338
339
340
341
342
|
.icon-arrowright {
color: #bbb;
font-size: 20px;
right: 2upx;
top: 60upx;
}
|
4b045f7c
刘淇
江阴初始化项目
|
343
|
</style>
|