新增卡单出单支付调用接口

This commit is contained in:
种岩宁
2024-06-28 11:53:13 +08:00
parent f937a9c376
commit 65e2642dea
2 changed files with 93 additions and 72 deletions

View File

@@ -3,7 +3,7 @@
* @Date: 2021-03-26 10:38:37
* @LastEditTime: 2021-04-02 16:10:30
* @LastEditors: PangXingYue
* @Description:
* @Description:
* @FilePath: \ebiz-h5\src\api\ebiz\cardList\cardList.js
*/
// 卡单接口
@@ -95,7 +95,7 @@ export function getPayTemp(data) {
//
export function getShareParam(data) {
return request({
url: getUrl('/customer/account/getShareParam', 1),
url: getUrl('/customer/account/getShareParam', 1),
method: 'post',
data
})
@@ -168,4 +168,12 @@ export function deleteGroupCardByInsured(data) {
method: 'post',
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(Button)
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 areaList from '@/assets/js/utils/area'
import Loading from '@/components/ebiz/Loading'
@@ -219,7 +219,7 @@ export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
insuredDTOs:[],//被保人信息
insuredDTOs: [], //被保人信息
// 银行卡支付图片地址
src: this.$assetsUrl + 'images/cardImg.png',
// 微信支付图片地址
@@ -291,7 +291,7 @@ export default {
accBankCity: '',
areaStr: '',
mainRiskCode: '',
isGroupCard:'' //1 团险标识
isGroupCard: '' //1 团险标识
}
},
created() {
@@ -311,9 +311,9 @@ export default {
this.bankListName = orderDetail.orderAccountDTO.bankName
this.orderStatus = orderDetail.orderInfoDTO.orderStatus
localStorage.orderNo = orderDetail.orderInfoDTO.orderNo
orderDetail.insuredDTOs.forEach(item=>{
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
orderDetail.insuredDTOs.forEach((item) => {
item.riskDTOLst.forEach((ii) => {
if (ii.isMainRisk == '0') {
this.mainRiskCode = ii.mainRiskCode
}
})
@@ -478,7 +478,7 @@ export default {
let data = {
operateType: 'bank_type'
}
getBankList(data).then(res => {
getBankList(data).then((res) => {
if (res.result == '0') {
console.log('银行卡列表', res.content)
self.bankList = res.content
@@ -496,23 +496,23 @@ export default {
},
getPayTemp() {
getPayTemp({ orderNo: window.localStorage.getItem('orderNo') })
.then(res => {
.then((res) => {
if (res.result == '0') {
this.noEdit = res.content.flag != 'false'
}
})
.catch(e => {
.catch((e) => {
console.error(e)
})
},
// 获取支付详情
getOrderDetail() {
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => {
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then((res) => {
if (res.result == '0') {
this.insuredDTOs = res.orderDTO.insuredDTOs
res.orderDTO.insuredDTOs.forEach(item=>{
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
res.orderDTO.insuredDTOs.forEach((item) => {
item.riskDTOLst.forEach((ii) => {
if (ii.isMainRisk == '0') {
this.mainRiskCode = ii.mainRiskCode
}
})
@@ -544,7 +544,7 @@ export default {
result: '',
resultMessage: '交易处理成功',
uwResult: '02',
cvalidate:res.orderDTO.orderInfoDTO.cvalidate //生效日期
cvalidate: res.orderDTO.orderInfoDTO.cvalidate //生效日期
}
// this.bankListName = res.orderDTO.orderAccountDTO.bankName
this.underWriteData.bankCode =
@@ -573,7 +573,7 @@ export default {
result: '',
resultMessage: '交易处理失败',
uwResult: '00',
cvalidate:res.orderDTO.orderInfoDTO.cvalidate //生效日期
cvalidate: res.orderDTO.orderInfoDTO.cvalidate //生效日期
}
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
this.$toast(res.resultMessage)
@@ -615,21 +615,38 @@ export default {
if (true !== valid) {
return this.$toast(this.$validator.errors.all()[0])
}
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('当前不可支付')
}
let data = {
orderNo: window.localStorage.getItem('orderNo')
}
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
// 支付之前要先调用一下是否跨天,不让跨天支付 过了24点 保费不一样 CYN 2024.06.28
let res = await cardContIsPay(data)
this.$toast.clear()
if (res.result == '0') {
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() {
@@ -638,7 +655,7 @@ export default {
cardOrder: 'cardOrder',
payType: this.radio
}
acceptInsurance(data).then(res => {
acceptInsurance(data).then((res) => {
// this.$jump({
// flag: 'h5',
// extra: {
@@ -748,13 +765,44 @@ export default {
let res = await saveOrUpdateAccount(data)
this.$toast.clear()
if (res.result == '0') {
if(this.mainRiskCode == 'GFRS_M0058'){
if (this.mainRiskCode == 'GFRS_M0058') {
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
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(() => {
this.$toast.loading({
duration: 0, // 持续展示 toast
@@ -764,42 +812,8 @@ export default {
})
this.acceptInsurance()
})
.catch(() => {
})
}else{
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
}
.catch(() => {})
} 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({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
@@ -808,7 +822,6 @@ export default {
})
this.acceptInsurance()
}
}
},
// 选择微信支付校验身份证类型