Commit 3c184204d9e2ddb0b3c4c0c58b2e066d00e42870

Authored by liuqimichale
1 parent ae6e7e99

支付方式 -- 支付宝

src/api/orderPay/orderPay.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +export function aliPay(params) {
  4 + return request({
  5 + url: '/api/alipay/aliH5Pay',
  6 + method: 'post',
  7 + data: params
  8 + })
  9 +}
  10 +
src/components/orderPay.vue
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 </li> 22 </li>
23 </ul> 23 </ul>
24 <div style="padding: 20px 18px"> 24 <div style="padding: 20px 18px">
25 - <div class="toPay">{{clientBrowser}}支付</div> 25 + <div class="toPay" @click="toPay">{{clientBrowser}}支付</div>
26 </div> 26 </div>
27 27
28 <p class="tip"> 28 <p class="tip">
@@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
38 </template> 38 </template>
39 39
40 <script> 40 <script>
  41 +import { aliPay } from '@/api/orderPay/orderPay'
41 export default { 42 export default {
42 name: 'orderPay', 43 name: 'orderPay',
43 data() { 44 data() {
@@ -53,14 +54,33 @@ export default { @@ -53,14 +54,33 @@ export default {
53 created() { 54 created() {
54 this.carWrapBG = this.$route.query.carColor //车牌颜色 55 this.carWrapBG = this.$route.query.carColor //车牌颜色
55 this.carNumber = this.$route.query.carNumber 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 this.clientBrowser = this.$utils.clientBrowser() //支付方式 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 filters:{ 85 filters:{
66 formateColor(val){ 86 formateColor(val){
src/components/parkRecord.vue
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 </p> 33 </p>
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.totalFee/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">出场缴费</p>
38 </div> 38 </div>
39 </div> 39 </div>
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 </p> 76 </p>
77 <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> 77 <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p>
78 <div class="out-wrap"> 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 </div> 80 </div>
81 81
82 </div> 82 </div>
@@ -206,7 +206,7 @@ export default { @@ -206,7 +206,7 @@ export default {
206 return item.parkState == '20' 206 return item.parkState == '20'
207 }) 207 })
208 this.historyList.forEach( i => { 208 this.historyList.forEach( i => {
209 - this.allMoney += Number(i.totalFee) 209 + this.allMoney += Number(i.unPayFee)
210 }) 210 })
211 211
212 console.log(this.historyList) 212 console.log(this.historyList)
@@ -229,13 +229,13 @@ export default { @@ -229,13 +229,13 @@ export default {
229 229
230 } 230 }
231 me.orderIds.push(i.orderId) 231 me.orderIds.push(i.orderId)
232 - me.historyCheckedMon += Number(i.totalFee) 232 + me.historyCheckedMon += Number(i.unPayFee)
233 }else{ //单个不选中 233 }else{ //单个不选中
234 let _i = me.orderIds.indexOf(i.orderId) 234 let _i = me.orderIds.indexOf(i.orderId)
235 me.orderIds.splice(_i,1) 235 me.orderIds.splice(_i,1)
236 this.allChecked = false 236 this.allChecked = false
237 me.historyCheckedLen -- 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,15 +303,16 @@ export default {
303 303
304 historyQuery(jsondata).then(response => { 304 historyQuery(jsondata).then(response => {
305 console.log(response) 305 console.log(response)
306 - let res = response.data.carArrearages 306 + let res = response.data.carArrearages[0]
  307 + console.log(res)
307 this.$router.push( 308 this.$router.push(
308 { 309 {
309 path:'orderPay', 310 path:'orderPay',
310 query:{ 311 query:{
311 carColor:0,// 车牌颜色 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 carNumber: this.carNumber // 车牌 316 carNumber: this.carNumber // 车牌
316 } 317 }
317 } 318 }