Commit 7ddbff4d6ee25b04be574cc073f9192c50f80f3f
1 parent
afb48777
本次停车费用 出场
Showing
3 changed files
with
65 additions
and
27 deletions
src/api/parkRecord/parkRecord.js
@@ -15,3 +15,13 @@ export function historyQuery(params) { | @@ -15,3 +15,13 @@ export function historyQuery(params) { | ||
15 | data: params | 15 | data: params |
16 | }) | 16 | }) |
17 | } | 17 | } |
18 | + | ||
19 | +export function parkingQuery(params) { | ||
20 | + return request({ | ||
21 | + url: '/api/queryParkOrder/billQuery', | ||
22 | + method: 'post', | ||
23 | + data: params | ||
24 | + }) | ||
25 | +} | ||
26 | + | ||
27 | + |
src/components/orderPay.vue
@@ -25,13 +25,15 @@ | @@ -25,13 +25,15 @@ | ||
25 | <div class="toPay" @click="toPay">{{clientBrowser}}支付</div> | 25 | <div class="toPay" @click="toPay">{{clientBrowser}}支付</div> |
26 | </div> | 26 | </div> |
27 | 27 | ||
28 | - <p class="tip"> | ||
29 | - 温馨提示: | ||
30 | - </p> | ||
31 | - <p style="color: #666;padding: 0 18px;"> | ||
32 | - 请在支付完成后15分钟内出场,如超出15分钟,会 | ||
33 | - 产生相应费用。 | ||
34 | - </p> | 28 | + <div v-if="appOrderTimeout.length>0"> |
29 | + <p class="tip"> | ||
30 | + 温馨提示: | ||
31 | + </p> | ||
32 | + <p style="color: #666;padding: 0 18px;"> | ||
33 | + {{appOrderTimeout}} | ||
34 | + </p> | ||
35 | + </div> | ||
36 | + | ||
35 | 37 | ||
36 | 38 | ||
37 | </div> | 39 | </div> |
@@ -53,6 +55,7 @@ export default { | @@ -53,6 +55,7 @@ export default { | ||
53 | paySrcType: '', //支付的类型 101 是本次 103是历史欠费 | 55 | paySrcType: '', //支付的类型 101 是本次 103是历史欠费 |
54 | orderId: '', //支付的订单 | 56 | orderId: '', //支付的订单 |
55 | webAppCode: '', // 微信code | 57 | webAppCode: '', // 微信code |
58 | + appOrderTimeout: '', // 超时描述 | ||
56 | } | 59 | } |
57 | }, | 60 | }, |
58 | created() { | 61 | created() { |
@@ -64,7 +67,7 @@ export default { | @@ -64,7 +67,7 @@ export default { | ||
64 | this.clientBrowser = this.$utils.clientBrowser() //支付方式 | 67 | this.clientBrowser = this.$utils.clientBrowser() //支付方式 |
65 | this.paySrcType = this.$route.query.paySrcType // 实收 | 68 | this.paySrcType = this.$route.query.paySrcType // 实收 |
66 | this.orderId = this.$route.query.ordeID | 69 | this.orderId = this.$route.query.ordeID |
67 | - | 70 | + this.appOrderTimeout = this.$route.query.appOrderTimeout |
68 | if (this.clientBrowser == "微信") { | 71 | if (this.clientBrowser == "微信") { |
69 | this.webAppCode = this.getCode(); | 72 | this.webAppCode = this.getCode(); |
70 | } | 73 | } |
src/components/parkRecord.vue
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <div v-show="currentTabActive==0"> | 15 | <div v-show="currentTabActive==0"> |
16 | 16 | ||
17 | <div v-if="parkingData.length>0"> | 17 | <div v-if="parkingData.length>0"> |
18 | - <p class="free-tip">您为会员卡车辆无需缴费,请直接离场。</p> | 18 | + <p class="free-tip" v-if="parkingData[0].parkDuration<=1800">停车30分钟内无需缴费,请直接离场。</p> |
19 | 19 | ||
20 | <div class="cost-main" v-for="i in parkingData"> | 20 | <div class="cost-main" v-for="i in parkingData"> |
21 | <ul class="cost-header"> | 21 | <ul class="cost-header"> |
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> | 34 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> |
35 | <div class="out-wrap"> | 35 | <div class="out-wrap"> |
36 | <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> | 36 | <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> |
37 | - <p class="out-btn">出场缴费</p> | 37 | + <p class="out-btn" @click="toPayCurrent(i)">出场缴费</p> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | <p class="check-btn" :class="{isAllChecked:allChecked}" | 94 | <p class="check-btn" :class="{isAllChecked:allChecked}" |
95 | @click="checkedAll" | 95 | @click="checkedAll" |
96 | >全选</p> | 96 | >全选</p> |
97 | - <p class="settle-btn" @click="toPayPage">清缴欠费</p> | 97 | + <p class="settle-btn" @click="toPayHisroryPage">清缴欠费</p> |
98 | </div> | 98 | </div> |
99 | </div> | 99 | </div> |
100 | </div> | 100 | </div> |
@@ -124,7 +124,7 @@ | @@ -124,7 +124,7 @@ | ||
124 | </template> | 124 | </template> |
125 | 125 | ||
126 | <script> | 126 | <script> |
127 | -import { parkRecordList, historyQuery } from '@/api/parkRecord/parkRecord.js' | 127 | +import { parkRecordList, historyQuery, parkingQuery } from '@/api/parkRecord/parkRecord.js' |
128 | import axios from 'axios' | 128 | import axios from 'axios' |
129 | 129 | ||
130 | export default { | 130 | export default { |
@@ -142,7 +142,6 @@ export default { | @@ -142,7 +142,6 @@ export default { | ||
142 | parkList: [], // 停车记录数据 | 142 | parkList: [], // 停车记录数据 |
143 | historyList:[ // 历史欠费数据 | 143 | historyList:[ // 历史欠费数据 |
144 | {money:100,checked:false, id: 1}, | 144 | {money:100,checked:false, id: 1}, |
145 | - | ||
146 | ] , | 145 | ] , |
147 | allChecked:false, // 全部选择事件 | 146 | allChecked:false, // 全部选择事件 |
148 | allMoney:0, // 欠费所有的费用 | 147 | allMoney:0, // 欠费所有的费用 |
@@ -156,14 +155,12 @@ export default { | @@ -156,14 +155,12 @@ export default { | ||
156 | created() { | 155 | created() { |
157 | this.carNumber = this.$route.query.carNumber // 获取车牌号 | 156 | this.carNumber = this.$route.query.carNumber // 获取车牌号 |
158 | this.carColor = this.$route.query.carNumberColor // 获取颜色 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色 | 157 | this.carColor = this.$route.query.carNumberColor // 获取颜色 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色 |
159 | - | ||
160 | console.log(this.carNumber) | 158 | console.log(this.carNumber) |
161 | this.parkRecordList(this.carNumber) | 159 | this.parkRecordList(this.carNumber) |
162 | }, | 160 | }, |
163 | methods: { | 161 | methods: { |
164 | - parkRecordList(){ | 162 | + parkRecordList(){ // 获取停车记录数据 |
165 | var salt = this.$utils.myCommonSalt(32); | 163 | var salt = this.$utils.myCommonSalt(32); |
166 | - | ||
167 | var jsondata = { | 164 | var jsondata = { |
168 | app_id: this.$utils.myVarAppid, | 165 | app_id: this.$utils.myVarAppid, |
169 | deviceInfo: this.$utils.myDeviceInfo, | 166 | deviceInfo: this.$utils.myDeviceInfo, |
@@ -179,8 +176,6 @@ export default { | @@ -179,8 +176,6 @@ export default { | ||
179 | } | 176 | } |
180 | jsondata.sign = this.$utils.signObject(jsondata) | 177 | jsondata.sign = this.$utils.signObject(jsondata) |
181 | 178 | ||
182 | - | ||
183 | - | ||
184 | // jsondata.sign = md5sign | 179 | // jsondata.sign = md5sign |
185 | console.log('停车记录传参 ' + JSON.stringify(jsondata)); | 180 | console.log('停车记录传参 ' + JSON.stringify(jsondata)); |
186 | parkRecordList(jsondata).then(response => { | 181 | parkRecordList(jsondata).then(response => { |
@@ -205,15 +200,12 @@ export default { | @@ -205,15 +200,12 @@ export default { | ||
205 | }) | 200 | }) |
206 | }, | 201 | }, |
207 | 202 | ||
208 | - | ||
209 | - | ||
210 | tabHandle(index) { // tab 切换 | 203 | tabHandle(index) { // tab 切换 |
211 | this.currentTabActive = index | 204 | this.currentTabActive = index |
212 | }, | 205 | }, |
213 | chooseHandle(i, index) { // 历史欠费单个选择事件 | 206 | chooseHandle(i, index) { // 历史欠费单个选择事件 |
214 | i.checked = !i.checked | 207 | i.checked = !i.checked |
215 | let me = this | 208 | let me = this |
216 | - | ||
217 | if(i.checked ){ //单个选中 | 209 | if(i.checked ){ //单个选中 |
218 | me.historyCheckedLen ++ | 210 | me.historyCheckedLen ++ |
219 | if(me.historyCheckedLen == this.historyList.length){ | 211 | if(me.historyCheckedLen == this.historyList.length){ |
@@ -253,7 +245,45 @@ export default { | @@ -253,7 +245,45 @@ export default { | ||
253 | this.orderIds = [] | 245 | this.orderIds = [] |
254 | } | 246 | } |
255 | }, | 247 | }, |
256 | - toPayPage() { //缴纳费用 | 248 | + toPayCurrent(i){ // 缴纳本次在停费用 |
249 | + var salt = this.$utils.myCommonSalt(32); | ||
250 | + var jsondata = { | ||
251 | + app_id: this.$utils.myVarAppid, | ||
252 | + deviceInfo: this.$utils.myDeviceInfo, | ||
253 | + salt: salt, | ||
254 | + sign_type: "md5", | ||
255 | + payType: 4, | ||
256 | + appId: this.$utils.myVxAppId, | ||
257 | + orderId: i.orderId, | ||
258 | + terminalSource: '7', | ||
259 | + parkCode: i.parkCode, | ||
260 | + carNumber: this.carNumber, | ||
261 | + } | ||
262 | + jsondata.sign = this.$utils.signObject(jsondata) | ||
263 | + parkingQuery(jsondata).then(result => { | ||
264 | + console.log(result) | ||
265 | + let res = result.data | ||
266 | + let _dis = res.discountFee | ||
267 | + let discountFee = _dis.slice(1,_dis.length-1) | ||
268 | + | ||
269 | + this.$router.push( | ||
270 | + { | ||
271 | + path:'orderPay', | ||
272 | + query:{ | ||
273 | + carColor: this.carColor,// 车牌颜色 | ||
274 | + arrearageTotalFee: res.orderTotalFee,// 应收 | ||
275 | + arrearageDiscFee: discountFee*100,// 优惠 | ||
276 | + arrearageActFee: res.orderFee,// 实收 | ||
277 | + carNumber: this.carNumber, // 车牌 | ||
278 | + paySrcType: 101, //支付的类型 101 是本次 103是历史欠费 | ||
279 | + ordeID: i.orderId, //支付的订单号 | ||
280 | + appOrderTimeout: res.appOrderTimeout, // 超时描述 | ||
281 | + } | ||
282 | + } | ||
283 | + ) | ||
284 | + }) | ||
285 | + }, | ||
286 | + toPayHisroryPage() { // 缴纳历史费用 | ||
257 | if(this.historyCheckedLen==0){ | 287 | if(this.historyCheckedLen==0){ |
258 | this.$refs.alert.open() | 288 | this.$refs.alert.open() |
259 | return | 289 | return |
@@ -262,7 +292,6 @@ export default { | @@ -262,7 +292,6 @@ export default { | ||
262 | 292 | ||
263 | var list = "[" + this.orderIds + "]" | 293 | var list = "[" + this.orderIds + "]" |
264 | 294 | ||
265 | - | ||
266 | var jsondata = { | 295 | var jsondata = { |
267 | app_id: this.$utils.myVarAppid, | 296 | app_id: this.$utils.myVarAppid, |
268 | deviceInfo: this.$utils.myDeviceInfo, | 297 | deviceInfo: this.$utils.myDeviceInfo, |
@@ -297,10 +326,6 @@ export default { | @@ -297,10 +326,6 @@ export default { | ||
297 | } | 326 | } |
298 | ) | 327 | ) |
299 | }) | 328 | }) |
300 | - | ||
301 | - | ||
302 | - | ||
303 | - | ||
304 | } | 329 | } |
305 | }, | 330 | }, |
306 | filters: { | 331 | filters: { |