20号上线修改重复支付重复调核保

This commit is contained in:
xiaokun
2019-10-20 14:13:05 +08:00
parent 977cebe49d
commit 12d99fcd28
2 changed files with 48 additions and 13 deletions

View File

@@ -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: {

View File

@@ -3,8 +3,11 @@
<div>
<van-cell-group>
<van-cell title="投保人" :value="underWriteData.appntName" />
<van-cell title="支付金额" :value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount}元`" class="payMent-title" />
<van-cell
title="支付金额"
:value="underWriteData.orderAmount == undefined ? '' : `${underWriteData.orderAmount}元`"
class="payMent-title"
/>
<van-cell-group class="flex align-items-c">
<img :src="src" class="pl10" />
<van-cell title="银行卡支付" clickable>
@@ -14,7 +17,6 @@
</van-radio-group>
</van-cell>
</van-cell-group>
<van-cell title="姓名" :value="underWriteData.accountName" />
<van-cell title="卡号" :value="underWriteData.cardBookCode" />
<van-cell title="银行">
@@ -64,10 +66,16 @@
</form>
</div>
<!-- <van-button class="m-btn fr" type="danger" @click="submit">确定</van-button>
<van-button class="m-btn fr green" @click="reset">重置</van-button> -->
<van-button class="m-btn fr green" @click="reset">重置</van-button>-->
<div class="bg-white bottom-btn">
<van-button type="danger" style="width: 50vw" @click="cancel" v-no-more-click="1000">返回投保单列表</van-button>
<van-button type="danger" style="width: 50vw" @click="payMent" v-no-more-click="1000" :disabled="payStatus == '1' || payStatus == '2' || payStatus == '8'">去支付</van-button>
<van-button
type="danger"
style="width: 50vw"
@click="payMent"
v-no-more-click="1000"
:disabled="payStatus == '1' || payStatus == '2' || payStatus == '8'"
>去支付</van-button>
</div>
</div>
</template>
@@ -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()