Blame view

src/main/webapp/WEB-INF/pages/check.html 8.44 KB
e80df919   atao   init
1
2
3
4
5
  <!DOCTYPE html>
  <html lang="en">
  <head>
      <meta charset="UTF-8">
      <title>查看账单</title>
6fc5291d   atao   提交代码
6
7
8
9
10
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
      <meta name="format-detection" content="telephone=no"/>
      <meta name="format-detection" content="email=no"/>
      <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
      <meta name="apple-mobile-web-app-capable" content="yes"/>
e80df919   atao   init
11
12
13
14
15
16
17
18
19
20
      <meta name="apple-mobile-web-app-title" content="">
      <meta name="google" value="notranslate"><!-- 禁止Chrome 浏览器中自动提示翻译 -->
      <link rel="apple-touch-icon-precomposed" href="favicon.ico">
      <link rel="shortcut icon" href="favicon.ico">
      <link rel="Bookmark" href="favicon.ico">
  
      <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
      <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
      <link rel="stylesheet" href="${staticHost}/css/reset.css">
      <style>
6fc5291d   atao   提交代码
21
          .all_told, .platen_number {
e80df919   atao   init
22
23
              text-align: center;
          }
6fc5291d   atao   提交代码
24
25
  
          .all_told {
e80df919   atao   init
26
27
              padding: 30px 0 10px 0;
          }
6fc5291d   atao   提交代码
28
29
  
          .all_told span {
e80df919   atao   init
30
31
32
              margin-right: 5px;
              font-size: 22px;
          }
6fc5291d   atao   提交代码
33
34
35
  
          .discount_money {
              color: #fc3817;
e80df919   atao   init
36
          }
6fc5291d   atao   提交代码
37
38
39
  
          .discount {
              padding: 4px 7px;
e80df919   atao   init
40
41
42
43
              background: #fc3817;
              border-radius: 2px;
              position: relative;
              margin-left: 10px;
6fc5291d   atao   提交代码
44
              color: #fff;
e80df919   atao   init
45
46
          }
  
6fc5291d   atao   提交代码
47
          .discount:before {
e80df919   atao   init
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
              position: absolute;
              content: '';
              width: 0;
              height: 0;
              left: -6px;
              top: 8px;
              border-top: 6px solid transparent;
              border-bottom: 6px solid transparent;
              border-right: 6px solid #fc3817;
          }
      </style>
  
  </head>
  
  <body ontouchstart="">
  
  
  <header class="demos-header">
81145463   王富生   更改车牌号支付流程
66
      <p class="all_told discount_money"><span id="orderNotPayFee">${orderVO.orderNotPayFee!''}</span></p>
e80df919   atao   init
67
68
69
70
71
      <p class="platen_number discount_money" style="font-weight:bold;" id="orderTitle">待付费用</p>
  </header>
  
  <div class="weui-cells weui-cells_form">
      <input type="hidden" id="carNumPre" value="${carNum!''}"/>
81145463   王富生   更改车牌号支付流程
72
      <input type="hidden" id="parkOrderId" value="${orderVO.orderId!''}"/>
e80df919   atao   init
73
74
      <div class="weui-cell">
          <div class="weui-cell__hd"><label for="" class="weui-label">当前车牌</label></div>
81145463   王富生   更改车牌号支付流程
75
          <div class="weui-cell__bd" id="carNumber">${orderVO.carNumber!''}
e900ab9b   atao   提交代码
76
  
e80df919   atao   init
77
78
79
80
81
          </div>
      </div>
  
      <div class="weui-cell">
          <div class="weui-cell__hd"><label for="" class="weui-label">停车位置</label></div>
81145463   王富生   更改车牌号支付流程
82
          <div class="weui-cell__bd" id="parkName">${orderVO.parkName!''}
e80df919   atao   init
83
84
85
86
          </div>
      </div>
      <div class="weui-cell">
          <div class="weui-cell__hd"><label for="" class="weui-label">进场时间</label></div>
81145463   王富生   更改车牌号支付流程
87
          <div class="weui-cell__bd" id="parkInTime">${orderVO.parkInTime!''}
e80df919   atao   init
88
89
90
91
          </div>
      </div>
      <div class="weui-cell">
          <div class="weui-cell__hd"><label for="" class="weui-label">停车时长</label></div>
81145463   王富生   更改车牌号支付流程
92
          <div class="weui-cell__bd" id="parkingDuration">${orderVO.parkingDuration!''}
e80df919   atao   init
93
94
95
96
97
98
99
100
101
          </div>
      </div>
  
  </div>
  
  <div class="weui-cells weui-cells_form" id="parkOutTime">
      <div class="weui-cell">
          <div class="weui-cell__hd"><label for="" class="weui-label">总计费用</label></div>
          <div class="weui-cell__bd">
81145463   王富生   更改车牌号支付流程
102
              ¥<span id="orderTotalFee">${orderVO.orderTotalFee!''}</span>
e80df919   atao   init
103
104
105
106
107
108
          </div>
      </div>
  
      <div class="weui-cell">
          <div class="weui-cell__hd"><label for="" class="weui-label">已付费用</label></div>
          <div class="weui-cell__bd">
81145463   王富生   更改车牌号支付流程
109
              ¥<span id="orderPayedFee">${orderVO.orderPayedFee!''}</span>
