Commit 834a2f37cc46dd662632d28d3342dade3c2da707
1 parent
acba8420
宣化 临停补缴 聚合支付
Showing
6 changed files
with
353 additions
and
279 deletions
src/api/doPay.js
0 → 100644
src/api/parkRecord/parkRecord.js
1 | -import request from '@/utils/request' | 1 | +import request from "@/utils/request"; |
2 | 2 | ||
3 | export function parkRecordList(params) { | 3 | export function parkRecordList(params) { |
4 | return request({ | 4 | return request({ |
5 | - url: 'queryParkOrder/queryParkingRecordPageByCarNumbers', | ||
6 | - method: 'post', | 5 | + url: "queryParkOrder/queryParkingRecordPageByCarNumbers", |
6 | + method: "post", | ||
7 | data: params | 7 | data: params |
8 | - }) | 8 | + }); |
9 | } | 9 | } |
10 | 10 | ||
11 | - | ||
12 | export function historyQuery(params) { | 11 | export function historyQuery(params) { |
13 | return request({ | 12 | return request({ |
14 | - url: 'queryParkOrder/queryArrearageStaForWXPublc', | ||
15 | - method: 'post', | 13 | + url: "queryParkOrder/queryArrearageStaForWXPublc", |
14 | + method: "post", | ||
16 | data: params | 15 | data: params |
17 | - }) | 16 | + }); |
18 | } | 17 | } |
19 | 18 | ||
20 | export function parkingQuery(params) { | 19 | export function parkingQuery(params) { |
21 | return request({ | 20 | return request({ |
22 | - url: 'queryParkOrder/billQuery', | ||
23 | - method: 'post', | 21 | + url: "queryParkOrder/billQuery", |
22 | + method: "post", | ||
24 | data: params | 23 | data: params |
25 | - }) | 24 | + }); |
26 | } | 25 | } |
27 | 26 | ||
28 | export function appApplyParkOut(params) { // 0元出场 | 27 | export function appApplyParkOut(params) { // 0元出场 |
29 | return request({ | 28 | return request({ |
30 | - url: 'appAccountPay/appApplyParkOut', | ||
31 | - method: 'post', | 29 | + url: "appAccountPay/appApplyParkOut", |
30 | + method: "post", | ||
32 | data: params | 31 | data: params |
33 | - }) | 32 | + }); |
34 | } | 33 | } |
35 | 34 | ||
35 | +export function queryArrearageSta(params) { // 查询补缴订单详情 | ||
36 | + return request({ | ||
37 | + url: "queryParkOrder/queryArrearageSta", | ||
38 | + method: "post", | ||
39 | + data: params | ||
40 | + }); | ||
41 | +} | ||
36 | 42 | ||
37 | - | 43 | +export function doOrderCreate(params) { // 查询补缴订单详情 |
44 | + return request({ | ||
45 | + url: "allInPay/doOrderCreate", | ||
46 | + method: "post", | ||
47 | + data: params | ||
48 | + }); | ||
49 | +} |
src/utils/request.js
@@ -8,7 +8,7 @@ const service = axios.create({ | @@ -8,7 +8,7 @@ const service = axios.create({ | ||
8 | // http://pay.service.renniting.cn/ 赤峰 | 8 | // http://pay.service.renniting.cn/ 赤峰 |
9 | // http://pay.service.huangshiparking.com/ 黄石正式环境 | 9 | // http://pay.service.huangshiparking.com/ 黄石正式环境 |
10 | // http://39.98.54.240:8090/ 黄石测试环境 | 10 | // http://39.98.54.240:8090/ 黄石测试环境 |
11 | - baseURL: 'https://pay.ccccitd.cc', // url = base url + request url | 11 | + baseURL: 'http://wxzhifu.natapp1.cc', // url = base url + request url |
12 | // withCredentials: true, // send cookies when cross-domain requests | 12 | // withCredentials: true, // send cookies when cross-domain requests |
13 | timeout: 6000 // request timeout | 13 | timeout: 6000 // request timeout |
14 | }) | 14 | }) |
src/utils/utils.js
@@ -120,10 +120,13 @@ export default { | @@ -120,10 +120,13 @@ export default { | ||
120 | openId: "oWw3o5rY_bFsiT_nFd2CEQWGZfhs", | 120 | openId: "oWw3o5rY_bFsiT_nFd2CEQWGZfhs", |
121 | myOrgId: "10120", // 归属地 赤峰id 10003 黄石 10079 | 121 | myOrgId: "10120", // 归属地 赤峰id 10003 黄石 10079 |
122 | 122 | ||
123 | + | ||
124 | + xuanhuaAppid:'00276515', | ||
125 | + commonTerminalSource:'7', | ||
123 | // myVxAppId: 'wx1489e48e6a547023', | 126 | // myVxAppId: 'wx1489e48e6a547023', |
124 | signObject: function(jsonObj) { //签名字段 | 127 | signObject: function(jsonObj) { //签名字段 |
125 | jsonObj.sign_type = "md5"; | 128 | jsonObj.sign_type = "md5"; |
126 | - jsonObj.app_id = "ud8yq5tv0inxupc05xfeau39jywlqoj2"; | 129 | + jsonObj.app_id = "lrpo55tmveqe07w3gpovzgx34pdez7eh"; |
127 | jsonObj.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; | 130 | jsonObj.deviceInfo = "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E"; |
128 | jsonObj.salt = myCommonSalt(32); | 131 | jsonObj.salt = myCommonSalt(32); |
129 | jsonObj.token = localStorage.getItem('userToken'); | 132 | jsonObj.token = localStorage.getItem('userToken'); |
@@ -149,13 +152,13 @@ export default { | @@ -149,13 +152,13 @@ export default { | ||
149 | } | 152 | } |
150 | }; | 153 | }; |
151 | objb.sort(compare); | 154 | objb.sort(compare); |
152 | - var strmd5 = "ny1u72b6k374sg379z0kqjgfxe2ycnpw"; | 155 | + var strmd5 = "gz8wfwd0gn1etamjjhzey1ggcz78pfvd"; |
153 | for (var i = 0; i < objb.length; i++) { | 156 | for (var i = 0; i < objb.length; i++) { |
154 | if (objb[i].value != null && objb[i].value != "") { | 157 | if (objb[i].value != null && objb[i].value != "") { |
155 | strmd5 += objb[i].keyname + objb[i].value; | 158 | strmd5 += objb[i].keyname + objb[i].value; |
156 | } | 159 | } |
157 | } | 160 | } |
158 | - strmd5 += "ny1u72b6k374sg379z0kqjgfxe2ycnpw"; | 161 | + strmd5 += "gz8wfwd0gn1etamjjhzey1ggcz78pfvd"; |
159 | // console.log('strmd5-------->'+strmd5); | 162 | // console.log('strmd5-------->'+strmd5); |
160 | strmd5 = md5(strmd5); | 163 | strmd5 = md5(strmd5); |
161 | strmd5 = strmd5.toUpperCase(); | 164 | strmd5 = strmd5.toUpperCase(); |
src/views/parkPay/orderPay.vue
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | 27 | ||
28 | 28 | ||
29 | <div style="padding: 20px 18px"> | 29 | <div style="padding: 20px 18px"> |
30 | - <div class="toPay" @click="toPay">{{clientBrowser}}支付</div> | 30 | + <div class="toPay" @click="vxPay">{{clientBrowser}}支付</div> |
31 | </div> | 31 | </div> |
32 | 32 | ||
33 | <div v-if="appOrderTimeout.length>0"> | 33 | <div v-if="appOrderTimeout.length>0"> |
@@ -48,7 +48,8 @@ | @@ -48,7 +48,8 @@ | ||
48 | // import CryptoJS from '../utils/AES.js' | 48 | // import CryptoJS from '../utils/AES.js' |
49 | // let Base64 = require('js-base64').Base64 | 49 | // let Base64 = require('js-base64').Base64 |
50 | import { MessageBox } from 'mint-ui'; | 50 | import { MessageBox } from 'mint-ui'; |
51 | -import { aliPay, getOpenId, vxPayQuery, bankH5Pay, queryParkingRecordPageByCarNumbers } from '@/api/orderPay/orderPay' | 51 | +import { aliPay, getOpenId, vxPayQuery, bankH5Pay, queryParkingRecordPageByCarNumbers} from '@/api/orderPay/orderPay' |
52 | +import { doPay } from '@/api/doPay' | ||
52 | 53 | ||
53 | export default { | 54 | export default { |
54 | name: 'orderPay', | 55 | name: 'orderPay', |
@@ -80,9 +81,9 @@ export default { | @@ -80,9 +81,9 @@ export default { | ||
80 | this.orderId = this.$route.query.ordeID | 81 | this.orderId = this.$route.query.ordeID |
81 | console.log(this.orderId) | 82 | console.log(this.orderId) |
82 | this.appOrderTimeout = this.$route.query.appOrderTimeout | 83 | this.appOrderTimeout = this.$route.query.appOrderTimeout |
83 | - if (this.clientBrowser == "微信") { | ||
84 | - this.webAppCode = this.getCode(); | ||
85 | - } | 84 | + // if (this.clientBrowser == "微信") { |
85 | + // this.webAppCode = this.getCode(); | ||
86 | + // } | ||
86 | 87 | ||
87 | 88 | ||
88 | 89 | ||
@@ -109,99 +110,126 @@ export default { | @@ -109,99 +110,126 @@ export default { | ||
109 | }, | 110 | }, |
110 | toPay() { | 111 | toPay() { |
111 | let me = this | 112 | let me = this |
112 | - let _order = [] | ||
113 | - | ||
114 | - console.log(this.orderId) | ||
115 | - if (this.paySrcType == 103) { | ||
116 | - this.orderId = JSON.parse(this.orderId) | ||
117 | - this.orderId.forEach(item => { | ||
118 | - _order.push({ | ||
119 | - orderId: item | ||
120 | - }) | ||
121 | - }) | ||
122 | - this.orderId = [] | ||
123 | - this.orderId = _order | ||
124 | - } | ||
125 | - | ||
126 | - | ||
127 | - if (this.clientBrowser == '微信') { // 微信支付 | ||
128 | - let _openId = sessionStorage.getItem('openIdData') | ||
129 | - if(_openId){ | ||
130 | - me.vxPay(_openId, this.orderId) | ||
131 | - }else{ | ||
132 | - //第一步获取openid | ||
133 | - var codeParams = { | ||
134 | - code: this.webAppCode, | ||
135 | - appId: this.$utils.myVxAppId | ||
136 | - }; | ||
137 | - getOpenId(codeParams).then(res => { | ||
138 | - if (res.code == 0) { | ||
139 | - me.vxPay(res.data, this.orderId) | ||
140 | - sessionStorage.setItem('openIdData',res.data) | ||
141 | - } else if (res.code == 40163) { //code been used, hints[重复code问题] | ||
142 | - alert('请重新扫码重复code问题') | ||
143 | - console.log(res.message); | ||
144 | - } else { | ||
145 | - alert('请重新扫码') | ||
146 | - } | ||
147 | - }) | ||
148 | - } | ||
149 | - } | 113 | + // let _order = [] |
114 | + // | ||
115 | + // console.log(this.orderId) | ||
116 | + // if (this.paySrcType == 103) { | ||
117 | + // this.orderId = JSON.parse(this.orderId) | ||
118 | + // this.orderId.forEach(item => { | ||
119 | + // _order.push({ | ||
120 | + // orderId: item | ||
121 | + // }) | ||
122 | + // }) | ||
123 | + // this.orderId = [] | ||
124 | + // this.orderId = _order | ||
125 | + // } | ||
126 | + | ||
127 | + | ||
128 | + // if (this.clientBrowser == '微信') { // 微信支付 | ||
129 | + // let _openId = sessionStorage.getItem('openIdData') | ||
130 | + // if(_openId){ | ||
131 | + // me.vxPay(_openId, this.orderId) | ||
132 | + // }else{ | ||
133 | + // //第一步获取openid | ||
134 | + // var codeParams = { | ||
135 | + // code: this.webAppCode, | ||
136 | + // appId: this.$utils.myVxAppId | ||
137 | + // }; | ||
138 | + // getOpenId(codeParams).then(res => { | ||
139 | + // if (res.code == 0) { | ||
140 | + // me.vxPay(res.data, this.orderId) | ||
141 | + // sessionStorage.setItem('openIdData',res.data) | ||
142 | + // } else if (res.code == 40163) { //code been used, hints[重复code问题] | ||
143 | + // alert('请重新扫码重复code问题') | ||
144 | + // console.log(res.message); | ||
145 | + // } else { | ||
146 | + // alert('请重新扫码') | ||
147 | + // } | ||
148 | + // }) | ||
149 | + // } | ||
150 | + // } | ||
150 | }, | 151 | }, |
151 | - vxPay(openIdData, orderIdData) { | ||
152 | - let vm = this | ||
153 | - var wxParams = {}; | ||
154 | - wxParams.orderId = orderIdData; | ||
155 | - wxParams.backType = 2, | ||
156 | - wxParams.orgId = this.$utils.myOrgId, | ||
157 | - wxParams.payType = 4;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号 | ||
158 | - wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 | ||
159 | - wxParams.carNumber = this.carNumber; | ||
160 | - wxParams.paySrcType = this.paySrcType;//101停车支付 | ||
161 | - wxParams.recordArreaInfos = JSON.stringify(orderIdData); | ||
162 | - wxParams.openId = openIdData; | ||
163 | - wxParams.backDeveloperCode = this.tollNumber, | ||
164 | - wxParams.appId = this.$utils.myVxAppId; | ||
165 | - vxPayQuery(wxParams).then(res => { | ||
166 | - if (res.code == 0) { // | ||
167 | - if (res.data) { | ||
168 | - var data = res.data; | ||
169 | - console.log(JSON.stringify(data)); | ||
170 | - if (typeof WeixinJSBridge === 'undefined') { // 微信浏览器内置对象。参考微信官方文档 | ||
171 | - if (document.addEventListener) { | ||
172 | - document.addEventListener('WeixinJSBridgeReady', vm.onBridgeReady(data), false) | ||
173 | - } else if (document.attachEvent) { | ||
174 | - document.attachEvent('WeixinJSBridgeReady', vm.onBridgeReady(data)) | ||
175 | - document.attachEvent('onWeixinJSBridgeReady', vm.onBridgeReady(data)) | ||
176 | - } | ||
177 | - } else { | ||
178 | - console.log('准备调用微信支付') | ||
179 | - vm.onBridgeReady(data) | ||
180 | - } | ||
181 | - } else { | ||
182 | - alert("没有找到返回值"); | ||
183 | - } | ||
184 | - } else if(res.code == 1002){//其他情况如【该卡号场内已存在】 | ||
185 | - console.log(res.message); | ||
186 | - MessageBox.confirm('', { | ||
187 | - message: res.message, | ||
188 | - title: '温馨提示', | ||
189 | - showCancelButton:false, | ||
190 | - confirmButtonText: '确定', | ||
191 | - }).then(action => { | ||
192 | - if (action == 'confirm') { //确认的回调 | ||
193 | - console.log('确定'); | ||
194 | - this.$router.go(-1) | ||
195 | - } | ||
196 | - }).catch(err => { | ||
197 | - if (err == 'cancel') { //取消的回调 | ||
198 | - console.log('取消'); | ||
199 | - } | ||
200 | - }); | ||
201 | - }else{ | ||
202 | - alert(res.message) | ||
203 | - } | 152 | + vxPay() { |
153 | + let me = this | ||
154 | + var jsondata = { | ||
155 | + appId:this.$utils.xuanhuaAppid, | ||
156 | + carNumber: me.carNumber, | ||
157 | + orderActFee: me.arrearageActFee, // 应收 | ||
158 | + orderBigType: '100', // 订单大类型 100:停车订单 200:充值订单 300:会员卡订单 | ||
159 | + orderTotalFee: me.arrearageActFee, // 实收 | ||
160 | + payOrderType: this.paySrcType, // 支付单来源 101:停车付款单 102:停车预付单 103:停车补缴单 104 共享车位 201 余额充值单 202 押金充值单 301 会员卡购买单 302 会员卡续费 | ||
161 | + paySource: '3', | ||
162 | + //支付单来源 101:停车付款单 102:停车预付单 103:停车补缴单 104 共享车位 201 余额充值单 202 押金充值单 301 会员卡购买单 302 会员卡续费 | ||
163 | + paySrcType: this.paySrcType, | ||
164 | + payType: 36, // 36微信 37支付宝 | ||
165 | + rltOrderId: this.orderId, | ||
166 | + sourceType: '3', | ||
167 | + orgId: this.$utils.myOrgId, | ||
168 | + terminalSource: this.$utils.commonTerminalSource, | ||
169 | + }; | ||
170 | + jsondata.sign = this.$utils.signObject(jsondata) | ||
171 | + | ||
172 | + doPay(jsondata).then(response => { | ||
173 | + console.log(response.data.payinfo) | ||
174 | + window.location.href = response.data.payinfo | ||
204 | }) | 175 | }) |
176 | + | ||
177 | + | ||
178 | + | ||
179 | + | ||
180 | + // let vm = this | ||
181 | + // var wxParams = {}; | ||
182 | + // wxParams.orderId = orderIdData; | ||
183 | + // wxParams.backType = 2, | ||
184 | + // wxParams.orgId = this.$utils.myOrgId, | ||
185 | + // wxParams.payType = 4;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号 | ||
186 | + // wxParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付 | ||
187 | + // wxParams.carNumber = this.carNumber; | ||
188 | + // wxParams.paySrcType = this.paySrcType;//101停车支付 | ||
189 | + // wxParams.recordArreaInfos = JSON.stringify(orderIdData); | ||
190 | + // wxParams.openId = openIdData; | ||
191 | + // wxParams.backDeveloperCode = this.tollNumber, | ||
192 | + // wxParams.appId = this.$utils.myVxAppId; | ||
193 | + // vxPayQuery(wxParams).then(res => { | ||
194 | + // if (res.code == 0) { // | ||
195 | + // if (res.data) { | ||
196 | + // var data = res.data; | ||
197 | + // console.log(JSON.stringify(data)); | ||
198 | + // if (typeof WeixinJSBridge === 'undefined') { // 微信浏览器内置对象。参考微信官方文档 | ||
199 | + // if (document.addEventListener) { | ||
200 | + // document.addEventListener('WeixinJSBridgeReady', vm.onBridgeReady(data), false) | ||
201 | + // } else if (document.attachEvent) { | ||
202 | + // document.attachEvent('WeixinJSBridgeReady', vm.onBridgeReady(data)) | ||
203 | + // document.attachEvent('onWeixinJSBridgeReady', vm.onBridgeReady(data)) | ||
204 | + // } | ||
205 | + // } else { | ||
206 | + // console.log('准备调用微信支付') | ||
207 | + // vm.onBridgeReady(data) | ||
208 | + // } | ||
209 | + // } else { | ||
210 | + // alert("没有找到返回值"); | ||
211 | + // } | ||
212 | + // } else if(res.code == 1002){//其他情况如【该卡号场内已存在】 | ||
213 | + // console.log(res.message); | ||
214 | + // MessageBox.confirm('', { | ||
215 | + // message: res.message, | ||
216 | + // title: '温馨提示', | ||
217 | + // showCancelButton:false, | ||
218 | + // confirmButtonText: '确定', | ||
219 | + // }).then(action => { | ||
220 | + // if (action == 'confirm') { //确认的回调 | ||
221 | + // console.log('确定'); | ||
222 | + // this.$router.go(-1) | ||
223 | + // } | ||
224 | + // }).catch(err => { | ||
225 | + // if (err == 'cancel') { //取消的回调 | ||
226 | + // console.log('取消'); | ||
227 | + // } | ||
228 | + // }); | ||
229 | + // }else{ | ||
230 | + // alert(res.message) | ||
231 | + // } | ||
232 | + // }) | ||
205 | }, | 233 | }, |
206 | onBridgeReady(params) { | 234 | onBridgeReady(params) { |
207 | let me = this | 235 | let me = this |
src/views/parkPay/parkRecord.vue
@@ -33,7 +33,8 @@ | @@ -33,7 +33,8 @@ | ||
33 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> | 33 | <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> |
34 | <div class="out-wrap"> | 34 | <div class="out-wrap"> |
35 | <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> | 35 | <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> |
36 | - <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-if="parkingData[0].parkDuration<=900">申请离场</p> | 36 | + <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" |
37 | + v-if="parkingData[0].parkDuration<=900">申请离场</p> | ||
37 | <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else>出场缴费</p> | 38 | <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else>出场缴费</p> |
38 | </div> | 39 | </div> |
39 | </div> | 40 | </div> |
@@ -47,9 +48,9 @@ | @@ -47,9 +48,9 @@ | ||
47 | 48 | ||
48 | 49 | ||
49 | <!--历史缴费--> | 50 | <!--历史缴费--> |
50 | - <div v-show="currentTabActive==1" class="history-con" > | 51 | + <div v-show="currentTabActive==1" class="history-con"> |
51 | <div v-if="historyList.length>0" style="height: 100%;"> | 52 | <div v-if="historyList.length>0" style="height: 100%;"> |
52 | - <div class="history-body" > | 53 | + <div class="history-body"> |
53 | <p class="money-all">总欠费金额: | 54 | <p class="money-all">总欠费金额: |
54 | <span>¥{{(allMoney/100).toFixed(2)}}</span> | 55 | <span>¥{{(allMoney/100).toFixed(2)}}</span> |
55 | </p> | 56 | </p> |
@@ -118,49 +119,45 @@ | @@ -118,49 +119,45 @@ | ||
118 | 119 | ||
119 | <script> | 120 | <script> |
120 | 121 | ||
121 | -import { parkRecordList, historyQuery, parkingQuery, appApplyParkOut } from '@/api/parkRecord/parkRecord.js' | ||
122 | - | ||
123 | - | 122 | +import { |
123 | + parkRecordList, historyQuery, parkingQuery, appApplyParkOut, queryArrearageSta, | ||
124 | + doOrderCreate | ||
125 | +} from "@/api/parkRecord/parkRecord.js"; | ||
124 | export default { | 126 | export default { |
125 | - name: 'parkRecord', | 127 | + name: "parkRecord", |
126 | data() { | 128 | data() { |
127 | return { | 129 | return { |
128 | tabList: [ // 切换数据 | 130 | tabList: [ // 切换数据 |
129 | - { text: '在停缴费', id: 1 }, | ||
130 | - { text: '欠费待缴', id: 2 }, | 131 | + { text: "在停缴费", id: 1 }, |
132 | + { text: "欠费待缴", id: 2 } | ||
131 | ], | 133 | ], |
132 | carColor: 1,// 车牌颜色 | 134 | carColor: 1,// 车牌颜色 |
133 | currentTabActive: 0, // 显示当前哪个 | 135 | currentTabActive: 0, // 显示当前哪个 |
134 | - carNumber: '', // 车牌号码 | ||
135 | - parkingData:[], // 在停数据 | 136 | + carNumber: "", // 车牌号码 |
137 | + parkingData: [], // 在停数据 | ||
136 | parkList: [], // 停车记录数据 | 138 | parkList: [], // 停车记录数据 |
137 | - historyList:[ // 历史欠费数据 | ||
138 | - {money:100,checked:false, id: 1}, | ||
139 | - ] , | ||
140 | - allChecked:false, // 全部选择事件 | ||
141 | - allMoney:0, // 欠费所有的费用 | ||
142 | - historyCheckedLen:0, //选中了几笔交易 | 139 | + historyList: [ // 历史欠费数据 |
140 | + { money: 100, checked: false, id: 1 } | ||
141 | + ], | ||
142 | + allChecked: false, // 全部选择事件 | ||
143 | + allMoney: 0, // 欠费所有的费用 | ||
144 | + historyCheckedLen: 0, //选中了几笔交易 | ||
143 | historyCheckedMon: 0, //选中了待缴纳的金额 | 145 | historyCheckedMon: 0, //选中了待缴纳的金额 |
144 | orderIds: [] // 选中数据的订单 数组 | 146 | orderIds: [] // 选中数据的订单 数组 |
145 | - } | 147 | + }; |
146 | }, | 148 | }, |
147 | - mounted(){ | ||
148 | - | ||
149 | - | 149 | + mounted() { |
150 | }, | 150 | }, |
151 | created() { | 151 | created() { |
152 | - this.carNumber = this.$route.query.carNumber // 获取车牌号 | ||
153 | - this.carColor = this.$route.query.carNumberColor // 获取颜色 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色 | ||
154 | - this.currentTabActive = this.$route.query.parkFlag ? this.$route.query.parkFlag : 0 // 0在停 1历史 | ||
155 | - console.log(this.carNumber) | ||
156 | - this.parkRecordList(this.carNumber) | ||
157 | - | ||
158 | - | 152 | + this.carNumber = this.$route.query.carNumber; // 获取车牌号 |
153 | + this.carColor = this.$route.query.carNumberColor; // 获取颜色 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色 | ||
154 | + this.currentTabActive = this.$route.query.parkFlag ? this.$route.query.parkFlag : 0; // 0在停 1历史 | ||
155 | + console.log(this.carNumber); | ||
156 | + this.parkRecordList(this.carNumber); | ||
159 | // | 157 | // |
160 | - | ||
161 | }, | 158 | }, |
162 | methods: { | 159 | methods: { |
163 | - parkRecordList(){ // 获取停车记录数据 | 160 | + parkRecordList() { // 获取停车记录数据 |
164 | var salt = this.$utils.myCommonSalt(32); | 161 | var salt = this.$utils.myCommonSalt(32); |
165 | var jsondata = { | 162 | var jsondata = { |
166 | app_id: this.$utils.myVarAppid, | 163 | app_id: this.$utils.myVarAppid, |
@@ -175,85 +172,74 @@ export default { | @@ -175,85 +172,74 @@ export default { | ||
175 | carNumberColor: this.carColor, | 172 | carNumberColor: this.carColor, |
176 | // sign: md5sign, | 173 | // sign: md5sign, |
177 | orgId: this.$utils.myOrgId | 174 | orgId: this.$utils.myOrgId |
178 | - } | ||
179 | - jsondata.sign = this.$utils.signObject(jsondata) | ||
180 | - | 175 | + }; |
176 | + jsondata.sign = this.$utils.signObject(jsondata); | ||
181 | // jsondata.sign = md5sign | 177 | // jsondata.sign = md5sign |
182 | - console.log('停车记录传参 ' + JSON.stringify(jsondata)); | 178 | + console.log("停车记录传参 " + JSON.stringify(jsondata)); |
183 | parkRecordList(jsondata).then(response => { | 179 | parkRecordList(jsondata).then(response => { |
184 | - console.log(response) | ||
185 | - this.parkList = response.data.dataList | ||
186 | - | 180 | + console.log(response); |
181 | + this.parkList = response.data.dataList; | ||
187 | this.parkingData = this.parkList.filter(item => { | 182 | this.parkingData = this.parkList.filter(item => { |
188 | - return item.parkState == '10' | ||
189 | - }) | 183 | + return item.parkState == "10"; |
184 | + }); | ||
190 | // if(this.parkingData.length>0){ | 185 | // if(this.parkingData.length>0){ |
191 | // this.currentTabActive = 0 | 186 | // this.currentTabActive = 0 |
192 | // } | 187 | // } |
193 | - console.log(this.parkingData) | 188 | + console.log(this.parkingData); |
194 | this.historyList = this.parkList.filter(item => { | 189 | this.historyList = this.parkList.filter(item => { |
195 | - return item.parkState == '20' | ||
196 | - }) | ||
197 | - | ||
198 | - this.historyList.forEach( i => { | ||
199 | - this.allMoney += Number(i.unPayFee) | ||
200 | - }) | ||
201 | - | ||
202 | - if(this.parkingData.length==0 && this.historyList.length>0){ | ||
203 | - this.currentTabActive = 1 | 190 | + return item.parkState == "20"; |
191 | + }); | ||
192 | + this.historyList.forEach(i => { | ||
193 | + this.allMoney += Number(i.unPayFee); | ||
194 | + }); | ||
195 | + if (this.parkingData.length == 0 && this.historyList.length > 0) { | ||
196 | + this.currentTabActive = 1; | ||
204 | } | 197 | } |
205 | - | ||
206 | - if(this.$route.query.parkFlag == 1){ | ||
207 | - this.currentTabActive = 1 | ||
208 | - this.checkedAll() | 198 | + if (this.$route.query.parkFlag == 1) { |
199 | + this.currentTabActive = 1; | ||
200 | + this.checkedAll(); | ||
209 | } | 201 | } |
210 | - console.log(this.historyList) | ||
211 | - }) | 202 | + console.log(this.historyList); |
203 | + }); | ||
212 | }, | 204 | }, |
213 | - | ||
214 | tabHandle(index) { // tab 切换 | 205 | tabHandle(index) { // tab 切换 |
215 | - this.currentTabActive = index | 206 | + this.currentTabActive = index; |
216 | }, | 207 | }, |
217 | chooseHandle(i, index) { // 历史欠费单个选择事件 | 208 | chooseHandle(i, index) { // 历史欠费单个选择事件 |
218 | - i.checked = !i.checked | ||
219 | - let me = this | ||
220 | - if(i.checked ){ //单个选中 | ||
221 | - me.historyCheckedLen ++ | ||
222 | - if(me.historyCheckedLen == this.historyList.length){ | ||
223 | - this.allChecked = true | ||
224 | - | 209 | + i.checked = !i.checked; |
210 | + let me = this; | ||
211 | + if (i.checked) { //单个选中 | ||
212 | + me.historyCheckedLen++; | ||
213 | + if (me.historyCheckedLen == this.historyList.length) { | ||
214 | + this.allChecked = true; | ||
225 | } | 215 | } |
226 | - me.orderIds.push(i.orderId) | ||
227 | - me.historyCheckedMon += Number(i.unPayFee) | ||
228 | - }else{ //单个不选中 | ||
229 | - let _i = me.orderIds.indexOf(i.orderId) | ||
230 | - me.orderIds.splice(_i,1) | ||
231 | - this.allChecked = false | ||
232 | - me.historyCheckedLen -- | ||
233 | - me.historyCheckedMon -= Number(i.unPayFee) | 216 | + me.orderIds.push(i.orderId); |
217 | + me.historyCheckedMon += Number(i.unPayFee); | ||
218 | + } else { //单个不选中 | ||
219 | + let _i = me.orderIds.indexOf(i.orderId); | ||
220 | + me.orderIds.splice(_i, 1); | ||
221 | + this.allChecked = false; | ||
222 | + me.historyCheckedLen--; | ||
223 | + me.historyCheckedMon -= Number(i.unPayFee); | ||
234 | } | 224 | } |
235 | - | ||
236 | - | ||
237 | }, | 225 | }, |
238 | checkedAll() { // 全选选择事件 | 226 | checkedAll() { // 全选选择事件 |
239 | - this.allChecked = !this.allChecked | ||
240 | - if(this.allChecked){ //全选 | ||
241 | - let me = this | ||
242 | - this.historyList.forEach(function(item){ | 227 | + this.allChecked = !this.allChecked; |
228 | + if (this.allChecked) { //全选 | ||
229 | + let me = this; | ||
230 | + this.historyList.forEach(function(item) { | ||
243 | item.checked = true; | 231 | item.checked = true; |
244 | - me.orderIds.push(item.orderId) | 232 | + me.orderIds.push(item.orderId); |
245 | }); | 233 | }); |
246 | - this.historyCheckedMon = this.allMoney | ||
247 | - this.historyCheckedLen = this.historyList.length | ||
248 | - | ||
249 | - }else{ //反选 | ||
250 | - this.historyList.forEach(function(item){ | 234 | + this.historyCheckedMon = this.allMoney; |
235 | + this.historyCheckedLen = this.historyList.length; | ||
236 | + } else { //反选 | ||
237 | + this.historyList.forEach(function(item) { | ||
251 | item.checked = false; | 238 | item.checked = false; |
252 | - | ||
253 | }); | 239 | }); |
254 | - this.historyCheckedLen = 0 | ||
255 | - this.historyCheckedMon = 0 | ||
256 | - this.orderIds = [] | 240 | + this.historyCheckedLen = 0; |
241 | + this.historyCheckedMon = 0; | ||
242 | + this.orderIds = []; | ||
257 | } | 243 | } |
258 | }, | 244 | }, |
259 | toPayCurrent(i, num) { // 缴纳本次在停费用 | 245 | toPayCurrent(i, num) { // 缴纳本次在停费用 |
@@ -264,14 +250,13 @@ export default { | @@ -264,14 +250,13 @@ export default { | ||
264 | salt: salt, | 250 | salt: salt, |
265 | sign_type: "md5", | 251 | sign_type: "md5", |
266 | orderId: i.orderId, | 252 | orderId: i.orderId, |
267 | - payOrderType: '101', | ||
268 | - terminalSource: '3', | ||
269 | - } | ||
270 | - params.sign = this.$utils.signObject(params) | 253 | + payOrderType: "101", |
254 | + terminalSource: "3" | ||
255 | + }; | ||
256 | + params.sign = this.$utils.signObject(params); | ||
271 | appApplyParkOut(params).then(response => { | 257 | appApplyParkOut(params).then(response => { |
272 | - console.log(response) | ||
273 | - | ||
274 | - if (response.code == '5005') { | 258 | + console.log(response); |
259 | + if (response.code == "5005") { | ||
275 | var salt = this.$utils.myCommonSalt(32); | 260 | var salt = this.$utils.myCommonSalt(32); |
276 | var jsondata = { | 261 | var jsondata = { |
277 | app_id: this.$utils.myVarAppid, | 262 | app_id: this.$utils.myVarAppid, |
@@ -281,20 +266,19 @@ export default { | @@ -281,20 +266,19 @@ export default { | ||
281 | payType: this.$utils.clientBrowsePayType(), | 266 | payType: this.$utils.clientBrowsePayType(), |
282 | appId: this.$utils.myVxAppId, | 267 | appId: this.$utils.myVxAppId, |
283 | orderId: i.orderId, | 268 | orderId: i.orderId, |
284 | - terminalSource: '7', | 269 | + terminalSource: "7", |
285 | parkCode: i.parkCode, | 270 | parkCode: i.parkCode, |
286 | - carNumber: this.carNumber, | ||
287 | - } | ||
288 | - jsondata.sign = this.$utils.signObject(jsondata) | 271 | + carNumber: this.carNumber |
272 | + }; | ||
273 | + jsondata.sign = this.$utils.signObject(jsondata); | ||
289 | parkingQuery(jsondata).then(result => { | 274 | parkingQuery(jsondata).then(result => { |
290 | - console.log(result) | ||
291 | - let res = result.data | ||
292 | - let _dis = res.discountFee | ||
293 | - let discountFee = _dis.slice(1, _dis.length - 1) | ||
294 | - | 275 | + console.log(result); |
276 | + let res = result.data; | ||
277 | + let _dis = res.discountFee; | ||
278 | + let discountFee = _dis.slice(1, _dis.length - 1); | ||
295 | this.$router.push( | 279 | this.$router.push( |
296 | { | 280 | { |
297 | - path: 'orderPay', | 281 | + path: "orderPay", |
298 | query: { | 282 | query: { |
299 | carColor: this.carColor,// 车牌颜色 | 283 | carColor: this.carColor,// 车牌颜色 |
300 | arrearageTotalFee: res.orderTotalFee,// 应收 | 284 | arrearageTotalFee: res.orderTotalFee,// 应收 |
@@ -303,71 +287,100 @@ export default { | @@ -303,71 +287,100 @@ export default { | ||
303 | carNumber: this.carNumber, // 车牌 | 287 | carNumber: this.carNumber, // 车牌 |
304 | paySrcType: 101, //支付的类型 101 是本次 103是历史欠费 | 288 | paySrcType: 101, //支付的类型 101 是本次 103是历史欠费 |
305 | ordeID: i.orderId, //支付的订单号 | 289 | ordeID: i.orderId, //支付的订单号 |
306 | - appOrderTimeout: res.appOrderTimeout, // 超时描述 | 290 | + appOrderTimeout: res.appOrderTimeout // 超时描述 |
307 | } | 291 | } |
308 | } | 292 | } |
309 | - ) | ||
310 | - }) | ||
311 | - | 293 | + ); |
294 | + }); | ||
312 | } else { | 295 | } else { |
313 | //$('.dialog-out').show() | 296 | //$('.dialog-out').show() |
314 | - this.$msgbox('提示', '停车15分钟内无需缴费,申请成功。') | 297 | + this.$msgbox("提示", "停车15分钟内无需缴费,申请成功。"); |
315 | } | 298 | } |
316 | - | ||
317 | - }) | ||
318 | - | 299 | + }); |
319 | }, | 300 | }, |
320 | toPayHisroryPage() { // 缴纳历史费用 | 301 | toPayHisroryPage() { // 缴纳历史费用 |
321 | - if(this.historyCheckedLen==0){ | ||
322 | - this.$msgbox('提示', '请至少选择一条记录') | ||
323 | - | ||
324 | - return | 302 | + if (this.historyCheckedLen == 0) { |
303 | + this.$msgbox("提示", "请至少选择一条记录"); | ||
304 | + return; | ||
325 | } | 305 | } |
306 | + let salt = this.$utils.myCommonSalt(32); | ||
307 | + let list = "[" + this.orderIds + "]"; | ||
308 | + let jsondata = { | ||
309 | + app_id: this.$utils.myVarAppid, | ||
310 | + deviceInfo: this.$utils.myDeviceInfo, | ||
311 | + salt: salt, | ||
312 | + sign_type: "md5", | ||
313 | + payType: this.$utils.clientBrowsePayType(), | ||
314 | + // appId: this.$utils.myVxAppId, | ||
315 | + terminalSource: "7", | ||
316 | + orderIds: JSON.stringify(this.orderIds) | ||
317 | + }; | ||
318 | + jsondata.sign = this.$utils.signObject(jsondata); | ||
319 | + console.log(jsondata); | ||
320 | + queryArrearageSta(jsondata).then(response => { | ||
321 | + console.log(response.data); | ||
322 | + let res = response.data; | ||
323 | + this.doOrderCreate(res.arrearageTotalFee, res.arrearageActFee, res.carArrearages[0].arrearageDiscFee); | ||
324 | + // let res = response.data.carArrearages[0] | ||
325 | + // console.log(res) | ||
326 | + // this.orderIds = JSON.stringify(this.orderIds) | ||
327 | + // sessionStorage.setItem('pageIds',this.orderIds) | ||
328 | + // console.log(this.orderIds) | ||
329 | + }); | ||
330 | + }, | ||
331 | + doOrderCreate(arrearageTotalFee, arrearageActFee, arrearageDiscFee) { | ||
326 | var salt = this.$utils.myCommonSalt(32); | 332 | var salt = this.$utils.myCommonSalt(32); |
327 | - | ||
328 | - var list = "[" + this.orderIds + "]" | ||
329 | - | ||
330 | - var jsondata = { | 333 | + // var list = "[" + this.orderIds + "]" |
334 | + console.log(this.orderIds); | ||
335 | + let carNumbers = []; | ||
336 | + carNumbers.push(this.carNumber); | ||
337 | + let jsondata = { | ||
331 | app_id: this.$utils.myVarAppid, | 338 | app_id: this.$utils.myVarAppid, |
332 | deviceInfo: this.$utils.myDeviceInfo, | 339 | deviceInfo: this.$utils.myDeviceInfo, |
333 | salt: salt, | 340 | salt: salt, |
334 | - // sign: md5sign, | ||
335 | sign_type: "md5", | 341 | sign_type: "md5", |
336 | - appId: this.$utils.myVxAppId, | ||
337 | - orderIds: list, | ||
338 | - terminalSource: '7', | ||
339 | - payType: 4, | 342 | + orderBigType: 100, |
343 | + payOrderType: 103, | ||
344 | + terminalSource: this.$utils.commonTerminalSource, | ||
345 | + parkOrderIds: this.orderIds, | ||
346 | + operCode: "", | ||
347 | + operName: "", | ||
348 | + backDeveloperCode: "", | ||
349 | + backPlNo: "", | ||
340 | orgId: this.$utils.myOrgId, | 350 | orgId: this.$utils.myOrgId, |
341 | - } | ||
342 | - jsondata.sign = this.$utils.signObject(jsondata) | ||
343 | - | ||
344 | - historyQuery(jsondata).then(response => { | ||
345 | - console.log(response) | ||
346 | - let res = response.data.carArrearages[0] | ||
347 | - console.log(res) | ||
348 | - this.orderIds = JSON.stringify(this.orderIds) | 351 | + orderTotalFee: arrearageTotalFee, |
352 | + orderActFee: arrearageActFee, | ||
353 | + token: "", | ||
354 | + backType: 2, | ||
355 | + carNumberList: carNumbers, | ||
356 | + payType: "12" | ||
357 | + }; | ||
358 | + jsondata.sign = this.$utils.signObject(jsondata); | ||
359 | + console.log(jsondata); | ||
360 | + doOrderCreate(jsondata).then(response => { | ||
361 | + let res = response.data; | ||
349 | this.$router.push( | 362 | this.$router.push( |
350 | { | 363 | { |
351 | - path:'orderPay', | ||
352 | - query:{ | ||
353 | - carColor:this.carColor,// 车牌颜色 | ||
354 | - arrearageTotalFee: res.arrearageTotalFee,// 应收 | ||
355 | - arrearageDiscFee: res.arrearageDiscFee,// 优惠 | ||
356 | - arrearageActFee: res.arrearageActFee,// 实收 | 364 | + path: "orderPay", |
365 | + query: { | ||
366 | + carColor: this.carColor,// 车牌颜色 | ||
367 | + arrearageTotalFee: arrearageTotalFee,// 应收 | ||
368 | + arrearageDiscFee: arrearageDiscFee,// 优惠 | ||
369 | + arrearageActFee: arrearageActFee,// 实收 | ||
357 | carNumber: this.carNumber, // 车牌 | 370 | carNumber: this.carNumber, // 车牌 |
358 | paySrcType: 103, //支付的类型 101 是本次 103是历史欠费 | 371 | paySrcType: 103, //支付的类型 101 是本次 103是历史欠费 |
359 | - ordeID: this.orderIds, //支付的订单号 | ||
360 | - appOrderTimeout: '' | 372 | + ordeID: res.rltOrderId, //支付的订单号 |
373 | + appOrderTimeout: "", | ||
374 | + // backDeveloperCode: response.data.inChargerCode | ||
375 | + backDeveloperCode: "" | ||
361 | } | 376 | } |
362 | } | 377 | } |
363 | - ) | ||
364 | - }) | 378 | + ); |
379 | + }); | ||
365 | } | 380 | } |
366 | }, | 381 | }, |
367 | - filters: { | ||
368 | - | ||
369 | - } | ||
370 | -} | 382 | + filters: {} |
383 | +}; | ||
371 | </script> | 384 | </script> |
372 | 385 | ||
373 | <style scoped lang="scss"> | 386 | <style scoped lang="scss"> |
@@ -468,70 +481,72 @@ export default { | @@ -468,70 +481,72 @@ export default { | ||
468 | } | 481 | } |
469 | } | 482 | } |
470 | 483 | ||
471 | - .history-con{ | 484 | + .history-con { |
472 | height: calc(100% - 38px); | 485 | height: calc(100% - 38px); |
473 | overflow: hidden; | 486 | overflow: hidden; |
474 | } | 487 | } |
475 | - .history-body{ | 488 | + |
489 | + .history-body { | ||
476 | height: calc(100% - 81px); | 490 | height: calc(100% - 81px); |
477 | overflow-y: scroll; | 491 | overflow-y: scroll; |
478 | } | 492 | } |
479 | - .history-footer{ | 493 | + |
494 | + .history-footer { | ||
480 | height: 81px; | 495 | height: 81px; |
481 | background: #F8F8F8; | 496 | background: #F8F8F8; |
482 | } | 497 | } |
483 | 498 | ||
484 | - .cost-main-history{ | 499 | + .cost-main-history { |
485 | margin-bottom: 10px; | 500 | margin-bottom: 10px; |
486 | - background:#fff url("../../assets/images/parkPay/choose.png") no-repeat 10px center; | 501 | + background: #fff url("../../assets/images/parkPay/choose.png") no-repeat 10px center; |
487 | background-size: 20px 20px; | 502 | background-size: 20px 20px; |
488 | cursor: pointer; | 503 | cursor: pointer; |
489 | } | 504 | } |
490 | 505 | ||
491 | - | ||
492 | - .isChecked{ | ||
493 | - background:#fff url("../../assets/images/parkPay/choosed.png") no-repeat 10px center; | 506 | + .isChecked { |
507 | + background: #fff url("../../assets/images/parkPay/choosed.png") no-repeat 10px center; | ||
494 | background-size: 20px 20px; | 508 | background-size: 20px 20px; |
495 | } | 509 | } |
496 | 510 | ||
497 | - .money-all{ | 511 | + .money-all { |
498 | padding-left: 18px; | 512 | padding-left: 18px; |
499 | height: 25px; | 513 | height: 25px; |
500 | line-height: 25px; | 514 | line-height: 25px; |
501 | font-weight: 500; | 515 | font-weight: 500; |
502 | background: #FEF8DB; | 516 | background: #FEF8DB; |
503 | - span{ | 517 | + span { |
504 | color: #BC0202; | 518 | color: #BC0202; |
505 | } | 519 | } |
506 | } | 520 | } |
507 | 521 | ||
508 | - .statistical-data{ | 522 | + .statistical-data { |
509 | padding-left: 18px; | 523 | padding-left: 18px; |
510 | height: 32px; | 524 | height: 32px; |
511 | line-height: 32px; | 525 | line-height: 32px; |
512 | background: #E6FAFA; | 526 | background: #E6FAFA; |
513 | - span{ | 527 | + span { |
514 | color: #D20000; | 528 | color: #D20000; |
515 | } | 529 | } |
516 | } | 530 | } |
517 | - .opration-wrap{ | 531 | + |
532 | + .opration-wrap { | ||
518 | padding-left: 18px; | 533 | padding-left: 18px; |
519 | height: 49px; | 534 | height: 49px; |
520 | line-height: 49px; | 535 | line-height: 49px; |
521 | background: #f8f8f8; | 536 | background: #f8f8f8; |
522 | display: flex; | 537 | display: flex; |
523 | justify-content: space-between; | 538 | justify-content: space-between; |
524 | - .check-btn{ | 539 | + .check-btn { |
525 | padding-left: 30px; | 540 | padding-left: 30px; |
526 | background: url("../../assets/images/parkPay/choose.png") no-repeat 0 center; | 541 | background: url("../../assets/images/parkPay/choose.png") no-repeat 0 center; |
527 | background-size: 20px 20px; | 542 | background-size: 20px 20px; |
528 | cursor: pointer; | 543 | cursor: pointer; |
529 | } | 544 | } |
530 | - .isAllChecked{ | 545 | + .isAllChecked { |
531 | background: url("../../assets/images/parkPay/choosed.png") no-repeat 0 center; | 546 | background: url("../../assets/images/parkPay/choosed.png") no-repeat 0 center; |
532 | background-size: 20px 20px; | 547 | background-size: 20px 20px; |
533 | } | 548 | } |
534 | - .settle-btn{ | 549 | + .settle-btn { |
535 | width: 106px; | 550 | width: 106px; |
536 | height: 49px; | 551 | height: 49px; |
537 | background: linear-gradient(145deg, #2783E9 0%, #227ADC 100%); | 552 | background: linear-gradient(145deg, #2783E9 0%, #227ADC 100%); |