Compare commits

...

1 Commits

Author SHA1 Message Date
种岩宁
65e2642dea 新增卡单出单支付调用接口 2024-06-28 11:53:13 +08:00
2 changed files with 93 additions and 72 deletions

View File

@@ -3,7 +3,7 @@
* @Date: 2021-03-26 10:38:37 * @Date: 2021-03-26 10:38:37
* @LastEditTime: 2021-04-02 16:10:30 * @LastEditTime: 2021-04-02 16:10:30
* @LastEditors: PangXingYue * @LastEditors: PangXingYue
* @Description: * @Description:
* @FilePath: \ebiz-h5\src\api\ebiz\cardList\cardList.js * @FilePath: \ebiz-h5\src\api\ebiz\cardList\cardList.js
*/ */
// 卡单接口 // 卡单接口
@@ -95,7 +95,7 @@ export function getPayTemp(data) {
// //
export function getShareParam(data) { export function getShareParam(data) {
return request({ return request({
url: getUrl('/customer/account/getShareParam', 1), url: getUrl('/customer/account/getShareParam', 1),
method: 'post', method: 'post',
data data
}) })
@@ -168,4 +168,12 @@ export function deleteGroupCardByInsured(data) {
method: 'post', method: 'post',
data data
}) })
} }
// 不让跨天支付 单新契约出单跨天支付流程优化
export function cardContIsPay(data) {
return request({
url: getUrl('/sale/card/contIsPay', 1),
method: 'post',
data
})
}

View File

