diff --git a/src/views/ebiz/sale/List.vue b/src/views/ebiz/sale/List.vue index 0ecfc8be1..6574b83f3 100644 --- a/src/views/ebiz/sale/List.vue +++ b/src/views/ebiz/sale/List.vue @@ -177,7 +177,8 @@ export default { //再次支付 againPay(order) { localStorage.orderNo = order.orderInfoDTO.orderNo - localStorage.salelist = '1' + // 再次支付 salelist为 0 + localStorage.salelist = '0' this.$jump({ flag: 'h5', extra: { diff --git a/src/views/ebiz/sale/PayMent.vue b/src/views/ebiz/sale/PayMent.vue index e071b14de..93f1ee1a6 100644 --- a/src/views/ebiz/sale/PayMent.vue +++ b/src/views/ebiz/sale/PayMent.vue @@ -3,8 +3,11 @@
- - + @@ -14,7 +17,6 @@ - @@ -64,10 +66,16 @@
+ 重置-->
返回投保单列表 - 去支付 + 去支付
@@ -81,7 +89,7 @@ export default { data() { return { // 支付表单 - formActionUrl:config.payUrl, + formActionUrl: config.payUrl, // 单选 radio: '1', // 图片地址 @@ -127,17 +135,20 @@ export default { tradeState: '' // 状态 }, gotPayParam: false, // 是否已正确获取支付参数, - payStatus:'',// 接口返回的支付状态 + payStatus: '' // 接口返回的支付状态 } }, mounted() { console.log('----保融form.action', config.payUrl) document.body.style.backgroundColor = '#fff' if (localStorage.salelist == '1') { + // 第一次支付 调核保获取 this.underWrite() this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData')) this.srcImg = this.$assetsUrl + `images/bank/bank_${JSON.parse(window.localStorage.getItem('underWriteData')).bankCode}.png` } else { + // 再次支付 调详情 获取信息 + this.twounderWrite() this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData')) this.srcImg = this.$assetsUrl + `images/bank/bank_${JSON.parse(window.localStorage.getItem('underWriteData')).bankCode}.png` } @@ -163,8 +174,8 @@ export default { // 1成 4支付中 2支付失败 8转批扣(无此情况) this.payStatus = res.payStatus - if(this.payStatus == '1'){ - this.$toast({message:'当前投保单已支付成功,请返回列表页查询',duration:5000}) + if (this.payStatus == '1') { + this.$toast({ message: '当前投保单已支付成功,请返回列表页查询', duration: 5000 }) return } @@ -184,15 +195,14 @@ export default { this.gotPayParam = true this.$forceUpdate() let thisRef = this - this.$nextTick(()=>{ - thisRef.$refs.payForm.submit()// 表单提交,发起支付,跳至收银台 + this.$nextTick(() => { + thisRef.$refs.payForm.submit() // 表单提交,发起支付,跳至收银台 }) window.localStorage.setItem('resMessage', res.resultMessage) window.localStorage.setItem('payStatus', res.payStatus) window.localStorage.setItem('payInfo', JSON.stringify(res)) - } else { that.$toast.clear() that.$toast(res.resultMessage) @@ -213,6 +223,29 @@ export default { } }) }, + // 再次支付 + twounderWrite() { + getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => { + if (res.code == '0') { + this.$toast.clear() + let underWriteData = { + accountName: res.content.orderDTO.orderAccountDTO.accountName, + appntName: res.content.orderDTO.appntDTO.name, + bankCode: res.content.orderDTO.orderAccountDTO.bankCode, + bankName: res.content.orderDTO.orderAccountDTO.bankName, + cardBookCode: res.content.orderDTO.orderAccountDTO.cardBookCode, + orderAmount: res.content.orderDTO.orderInfoDTO.orderAmount, + orderNo: res.content.orderDTO.orderAccountDTO.orderNo, + result: '', + resultMessage: '交易处理成功', + uwResult: '02' + } + window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData)) + } else { + this.$toast(res.resultMessage) + } + }) + }, // 获取支付信息 underWrite() { let data = { @@ -224,6 +257,7 @@ export default { } } } + underWrite(data).then(res => { if (res.result == '0') { this.$toast.clear()