Merge branch 'feature/GFRS-1291【0529】银行卡鉴权' into release/0528

# Conflicts:
#	src/api/ebiz/sale/sale.js
This commit is contained in:
tian.guangyuan
2020-05-29 14:05:15 +08:00
2 changed files with 46 additions and 3 deletions

View File

@@ -230,3 +230,12 @@ export function getCompany(data) {
data
})
}
// 2.1. 校验银行卡信息
export function checkCard(data) {
return request({
url: getUrl('/customer/checkCard', 1),
method: 'post',
data
})
}

View File

@@ -113,7 +113,7 @@
<script>
import { Cell, CellGroup, Field, RadioGroup, Radio, Popup, List, Switch, Toast, SwitchCell, Icon } from 'vant'
import { saveInformation, getBankList, getOrderDetail } from '@/api/ebiz/sale/sale'
import { saveInformation, getBankList, getOrderDetail, checkCard } from '@/api/ebiz/sale/sale'
import utilsAge from '@/assets/js/utils/age'
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
import IndexBar from '@/components/ebiz/sale/IndexBar'
@@ -160,7 +160,8 @@ export default {
changeCard: localStorage.changeCard,
age: null,
productNo: null,
salePageFlag: '6'
salePageFlag: '6',
appntDTO: null
}
},
methods: {
@@ -281,11 +282,41 @@ export default {
that.name = val
},
// 下一步
next() {
async next() {
if (this.productNo === 'GFRS_M0016' && this.age > 65) {
this.$toast('本产品年龄大于65岁不能投保')
return
}
let data
if(this.saleInsuredInfo.idNo){
data = {
"account": this.bankId,
"idNo": this.saleInsuredInfo.idNo,
"idType": this.saleInsuredInfo.idType,
"mobile": this.saleInsuredInfo.mobile,
"name": this.saleInsuredInfo.name
}
}else {
data = {
"account": this.bankId,
"idNo": this.appntDTO.idNo,
"idType": this.appntDTO.idType,
"mobile": this.appntDTO.mobile,
"name": this.appntDTO.name
}
}
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let res = await checkCard(data)
this.$toast.clear()
if(res.result != '0'){
return this.$toast(res.resultMessage)
}
let that = this
that.$validator.validate().then(valid => {
if (valid === true) {
@@ -435,6 +466,9 @@ export default {
getOrderDetail({ orderNo: localStorage.orderNo }).then(res => {
console.log(res)
if (res.result == 0) {
this.appntDTO = res.orderDTO.appntDTO
//如果是从编辑进来的
if (this.$route.query.edit) {
//投被保险人关系