@@ -198,7 +198,7 @@ Vue.use(Checkbox).use(CheckboxGroup)
Vue.use(Field) Vue.use(Field)
Vue.use(Button) Vue.use(Button)
import { acceptInsurance, getBankList, underWrite, getOrderDetail } from '@/api/ebiz/sale/sale' import { acceptInsurance, getBankList, underWrite, getOrderDetail } from '@/api/ebiz/sale/sale'
import { saveOrUpdateAccount, getPayTemp, getShareParam } from '@/api/ebiz/cardList/cardList.js' import { saveOrUpdateAccount, getPayTemp, getShareParam, cardContIsPay } from '@/api/ebiz/cardList/cardList.js'
import BankCardScan from '@/components/ebiz/sale/BankCardScan' import BankCardScan from '@/components/ebiz/sale/BankCardScan'
import areaList from '@/assets/js/utils/area' import areaList from '@/assets/js/utils/area'
import Loading from '@/components/ebiz/Loading' import Loading from '@/components/ebiz/Loading'
@@ -219,7 +219,7 @@ export default {
data() { data() {
let isWeixin = this.$utils.device().isWeixin //判断环境 let isWeixin = this.$utils.device().isWeixin //判断环境
return { return {
insuredDTOs:[],//被保人信息 insuredDTOs: [], //被保人信息
// 银行卡支付图片地址 // 银行卡支付图片地址
src: this.$assetsUrl + 'images/cardImg.png', src: this.$assetsUrl + 'images/cardImg.png',
// 微信支付图片地址 // 微信支付图片地址
@@ -291,7 +291,7 @@ export default {
accBankCity: '', accBankCity: '',
areaStr: '', areaStr: '',
mainRiskCode: '', mainRiskCode: '',
isGroupCard:'' //1 团险标识 isGroupCard: '' //1 团险标识
} }
}, },
created() { created() {
@@ -311,9 +311,9 @@ export default {
this.bankListName = orderDetail.orderAccountDTO.bankName this.bankListName = orderDetail.orderAccountDTO.bankName
this.orderStatus = orderDetail.orderInfoDTO.orderStatus this.orderStatus = orderDetail.orderInfoDTO.orderStatus
localStorage.orderNo = orderDetail.orderInfoDTO.orderNo localStorage.orderNo = orderDetail.orderInfoDTO.orderNo
orderDetail.insuredDTOs.forEach(item=>{ orderDetail.insuredDTOs.forEach((item) => {
item.riskDTOLst.forEach(ii=>{ item.riskDTOLst.forEach((ii) => {
if(ii.isMainRisk == '0'){ if (ii.isMainRisk == '0') {
this.mainRiskCode = ii.mainRiskCode this.mainRiskCode = ii.mainRiskCode
} }
}) })
@@ -478,7 +478,7 @@ export default {
let data = { let data = {
operateType: 'bank_type' operateType: 'bank_type'
} }
getBankList(data).then(res => { getBankList(data).then((res) => {
if (res.result == '0') { if (res.result == '0') {
console.log('银行卡列表', res.content) console.log('银行卡列表', res.content)
self.bankList = res.content self.bankList = res.content
@@ -496,23 +496,23 @@ export default {
}, },
getPayTemp() { getPayTemp() {
getPayTemp({ orderNo: window.localStorage.getItem('orderNo') }) getPayTemp({ orderNo: window.localStorage.getItem('orderNo') })
.then(res => { .then((res) => {
if (res.result == '0') { if (res.result == '0') {
this.noEdit = res.content.flag != 'false' this.noEdit = res.content.flag != 'false'
} }
}) })
.catch(e => { .catch((e) => {
console.error(e) console.error(e)
}) })
}, },
// 获取支付详情 // 获取支付详情
getOrderDetail() { getOrderDetail() {
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => { getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then((res) => {
if (res.result == '0') { if (res.result == '0') {
this.insuredDTOs = res.orderDTO.insuredDTOs this.insuredDTOs = res.orderDTO.insuredDTOs
res.orderDTO.insuredDTOs.forEach(item=>{ res.orderDTO.insuredDTOs.forEach((item) => {
item.riskDTOLst.forEach(ii=>{ item.riskDTOLst.forEach((ii) => {
if(ii.isMainRisk == '0'){ if (ii.isMainRisk == '0') {
this.mainRiskCode = ii.mainRiskCode this.mainRiskCode = ii.mainRiskCode
} }
}) })
@@ -544,7 +544,7 @@ export default {
result: '', result: '',
resultMessage: '交易处理成功', resultMessage: '交易处理成功',
uwResult: '02', uwResult: '02',
cvalidate:res.orderDTO.orderInfoDTO.cvalidate //生效日期 cvalidate: res.orderDTO.orderInfoDTO.cvalidate //生效日期
} }
// this.bankListName = res.orderDTO.orderAccountDTO.bankName // this.bankListName = res.orderDTO.orderAccountDTO.bankName
this.underWriteData.bankCode = this.underWriteData.bankCode =
@@ -573,7 +573,7 @@ export default {
result: '', result: '',
resultMessage: '交易处理失败', resultMessage: '交易处理失败',
uwResult: '00', uwResult: '00',
cvalidate:res.orderDTO.orderInfoDTO.cvalidate //生效日期 cvalidate: res.orderDTO.orderInfoDTO.cvalidate //生效日期
} }
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData)) // window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
@@ -615,21 +615,38 @@ export default {
if (true !== valid) { if (true !== valid) {
return this.$toast(this.$validator.errors.all()[0]) return this.$toast(this.$validator.errors.all()[0])
} }
switch (this.orderStatus) { let data = {
case '56': orderNo: window.localStorage.getItem('orderNo')
case '57': }
this.payMent() this.$toast.loading({
break duration: 0, // 持续展示 toast
// case '02': forbidClick: true, // 禁用背景点击
// break loadingType: 'spinner',
default: message: '加载中……'
if (!this.noEdit) { })
this.payMent(true) // 支付之前要先调用一下是否跨天,不让跨天支付 过了24点 保费不一样 CYN 2024.06.28
return true let res = await cardContIsPay(data)
} else { this.$toast.clear()
this.acceptInsurance() if (res.result == '0') {
return this.$toast('当前不可支付') switch (this.orderStatus) {
} case '56':
case '57':
this.payMent()
break
// case '02':
// break
default:
if (!this.noEdit) {
this.payMent(true)
return true
} else {
this.acceptInsurance()
return this.$toast('当前不可支付')
}
}
} else {
this.$toast(res.resultMessage)
this.isLoading = false
} }
}, },
acceptInsurance() { acceptInsurance() {
@@ -638,7 +655,7 @@ export default {
cardOrder: 'cardOrder', cardOrder: 'cardOrder',
payType: this.radio payType: this.radio
} }
acceptInsurance(data).then(res => { acceptInsurance(data).then((res) => {
// this.$jump({ // this.$jump({
// flag: 'h5', // flag: 'h5',
// extra: { // extra: {
@@ -748,13 +765,44 @@ export default {
let res = await saveOrUpdateAccount(data) let res = await saveOrUpdateAccount(data)
this.$toast.clear() this.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
if(this.mainRiskCode == 'GFRS_M0058'){ if (this.mainRiskCode == 'GFRS_M0058') {
Dialog.alert({ Dialog.alert({
title: '特别提醒', title: '特别提醒',
messageAlign: 'left', messageAlign: 'left',
confirmButtonText: '确认', confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`, message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`
}) })
.then(() => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
})
.catch(() => {})
} else {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
}
} else {
this.$toast(res.resultMessage)
this.isLoading = false
}
} else {
if (this.mainRiskCode == 'GFRS_M0058') {
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`
})
.then(() => { .then(() => {
this.$toast.loading({ this.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
@@ -764,42 +812,8 @@ export default {
}) })
this.acceptInsurance() this.acceptInsurance()
}) })
.catch(() => { .catch(() => {})
})
}else{
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
}
} else { } else {
this.$toast(res.resultMessage)
this.isLoading = false
}
} else {
if(this.mainRiskCode == 'GFRS_M0058'){
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
})
.catch(() => {
})
}else{
this.$toast.loading({ this.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击 forbidClick: true, // 禁用背景点击
@@ -808,7 +822,6 @@ export default {
}) })
this.acceptInsurance() this.acceptInsurance()
} }
} }
}, },
// 选择微信支付校验身份证类型 // 选择微信支付校验身份证类型