Commit 4e5f7a9ae055213f412bd60b8917c9edd316b482
1 parent
d68fc748
多笔缴纳费用
Showing
9 changed files
with
283 additions
and
23 deletions
css/paybacknew.css
1 | +.out-btn{ | |
2 | + position: absolute; | |
3 | + right: 10px; | |
4 | + bottom:10px; | |
5 | + | |
6 | +} | |
7 | +.outpay-btn{ | |
8 | + position: absolute; | |
9 | + right: 10px; | |
10 | + bottom:10px; | |
11 | + width: 70px; | |
12 | + height: 25px; | |
13 | + margin-top: 20px; | |
14 | + color: #FFF; | |
15 | + font-size: 12px; | |
16 | + text-align: center; | |
17 | + line-height: 25px; | |
18 | + background: url(../img/arrears-bg.png) no-repeat; | |
19 | + background-size: 70px 25px; | |
20 | +} | |
1 | 21 | .tab-wrap{ |
2 | 22 | display: flex; |
3 | 23 | margin-bottom: 4px; | ... | ... |
js/ajax.js
js/monPay.js
... | ... | @@ -7,7 +7,7 @@ var webAppParams = null; |
7 | 7 | var $btnObj = null; |
8 | 8 | var $btnLoad = null; |
9 | 9 | var flag = 0; |
10 | -var appWxID = 'wxff4cebaedbf4f886'; | |
10 | +var appWxID = 'wx2af2bab90d433c86'; | |
11 | 11 | // var appWxID = 'wx945eccc8163fd75b' |
12 | 12 | var webAppCode = null;//如果是微信,先获取微信code |
13 | 13 | //var $btnLoad = document.getElementById("loading"); | ... | ... |
js/paybacknew.js
... | ... | @@ -249,6 +249,7 @@ var fun = { |
249 | 249 | parkCodes: [], |
250 | 250 | parkCodeArr: [], |
251 | 251 | selectedMon: 0,//选中了总金额 |
252 | + flag:false, | |
252 | 253 | getQueryVariable: function (variable) { |
253 | 254 | var query = window.location.search.substring(1); |
254 | 255 | var vars = query.split("&"); |
... | ... | @@ -273,17 +274,43 @@ var fun = { |
273 | 274 | $('#pay-wrap').attr('carNumber', fun.inData[0].carNumber) |
274 | 275 | $('#pay-wrap').attr('parkCode', fun.inData[0].parkCode) |
275 | 276 | $('#pay-wrap').attr('orderId', fun.inData[0].orderId) |
276 | - $('#pay-wrap').append('<div class="pay-header">\n' + | |
277 | - ' <span>' + fun.inData[0].carNumber + '</span>\n' + | |
278 | - ' <span>本次费用</span>\n' + | |
279 | - ' </div>\n' + | |
280 | - ' <div class="pay-body">\n' + | |
281 | - ' <p>停车场名称:' + fun.inData[0].parkName + '</p>\n' + | |
282 | - ' <p>进场时间:' + fun.inData[0].parkInTime + '</p>\n' + | |
283 | - ' <p>出场时间:' + fun.inData[0].parkOutTime + '</p>\n' + | |
284 | - ' <p>停车时长:' + fun.dateFormat(fun.inData[0].parkDuration) + '</p>\n' + | |
285 | - ' <span class="pay-money">' + ((fun.inData[0].unPayFee) / 100).toFixed(2) + '元</span>\n' + | |
286 | - ' </div>') | |
277 | + | |
278 | + var orderFreeDuration = Number((fun.inData[0].orderFreeDuration)) | |
279 | + var parkDuration = Number((fun.inData[0].parkDuration)) | |
280 | + | |
281 | + if (orderFreeDuration > parkDuration) { | |
282 | + fun.flag = true | |
283 | + $('#pay-wrap').append('<div class="pay-header">\n' + | |
284 | + ' <span>' + fun.inData[0].carNumber + '</span>\n' + | |
285 | + ' <span>本次费用</span>\n' + | |
286 | + ' </div>\n' + | |
287 | + ' <div class="pay-body">\n' + | |
288 | + ' <p>停车场名称:' + fun.inData[0].parkName + '</p>\n' + | |
289 | + ' <p>进场时间:' + fun.inData[0].parkInTime + '</p>\n' + | |
290 | + ' <p>出场时间:' + fun.inData[0].parkOutTime + '</p>\n' + | |
291 | + ' <p>停车时长:' + fun.dateFormat(fun.inData[0].parkDuration) + '</p>\n' + | |
292 | + ' <span class="pay-money">' + ((fun.inData[0].unPayFee) / 100).toFixed(2) + '元</span>\n' + | |
293 | + '<p class="out-btn arrears-btn" data-orderId="'+fun.inData[0].orderId+'" data-money="'+fun.inData[0].unPayFee+'" data-carNumber="'+fun.inData[0].carNumber+'" data-parkCode="'+fun.inData[0].parkCode+'">申请离场' + | |
294 | + ' <span class="orderId" style="display: none" ' + | |
295 | + '>' + fun.inData[0].orderId + '</span>' + | |
296 | + '</p>' + | |
297 | + ' </div>') | |
298 | + } else { | |
299 | + $('#pay-wrap').append('<div class="pay-header">\n' + | |
300 | + ' <span>' + fun.inData[0].carNumber + '</span>\n' + | |
301 | + ' <span>本次费用</span>\n' + | |
302 | + ' </div>\n' + | |
303 | + ' <div class="pay-body">\n' + | |
304 | + ' <p>停车场名称:' + fun.inData[0].parkName + '</p>\n' + | |
305 | + ' <p>进场时间:' + fun.inData[0].parkInTime + '</p>\n' + | |
306 | + ' <p>出场时间:' + fun.inData[0].parkOutTime + '</p>\n' + | |
307 | + ' <p>停车时长:' + fun.dateFormat(fun.inData[0].parkDuration) + '</p>\n' + | |
308 | + ' <span class="pay-money">' + ((fun.inData[0].unPayFee) / 100).toFixed(2) + '元</span>\n' + | |
309 | + '<p class="outpay-btn">出场缴费' + | |
310 | + ' <span class="orderId" style="display: none">' + fun.inData[0].orderId + '</span>' + | |
311 | + '</p>' + | |
312 | + ' </div>') | |
313 | + } | |
287 | 314 | } else { |
288 | 315 | $('#pay-wrap').html('') |
289 | 316 | $('#pay-wrap').append('<p style="height: 50px;line-height: 50px;text-align: center">无本次订单费用</p>') |
... | ... | @@ -445,6 +472,9 @@ $('#arrears-list').delegate('li','click', function () { |
445 | 472 | |
446 | 473 | //......................... 本次费用 |
447 | 474 | $('#pay-wrap').on('click', function () { |
475 | + if(fun.flag){ | |
476 | + return | |
477 | + } | |
448 | 478 | var carNumber = $(this).attr('carNumber') |
449 | 479 | var parkCode = $(this).attr('parkCode') |
450 | 480 | var orderId = $(this).attr('orderId') |
... | ... | @@ -463,5 +493,97 @@ $('#opr-btn').on('click', function () { |
463 | 493 | |
464 | 494 | }) |
465 | 495 | |
496 | +//......................... 免费离场 | |
497 | + | |
498 | +$(document).on('click', '.out-btn', function () { | |
499 | + // var _this = $(this).parent().parent().parent(); | |
500 | + | |
501 | + var money = $(this).attr('data-money') | |
502 | + console.log(money) | |
503 | + var _orderId = $(this).attr('data-orderId') | |
504 | + | |
505 | + var carNumber = $(this).attr('data-carnumber') | |
506 | + //var parkCode = $(this).find('.parkCode').text() | |
507 | + // var orderId = _this.find('.orderId').text() | |
508 | + var parkCode = $(this).attr('data-parkcode') | |
509 | + // var carNumber = $(this).find('.carNumber').text() | |
510 | + | |
511 | + var paySrcType = '101' | |
512 | + | |
513 | + // if(paySrcType == ''){ | |
514 | + // paySrcType = 103 | |
515 | + // }else{ | |
516 | + // paySrcType = 101 | |
517 | + // } | |
518 | + // alert(paySrcType) | |
519 | + console.log(paySrcType) | |
520 | + localStorage.setItem('paySrcType', paySrcType) | |
521 | + localStorage.setItem('parkCode', parkCode) | |
522 | + $('.dialog-out').show() | |
523 | + var salt = jsajax.salt(32); | |
524 | + var token = mUrl.GetToken(); | |
525 | + if (token == null) { | |
526 | + token = ''; | |
527 | + } | |
528 | + var jsondata = { | |
529 | + app_id: "0eca8f5373ca4866aec2f8e9d9367104", | |
530 | + deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", | |
531 | + salt: salt, | |
532 | + sign: getMd5sign(), | |
533 | + sign_type: "md5", | |
534 | + //token : token, | |
535 | + | |
536 | + //appId:jsajax.appID, | |
537 | + orderId: _orderId, | |
538 | + payOrderType: '101', | |
539 | + terminalSource: '1', | |
540 | + //parkCode:parkCode, | |
541 | + // carNumber:carNumber, | |
542 | + | |
543 | + } | |
544 | + jsajax.defaultReq( | |
545 | + cepath + '/appAccountPay/appApplyParkOut', | |
546 | + JSON.stringify(jsondata), | |
547 | + function (data) { | |
548 | + console.log(data) | |
549 | + | |
550 | + if (data.code == '5005') { | |
551 | + getOneorder(carNumber, parkCode, _orderId) | |
552 | + | |
553 | + } else { | |
554 | + $('.dialog-out').show() | |
555 | + // window.location.href = 'zeroout.html' | |
556 | + } | |
557 | + // alert(data.message) | |
558 | + | |
559 | + }) | |
560 | + | |
561 | +}) | |
562 | + | |
563 | +$('.close-btn').on('click',function () { | |
564 | + $('.dialog-out').hide() | |
565 | +}) | |
566 | + | |
567 | +function getMd5sign() | |
568 | +{ | |
569 | + var salt = jsajax.salt(32); | |
570 | + var token = mUrl.GetToken(); | |
571 | + if (token == null) { | |
572 | + token = ''; | |
573 | + } | |
574 | + var sortd = [ | |
575 | + {keyname:'app_id',value:'0eca8f5373ca4866aec2f8e9d9367104'}, | |
576 | + {keyname:'deviceInfo',value:'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E'}, | |
577 | + {keyname:'salt',value:salt}, | |
578 | + {keyname:'sign_type',value:'md5'}, | |
579 | + {keyname:'token',value:token} | |
580 | + ]; | |
581 | + var md5sign = jsajax.getsign(sortd); | |
582 | + return md5sign; | |
583 | + | |
584 | +} | |
585 | + | |
586 | + | |
587 | + | |
466 | 588 | |
467 | 589 | ... | ... |
list.html
listnew.html
monPay.html
... | ... | @@ -112,10 +112,10 @@ |
112 | 112 | |
113 | 113 | <script src="js/jquery-3.2.1.min.js"></script> |
114 | 114 | <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script> |
115 | -<script src="js/config.js?a=123"></script> | |
115 | +<script src="js/config.js?a=1213"></script> | |
116 | 116 | <script src="js/common.js?f=3.51"></script> |
117 | 117 | <!--<script src="js/jweixin-1.0.0.js?v=0.1"></script>--> |
118 | -<script src="js/monPay.js?b=551.5120"></script> | |
118 | +<script src="js/monPay.js?b=0.1"></script> | |
119 | 119 | </body> |
120 | 120 | |
121 | 121 | </html> | ... | ... |
out.html
... | ... | @@ -154,7 +154,7 @@ |
154 | 154 | <input type="tel" id="inputPhoneNum" value="" onkeydown="inputDown();" placeholder="请输入手机号码" maxlength="14" onpaste="return false" style="display:block;" /> |
155 | 155 | </div> |
156 | 156 | <div id="carNumBox" style="display:block;" class="flexBoxRow"> |
157 | - <input class="input_province" type="text" readonly="readonly" maxlength="1" id="selProvince" onclick="provinceSelect();" value="鄂"> | |
157 | + <input class="input_province" type="text" readonly="readonly" maxlength="1" id="selProvince" onclick="provinceSelect();" value="蒙"> | |
158 | 158 | <span class="splitLine2"> |</span> |
159 | 159 | <input type="text" maxlength="10" name="inputCarNum" id="inputCarNum" /> |
160 | 160 | </div> | ... | ... |
paybacknew.html
... | ... | @@ -21,7 +21,115 @@ |
21 | 21 | <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css"> |
22 | 22 | <link rel="stylesheet" href="css/reset.css"> |
23 | 23 | <link rel="stylesheet" href="css/paybacknew.css"> |
24 | - | |
24 | + <style> | |
25 | + .all_told, .platen_number { | |
26 | + text-align: center; | |
27 | + } | |
28 | + .all_told { | |
29 | + padding: 30px 0 10px 0; | |
30 | + } | |
31 | + .all_told span { | |
32 | + margin-right: 5px; | |
33 | + font-size: 22px; | |
34 | + } | |
35 | + .discount_money { | |
36 | + color: #fc3817; | |
37 | + } | |
38 | + .discount { | |
39 | + padding: 4px 7px; | |
40 | + background: #fc3817; | |
41 | + border-radius: 2px; | |
42 | + position: relative; | |
43 | + margin-left: 10px; | |
44 | + color: #fff; | |
45 | + } | |
46 | + .discount:before { | |
47 | + position: absolute; | |
48 | + content: ''; | |
49 | + width: 0; | |
50 | + height: 0; | |
51 | + left: -6px; | |
52 | + top: 8px; | |
53 | + border-top: 6px solid transparent; | |
54 | + border-bottom: 6px solid transparent; | |
55 | + border-right: 6px solid #fc3817; | |
56 | + } | |
57 | + .youhuid{ | |
58 | + background: #f00; | |
59 | + color: #fff; | |
60 | + font-size: 13px; | |
61 | + padding:2px 5px; | |
62 | + border-radius: 3px; | |
63 | + margin-left: 2px; | |
64 | + display: none; | |
65 | + } | |
66 | + .showTooltips{ | |
67 | + display: none; | |
68 | + /*针对苹果新增手势*/ | |
69 | + cursor: pointer; | |
70 | + } | |
71 | + .weui-cells{ | |
72 | + /*针对苹果新增手势*/ | |
73 | + cursor: pointer; | |
74 | + } | |
75 | + .dialog-out{ | |
76 | + position: absolute; | |
77 | + width: 100%; | |
78 | + height: 100%; | |
79 | + top:0; | |
80 | + right: 0; | |
81 | + left: 0; | |
82 | + bottom: 0; | |
83 | + z-index: 1000; | |
84 | + background: rgba(0,0,0,.3); | |
85 | + display: none; | |
86 | + } | |
87 | + .dia-con{ | |
88 | + width: 305px; | |
89 | + height: 138px; | |
90 | + padding: 10px ; | |
91 | + background:rgba(255,255,255,1); | |
92 | + border-radius:8px; | |
93 | + position: absolute; | |
94 | + left: 50%; | |
95 | + top:50%; | |
96 | + transform: translate(-50%,-50%); | |
97 | + } | |
98 | + .close-btn{ | |
99 | + float: right; | |
100 | + width: 16px; | |
101 | + height: 16px; | |
102 | + background: url("img/close.png") no-repeat; | |
103 | + background-size: 100% 100%; | |
104 | + cursor: pointer; | |
105 | + overflow: hidden; | |
106 | + } | |
107 | + .dia-main{ | |
108 | + margin-left: 30px; | |
109 | + margin-top: 30px; | |
110 | + height: 52px; | |
111 | + padding-left: 90px; | |
112 | + background: url("img/out.png") no-repeat; | |
113 | + background-size: 52px 52px; | |
114 | + } | |
115 | + .dia-text{ | |
116 | + padding-top: 20px; | |
117 | + text-align: center; | |
118 | + font-size: 12px; | |
119 | + color: #999; | |
120 | + } | |
121 | + .arrears-btn{ | |
122 | + width: 70px; | |
123 | + height: 25px; | |
124 | + margin-top: 20px; | |
125 | + color: #FFF; | |
126 | + font-size: 12px; | |
127 | + text-align: center; | |
128 | + line-height: 25px; | |
129 | + background: url("img/arrears-bg.png") no-repeat; | |
130 | + background-size:70px 25px ; | |
131 | + } | |
132 | + </style> | |
25 | 133 | |
26 | 134 | </head> |
27 | 135 | <body ontouchstart=""> |
... | ... | @@ -90,7 +198,17 @@ |
90 | 198 | |
91 | 199 | |
92 | 200 | |
93 | - | |
201 | +<div class="dialog-out"> | |
202 | + <div class="dia-con"> | |
203 | + <div class="close-btn"></div> | |
204 | + <div class="layui-clear"></div> | |
205 | + <div class="dia-main"> | |
206 | + <p>您已经成功申请离场</p> | |
207 | + <p>期待您的再次光临</p> | |
208 | + </div> | |
209 | + <div class="dia-text">温馨提示:请尽快出场,超过时间将重新计费哦!</div> | |
210 | + </div> | |
211 | +</div> | |
94 | 212 | |
95 | 213 | <script src="js/jquery-3.2.1.min.js"></script> |
96 | 214 | <script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script> |
... | ... | @@ -98,8 +216,8 @@ |
98 | 216 | |
99 | 217 | <script src="js/md5.min.js"></script> |
100 | 218 | |
101 | -<script src="js/url.js?a=123"></script> | |
102 | -<script src="js/ajax.js?a=123"></script> | |
219 | +<script src="js/url.js?a=1213"></script> | |
220 | +<script src="js/ajax.js?a=1213"></script> | |
103 | 221 | <script type="text/javascript"> |
104 | 222 | //微信浏览器中,aler弹框不显示域名 |
105 | 223 | (function(){ |
... | ... | @@ -118,6 +236,6 @@ |
118 | 236 | } |
119 | 237 | })(); |
120 | 238 | </script> |
121 | -<script src="js/paybacknew.js?a=4.01"></script> | |
239 | +<script src="js/paybacknew.js?a=4.1101"></script> | |
122 | 240 | </body> |
123 | 241 | </html> | ... | ... |