Commit b0253c4fc83050420fb6cb273a1179b8df1be16d
Merge branch 'branch' of http://gitlab1.renniting.cn/web_developers/jy_parkingOS into branch
# Conflicts: # common/common.js
Showing
4 changed files
with
440 additions
and
397 deletions
common/common.js
@@ -36,156 +36,166 @@ const couponRuleParkPage = serverUrl + "/business/h5/coupon/couponRuleParkPage"; | @@ -36,156 +36,166 @@ const couponRuleParkPage = serverUrl + "/business/h5/coupon/couponRuleParkPage"; | ||
36 | 36 | ||
37 | //陈彪接口 | 37 | //陈彪接口 |
38 | 38 | ||
39 | +// 余额明细下拉框选择列表 | ||
40 | +const walletKindType = serverUrl + "/business/h5/wallet/kindType"; | ||
41 | + | ||
42 | +// 余额明细总览 | ||
43 | +const detailSummary = serverUrl + "/business/h5/wallet/detailSummary"; | ||
44 | + | ||
45 | +// 余额明细-分页 | ||
46 | +const walletDetailsPage = serverUrl + "/business/h5/wallet/detailsPage"; | ||
47 | + | ||
48 | +// 钱包充值-微信 | ||
49 | +const publicUnifiedOrder = serverUrl + "/business/h5/pay/weixinpay/publicUnifiedOrder"; | ||
50 | + | ||
39 | 51 | ||
40 | 52 | ||
41 | 53 | ||
42 | const requestSign = function (inputData) { | 54 | const requestSign = function (inputData) { |
43 | - var jsonList = inputData || {}; | ||
44 | - jsonList.orgId = public_orgId; | ||
45 | - jsonList.sign_type = "md5"; | ||
46 | - jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104"; | ||
47 | - jsonList.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; | ||
48 | - jsonList.salt = getSalt(); | ||
49 | - jsonList.terminalSource = "11"; | ||
50 | - // jsonList.token = getGlobalUser("globalUser").token; | ||
51 | - jsonList.token = getGlobalUser("globalUser").token; | ||
52 | - // jsonList.token = 'af7ed65335f842ee8f754e841ff940ea'; | ||
53 | - var arrData = []; | ||
54 | - for (var key in jsonList) { | ||
55 | - var obj = {}; | ||
56 | - // console.log("key = "+key); | ||
57 | - // // obj[key] =jsonList[key]; | ||
58 | - obj.keyname = key; | ||
59 | - obj.value = jsonList[key]; | ||
60 | - // console.log(obj); | ||
61 | - arrData.push(obj); | ||
62 | - } | ||
63 | - var sign = getSign(arrData); | ||
64 | - jsonList.sign = sign; | ||
65 | - return jsonList; | 55 | + var jsonList = inputData || {}; |
56 | + jsonList.orgId = public_orgId; | ||
57 | + jsonList.sign_type = "md5"; | ||
58 | + jsonList.app_id = "0eca8f5373ca4866aec2f8e9d9367104"; | ||
59 | + jsonList.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; | ||
60 | + jsonList.salt = getSalt(); | ||
61 | + jsonList.terminalSource = "11"; | ||
62 | + // jsonList.token = getGlobalUser("globalUser").token; | ||
63 | + jsonList.token = getGlobalUser("globalUser").token; | ||
64 | + // jsonList.token = 'af7ed65335f842ee8f754e841ff940ea'; | ||
65 | + var arrData = []; | ||
66 | + for (var key in jsonList) { | ||
67 | + var obj = {}; | ||
68 | + // console.log("key = "+key); | ||
69 | + // // obj[key] =jsonList[key]; | ||
70 | + obj.keyname = key; | ||
71 | + obj.value = jsonList[key]; | ||
72 | + // console.log(obj); | ||
73 | + arrData.push(obj); | ||
74 | + } | ||
75 | + var sign = getSign(arrData); | ||
76 | + jsonList.sign = sign; | ||
77 | + return jsonList; | ||
66 | } | 78 | } |
67 | //获取sign | 79 | //获取sign |
68 | var getSign = function (objb) { | 80 | var getSign = function (objb) { |
69 | - var compare = function (obj1, obj2) { | ||
70 | - var val1 = obj1.keyname; | ||
71 | - var val2 = obj2.keyname; | ||
72 | - if (val1 < val2) { | ||
73 | - return -1; | ||
74 | - } else if (val1 > val2) { | ||
75 | - return 1; | ||
76 | - } else { | ||
77 | - return 0; | ||
78 | - } | ||
79 | - } | ||
80 | - objb.sort(compare); | ||
81 | - var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; | ||
82 | - for (var i = 0; i < objb.length; i++) { | ||
83 | - if (objb[i].value != null && objb[i].value != '') { | ||
84 | - strmd5 += objb[i].keyname + objb[i].value; | ||
85 | - } | ||
86 | - } | ||
87 | - strmd5 += '14318527b13840c2a4af63fef52c2d6e'; | ||
88 | - // console.log('strmd5-------->'+strmd5); | ||
89 | - strmd5 = md5(strmd5); | ||
90 | - strmd5 = strmd5.toUpperCase(); | ||
91 | - return strmd5; | 81 | + var compare = function (obj1, obj2) { |
82 | + var val1 = obj1.keyname; | ||
83 | + var val2 = obj2.keyname; | ||
84 | + if (val1 < val2) { | ||
85 | + return -1; | ||
86 | + } else if (val1 > val2) { | ||
87 | + return 1; | ||
88 | + } else { | ||
89 | + return 0; | ||
90 | + } | ||
91 | + } | ||
92 | + objb.sort(compare); | ||
93 | + var strmd5 = '14318527b13840c2a4af63fef52c2d6e'; | ||
94 | + for (var i = 0; i < objb.length; i++) { | ||
95 | + if (objb[i].value != null && objb[i].value != '') { | ||
96 | + strmd5 += objb[i].keyname + objb[i].value; | ||
97 | + } | ||
98 | + } | ||
99 | + strmd5 += '14318527b13840c2a4af63fef52c2d6e'; | ||
100 | + // console.log('strmd5-------->'+strmd5); | ||
101 | + strmd5 = md5(strmd5); | ||
102 | + strmd5 = strmd5.toUpperCase(); | ||
103 | + return strmd5; | ||
92 | } | 104 | } |
93 | //获取盐值 | 105 | //获取盐值 |
94 | var getSalt = function () { | 106 | var getSalt = function () { |
95 | - var len = parseInt(32); | ||
96 | - var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; | ||
97 | - var maxPos = $chars.length; | ||
98 | - var pwd = ''; | ||
99 | - for (var i = 0; i < len; i++) { | ||
100 | - pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); | ||
101 | - } | ||
102 | - // console.log(pwd); | ||
103 | - return pwd; | 107 | + var len = parseInt(32); |
108 | + var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; | ||
109 | + var maxPos = $chars.length; | ||
110 | + var pwd = ''; | ||
111 | + for (var i = 0; i < len; i++) { | ||
112 | + pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); | ||
113 | + } | ||
114 | + // console.log(pwd); | ||
115 | + return pwd; | ||
104 | } | 116 | } |
105 | var getGlobalUser = function (key) { | 117 | var getGlobalUser = function (key) { |
106 | - var userInfo = uni.getStorageSync("globalUser"); | ||
107 | - if (userInfo != null && userInfo != "" && userInfo != undefined) { | ||
108 | - return userInfo; | ||
109 | - } else { | ||
110 | - return ''; | ||
111 | - } | 118 | + var userInfo = uni.getStorageSync("globalUser"); |
119 | + if (userInfo != null && userInfo != "" && userInfo != undefined) { | ||
120 | + return userInfo; | ||
121 | + } else { | ||
122 | + return ''; | ||
123 | + } | ||
112 | } | 124 | } |
113 | // 除了金额 | 125 | // 除了金额 |
114 | var moneyFormat = function (val) { | 126 | var moneyFormat = function (val) { |
115 | - return (val / 100).toFixed(2) | 127 | + return (val / 100).toFixed(2) |
116 | } | 128 | } |
117 | var dateFormat = function (msd) { // 时间转换 | 129 | var dateFormat = function (msd) { // 时间转换 |
118 | - var time =msd | 130 | + var time =msd |
119 | 131 | ||
120 | - if (null != time && "" != time) { | ||
121 | - if (time > 60 && time < 60 * 60) { | ||
122 | - time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) - | 132 | + if (null != time && "" != time) { |
133 | + if (time > 60 && time < 60 * 60) { | ||
134 | + time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) - | ||
123 | 135 | ||
124 | - parseInt(time / 60.0)) * 60) + "秒"; | 136 | + parseInt(time / 60.0)) * 60) + "秒"; |
125 | 137 | ||
126 | - } | 138 | + } |
127 | 139 | ||
128 | - else if (time >= 60 * 60 && time < 60 * 60 * 24) { | ||
129 | - time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) - | 140 | + else if (time >= 60 * 60 && time < 60 * 60 * 24) { |
141 | + time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) - | ||
130 | 142 | ||
131 | - parseInt(time / 3600.0)) * 60) + "分钟" + | 143 | + parseInt(time / 3600.0)) * 60) + "分钟" + |
132 | 144 | ||
133 | - parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - | 145 | + parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - |
134 | 146 | ||
135 | - parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; | 147 | + parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; |
136 | 148 | ||
137 | - } else if (time >= 60 * 60 * 24) { | ||
138 | - time = parseInt(time / 3600.0/24) + "天" +parseInt((parseFloat(time / 3600.0/24)- | 149 | + } else if (time >= 60 * 60 * 24) { |
150 | + time = parseInt(time / 3600.0/24) + "天" +parseInt((parseFloat(time / 3600.0/24)- | ||
139 | 151 | ||
140 | - parseInt(time / 3600.0/24))*24) + "小时" + parseInt((parseFloat(time / 3600.0) - | 152 | + parseInt(time / 3600.0/24))*24) + "小时" + parseInt((parseFloat(time / 3600.0) - |
141 | 153 | ||
142 | - parseInt(time / 3600.0)) * 60) + "分钟" + | 154 | + parseInt(time / 3600.0)) * 60) + "分钟" + |
143 | 155 | ||
144 | - parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - | 156 | + parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - |
145 | 157 | ||
146 | - parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; | 158 | + parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; |
147 | 159 | ||
148 | - } | 160 | + } |
149 | 161 | ||
150 | - else { | ||
151 | - time = parseInt(time) + "秒"; | 162 | + else { |
163 | + time = parseInt(time) + "秒"; | ||
152 | 164 | ||
153 | - } | 165 | + } |
154 | 166 | ||
155 | - } | ||
156 | - return time; | 167 | + } |
168 | + return time; | ||
157 | } | 169 | } |
158 | export default { | 170 | export default { |
159 | - // deviceInfo, | ||
160 | - hs_wxPay_appId, | ||
161 | - public_orgId, | ||
162 | - appName, | ||
163 | - ACompany, | ||
164 | - BCompany, | ||
165 | - appVerson, | ||
166 | - SetToken, | ||
167 | - requestSign, | ||
168 | - moneyFormat, | ||
169 | - dateFormat, | ||
170 | - // 接口 | ||
171 | - userLogin, | ||
172 | - indexInfo, | ||
173 | - userLoginout, | ||
174 | - useraboutUs, | ||
175 | - walletAccount, | ||
176 | - //刘淇接口 | ||
177 | - getBusinessParkOrderByBusIdForPage, | ||
178 | - getPayOrderByOrderId, | 171 | + // deviceInfo, |
172 | + hs_wxPay_appId, | ||
173 | + public_orgId, | ||
174 | + appName, | ||
175 | + ACompany, | ||
176 | + BCompany, | ||
177 | + appVerson, | ||
178 | + SetToken, | ||
179 | + requestSign, | ||
180 | + moneyFormat, | ||
181 | + dateFormat, | ||
182 | + // 接口 | ||
183 | + userLogin, | ||
184 | + indexInfo, | ||
185 | + userLoginout, | ||
186 | + useraboutUs, | ||
187 | + walletAccount, | ||
188 | + //刘淇接口 | ||
189 | + getBusinessParkOrderByBusIdForPage, | ||
190 | + getPayOrderByOrderId, | ||
179 | couponRuleParkPage, | 191 | couponRuleParkPage, |
180 | 192 | ||
181 | 193 | ||
182 | - | ||
183 | - | ||
184 | - //陈彪接口 | ||
185 | - rechargeList, | ||
186 | - | ||
187 | - | ||
188 | - | ||
189 | - | 194 | + //陈彪接口 |
195 | + rechargeList, | ||
196 | + walletKindType, | ||
197 | + detailSummary, | ||
198 | + walletDetailsPage, | ||
199 | + publicUnifiedOrder, | ||
190 | 200 | ||
191 | } | 201 | } |
common/filters.js
@@ -31,42 +31,52 @@ const RMB = (value) => { | @@ -31,42 +31,52 @@ const RMB = (value) => { | ||
31 | return `¥${value}` | 31 | return `¥${value}` |
32 | } | 32 | } |
33 | 33 | ||
34 | -// 钱保留两位小数 | ||
35 | -const toFixed2 = num => { | ||
36 | - return isNaN(num) ? 0.00 : parseFloat((num/100).toFixed(2)); | 34 | +// 处理金额两位小数 |
35 | +const toFixed2 = value => { | ||
36 | + if (!value) { | ||
37 | + return '0.00'; | ||
38 | + } else { | ||
39 | + return (value / 100).toFixed(2); | ||
40 | + } | ||
41 | + | ||
37 | } | 42 | } |
38 | 43 | ||
39 | // 钱保留两位小数+其他 | 44 | // 钱保留两位小数+其他 |
40 | const ortherToFixed = num => { | 45 | const ortherToFixed = num => { |
41 | - if(num === -1) return '其他'; | ||
42 | - return isNaN(num) ? 0.00 : parseFloat((num/100).toFixed(2)); | 46 | + if (num === '0' || num === undefined || num === null || num === '' || num === NaN) { |
47 | + return '0.00'; | ||
48 | + } else if (num === -1) { | ||
49 | + return '其他'; | ||
50 | + } else { | ||
51 | + return (num / 100).toFixed(2); | ||
52 | + } | ||
43 | } | 53 | } |
44 | 54 | ||
45 | 55 | ||
46 | // 数字每三位加个逗号 | 56 | // 数字每三位加个逗号 |
47 | -const toThousands =(num)=> { | ||
48 | - var result = [], | ||
49 | - counter = 0; | ||
50 | - num = (num || 0).toString().split(''); | ||
51 | - for (var i = num.length - 1; i >= 0; i--) { | ||
52 | - counter++; | ||
53 | - result.unshift(num[i]); | ||
54 | - if (!(counter % 3) && i != 0) { | ||
55 | - result.unshift(','); | ||
56 | - } | ||
57 | - } | ||
58 | - return result.join(''); | ||
59 | - } | ||
60 | - | ||
61 | - // 根据身份证号码判断男女 | ||
62 | - const sexFilter = value => { | ||
63 | - if (!value) { | ||
64 | - return '' | ||
65 | - } else { | ||
66 | - let data = value.substr(16, 1) % 2 === 1 ? '男' : '女' | ||
67 | - return data | ||
68 | - } | ||
69 | - } | 57 | +const toThousands = (num) => { |
58 | + var result = [], | ||
59 | + counter = 0; | ||
60 | + num = (num || 0).toString().split(''); | ||
61 | + for (var i = num.length - 1; i >= 0; i--) { | ||
62 | + counter++; | ||
63 | + result.unshift(num[i]); | ||
64 | + if (!(counter % 3) && i != 0) { | ||
65 | + result.unshift(','); | ||
66 | + } | ||
67 | + } | ||
68 | + return result.join(''); | ||
69 | +} | ||
70 | + | ||
71 | +// 根据身份证号码判断男女 | ||
72 | +const sexFilter = value => { | ||
73 | + if (!value) { | ||
74 | + return '' | ||
75 | + } else { | ||
76 | + let data = value.substr(16, 1) % 2 === 1 ? '男' : '女' | ||
77 | + return data | ||
78 | + } | ||
79 | +} | ||
70 | 80 | ||
71 | export default { | 81 | export default { |
72 | tranNull, | 82 | tranNull, |
pages/moneyRecharge/moneyRecharge.vue
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <view class="rechargeNum uni-center">¥{{acctBalance | toFixed2 }}</view> | 6 | <view class="rechargeNum uni-center">¥{{acctBalance | toFixed2 }}</view> |
7 | </view> | 7 | </view> |
8 | 8 | ||
9 | - <uni-section title="充值金额" type="line" padding> | 9 | + <uni-section title="充值金额(元)" type="line" padding> |
10 | <uni-grid :column="3" :highlight="true" :showBorder="false" :square="false" @change="change"> | 10 | <uni-grid :column="3" :highlight="true" :showBorder="false" :square="false" @change="change"> |
11 | <uni-grid-item v-for="(item, index) in ListData" :index="index" :key="index"> | 11 | <uni-grid-item v-for="(item, index) in ListData" :index="index" :key="index"> |
12 | <view class="grid-item-box" style="background-color: #fff;"> | 12 | <view class="grid-item-box" style="background-color: #fff;"> |
@@ -16,9 +16,9 @@ | @@ -16,9 +16,9 @@ | ||
16 | </view> | 16 | </view> |
17 | </uni-grid-item> | 17 | </uni-grid-item> |
18 | </uni-grid> | 18 | </uni-grid> |
19 | - <view :class="isShowInput ? 'jy-fix-height34' : 'display-none'"> | ||
20 | - <input class="jy-fix-height34 uni-list-cell-hover" type="digit" v-model="rechargeNum" | ||
21 | - placeholder=" 请输入金额" /> | 19 | + <view class="uni-list-cell-pd" v-show="isShowInput"> |
20 | + <input class="payInut" type="number" v-model="rechargeNum" @input="checkNum" :maxlength="maxlength" | ||
21 | + placeholder=" 请输入金额"> | ||
22 | </view> | 22 | </view> |
23 | </uni-section> | 23 | </uni-section> |
24 | 24 | ||
@@ -54,6 +54,7 @@ | @@ -54,6 +54,7 @@ | ||
54 | currentIndex: 0, | 54 | currentIndex: 0, |
55 | isShowInput: false, | 55 | isShowInput: false, |
56 | rechargeNum: '', | 56 | rechargeNum: '', |
57 | + maxlength: 6 //默认一个长度 | ||
57 | } | 58 | } |
58 | }, | 59 | }, |
59 | onLoad() { | 60 | onLoad() { |
@@ -104,11 +105,30 @@ | @@ -104,11 +105,30 @@ | ||
104 | console.log('1') | 105 | console.log('1') |
105 | that.isShowInput = true; | 106 | that.isShowInput = true; |
106 | that.rechargeNum = '' | 107 | that.rechargeNum = '' |
108 | + } else { | ||
109 | + that.isShowInput = false; | ||
107 | } | 110 | } |
108 | - that.isShowInput = false; | 111 | + |
109 | }, | 112 | }, |
110 | - detailCell() { | 113 | + checkNum(e) { |
114 | + let value = e.detail.value; | ||
115 | + let dot = value.indexOf('.'); //包含小数点 | ||
116 | + let reg = /^[0-9]+$/; //正整数 | ||
117 | + if (dot > -1) { | ||
118 | + this.maxlength = dot + 3; //长度是小数点后两位 | ||
119 | + if (value.length > dot + 3) {} | ||
120 | + } | ||
121 | + if (reg.test(value)) { //如果是正整数不包含小数点 | ||
122 | + this.maxlength = 6; | ||
123 | + } | ||
111 | 124 | ||
125 | + }, | ||
126 | + | ||
127 | + detailCell() { | ||
128 | + uni.navigateTo({ | ||
129 | + url: '../rechargeDetail/rechargeDetail' | ||
130 | + | ||
131 | + }); | ||
112 | } | 132 | } |
113 | } | 133 | } |
114 | } | 134 | } |
@@ -227,4 +247,14 @@ | @@ -227,4 +247,14 @@ | ||
227 | margin-top: 40px; | 247 | margin-top: 40px; |
228 | 248 | ||
229 | } | 249 | } |
250 | + .payInut{ | ||
251 | + display: flex; | ||
252 | + box-sizing: border-box; | ||
253 | + flex-direction: row; | ||
254 | + align-items: center; | ||
255 | + border: 1px solid #DCDFE6; | ||
256 | + border-radius: 4px; | ||
257 | + min-height: 36px; | ||
258 | + padding-left: 10px; | ||
259 | + } | ||
230 | </style> | 260 | </style> |
pages/rechargeDetail/rechargeDetail.vue
1 | <template> | 1 | <template> |
2 | - <view> | ||
3 | - <view class="statistics yellow-bg uni-list-cell-pd" style="color: #fff">共18笔充值,充值总金额100.00元</view> | ||
4 | - <view class="uni-list"> | ||
5 | - <view class="uni-list-cell"> | ||
6 | - <view class="uni-list-cell-left"> | ||
7 | - 消费类型 | ||
8 | - </view> | ||
9 | - <view class="uni-list-cell-db"> | ||
10 | - <picker @change="bindPickerChange" :value="index" :range="array"> | ||
11 | - <view class="uni-input">{{array[index]}}</view> | ||
12 | - </picker> | ||
13 | - </view> | ||
14 | - </view> | ||
15 | - </view> | ||
16 | - | ||
17 | - <view class="uni-list"> | ||
18 | - <view class="uni-list-cell"> | ||
19 | - <view class="uni-list-cell-left"> | ||
20 | - 充值方式 | ||
21 | - </view> | ||
22 | - <view class="uni-list-cell-db"> | ||
23 | - <picker @change="bindPickerChangeWay" :value="indexWay" :range="arrayWay"> | ||
24 | - <view class="uni-input">{{arrayWay[indexWay]}}</view> | ||
25 | - </picker> | ||
26 | - </view> | ||
27 | - </view> | ||
28 | - </view> | ||
29 | - | ||
30 | - | ||
31 | - <view class="uni-list"> | ||
32 | - <view class="uni-list-cell"> | ||
33 | - <view class="uni-list-cell-left"> | ||
34 | - 开始时间 | ||
35 | - </view> | ||
36 | - <view class="uni-list-cell-db"> | ||
37 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange"> | ||
38 | - <view class="uni-input">{{benginDate}}</view> | ||
39 | - </picker> | ||
40 | - </view> | ||
41 | - </view> | ||
42 | - </view> | ||
43 | - | ||
44 | - <view class="uni-list"> | ||
45 | - <view class="uni-list-cell"> | ||
46 | - <view class="uni-list-cell-left"> | ||
47 | - 结束时间 | ||
48 | - </view> | ||
49 | - <view class="uni-list-cell-db"> | ||
50 | - <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange"> | ||
51 | - <view class="uni-input">{{overDate}}</view> | ||
52 | - </picker> | ||
53 | - </view> | ||
54 | - </view> | ||
55 | - </view> | ||
56 | - | ||
57 | - <view class="border-bg"></view> | ||
58 | - | ||
59 | - | ||
60 | - <uni-load-more class="load" | ||
61 | - :content-text="contentText" | ||
62 | - :status="status" | ||
63 | - :icon-size="24" | ||
64 | - :iconType="iconType" | ||
65 | - v-if="rows.length == 0"> | ||
66 | - | ||
67 | - <uni-list class="rechargeWrap"> | ||
68 | - <view class="recordCon uni-list-cell-pd"> | ||
69 | - <text>+66</text> | ||
70 | - <text>充值成功</text> | ||
71 | - </view> | ||
72 | - <view class="recordCon uni-list-cell-pd"> | ||
73 | - <text class="color-green">微信充值</text> | ||
74 | - <text>2020-10-01 01:01:01</text> | ||
75 | - </view> | ||
76 | - </uni-list> | ||
77 | - | ||
78 | - <uni-list class="rechargeWrap"> | ||
79 | - <view class="recordCon uni-list-cell-pd"> | ||
80 | - <text>+66</text> | ||
81 | - <text>充值成功</text> | ||
82 | - </view> | ||
83 | - <view class="recordCon uni-list-cell-pd"> | ||
84 | - <text class="color-blue">支付宝充值</text> | ||
85 | - <text>2020-10-01 01:01:01</text> | ||
86 | - </view> | ||
87 | - </uni-list> | ||
88 | - | ||
89 | - <uni-list class="rechargeWrap"> | ||
90 | - <view class="recordCon uni-list-cell-pd"> | ||
91 | - <text>+66</text> | ||
92 | - <text>充值成功</text> | ||
93 | - </view> | ||
94 | - <view class="recordCon uni-list-cell-pd"> | ||
95 | - <text class="color-red">线下公对公充值</text> | ||
96 | - <text>2020-10-01 01:01:01</text> | ||
97 | - </view> | ||
98 | - </uni-list> | ||
99 | - | ||
100 | - <uni-list class="rechargeWrap"> | ||
101 | - <view class="recordCon uni-list-cell-pd"> | ||
102 | - <text>-66</text> | ||
103 | - <text>支付成功</text> | ||
104 | - </view> | ||
105 | - <view class="recordCon uni-list-cell-pd"> | ||
106 | - <text class="color-green">购买卡券</text> | ||
107 | - <text>2020-10-01 01:01:01</text> | ||
108 | - </view> | ||
109 | - <view class="rechargeArrow"> | ||
110 | - > | ||
111 | - </view> | ||
112 | - </uni-list> | ||
113 | - | ||
114 | - | ||
115 | - | ||
116 | - <uni-list class="rechargeWrap"> | ||
117 | - <view class="recordCon uni-list-cell-pd"> | ||
118 | - <text>-66</text> | ||
119 | - <text>支付成功</text> | ||
120 | - </view> | ||
121 | - <view class="recordCon uni-list-cell-pd"> | ||
122 | - <text class="">停车支付</text> | ||
123 | - <text>2020-10-01 01:01:01</text> | ||
124 | - </view> | ||
125 | - <view class="rechargeArrow"> | ||
126 | - > | ||
127 | - </view> | ||
128 | - </uni-list> | ||
129 | - | ||
130 | - </uni-load-more> | ||
131 | - | ||
132 | - | ||
133 | - </view> | 2 | + <view> |
3 | + <view class="statistics yellow-bg uni-list-cell-pd" style="color: #fff">共18笔充值,充值总金额100.00元</view> | ||
4 | + <view class="uni-list"> | ||
5 | + <view class="uni-list-cell"> | ||
6 | + <view class="uni-list-cell-left"> | ||
7 | + 消费类型 | ||
8 | + </view> | ||
9 | + <view class="uni-list-cell-db"> | ||
10 | + <picker @change="bindPickerChange" :value="index" :range="kindArray"> | ||
11 | + <view class="uni-input">{{kindArray[index].kindName}}</view> | ||
12 | + </picker> | ||
13 | + </view> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + | ||
17 | + <view class="uni-list"> | ||
18 | + <view class="uni-list-cell"> | ||
19 | + <view class="uni-list-cell-left"> | ||
20 | + 充值方式 | ||
21 | + </view> | ||
22 | + <view class="uni-list-cell-db"> | ||
23 | + <picker @change="bindPickerChangeWay" :value="indexWay" :range="arrayWay"> | ||
24 | + <view class="uni-input">{{arrayWay[indexWay]}}</view> | ||
25 | + </picker> | ||
26 | + </view> | ||
27 | + </view> | ||
28 | + </view> | ||
29 | + | ||
30 | + | ||
31 | + <view class="uni-list"> | ||
32 | + <view class="uni-list-cell"> | ||
33 | + <view class="uni-list-cell-left"> | ||
34 | + 开始时间 | ||
35 | + </view> | ||
36 | + <view class="uni-list-cell-db"> | ||
37 | + <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindStartDateChange"> | ||
38 | + <view class="uni-input">{{benginDate}}</view> | ||
39 | + </picker> | ||
40 | + </view> | ||
41 | + </view> | ||
42 | + </view> | ||
43 | + | ||
44 | + <view class="uni-list"> | ||
45 | + <view class="uni-list-cell"> | ||
46 | + <view class="uni-list-cell-left"> | ||
47 | + 结束时间 | ||
48 | + </view> | ||
49 | + <view class="uni-list-cell-db"> | ||
50 | + <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindEndDateChange"> | ||
51 | + <view class="uni-input">{{overDate}}</view> | ||
52 | + </picker> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + </view> | ||
56 | + | ||
57 | + <view class="border-bg"></view> | ||
58 | + | ||
59 | + | ||
60 | + <uni-load-more class="load" :content-text="contentText" :status="status" :icon-size="24" :iconType="iconType" | ||
61 | + v-if="rows.length == 0"> | ||
62 | + | ||
63 | + <uni-list class="rechargeWrap"> | ||
64 | + <view class="recordCon uni-list-cell-pd"> | ||
65 | + <text>+66</text> | ||
66 | + <text>充值成功</text> | ||
67 | + </view> | ||
68 | + <view class="recordCon uni-list-cell-pd"> | ||
69 | + <text class="color-green">微信充值</text> | ||
70 | + <text>2020-10-01 01:01:01</text> | ||
71 | + </view> | ||
72 | + </uni-list> | ||
73 | + | ||
74 | + <uni-list class="rechargeWrap"> | ||
75 | + <view class="recordCon uni-list-cell-pd"> | ||
76 | + <text>+66</text> | ||
77 | + <text>充值成功</text> | ||
78 | + </view> | ||
79 | + <view class="recordCon uni-list-cell-pd"> | ||
80 | + <text class="color-blue">支付宝充值</text> | ||
81 | + <text>2020-10-01 01:01:01</text> | ||
82 | + </view> | ||
83 | + </uni-list> | ||
84 | + | ||
85 | + <uni-list class="rechargeWrap"> | ||
86 | + <view class="recordCon uni-list-cell-pd"> | ||
87 | + <text>+66</text> | ||
88 | + <text>充值成功</text> | ||
89 | + </view> | ||
90 | + <view class="recordCon uni-list-cell-pd"> | ||
91 | + <text class="color-red">线下公对公充值</text> | ||
92 | + <text>2020-10-01 01:01:01</text> | ||
93 | + </view> | ||
94 | + </uni-list> | ||
95 | + | ||
96 | + <uni-list class="rechargeWrap"> | ||
97 | + <view class="recordCon uni-list-cell-pd"> | ||
98 | + <text>-66</text> | ||
99 | + <text>支付成功</text> | ||
100 | + </view> | ||
101 | + <view class="recordCon uni-list-cell-pd"> | ||
102 | + <text class="color-green">购买卡券</text> | ||
103 | + <text>2020-10-01 01:01:01</text> | ||
104 | + </view> | ||
105 | + <view class="rechargeArrow"> | ||
106 | + > | ||
107 | + </view> | ||
108 | + </uni-list> | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + <uni-list class="rechargeWrap"> | ||
113 | + <view class="recordCon uni-list-cell-pd"> | ||
114 | + <text>-66</text> | ||
115 | + <text>支付成功</text> | ||
116 | + </view> | ||
117 | + <view class="recordCon uni-list-cell-pd"> | ||
118 | + <text class="">停车支付</text> | ||
119 | + <text>2020-10-01 01:01:01</text> | ||
120 | + </view> | ||
121 | + <view class="rechargeArrow"> | ||
122 | + > | ||
123 | + </view> | ||
124 | + </uni-list> | ||
125 | + | ||
126 | + </uni-load-more> | ||
127 | + | ||
128 | + | ||
129 | + </view> | ||
134 | </template> | 130 | </template> |
135 | 131 | ||
136 | <script> | 132 | <script> |
137 | -import common from "../../common/common.js"; | ||
138 | -export default { | ||
139 | - data() { | ||
140 | - const currentDate = this.getDate({ | ||
141 | - format: true | ||
142 | - }) | ||
143 | - return { | ||
144 | - title: 'picker', | ||
145 | - array: ['全部', '充值', '支付'], | ||
146 | - arrayWay: ['所有方式', '微信', '线下公对公'], | ||
147 | - index: 0, | ||
148 | - indexWay: 0, | ||
149 | - benginDate: currentDate, | ||
150 | - overDate: currentDate, | ||
151 | - rows:[], | ||
152 | - pageNum:1,//当前页 | ||
153 | - pageSize:1,//每页条数 | ||
154 | - reload:false, | ||
155 | - status:'more', | ||
156 | - contentText:{ | ||
157 | - contentdown:'上拉加载更多~', | ||
158 | - contentrefresh:'正在加载更多~', | ||
159 | - contentmore:'我是有底线的~' | ||
160 | - }, | ||
161 | - iconType:'auto', // 图标样式 | ||
162 | - } | ||
163 | - }, | ||
164 | - onLoad(params) { | ||
165 | - wx.showShareMenu({ | ||
166 | - withShareTicket: true | ||
167 | - }) | ||
168 | - // this.mycarNumber = params.carNumber; | ||
169 | - // this.myorderId = params.orderId; | ||
170 | - // this.myparkCode = params.parkCode; | ||
171 | - // this.myorderState = params.orderState; | ||
172 | - // this.totalFee = params.totalFee | ||
173 | - // this.unPayFee = params.unPayFee | ||
174 | - // if (params.orderState == 5) { | ||
175 | - // //停车补缴单 103 | ||
176 | - // this.mypaySrcType = '103' | ||
177 | - // } else { | ||
178 | - // this.mypaySrcType = '101' | ||
179 | - // } | ||
180 | - // // this.GetbillQueryInfo(this.mycarNumber, this.myorderId, this.myparkCode); | ||
181 | - // this.getWxCode(); | ||
182 | - // this.PDlogin(); | ||
183 | - //console.log("xxxmake = "+this.makedateFormat()); | ||
184 | - }, | ||
185 | - onShow() { | ||
186 | - var me = this; | ||
187 | - var userInfo = me.getGlobalUser("globalUser"); | ||
188 | - if (userInfo != null) { | ||
189 | - me.phoneNumb = userInfo.userPhone; | ||
190 | - } | ||
191 | - var pages = getCurrentPages(); | ||
192 | - var currPage = pages[pages.length - 1]; //当前页面 | ||
193 | - console.log('currPage.data.selCoupon = ' + currPage.data.selCoupon); | ||
194 | - me.selCoupon = currPage.data.selCoupon; | ||
195 | - console.log(JSON.stringify(me.selCoupon)); | ||
196 | - // me.GetbillQueryInfo(me.mycarNumber, me.myorderId, me.myparkCode, me.selCoupon.cardNo, me.selCoupon.couponType, me.selCoupon | ||
197 | - // .discValue); | ||
198 | - // GetbillQueryInfo(carnum, orderId, parkCode, cardNo, couponType, disValue) { | ||
199 | - }, | ||
200 | - computed: { | ||
201 | - startDate() { | ||
202 | - return this.getDate('start'); | ||
203 | - }, | ||
204 | - endDate() { | ||
205 | - return this.getDate('end'); | ||
206 | - } | ||
207 | - }, | ||
208 | - methods: { | ||
209 | - bindPickerChange: function (e) { | ||
210 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
211 | - this.index = e.detail.value | ||
212 | - }, | ||
213 | - bindPickerChangeWay: function (e) { | ||
214 | - console.log('picker发送选择改变,携带值为', e.detail.value) | ||
215 | - this.indexWay = e.detail.value | ||
216 | - }, | ||
217 | - bindStartDateChange: function (e) { | ||
218 | - this.benginDate = e.detail.value | ||
219 | - }, | ||
220 | - bindEndDateChange: function (e) { | ||
221 | - this.overDate = e.detail.value | ||
222 | - }, | ||
223 | - getDate(type) { | ||
224 | - const date = new Date(); | ||
225 | - let year = date.getFullYear(); | ||
226 | - let month = date.getMonth() + 1; | ||
227 | - let day = date.getDate(); | ||
228 | - if (type === 'start') { | ||
229 | - year = year - 60; | ||
230 | - } else if (type === 'end') { | ||
231 | - year = year + 2; | ||
232 | - } | ||
233 | - month = month > 9 ? month : '0' + month; | ||
234 | - day = day > 9 ? day : '0' + day; | ||
235 | - return `${year}-${month}-${day}`; | ||
236 | - }, | ||
237 | - } | ||
238 | -} | 133 | + export default { |
134 | + data() { | ||
135 | + const currentDate = this.getDate({ | ||
136 | + format: true | ||
137 | + }) | ||
138 | + return { | ||
139 | + title: 'picker', | ||
140 | + kindArray: [], | ||
141 | + arrayWay: [], | ||
142 | + index: 0, | ||
143 | + indexWay: 0, | ||
144 | + benginDate: currentDate, | ||
145 | + overDate: currentDate, | ||
146 | + rows: [], | ||
147 | + pageNum: 1, //当前页 | ||
148 | + pageSize: 1, //每页条数 | ||
149 | + reload: false, | ||
150 | + status: 'more', | ||
151 | + contentText: { | ||
152 | + contentdown: '上拉加载更多~', | ||
153 | + contentrefresh: '正在加载更多~', | ||
154 | + contentmore: '我是有底线的~' | ||
155 | + }, | ||
156 | + iconType: 'auto', // 图标样式 | ||
157 | + } | ||
158 | + }, | ||
159 | + onLoad(params) { | ||
160 | + wx.showShareMenu({ | ||
161 | + withShareTicket: true | ||
162 | + }); | ||
163 | + this.getKindType() | ||
164 | + | ||
165 | + }, | ||
166 | + onShow() { | ||
167 | + | ||
168 | + | ||
169 | + }, | ||
170 | + computed: { | ||
171 | + startDate() { | ||
172 | + return this.getDate('start'); | ||
173 | + }, | ||
174 | + endDate() { | ||
175 | + return this.getDate('end'); | ||
176 | + } | ||
177 | + }, | ||
178 | + methods: { | ||
179 | + getKindType() { | ||
180 | + let that = this; | ||
181 | + that.$myRequest({ | ||
182 | + url: that.$common.walletKindType, | ||
183 | + method: 'POST', | ||
184 | + data: that.$common.requestSign() | ||
185 | + }).then(res => { | ||
186 | + | ||
187 | + let data = res.data; | ||
188 | + // let list = []; | ||
189 | + // data.forEach((item, index) => { | ||
190 | + // list.push(item.kindName) | ||
191 | + // }); | ||
192 | + console.log(data) | ||
193 | + that.kindArray = data; | ||
194 | + | ||
195 | + }) | ||
196 | + }, | ||
197 | + bindPickerChange: function(e) { | ||
198 | + let that = this; | ||
199 | + that.index = e.detail.value | ||
200 | + | ||
201 | + | ||
202 | + | ||
203 | + }, | ||
204 | + bindPickerChangeWay: function(e) { | ||
205 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
206 | + this.indexWay = e.detail.value | ||
207 | + }, | ||
208 | + bindStartDateChange: function(e) { | ||
209 | + this.benginDate = e.detail.value | ||
210 | + }, | ||
211 | + bindEndDateChange: function(e) { | ||
212 | + this.overDate = e.detail.value | ||
213 | + }, | ||
214 | + getDate(type) { | ||
215 | + const date = new Date(); | ||
216 | + let year = date.getFullYear(); | ||
217 | + let month = date.getMonth() + 1; | ||
218 | + let day = date.getDate(); | ||
219 | + if (type === 'start') { | ||
220 | + year = year - 60; | ||
221 | + } else if (type === 'end') { | ||
222 | + year = year + 2; | ||
223 | + } | ||
224 | + month = month > 9 ? month : '0' + month; | ||
225 | + day = day > 9 ? day : '0' + day; | ||
226 | + return `${year}-${month}-${day}`; | ||
227 | + }, | ||
228 | + } | ||
229 | + } | ||
239 | </script> | 230 | </script> |
240 | 231 | ||
241 | <style lang="scss" scoped> | 232 | <style lang="scss" scoped> |
242 | - .rechargeWrap{ | ||
243 | - position: relative; | ||
244 | - .rechargeArrow{ | ||
245 | - position: absolute; | ||
246 | - right: 10px; | ||
247 | - top: 30px; | ||
248 | - font-size: 20px; | ||
249 | - color: #999; | ||
250 | - } | ||
251 | - } | ||
252 | - .recordCon { | ||
253 | - padding-right: 35px; | ||
254 | - color: #999; | ||
255 | - display: flex; | ||
256 | - justify-content: space-between; | ||
257 | - } | 233 | + .rechargeWrap { |
234 | + position: relative; | ||
235 | + | ||
236 | + .rechargeArrow { | ||
237 | + position: absolute; | ||
238 | + right: 10px; | ||
239 | + top: 30px; | ||
240 | + font-size: 20px; | ||
241 | + color: #999; | ||
242 | + } | ||
243 | + } | ||
244 | + | ||
245 | + .recordCon { | ||
246 | + padding-right: 35px; | ||
247 | + color: #999; | ||
248 | + display: flex; | ||
249 | + justify-content: space-between; | ||
250 | + } | ||
258 | </style> | 251 | </style> |