Merge branch 'feature/GFRS-2301【需求】健康险渠道国富无忧卡金掌桂开发的需求' into dev

This commit is contained in:
liyuetong
2021-05-18 16:13:13 +08:00
3 changed files with 36 additions and 27 deletions

View File

@@ -859,7 +859,6 @@ export function sureArea(that, area, type, flag = false) {
*/ */
export function getIdentityInfo(that, data, type) { export function getIdentityInfo(that, data, type) {
if (data.name && data.name != '待识别') { if (data.name && data.name != '待识别') {
if (type == '1') {
that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}` that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}`
that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}` that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}`
that.userInfo.name = data.name that.userInfo.name = data.name
@@ -867,15 +866,6 @@ export function getIdentityInfo(that, data, type) {
that.userInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}` that.userInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}`
that.userInfo.sex = data.gender == '男' ? '0' : '1' that.userInfo.sex = data.gender == '男' ? '0' : '1'
that.effectiveDateTypeAble = idToData(data.idNo).age <= 45 that.effectiveDateTypeAble = idToData(data.idNo).age <= 45
} else if (type == '2') {
that.insuredInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}`
that.insuredInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}`
that.insuredInfo.name = data.name
that.insuredInfo.idNo = data.idNo
that.insuredInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}`
that.insuredInfo.sex = data.gender == '男' ? '0' : '1'
that.effectiveDateTypeAbleInsured = idToData(data.idNo).age <= 45
}
} }
that.isScan = false that.isScan = false
that.bankisScan = false that.bankisScan = false

View File

@@ -196,7 +196,7 @@
@confirm="onDateConfirm($event, '7')" @confirm="onDateConfirm($event, '7')"
ref="certiexpiredate" ref="certiexpiredate"
:flag="true" :flag="true"
:readonly="idLimit" :readonly="idLimitInsured"
></FieldDatePicter> ></FieldDatePicter>
<div class="border-bt relative fs14 p10 flex justify-content-fe"> <div class="border-bt relative fs14 p10 flex justify-content-fe">
<van-checkbox v-model="insuredInfo.effectiveDateType" :disabled="effectiveDateTypeAbleInsured" @change="effectiveDataTypeChangeInsured" <van-checkbox v-model="insuredInfo.effectiveDateType" :disabled="effectiveDateTypeAbleInsured" @change="effectiveDataTypeChangeInsured"
@@ -523,6 +523,8 @@ export default {
}, },
data() { data() {
return { return {
idLimit: false, //截止日期是否可编辑
idLimitInsured: false, //截止日期是否可编辑--被保人
certiexpiredateRequired: true, //证件截止日期是否需要校验 certiexpiredateRequired: true, //证件截止日期是否需要校验
certiexpiredateRequiredInsured: true, //证件截止日期是否需要校验--被保人 certiexpiredateRequiredInsured: true, //证件截止日期是否需要校验--被保人
effectiveDateTypeAble: false, //长期按钮是否禁用 effectiveDateTypeAble: false, //长期按钮是否禁用

View File

@@ -1,3 +1,5 @@
import CacheUtils from '@/assets/js/utils/cacheUtils'
//点击弹出组件 //点击弹出组件
export function selectComp(that, index, type = '') { export function selectComp(that, index, type = '') {
that.currentPopupIndex = index that.currentPopupIndex = index
@@ -12,16 +14,24 @@ export function selectComp(that, index, type = '') {
} else if (index == 2) { } else if (index == 2) {
;[that.occupationShowPicker, title] = [true, '职业类别'] ;[that.occupationShowPicker, title] = [true, '职业类别']
} else if (index == 3) { } else if (index == 3) {
// if (type == '1') {
//投保人
// localStorage.scanFromInsured = 'true'
// ;[that.isScan, title] = [true, '身份证扫描']
// } else if (type == '2') {
// //被保人
// localStorage.scanFromInsured = 'false'
// ;[that.isScan2, title] = [true, '身份证扫描']
// }
// ;[that.isScan, title] = [true, '身份证扫描']
if (type == '1') { if (type == '1') {
//投保人 //投保人
localStorage.scanFromInsured = 'true' CacheUtils.setLocItem('scanFromInsured','true')
;[that.isScan, title] = [true, '身份证扫描']
} else if (type == '2') { } else if (type == '2') {
//被保人 //被保
localStorage.scanFromInsured = 'false' CacheUtils.setLocItem('scanFromInsured','false')
;[that.isScan2, title] = [true, '身份证扫描']
} }
// ;[that.isScan, title] = [true, '身份证扫描'] ;[that.isScan, title] = [true, '身份证扫描']
} }
setTimeout(() => { setTimeout(() => {
@@ -76,6 +86,7 @@ export function getIdentityInfo(that, data, type) {
that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}` that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}`
// that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}` // that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}`
that.effectiveDateTypeAble = true that.effectiveDateTypeAble = true
that.idLimit = false
} else { } else {
// 勾选长期 // 勾选长期
that.userInfo.effectiveDateType = true that.userInfo.effectiveDateType = true
@@ -83,36 +94,42 @@ export function getIdentityInfo(that, data, type) {
that.effectiveDateTypeAble = false that.effectiveDateTypeAble = false
// 证件截止日期不需要校验 // 证件截止日期不需要校验
that.certiexpiredateRequired = false that.certiexpiredateRequired = false
//截止日期不可编辑
that.idLimit = true
} }
} }
} }
if (type == '2') { if (type == '2') {
// 正面 // 正面
if (data.name && data.name != '待识别') { if (data.name && data.name != '待识别') {
that.userInfo.insuredName = data.name that.insuredInfo.name = data.name
that.insuredInfo.idNo = that.userInfo.insuredidNo = data.idNo that.insuredInfo.idNo = data.idNo
that.insuredInfo.birthday = that.userInfo.insuredBirthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}` that.insuredInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}`
that.insuredInfo.insuredSex = that.userInfo.insuredSex = data.gender == '男' ? '0' : '1' that.insuredInfo.sex = data.gender == '男' ? '0' : '1'
} }
// 反面 // 反面
if (data.startDate && data.startDate != '待识别') { if (data.startDate && data.startDate != '待识别') {
that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(5, 2)}-${data.startDate.substr(8, 2)}` that.insuredInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(5, 2)}-${data.startDate.substr(8, 2)}`
//that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}` //that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}`
// 是否为长期身份证 // 是否为长期身份证
if (data.endDate != '长期') { if (data.endDate != '长期') {
that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}` that.insuredInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}`
// that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}` // that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}`
that.effectiveDateTypeAble = true that.effectiveDateTypeAbleInsured = true
that.idLimitInsured = false
} else { } else {
// 勾选长期 // 勾选长期
that.userInfo.effectiveDateType = true that.insuredInfo.effectiveDateType = true
// 长期按钮不禁用 // 长期按钮不禁用
that.effectiveDateTypeAble = false that.effectiveDateTypeAbleInsured = false
// 证件截止日期不需要校验 // 证件截止日期不需要校验
that.certiexpiredateRequired = false that.certiexpiredateRequiredInsured = false
//截止日期不可编辑
that.idLimitInsured = true
} }
} }
} }
that.isScan = false that.isScan = false
let title = type == '1' ? '投保人信息' : '被保人信息' let title = type == '1' ? '投保人信息' : '被保人信息'
that.$jump({ that.$jump({