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