Commit 7ddbff4d6ee25b04be574cc073f9192c50f80f3f
1 parent
afb48777
本次停车费用 出场
Showing
3 changed files
with
65 additions
and
27 deletions
src/api/parkRecord/parkRecord.js
src/components/orderPay.vue
| ... | ... | @@ -25,13 +25,15 @@ |
| 25 | 25 | <div class="toPay" @click="toPay">{{clientBrowser}}支付</div> |
| 26 | 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 | 39 | </div> |
| ... | ... | @@ -53,6 +55,7 @@ export default { |
| 53 | 55 | paySrcType: '', //支付的类型 101 是本次 103是历史欠费 |
| 54 | 56 | orderId: '', //支付的订单 |
| 55 | 57 | webAppCode: '', // 微信code |
| 58 | + appOrderTimeout: '', // 超时描述 | |
| 56 | 59 | } |
| 57 | 60 | }, |
| 58 | 61 | created() { |
| ... | ... | @@ -64,7 +67,7 @@ export default { |
| 64 | 67 | this.clientBrowser = this.$utils.clientBrowser() //支付方式 |
| 65 | 68 | this.paySrcType = this.$route.query.paySrcType // 实收 |
| 66 | 69 | this.orderId = this.$route.query.ordeID |
| 67 | - | |
| 70 | + this.appOrderTimeout = this.$route.query.appOrderTimeout | |
| 68 | 71 | if (this.clientBrowser == "微信") { |
| 69 | 72 | this.webAppCode = this.getCode(); |
| 70 | 73 | } | ... | ... |
src/components/parkRecord.vue
| ... | ... | @@ -15,7 +15,7 @@ |
| 15 | 15 | <div v-show="currentTabActive==0"> |
| 16 | 16 | |
| 17 | 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 | 20 | <div class="cost-main" v-for="i in parkingData"> |
| 21 | 21 | <ul class="cost-header"> |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> |
| 35 | 35 | <div class="out-wrap"> |
| 36 | 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 | 38 | </div> |
| 39 | 39 | </div> |
| 40 | 40 | </div> |
| ... | ... | @@ -94,7 +94,7 @@ |
| 94 | 94 | <p class="check-btn" :class="{isAllChecked:allChecked}" |
| 95 | 95 | @click="checkedAll" |
| 96 | 96 | >全选</p> |
| 97 | - <p class="settle-btn" @click="toPayPage">清缴欠费</p> | |
| 97 | + <p class="settle-btn" @click="toPayHisroryPage">清缴欠费</p> | |
| 98 | 98 | </div> |
| 99 | 99 | </div> |
| 100 | 100 | </div> |
| ... | ... | @@ -124,7 +124,7 @@ |
| 124 | 124 | </template> |
| 125 | 125 | |
| 126 | 126 | <script> |
| 127 | -import { parkRecordList, historyQuery } from '@/api/parkRecord/parkRecord.js' | |
| 127 | +import { parkRecordList, historyQuery, parkingQuery } from '@/api/parkRecord/parkRecord.js' | |
| 128 | 128 | import axios from 'axios' |
| 129 | 129 | |
| 130 | 130 | export default { |
| ... | ... | @@ -142,7 +142,6 @@ export default { |
| 142 | 142 | parkList: [], // 停车记录数据 |
| 143 | 143 | historyList:[ // 历史欠费数据 |
| 144 | 144 | {money:100,checked:false, id: 1}, |
| 145 | - | |
| 146 | 145 | ] , |
| 147 | 146 | allChecked:false, // 全部选择事件 |
| 148 | 147 | allMoney:0, // 欠费所有的费用 |
| ... | ... | @@ -156,14 +155,12 @@ export default { |
| 156 | 155 | created() { |
| 157 | 156 | this.carNumber = this.$route.query.carNumber // 获取车牌号 |
| 158 | 157 | this.carColor = this.$route.query.carNumberColor // 获取颜色 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色 |
| 159 | - | |
| 160 | 158 | console.log(this.carNumber) |
| 161 | 159 | this.parkRecordList(this.carNumber) |
| 162 | 160 | }, |
| 163 | 161 | methods: { |
| 164 | - parkRecordList(){ | |
| 162 | + parkRecordList(){ // 获取停车记录数据 | |
| 165 | 163 | var salt = this.$utils.myCommonSalt(32); |
| 166 | - | |
| 167 | 164 | var jsondata = { |
| 168 | 165 | app_id: this.$utils.myVarAppid, |
| 169 | 166 | deviceInfo: this.$utils.myDeviceInfo, |
| ... | ... | @@ -179,8 +176,6 @@ export default { |
| 179 | 176 | } |
| 180 | 177 | jsondata.sign = this.$utils.signObject(jsondata) |
| 181 | 178 | |
| 182 | - | |
| 183 | - | |
| 184 | 179 | // jsondata.sign = md5sign |
| 185 | 180 | console.log('停车记录传参 ' + JSON.stringify(jsondata)); |
| 186 | 181 | parkRecordList(jsondata).then(response => { |
| ... | ... | @@ -205,15 +200,12 @@ export default { |
| 205 | 200 | }) |
| 206 | 201 | }, |
| 207 | 202 | |
| 208 | - | |
| 209 | - | |
| 210 | 203 | tabHandle(index) { // tab 切换 |
| 211 | 204 | this.currentTabActive = index |
| 212 | 205 | }, |
| 213 | 206 | chooseHandle(i, index) { // 历史欠费单个选择事件 |
| 214 | 207 | i.checked = !i.checked |
| 215 | 208 | let me = this |
| 216 | - | |
| 217 | 209 | if(i.checked ){ //单个选中 |
| 218 | 210 | me.historyCheckedLen ++ |
| 219 | 211 | if(me.historyCheckedLen == this.historyList.length){ |
| ... | ... | @@ -253,7 +245,45 @@ export default { |
| 253 | 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 | 287 | if(this.historyCheckedLen==0){ |
| 258 | 288 | this.$refs.alert.open() |
| 259 | 289 | return |
| ... | ... | @@ -262,7 +292,6 @@ export default { |
| 262 | 292 | |
| 263 | 293 | var list = "[" + this.orderIds + "]" |
| 264 | 294 | |
| 265 | - | |
| 266 | 295 | var jsondata = { |
| 267 | 296 | app_id: this.$utils.myVarAppid, |
| 268 | 297 | deviceInfo: this.$utils.myDeviceInfo, |
| ... | ... | @@ -297,10 +326,6 @@ export default { |
| 297 | 326 | } |
| 298 | 327 | ) |
| 299 | 328 | }) |
| 300 | - | |
| 301 | - | |
| 302 | - | |
| 303 | - | |
| 304 | 329 | } |
| 305 | 330 | }, |
| 306 | 331 | filters: { | ... | ... |