Commit 3c184204d9e2ddb0b3c4c0c58b2e066d00e42870
1 parent
ae6e7e99
支付方式 -- 支付宝
Showing
3 changed files
with
48 additions
and
17 deletions
src/api/orderPay/orderPay.js
0 → 100644
src/components/orderPay.vue
| ... | ... | @@ -22,7 +22,7 @@ |
| 22 | 22 | </li> |
| 23 | 23 | </ul> |
| 24 | 24 | <div style="padding: 20px 18px"> |
| 25 | - <div class="toPay">{{clientBrowser}}支付</div> | |
| 25 | + <div class="toPay" @click="toPay">{{clientBrowser}}支付</div> | |
| 26 | 26 | </div> |
| 27 | 27 | |
| 28 | 28 | <p class="tip"> |
| ... | ... | @@ -38,6 +38,7 @@ |
| 38 | 38 | </template> |
| 39 | 39 | |
| 40 | 40 | <script> |
| 41 | +import { aliPay } from '@/api/orderPay/orderPay' | |
| 41 | 42 | export default { |
| 42 | 43 | name: 'orderPay', |
| 43 | 44 | data() { |
| ... | ... | @@ -53,14 +54,33 @@ export default { |
| 53 | 54 | created() { |
| 54 | 55 | this.carWrapBG = this.$route.query.carColor //车牌颜色 |
| 55 | 56 | this.carNumber = this.$route.query.carNumber |
| 56 | - this.arrearageTotalFee = this.$route.query.arrearageTotalFee | |
| 57 | - this.arrearageDiscFee = this.$route.query.arrearageDiscFee | |
| 58 | - this.arrearageActFee = this.$route.query.arrearageActFee | |
| 57 | + this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收 | |
| 58 | + this.arrearageDiscFee = this.$route.query.arrearageDiscFee // 优惠 | |
| 59 | + this.arrearageActFee = this.$route.query.arrearageActFee // 实收 | |
| 59 | 60 | this.clientBrowser = this.$utils.clientBrowser() //支付方式 |
| 60 | - // arrearageTotalFee: res.arrearageTotalFee,//车牌颜色 | |
| 61 | - // arrearageDiscFee: res.arrearageDiscFee,//车牌颜色 | |
| 62 | - // arrearageActFee: res.arrearageActFee,//车牌颜色 | |
| 63 | - // carNumber: this.carNumber // 车牌 | |
| 61 | + }, | |
| 62 | + methods:{ | |
| 63 | + toPay(){ | |
| 64 | + if(this.clientBrowser == '支付宝') { | |
| 65 | + var aliParams = {}; | |
| 66 | + aliParams.orderId = orderID; | |
| 67 | + aliParams.carNumber = this.carNumber; | |
| 68 | + aliParams.payType = 1;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号 | |
| 69 | + aliParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 | |
| 70 | + aliParams.paySrcType = _paySrcType;//101停车支付 | |
| 71 | + aliParams.orgId = '10003', | |
| 72 | + aliParams.backType=2, | |
| 73 | + // aliParams.recordArreaInfos = JSON.stringify([{ | |
| 74 | + // "orderId": webAppParams.orderId, | |
| 75 | + // "orderNotPayFee": _mon * 100, | |
| 76 | + // "parkId": getQueryString(window.location).parkCode | |
| 77 | + // }]); | |
| 78 | + | |
| 79 | + aliParams.recordArreaInfos = JSON.stringify(orderID); | |
| 80 | + } | |
| 81 | + | |
| 82 | + | |
| 83 | + } | |
| 64 | 84 | }, |
| 65 | 85 | filters:{ |
| 66 | 86 | formateColor(val){ | ... | ... |
src/components/parkRecord.vue
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | </p> |
| 34 | 34 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> |
| 35 | 35 | <div class="out-wrap"> |
| 36 | - <p class="mon-wrap">¥{{(i.totalFee/100).toFixed(2)}}</p> | |
| 36 | + <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> | |
| 37 | 37 | <p class="out-btn">出场缴费</p> |
| 38 | 38 | </div> |
| 39 | 39 | </div> |
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | </p> |
| 77 | 77 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> |
| 78 | 78 | <div class="out-wrap"> |
| 79 | - <p class="mon-wrap">¥{{(i.totalFee/100).toFixed(2)}}</p> | |
| 79 | + <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> | |
| 80 | 80 | </div> |
| 81 | 81 | |
| 82 | 82 | </div> |
| ... | ... | @@ -206,7 +206,7 @@ export default { |
| 206 | 206 | return item.parkState == '20' |
| 207 | 207 | }) |
| 208 | 208 | this.historyList.forEach( i => { |
| 209 | - this.allMoney += Number(i.totalFee) | |
| 209 | + this.allMoney += Number(i.unPayFee) | |
| 210 | 210 | }) |
| 211 | 211 | |
| 212 | 212 | console.log(this.historyList) |
| ... | ... | @@ -229,13 +229,13 @@ export default { |
| 229 | 229 | |
| 230 | 230 | } |
| 231 | 231 | me.orderIds.push(i.orderId) |
| 232 | - me.historyCheckedMon += Number(i.totalFee) | |
| 232 | + me.historyCheckedMon += Number(i.unPayFee) | |
| 233 | 233 | }else{ //单个不选中 |
| 234 | 234 | let _i = me.orderIds.indexOf(i.orderId) |
| 235 | 235 | me.orderIds.splice(_i,1) |
| 236 | 236 | this.allChecked = false |
| 237 | 237 | me.historyCheckedLen -- |
| 238 | - me.historyCheckedMon -= Number(i.totalFee) | |
| 238 | + me.historyCheckedMon -= Number(i.unPayFee) | |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | |
| ... | ... | @@ -303,15 +303,16 @@ export default { |
| 303 | 303 | |
| 304 | 304 | historyQuery(jsondata).then(response => { |
| 305 | 305 | console.log(response) |
| 306 | - let res = response.data.carArrearages | |
| 306 | + let res = response.data.carArrearages[0] | |
| 307 | + console.log(res) | |
| 307 | 308 | this.$router.push( |
| 308 | 309 | { |
| 309 | 310 | path:'orderPay', |
| 310 | 311 | query:{ |
| 311 | 312 | carColor:0,// 车牌颜色 |
| 312 | - arrearageTotalFee: res.arrearageTotalFee,//车牌颜色 | |
| 313 | - arrearageDiscFee: res.arrearageDiscFee,//车牌颜色 | |
| 314 | - arrearageActFee: res.arrearageActFee,//车牌颜色 | |
| 313 | + arrearageTotalFee: res.arrearageTotalFee,// 应收 | |
| 314 | + arrearageDiscFee: res.arrearageDiscFee,// 优惠 | |
| 315 | + arrearageActFee: res.arrearageActFee,// 实收 | |
| 315 | 316 | carNumber: this.carNumber // 车牌 |
| 316 | 317 | } |
| 317 | 318 | } | ... | ... |