e80df919   atao   init
110
111
112
113
114
115
116
117
118
119
120
          </div>
      </div>
      <!--  <div class="weui-cell">
          <div class="weui-cell__hd"><label for="" class="weui-label">优惠费用</label></div>
          <div class="weui-cell__bd discount_money">
  <span>2.40</span><span class="discount">8折优惠</span>
          </div>
      </div>-->
  </div>
  
  
e80df919   atao   init
121
  <div class="pay-content-padded">
6fc5291d   atao   提交代码
122
      <a class="weui-btn weui-btn_primary " href="javascript:" id="showTooltips">确定支付</a>
e80df919   atao   init
123
124
125
126
127
128
129
130
  </div>
  
  
  <script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
  <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
  <script src="${staticHost}/js/jsutil.js"></script>
  <script src="${staticHost}/js/url.js"></script>
  <script type="text/javascript">
81145463   王富生   更改车牌号支付流程
131
132
133
134
135
136
     $(function(){
  	   var orderNotPayFee = $('#orderNotPayFee').text();
     	   if("0" ==orderNotPayFee || null == orderNotPayFee || "" == orderNotPayFee){
     		$('#showTooltips').attr('class', 'weui-btn weui-btn_primary weui-btn_disabled');
     	}
     });
6fc5291d   atao   提交代码
137
138
      var flg = true;
      $("#showTooltips").click(function () {
81145463   王富生   更改车牌号支付流程
139
140
141
142
143
144
145
146
147
      	var orderNotPayFee = $('#orderNotPayFee').text();
     	   if("0" ==orderNotPayFee || null == orderNotPayFee || "" == orderNotPayFee){
     		 $('#showTooltips').attr('class', 'weui-btn weui-btn_primary weui-btn_disabled');
     		 flg = false;
     		 return false;
     	   }else{
     		 $('#showTooltips').attr('class', 'weui-btn weui-btn_primary');
           flg = true;
     	   }
6fc5291d   atao   提交代码
148
149
150
          if (flg) {
              flg = false;
              $('#showTooltips').attr('class', 'weui-btn weui-btn_primary weui-btn_disabled');
81145463   王富生   更改车牌号支付流程
151
            //判断待付费用为0不能发起支付
6fc5291d   atao   提交代码
152
              var parkOrderId = $('#parkOrderId').val();
6fc5291d   atao   提交代码
153
154
155
156
157
158
159
              if (parkOrderId.length < 1) {
                  $.toptip("订单Id为空", 2000, "error");
                  $('#showTooltips').attr('class', 'weui-btn weui-btn_primary');
                  flg = true;
                  return false;
              }
              var req = {
e5b4babd   王富生   提交
160
                  orderId: parkOrderId
6fc5291d   atao   提交代码
161
              }
81145463   王富生   更改车牌号支付流程
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
              
              jsutil.defaultReq(
                 mUrl.queryParkOrderForNotPay,
                 {"orderId":parkOrderId},
                 function(data){
              	   if(data != null && "8888" !=data.code){
  			    		 $.alert("亲!支付失败,请重试!");
  			    		 return false;
  				   }else{
  					   $.ajax({
  	                       url: mUrl.getJSPayParam,
  	                       type: 'post',
  	                       dataType: 'json',
  	                       data: req,
  	                       success: function (res) {
  	                           if (res.code == '8888') {
  	                               var payParam = res.data;
  	                               //调用微信支付
  	                               callpay(payParam);
  	                           } else {
  	                               $.toptip(res.msg, 2000, "error");
  	                               console.log('详细错误信息为:' + res.data);
  	                           }
  	                       }
  	                   });
  				   }//else
              	   
                 }
              
              );
              
  
              
6fc5291d   atao   提交代码
195
196
197
198
199
200
201
          }//if
      });
  
      //调用微信JS api 支付
      function jsApiCall(payParam) {
          WeixinJSBridge.invoke(
              'getBrandWCPayRequest',
e5b4babd   王富生   提交
202
              JSON.parse(payParam),
6fc5291d   atao   提交代码
203
204
              function (res) {
                  if (res.err_msg == "get_brand_wcpay_request:ok") {
e5b4babd   王富生   提交
205
                      //$.alert("亲!支付成功!");
6fc5291d   atao   提交代码
206
                      //支付成功
bc095293   atao   提交代码
207
208
  
                      passHandrail();
e5b4babd   王富生   提交
209
                      window.location.href = mUrl.paySuccessView + '&payMoney=' + totleMoney;
6fc5291d   atao   提交代码
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
  
                  } else {
                      //支付失败
                      $.alert("亲!支付失败!err_msg=" + res.err_msg);
                      //windows.location.href='${host}/pay/payFail';
  
                  }
  
  
              }
          );
      }
  
      function callpay(payParam) {
          if (typeof WeixinJSBridge == "undefined") {
              if (document.addEventListener) {
                  document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
              } else if (document.attachEvent) {
                  document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                  document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
              }
          } else {
              jsApiCall(payParam);
          }
      }
bc095293   atao   提交代码
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
  
  
      //支付成功后,调用此函数通知抬杆
      function passHandrail() {
          var orderId = $('#parkOrderId').val();
          var req = {
              orderId: orderId
          }
  
          $.ajax({
              url: mUrl.passHandrail,
              type: 'post',
              dataType: 'json',
              data: req,
              success: function (res) {
                  console.log(res);
              }
          })
  
      }
e80df919   atao   init
255
256
257
  </script>
  </body>
  </html>