Commit 0c5184f35d936328d75355b1d0155d880b3c162c
1 parent
868dbcd3
提交金额修改
Showing
6 changed files
with
169 additions
and
163 deletions
src/main/java/com/rnt/controller/WeixinPayController.java
... | ... | @@ -225,7 +225,7 @@ public class WeixinPayController extends Controller { |
225 | 225 | //到期时间字符串 |
226 | 226 | setAttr("expDateStr", DateUtil.format(cardCoupons.getExpDate(), "yyyy-MM-dd")); |
227 | 227 | //单价 |
228 | - setAttr("cardPrice", cardCoupons.getCardPrice()); | |
228 | + setAttr("cardPrice", cardCoupons.getCardPrice()!=null?cardCoupons.getCardPrice().divide(new BigDecimal("100")).toString():null); | |
229 | 229 | //停车场名称 |
230 | 230 | setAttr("parkName", parkName); |
231 | 231 | ... | ... |
src/main/webapp/WEB-INF/pages/card.html
... | ... | @@ -3,11 +3,11 @@ |
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <title>月卡年卡</title> |
6 | - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
7 | - <meta name="format-detection" content="telephone=no" /> | |
8 | - <meta name="format-detection" content="email=no" /> | |
9 | - <meta name="apple-mobile-web-app-status-bar-style" content="black" /> | |
10 | - <meta name="apple-mobile-web-app-capable" content="yes" /> | |
6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | |
7 | + <meta name="format-detection" content="telephone=no"/> | |
8 | + <meta name="format-detection" content="email=no"/> | |
9 | + <meta name="apple-mobile-web-app-status-bar-style" content="black"/> | |
10 | + <meta name="apple-mobile-web-app-capable" content="yes"/> | |
11 | 11 | <meta name="apple-mobile-web-app-title" content=""> |
12 | 12 | <meta name="google" value="notranslate"><!-- 禁止Chrome 浏览器中自动提示翻译 --> |
13 | 13 | <link rel="apple-touch-icon-precomposed" href="favicon.ico"> |
... | ... | @@ -19,172 +19,174 @@ |
19 | 19 | <link rel="stylesheet" href="${staticHost}/css/card.css?v=1.0"> |
20 | 20 | </head> |
21 | 21 | <body ontouchstart> |
22 | - <input type="hidden" id="pklNo" value="${pklNo!''}"/> | |
23 | - <div class="weui-panel__bd card-top"> | |
24 | - <div class="weui-media-box weui-media-box_text weui-media-box-border card-park"> | |
25 | - <h4 class="weui-media-box__title park-tit" id="parkLotName"></h4> | |
26 | - <p class="weui-media-box__desc park-desc" id="parkLotAddress"></p> | |
27 | - </div> | |
28 | - <div class="park-bg"></div> | |
22 | +<input type="hidden" id="pklNo" value="${pklNo!''}"/> | |
23 | +<div class="weui-panel__bd card-top"> | |
24 | + <div class="weui-media-box weui-media-box_text weui-media-box-border card-park"> | |
25 | + <h4 class="weui-media-box__title park-tit" id="parkLotName"></h4> | |
26 | + <p class="weui-media-box__desc park-desc" id="parkLotAddress"></p> | |
29 | 27 | </div> |
28 | + <div class="park-bg"></div> | |
29 | +</div> | |
30 | 30 | |
31 | - <div class="weui-panel weui-panel_access month-mar" id="addCardMonth" style="display: none;"> | |
32 | - <!-- <div class="weui-panel__hd month-chtit">包月优惠</div> | |
33 | - <div class="weui-panel__bd"> | |
34 | - <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg mon-vip"> | |
35 | - <div class="weui-media-box__hd monthcard-bg"> | |
36 | - <img class="weui-media-box__thumb" src="${staticHost}/img/monthcard.png"> | |
37 | - </div> | |
38 | - <div class="weui-media-box__bd car-font"> | |
39 | - <h4 class="weui-media-box__title">蓝牌小车包月卡</h4> | |
40 | - <p class="weui-media-box__desc">单价:<span class="fontcol">¥90</span></p> | |
41 | - </div> | |
42 | - <div class="weui-cell__ft"> | |
43 | - </div> | |
44 | - </a> | |
45 | - <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg mon-vip"> | |
46 | - <div class="weui-media-box__hd monthcard-bg"> | |
47 | - <img class="weui-media-box__thumb" src="${staticHost}/img/monthcard.png"> | |
48 | - </div> | |
49 | - <div class="weui-media-box__bd car-font"> | |
50 | - <h4 class="weui-media-box__title">黄牌大车包月卡</h4> | |
51 | - <p class="weui-media-box__desc">单价:<span class="fontcol">¥180</span></p> | |
52 | - </div> | |
53 | - <div class="weui-cell__ft"> | |
54 | - </div> | |
55 | - </a> | |
56 | - </div>--> | |
57 | - </div> | |
31 | +<div class="weui-panel weui-panel_access month-mar" id="addCardMonth" style="display: none;"> | |
32 | + <!-- <div class="weui-panel__hd month-chtit">包月优惠</div> | |
33 | + <div class="weui-panel__bd"> | |
34 | + <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg mon-vip"> | |
35 | + <div class="weui-media-box__hd monthcard-bg"> | |
36 | + <img class="weui-media-box__thumb" src="${staticHost}/img/monthcard.png"> | |
37 | + </div> | |
38 | + <div class="weui-media-box__bd car-font"> | |
39 | + <h4 class="weui-media-box__title">蓝牌小车包月卡</h4> | |
40 | + <p class="weui-media-box__desc">单价:<span class="fontcol">¥90</span></p> | |
41 | + </div> | |
42 | + <div class="weui-cell__ft"> | |
43 | + </div> | |
44 | + </a> | |
45 | + <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg mon-vip"> | |
46 | + <div class="weui-media-box__hd monthcard-bg"> | |
47 | + <img class="weui-media-box__thumb" src="${staticHost}/img/monthcard.png"> | |
48 | + </div> | |
49 | + <div class="weui-media-box__bd car-font"> | |
50 | + <h4 class="weui-media-box__title">黄牌大车包月卡</h4> | |
51 | + <p class="weui-media-box__desc">单价:<span class="fontcol">¥180</span></p> | |
52 | + </div> | |
53 | + <div class="weui-cell__ft"> | |
54 | + </div> | |
55 | + </a> | |
56 | + </div>--> | |
57 | +</div> | |
58 | 58 | |
59 | - <div class="weui-panel weui-panel_access" id="addCardYear" style="display: none;"> | |
60 | - <!-- <div class="weui-panel__hd year-chtit">包年优惠</div> | |
61 | - <div class="weui-panel__bd"> | |
62 | - <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg year-vip"> | |
63 | - <div class="weui-media-box__hd yearcard-bg"> | |
64 | - <img class="weui-media-box__thumb" src="${staticHost}/img/yearcard.png"> | |
65 | - </div> | |
66 | - <div class="weui-media-box__bd car-font"> | |
67 | - <h4 class="weui-media-box__title">蓝牌小车包年卡</h4> | |
68 | - <p class="weui-media-box__desc">单价:<span class="fontcol">¥90</span></p> | |
69 | - </div> | |
70 | - <div class="weui-cell__ft"> | |
71 | - </div> | |
72 | - </a> | |
73 | - <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg year-vip"> | |
74 | - <div class="weui-media-box__hd yearcard-bg"> | |
75 | - <img class="weui-media-box__thumb" src="${staticHost}/img/yearcard.png"> | |
76 | - </div> | |
77 | - <div class="weui-media-box__bd car-font"> | |
78 | - <h4 class="weui-media-box__title">黄牌大车包年卡</h4> | |
79 | - <p class="weui-media-box__desc">单价:<span class="fontcol">¥180</span></p> | |
80 | - </div> | |
81 | - <div class="weui-cell__ft"> | |
82 | - </div> | |
83 | - </a> --> | |
84 | - </div> | |
85 | - </div> | |
59 | +<div class="weui-panel weui-panel_access" id="addCardYear" style="display: none;"> | |
60 | + <!-- <div class="weui-panel__hd year-chtit">包年优惠</div> | |
61 | + <div class="weui-panel__bd"> | |
62 | + <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg year-vip"> | |
63 | + <div class="weui-media-box__hd yearcard-bg"> | |
64 | + <img class="weui-media-box__thumb" src="${staticHost}/img/yearcard.png"> | |
65 | + </div> | |
66 | + <div class="weui-media-box__bd car-font"> | |
67 | + <h4 class="weui-media-box__title">蓝牌小车包年卡</h4> | |
68 | + <p class="weui-media-box__desc">单价:<span class="fontcol">¥90</span></p> | |
69 | + </div> | |
70 | + <div class="weui-cell__ft"> | |
71 | + </div> | |
72 | + </a> | |
73 | + <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg year-vip"> | |
74 | + <div class="weui-media-box__hd yearcard-bg"> | |
75 | + <img class="weui-media-box__thumb" src="${staticHost}/img/yearcard.png"> | |
76 | + </div> | |
77 | + <div class="weui-media-box__bd car-font"> | |
78 | + <h4 class="weui-media-box__title">黄牌大车包年卡</h4> | |
79 | + <p class="weui-media-box__desc">单价:<span class="fontcol">¥180</span></p> | |
80 | + </div> | |
81 | + <div class="weui-cell__ft"> | |
82 | + </div> | |
83 | + </a> --> | |
84 | +</div> | |
85 | +</div> | |
86 | 86 | <script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script> |
87 | 87 | <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script> |
88 | 88 | <script src="${staticHost}/js/jsutil.js"></script> |
89 | 89 | <script src="${staticHost}/js/url.js"></script> |
90 | 90 | <script type="text/javascript"> |
91 | 91 | |
92 | - var func ={ | |
93 | - //1.查询停车场月卡年卡信息 | |
94 | - queryParkLotCard:function(){ | |
95 | - var pklNo = $('#pklNo').val(); | |
96 | - var jsonInfo ={}; | |
97 | - jsonInfo.pklNo = pklNo; | |
98 | - jsutil.defaultReq( | |
99 | - mUrl.queryParkLotCard, | |
100 | - jsonInfo, | |
101 | - function(data){ | |
102 | - if("8888" ==data.code){ | |
103 | - var parkLot = data.data; | |
104 | - $('#parkLotName').text(parkLot.parkName); | |
105 | - $('#parkLotAddress').text(parkLot.address); | |
106 | - //2.添加包年包月信息 | |
107 | - var str =""; | |
108 | - var strYear =""; | |
109 | - str +=' <div class="weui-panel__hd month-chtit">包月优惠</div>'; | |
110 | - str +='<div class="weui-panel__bd">'; | |
92 | + var func = { | |
93 | + //1.查询停车场月卡年卡信息 | |
94 | + queryParkLotCard: function () { | |
95 | + var pklNo = $('#pklNo').val(); | |
96 | + var jsonInfo = {}; | |
97 | + jsonInfo.pklNo = pklNo; | |
98 | + jsutil.defaultReq( | |
99 | + mUrl.queryParkLotCard, | |
100 | + jsonInfo, | |
101 | + function (data) { | |
102 | + if ("8888" == data.code) { | |
103 | + var parkLot = data.data; | |
104 | + $('#parkLotName').text(parkLot.parkName); | |
105 | + $('#parkLotAddress').text(parkLot.address); | |
106 | + //2.添加包年包月信息 | |
107 | + var str = ""; | |
108 | + var strYear = ""; | |
109 | + str += ' <div class="weui-panel__hd month-chtit">包月优惠</div>'; | |
110 | + str += '<div class="weui-panel__bd">'; | |
111 | 111 | |
112 | - strYear +='<div class="weui-panel__hd year-chtit">包年优惠</div>'; | |
113 | - str +='<div class="weui-panel__bd">'; | |
114 | - $.each(parkLot.parkCardCouponsList,function(i,n){ | |
115 | - if("22"==n.goods_type || "23"==n.goods_type ){//月卡 | |
116 | - $('#addCardMonth').show(); | |
117 | - if("23"==n.goods_type){//小型月卡 | |
118 | - str +='<a href="javascript:void(0);" id="monthCardMin" class="weui-media-box weui-media-box_appmsg mon-vip" data-value="'+n.id+'">'; | |
119 | - }else{ | |
120 | - str +='<a href="javascript:void(0);" id="monthCardMax" class="weui-media-box weui-media-box_appmsg mon-vip" data-value="'+n.id+'">'; | |
121 | - } | |
112 | + strYear += '<div class="weui-panel__hd year-chtit">包年优惠</div>'; | |
113 | + str += '<div class="weui-panel__bd">'; | |
114 | + $.each(parkLot.parkCardCouponsList, function (i, n) { | |
115 | + if ("22" == n.goods_type || "23" == n.goods_type) {//月卡 | |
116 | + $('#addCardMonth').show(); | |
117 | + if ("23" == n.goods_type) {//小型月卡 | |
118 | + str += '<a href="javascript:void(0);" id="monthCardMin" class="weui-media-box weui-media-box_appmsg mon-vip" data-value="' + n.id + '">'; | |
119 | + } else { | |
120 | + str += '<a href="javascript:void(0);" id="monthCardMax" class="weui-media-box weui-media-box_appmsg mon-vip" data-value="' + n.id + '">'; | |
121 | + } | |
122 | 122 | |
123 | - str +='<div class="weui-media-box__hd monthcard-bg">'; | |
124 | - str +='<img class="weui-media-box__thumb" src="${staticHost}/img/monthcard.png">'; | |
125 | - str +='</div>'; | |
126 | - str +='<div class="weui-media-box__bd car-font">'; | |
127 | - str +='<h4 class="weui-media-box__title">'+n.goods_type_remark+'</h4>'; | |
128 | - str +=' <p class="weui-media-box__desc">单价:<span class="fontcol">¥'+n.goods_amount+'</span></p>'; | |
129 | - str +='</div>'; | |
130 | - str +=' <div class="weui-cell__ft"></div>'; | |
131 | - str +='</a>'; | |
132 | - }else{ | |
133 | - $('#addCardYear').show(); | |
134 | - if("20"==n.goods_type){ | |
135 | - strYear +='<a href="javascript:void(0);" id="yearCardMin" class="weui-media-box weui-media-box_appmsg year-vip" data-value="'+n.id+'">'; | |
136 | - }else{ | |
137 | - strYear +='<a href="javascript:void(0);" id="yearCardMax" class="weui-media-box weui-media-box_appmsg year-vip" data-value="'+n.id+'">'; | |
138 | - } | |
123 | + str += '<div class="weui-media-box__hd monthcard-bg">'; | |
124 | + str += '<img class="weui-media-box__thumb" src="${staticHost}/img/monthcard.png">'; | |
125 | + str += '</div>'; | |
126 | + str += '<div class="weui-media-box__bd car-font">'; | |
127 | + str += '<h4 class="weui-media-box__title">' + n.goods_type_remark + '</h4>'; | |
128 | + //后台传过来的是分 ,转换为元 | |
129 | + str += ' <p class="weui-media-box__desc">单价:<span class="fontcol">¥' + n.goods_amount / 100 + '</span></p>'; | |
130 | + str += '</div>'; | |
131 | + str += ' <div class="weui-cell__ft"></div>'; | |
132 | + str += '</a>'; | |
133 | + } else { | |
134 | + $('#addCardYear').show(); | |
135 | + if ("20" == n.goods_type) { | |
136 | + strYear += '<a href="javascript:void(0);" id="yearCardMin" class="weui-media-box weui-media-box_appmsg year-vip" data-value="' + n.id + '">'; | |
137 | + } else { | |
138 | + strYear += '<a href="javascript:void(0);" id="yearCardMax" class="weui-media-box weui-media-box_appmsg year-vip" data-value="' + n.id + '">'; | |
139 | + } | |
139 | 140 | |
140 | - strYear +='<div class="weui-media-box__hd yearcard-bg">'; | |
141 | - strYear +=' <img class="weui-media-box__thumb" src="${staticHost}/img/yearcard.png">'; | |
142 | - strYear +='</div>'; | |
143 | - strYear +='<div class="weui-media-box__bd car-font">'; | |
144 | - strYear +='<h4 class="weui-media-box__title">'+n.goods_type_remark+'</h4>'; | |
145 | - strYear +='<p class="weui-media-box__desc">单价:<span class="fontcol">¥'+n.goods_amount+'</span></p>'; | |
146 | - strYear +='</div>'; | |
147 | - strYear +='<div class="weui-cell__ft"></div>'; | |
148 | - strYear +='</a>'; | |
141 | + strYear += '<div class="weui-media-box__hd yearcard-bg">'; | |
142 | + strYear += ' <img class="weui-media-box__thumb" src="${staticHost}/img/yearcard.png">'; | |
143 | + strYear += '</div>'; | |
144 | + strYear += '<div class="weui-media-box__bd car-font">'; | |
145 | + strYear += '<h4 class="weui-media-box__title">' + n.goods_type_remark + '</h4>'; | |
146 | + //后台传过来的是分 ,转换为元 | |
147 | + strYear += '<p class="weui-media-box__desc">单价:<span class="fontcol">¥' + n.goods_amount / 100 + '</span></p>'; | |
148 | + strYear += '</div>'; | |
149 | + strYear += '<div class="weui-cell__ft"></div>'; | |
150 | + strYear += '</a>'; | |
149 | 151 | |
150 | - } | |
151 | - }); | |
152 | - str +='</div>'; | |
153 | - strYear +='</div>'; | |
154 | - $('#addCardMonth').empty(); | |
155 | - $('#addCardMonth').html(str); | |
156 | - $('#addCardYear').empty(); | |
157 | - $('#addCardYear').html(strYear); | |
158 | - }else{ | |
159 | - $.alert("亲!系统繁忙,请重新操作!"); | |
160 | - return false; | |
161 | - } | |
162 | - } | |
163 | - ); | |
164 | - }, | |
165 | - //办理月卡 | |
166 | - monthCardBuy:function(){ | |
167 | - $(document).on('click','#monthCardMin,#monthCardMax',function(){ | |
168 | - var id=$(this).attr('data-value'); | |
169 | - window.location.href=mUrl.monthOrderView+"&id="+id+"&data="+Math.random(); | |
152 | + } | |
153 | + }); | |
154 | + str += '</div>'; | |
155 | + strYear += '</div>'; | |
156 | + $('#addCardMonth').empty(); | |
157 | + $('#addCardMonth').html(str); | |
158 | + $('#addCardYear').empty(); | |
159 | + $('#addCardYear').html(strYear); | |
160 | + } else { | |
161 | + $.alert("亲!系统繁忙,请重新操作!"); | |
162 | + return false; | |
163 | + } | |
164 | + } | |
165 | + ); | |
166 | + }, | |
167 | + //办理月卡 | |
168 | + monthCardBuy: function () { | |
169 | + $(document).on('click', '#monthCardMin,#monthCardMax', function () { | |
170 | + var id = $(this).attr('data-value'); | |
171 | + window.location.href = mUrl.monthOrderView + "&id=" + id + "&data=" + Math.random(); | |
170 | 172 | |
171 | - }); | |
172 | - }, | |
173 | - //办理年卡 | |
174 | - yearCardBuy:function(){ | |
175 | - $(document).on('click','#yearCardMin,#yearCardMax',function(){ | |
176 | - var id=$(this).attr('data-value'); | |
177 | - window.location.href=mUrl.yearOrderView+"&id="+id+"&data="+Math.random(); | |
173 | + }); | |
174 | + }, | |
175 | + //办理年卡 | |
176 | + yearCardBuy: function () { | |
177 | + $(document).on('click', '#yearCardMin,#yearCardMax', function () { | |
178 | + var id = $(this).attr('data-value'); | |
179 | + window.location.href = mUrl.yearOrderView + "&id=" + id + "&data=" + Math.random(); | |
178 | 180 | |
179 | - }); | |
180 | - } | |
181 | - }; | |
182 | - $(function(){ | |
183 | - func.queryParkLotCard(); | |
184 | - func.monthCardBuy(); | |
185 | - func.yearCardBuy(); | |
181 | + }); | |
182 | + } | |
183 | + }; | |
184 | + $(function () { | |
185 | + func.queryParkLotCard(); | |
186 | + func.monthCardBuy(); | |
187 | + func.yearCardBuy(); | |
186 | 188 | |
187 | - }); | |
189 | + }); | |
188 | 190 | </script> |
189 | 191 | </body> |
190 | 192 | </html> | ... | ... |
src/main/webapp/WEB-INF/pages/monthpay.html
... | ... | @@ -101,9 +101,10 @@ |
101 | 101 | $('#parkLotName').text(parkLot.parkName); |
102 | 102 | $('#parkLotCode').val(parkLot.parkNo); |
103 | 103 | $('#cardTypeRemark').text(parkLot.parkCardCouponsList[0].goods_type_remark); |
104 | - $('#totle_money').text(parkLot.parkCardCouponsList[0].goods_amount); | |
104 | + $('#totle_money').text(parkLot.parkCardCouponsList[0].goods_amount/100); | |
105 | 105 | $('#parkLotCardId').val(parkLot.parkCardCouponsList[0].id); |
106 | - $('#cardAmount').val(parkLot.parkCardCouponsList[0].goods_amount); | |
106 | + //将分转为元 | |
107 | + $('#cardAmount').val(parkLot.parkCardCouponsList[0].goods_amount/100); | |
107 | 108 | } else { |
108 | 109 | $.alert("系统繁忙,请重新操作!"); |
109 | 110 | } | ... | ... |
src/main/webapp/WEB-INF/pages/pay.html
... | ... | @@ -159,8 +159,9 @@ |
159 | 159 | $('#buyNum').text(order.buyNum); |
160 | 160 | $('#startDate').text(order.startDate); |
161 | 161 | $('#endDate').text(order.endDate); |
162 | - $('#totalAmount').text(order.totleMoney); | |
163 | - totleMoney = order.totleMoney; | |
162 | + totleMoney = order.totleMoney/100; | |
163 | + $('#totalAmount').text('¥'+totleMoney); | |
164 | + | |
164 | 165 | $('#carTypeRemark').text(order.orderTypeRemark); |
165 | 166 | } |
166 | 167 | }); | ... | ... |
src/main/webapp/WEB-INF/pages/yearpay.html
... | ... | @@ -99,9 +99,10 @@ var func = { |
99 | 99 | $('#totle_money').empty(); |
100 | 100 | $('#parkLotName').text(parkLot.parkName); |
101 | 101 | $('#cardTypeRemark').text(parkLot.parkCardCouponsList[0].goods_type_remark); |
102 | - $('#totle_money').text(parkLot.parkCardCouponsList[0].goods_amount); | |
102 | + $('#totle_money').text(parkLot.parkCardCouponsList[0].goods_amount/100); | |
103 | 103 | $('#parkLotCardId').val(parkLot.parkCardCouponsList[0].id); |
104 | - $('#cardAmount').val(parkLot.parkCardCouponsList[0].goods_amount); | |
104 | + //将分转为元 | |
105 | + $('#cardAmount').val(parkLot.parkCardCouponsList[0].goods_amount/100); | |
105 | 106 | }else{ |
106 | 107 | $.alert("系统繁忙,请重新操作!"); |
107 | 108 | } | ... | ... |
src/main/webapp/static/js/srcjs/mylist.js
... | ... | @@ -51,7 +51,8 @@ |
51 | 51 | success: function(res){ |
52 | 52 | if(res.code == '8888'){ |
53 | 53 | var numStr = res.data.numStr; |
54 | - $("#cardNum").html('共'+numStr+'张'); | |
54 | + var num = res.data.num; | |
55 | + $("#cardNum").html('共'+num+'张'); | |
55 | 56 | }else{ |
56 | 57 | $.toptip('获取停车场卡卷数量失败,请重试!', 2000, 'error'); |
57 | 58 | } | ... | ... |