mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-21 03:06:43 +08:00
Merge branch 'feature/GFRS-1858-【人核保单支持线上支付】' into release/1012
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import request from '@/assets/js/utils/request'
|
||||
import getUrl from '@/assets/js/utils/get-url'
|
||||
|
||||
// 保费计算
|
||||
export function saveOrUpdateOrderInfo(data) {
|
||||
return request({
|
||||
@@ -9,6 +8,14 @@ export function saveOrUpdateOrderInfo(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
//人核转线上支付判断是否可进行支付操作
|
||||
export function payFlag(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/insure/payFlag', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 订单列表
|
||||
export function orderList(data) {
|
||||
return request({
|
||||
|
||||
@@ -1656,6 +1656,10 @@ export default {
|
||||
{
|
||||
id: '57',
|
||||
text: '卡单保存账户信息成功'
|
||||
},
|
||||
{
|
||||
id: '58',
|
||||
text: '待客户付款'
|
||||
}
|
||||
],
|
||||
// 产品编码
|
||||
|
||||
@@ -24,7 +24,7 @@ const detail = () => import('@/views/ebiz/sale/Detail')
|
||||
const productTip = () => import('@/views/ebiz/sale/productTip')
|
||||
const avoidDutyTip = () => import('@/views/ebiz/sale/AvoidDutyTip')
|
||||
const doubleRecordTip = () => import('@/views/ebiz/sale/DoubleRecordTip')
|
||||
|
||||
const PayResultFail = () => import('@/views/ebiz/sale/PayResultFail')
|
||||
let riskName = localStorage.riskName
|
||||
console.log('sale/riskName==', riskName)
|
||||
export default [
|
||||
@@ -212,5 +212,13 @@ export default [
|
||||
{
|
||||
path: '/sale/test',
|
||||
component: Test
|
||||
},
|
||||
{
|
||||
path: '/sale/payResultFail',
|
||||
name: 'payResultFail',
|
||||
component: PayResultFail,
|
||||
meta: {
|
||||
title: '支付结果'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
<div v-if="!!order.orderInfoDTO.doubleFlag && order.orderInfoDTO.doubleFlag == '0'" class="fs12 mt15">
|
||||
温馨提示:本投保单满足双录条件,需要双录质检通过后才能承保。
|
||||
</div>
|
||||
|
||||
<div class="text-right mt15 ">
|
||||
<van-button v-if="active == 'uncommit'" round @click="goDetail(order)" size="small" class="mr5" type="danger" v-no-more-click="1000"
|
||||
>编辑</van-button
|
||||
@@ -114,16 +115,9 @@
|
||||
<van-button @click="changeCard(order)" size="small" class="mr5" type="danger" round>修改卡号</van-button>
|
||||
<van-button @click="againPay(order)" size="small" class="mr5" type="danger" round>重新支付</van-button>
|
||||
</template>
|
||||
|
||||
<van-button
|
||||
@click="goPay(order)"
|
||||
v-if="active == 'commit' && order.orderInfoDTO.orderStatus == '02'"
|
||||
size="small"
|
||||
class="mr5"
|
||||
type="danger"
|
||||
round
|
||||
>去支付</van-button
|
||||
>
|
||||
<template v-if="active == 'commit' && (order.orderInfoDTO.orderStatus == '02' || order.orderInfoDTO.orderStatus == '58')">
|
||||
<van-button @click="goPay(order)" size="small" class="mr5" type="danger" round>去支付</van-button>
|
||||
</template>
|
||||
|
||||
<!-- <van-button
|
||||
@click="goNucleus(order)"
|
||||
|
||||
@@ -90,13 +90,14 @@
|
||||
<script>
|
||||
import { Cell, CellGroup, RadioGroup, Radio, Dialog } from 'vant'
|
||||
import { acceptInsurance } from '@/api/ebiz/sale/sale'
|
||||
import { underWrite, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||
import { payFlag, underWrite, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||
import Loading from '@/components/ebiz/Loading'
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
return {
|
||||
orderNo: '', //订单号
|
||||
// 支付表单
|
||||
formActionUrl: config.payUrl,
|
||||
// 单选
|
||||
@@ -158,6 +159,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.orderNo = window.localStorage.getItem('orderNo')
|
||||
console.log('----保融form.action', config.payUrl)
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
// 不在微信环境下
|
||||
@@ -185,19 +187,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 点击支付
|
||||
payMent() {
|
||||
if (!this.isWeixin) {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
}
|
||||
getAcceptInsurance() {
|
||||
let that = this
|
||||
let data = {
|
||||
orderNo: window.localStorage.getItem('orderNo'),
|
||||
orderNo: this.orderNo,
|
||||
payType: this.radio
|
||||
}
|
||||
acceptInsurance(data).then(res => {
|
||||
@@ -246,6 +239,29 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击支付
|
||||
async payMent() {
|
||||
if (!this.isWeixin) {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
}
|
||||
|
||||
const res = await payFlag({ orderNo: this.orderNo })
|
||||
console.dir(res)
|
||||
if (res.content.payFlag == 'Y') {
|
||||
this.getAcceptInsurance()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
|
||||
setTimeout(() => {
|
||||
this.$router.push({ path: '/sale/payResultFail' })
|
||||
}, 2000)
|
||||
}
|
||||
},
|
||||
// 取消支付
|
||||
cancel() {
|
||||
this.$toast.clear()
|
||||
|
||||
82
src/views/ebiz/sale/PayResultFail.vue
Normal file
82
src/views/ebiz/sale/PayResultFail.vue
Normal file
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<div class="payResult-container" >
|
||||
<div class="payResult-header flex justify-content-c align-items-c m15 bg-white flex-direction-colunm">
|
||||
<img :src="srcFail" class="payResult-img mb15 pt15" />
|
||||
|
||||
<h3>支付失败</h3>
|
||||
<div class="bottom-btn bg-white" >
|
||||
<van-button type="danger" size="large" @click="next" v-no-more-click="1000"> 返回</van-button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
// 图片
|
||||
srcSuccess: this.$assetsUrl + 'images/success.png',
|
||||
srcPending: this.$assetsUrl + 'images/pending.png',
|
||||
srcFail: this.$assetsUrl + 'images/fail.png'
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 返回列表页
|
||||
next() {
|
||||
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/list'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/list'
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'left_button_click') {
|
||||
this.next()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
window.appCallBack = this.appCallBack
|
||||
},
|
||||
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
h3{
|
||||
padding:20px 0px;
|
||||
}
|
||||
.payResult-container {
|
||||
.payResult-header {
|
||||
width: 345px;
|
||||
// height: 143px;
|
||||
.payResult-img {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
}
|
||||
}
|
||||
// /deep/ .van-cell__value {
|
||||
// text-align: left;
|
||||
// }
|
||||
</style>
|
||||
Reference in New Issue
Block a user