mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-18 01:36:45 +08:00
feat(ebiz): 优化投保流程与职业选择功能
- 注释掉 initPersonInfo 方法调用,调整初始化逻辑 - 新增 source 为 productDetail 时的字段忽略逻辑,保留默认值 - 更新 InsuredInfo 组件中的 nativeplace 显示与选择逻辑 - 移除有无社保选择组件,注释相关代码 - 增加 van-picker 的 default-index 属性支持默认索引 - 更新导入状态模块 applicant 替代 insured - 修改订单类型为 APPNT_ORDER_NEW 以适配新流程 - 优化婚姻状态监听器,增加 deep 和 immediate 配置 - 在 InsuredPerson 组件中新增“同投保人”地址复选框 - 更新地址选择器默认索引逻辑及条件判断 - 职业选择组件中禁止选择特定职业代码并提示错误 - 设置 isNewPeopleFlag 默认值为 '0' 以确保初始状态正确
This commit is contained in:
@@ -669,7 +669,7 @@ export default {
|
|||||||
this.branchTypeVal = 'Y'
|
this.branchTypeVal = 'Y'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.initPersonInfo()
|
// this.initPersonInfo()
|
||||||
this.init()
|
this.init()
|
||||||
|
|
||||||
Array.prototype.min = function() {
|
Array.prototype.min = function() {
|
||||||
@@ -702,13 +702,18 @@ export default {
|
|||||||
const { appntDTO, insuredDTOs } = orderDTO
|
const { appntDTO, insuredDTOs } = orderDTO
|
||||||
const [insuredPersonInfo] = insuredDTOs
|
const [insuredPersonInfo] = insuredDTOs
|
||||||
|
|
||||||
Object.assign(this.saleInsuredInfo, appntDTO)
|
// 如果从产品详情进入, 则不校验一些属性内容, 保留默认值
|
||||||
Object.assign(this.saleInsuredPersonInfo, insuredPersonInfo)
|
const defaultKeys = this.$route.query.source === 'productDetail' ? ['isNewPeopleFlag'] : []
|
||||||
|
const applicantIgnoreKeys = [...defaultKeys]
|
||||||
// this.saleInsuredInfo = { ...this.saleInsuredInfo, ...appntDTO }
|
for (const key in appntDTO) {
|
||||||
// setLocItem('saleInsuredInfo', JSON.stringify(agppntDTO))
|
if (applicantIgnoreKeys.includes(key)) continue
|
||||||
// this.saleInsuredPersonInfo = { ...this.saleInsuredPersonInfo, ...insuredPersonInfo }
|
this.saleInsuredInfo[key] = appntDTO[key]
|
||||||
// setLocItem('saleInsuredPersonInfo', JSON.stringify(insuredPersonInfo))
|
}
|
||||||
|
const insuredIgnoreKeys = [...defaultKeys]
|
||||||
|
for (const key in insuredPersonInfo) {
|
||||||
|
if (insuredIgnoreKeys.includes(key)) continue
|
||||||
|
this.saleInsuredPersonInfo[key] = insuredPersonInfo[key]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -120,6 +120,8 @@
|
|||||||
right-icon="arrow"
|
right-icon="arrow"
|
||||||
@click="toSelect('10')"
|
@click="toSelect('10')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{{ userInfo.nativeplace }}
|
||||||
<van-field
|
<van-field
|
||||||
v-validate="'required'"
|
v-validate="'required'"
|
||||||
:value="userInfo.nativeplace | idToText('nativeplace')"
|
:value="userInfo.nativeplace | idToText('nativeplace')"
|
||||||
@@ -237,15 +239,15 @@
|
|||||||
v-validate="'required'"
|
v-validate="'required'"
|
||||||
@click="toSelect('3')"
|
@click="toSelect('3')"
|
||||||
/> -->
|
/> -->
|
||||||
<select-radio
|
<!-- <select-radio-->
|
||||||
v-if="Number(branchType) !== 14"
|
<!-- v-if="Number(branchType) !== 14"-->
|
||||||
v-validate="'required'"
|
<!-- v-validate="'required'"-->
|
||||||
:radios="medicalRadio"
|
<!-- :radios="medicalRadio"-->
|
||||||
:value.sync="userInfo.medical"
|
<!-- :value.sync="userInfo.medical"-->
|
||||||
label="有无社保"
|
<!-- label="有无社保"-->
|
||||||
name="有无社保"
|
<!-- name="有无社保"-->
|
||||||
required
|
<!-- required-->
|
||||||
/>
|
<!-- />-->
|
||||||
<van-field
|
<van-field
|
||||||
v-validate="'required'"
|
v-validate="'required'"
|
||||||
:value="userInfo.taxResidentId | idToText('taxIdentity')"
|
:value="userInfo.taxResidentId | idToText('taxIdentity')"
|
||||||
@@ -475,7 +477,7 @@
|
|||||||
|
|
||||||
<!-- 字段选择 -->
|
<!-- 字段选择 -->
|
||||||
<van-popup v-model="popupShow" position="bottom">
|
<van-popup v-model="popupShow" position="bottom">
|
||||||
<van-picker :columns="columns" show-toolbar @cancel="popupShow = false" @confirm="onConfirm" />
|
<van-picker :columns="columns" :default-index="defaultIndex" show-toolbar @cancel="popupShow = false" @confirm="onConfirm" />
|
||||||
</van-popup>
|
</van-popup>
|
||||||
<!-- 地区选择 -->
|
<!-- 地区选择 -->
|
||||||
<!-- <van-popup v-model="areaShow" position="bottom">
|
<!-- <van-popup v-model="areaShow" position="bottom">
|
||||||
@@ -592,7 +594,7 @@ import { gbcProjectDetail, getDepartmentByProjectNo } from '@/api/GBC/GBC'
|
|||||||
import { getCheckModelAgentInfo } from '@/api/ebiz/common/common'
|
import { getCheckModelAgentInfo } from '@/api/ebiz/common/common'
|
||||||
import { getAgentInfo } from '@/api/ebiz/my/my'
|
import { getAgentInfo } from '@/api/ebiz/my/my'
|
||||||
import { cardSide, imageType, subBusinessType, user } from '@/views/ebiz/saleFlowProImprove/js/enum'
|
import { cardSide, imageType, subBusinessType, user } from '@/views/ebiz/saleFlowProImprove/js/enum'
|
||||||
import { insured } from '@/views/ebiz/saleFlowProImprove/js/state'
|
import { applicant } from '@/views/ebiz/saleFlowProImprove/js/state'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'insuredInfo',
|
name: 'insuredInfo',
|
||||||
@@ -677,6 +679,7 @@ export default {
|
|||||||
// censusShow: false, //户籍联动
|
// censusShow: false, //户籍联动
|
||||||
pickerType: undefined,
|
pickerType: undefined,
|
||||||
columns: [],
|
columns: [],
|
||||||
|
defaultIndex: 0,
|
||||||
valueKey: 'text',
|
valueKey: 'text',
|
||||||
// census: '', //户籍
|
// census: '', //户籍
|
||||||
// areaName: '', //单位地址
|
// areaName: '', //单位地址
|
||||||
@@ -687,7 +690,7 @@ export default {
|
|||||||
sessionId: '', //后台返回的 id
|
sessionId: '', //后台返回的 id
|
||||||
effectiveDateTypeAble: false, //长期按钮是否禁用
|
effectiveDateTypeAble: false, //长期按钮是否禁用
|
||||||
isElecCont: '', // 保单类型 0 为电子 2 为纸质加电子
|
isElecCont: '', // 保单类型 0 为电子 2 为纸质加电子
|
||||||
userInfo: insured,
|
userInfo: applicant,
|
||||||
areaList: areaList,
|
areaList: areaList,
|
||||||
areaLists: areaLists,
|
areaLists: areaLists,
|
||||||
currentPopupIndex: '',
|
currentPopupIndex: '',
|
||||||
@@ -742,8 +745,11 @@ export default {
|
|||||||
getOrderDetail({ orderNo: orderNo }).then(res => {
|
getOrderDetail({ orderNo: orderNo }).then(res => {
|
||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
this.renovate = new Date().getTime()
|
this.renovate = new Date().getTime()
|
||||||
|
|
||||||
|
const ignoreKeys = this.$route.query.source === 'productDetail' ? ['isNewPeopleFlag'] : []
|
||||||
//投保人信息返显
|
//投保人信息返显
|
||||||
for (const [key, value] of Object.entries(res.orderDTO.appntDTO)) {
|
for (const [key, value] of Object.entries(res.orderDTO.appntDTO)) {
|
||||||
|
if (ignoreKeys.includes(key)) continue
|
||||||
this.userInfo[key] = value
|
this.userInfo[key] = value
|
||||||
}
|
}
|
||||||
// 保单信息-投保单号返显
|
// 保单信息-投保单号返显
|
||||||
@@ -1024,8 +1030,13 @@ export default {
|
|||||||
})
|
})
|
||||||
this.occupationShowPicker = false
|
this.occupationShowPicker = false
|
||||||
},
|
},
|
||||||
|
setColumnIndex(index) {
|
||||||
|
this.defaultIndex = index
|
||||||
|
},
|
||||||
//弹框选择
|
//弹框选择
|
||||||
toSelect(pickerType, valueKey) {
|
toSelect(pickerType, valueKey) {
|
||||||
|
// 默认从 索引为0
|
||||||
|
this.setColumnIndex(0)
|
||||||
//pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保(弃用) 5、税收居民身份 6、婚姻状况 7、在职情况 8、收入来源 11、新市民类型
|
//pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保(弃用) 5、税收居民身份 6、婚姻状况 7、在职情况 8、收入来源 11、新市民类型
|
||||||
;[this.popupShow, this.pickerType] = [true, pickerType]
|
;[this.popupShow, this.pickerType] = [true, pickerType]
|
||||||
if (valueKey) this.valueKey = valueKey
|
if (valueKey) this.valueKey = valueKey
|
||||||
@@ -1035,7 +1046,17 @@ export default {
|
|||||||
this.columns = DataDictionary.nativeplace
|
this.columns = DataDictionary.nativeplace
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
|
// eslint-disable-next-line no-case-declarations
|
||||||
|
const age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||||
|
this.setColumnIndex(age <= 18 ? 1 : 0)
|
||||||
|
|
||||||
this.columns = DataDictionary.insuredIdType
|
this.columns = DataDictionary.insuredIdType
|
||||||
|
.map(item => {
|
||||||
|
// 去除禁用标识
|
||||||
|
return item.id !== 3 ? { id: item.id, text: item.text } : undefined
|
||||||
|
})
|
||||||
|
// 去除空项
|
||||||
|
.filter(item => item)
|
||||||
break
|
break
|
||||||
// case '3':
|
// case '3':
|
||||||
// this.columns = DataDictionary.degree
|
// this.columns = DataDictionary.degree
|
||||||
@@ -1081,6 +1102,9 @@ export default {
|
|||||||
break
|
break
|
||||||
case 'dialogInsuredIdType':
|
case 'dialogInsuredIdType':
|
||||||
this.columns = DataDictionary.insuredIdType
|
this.columns = DataDictionary.insuredIdType
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (pickerType == '1') {
|
// if (pickerType == '1') {
|
||||||
@@ -1116,10 +1140,21 @@ export default {
|
|||||||
},
|
},
|
||||||
//确认选择字段
|
//确认选择字段
|
||||||
onConfirm(value) {
|
onConfirm(value) {
|
||||||
|
// /** 如果身份证类型为 居民身份证或者户口本时,国家为非中国,则报错*/
|
||||||
|
// function validateCountry({ value, type }) {
|
||||||
|
// if (
|
||||||
|
// ![1, 2, 3, 4].includes(Number(type === 1 ? value.id : this.userInfo.nativeplace)) &&
|
||||||
|
// [1, 2].includes(Number(type === 1 ? this.userInfo.idType : value.id))
|
||||||
|
// ) {
|
||||||
|
// this.$toast('国籍选择错误')
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
this.popupShow = false
|
this.popupShow = false
|
||||||
if (this.pickerType == '1') {
|
if (Number(this.pickerType) === 1) {
|
||||||
this.userInfo.nativeplace = value.id
|
this.userInfo.nativeplace = value.id
|
||||||
} else if (this.pickerType == '2') {
|
} else if (Number(this.pickerType) === 2) {
|
||||||
//身份证以外的证件类型可以使用长期
|
//身份证以外的证件类型可以使用长期
|
||||||
if (value.id != '1') {
|
if (value.id != '1') {
|
||||||
this.effectiveDateTypeAble = false
|
this.effectiveDateTypeAble = false
|
||||||
@@ -1174,7 +1209,6 @@ export default {
|
|||||||
},
|
},
|
||||||
//证件起始截止日期
|
//证件起始截止日期
|
||||||
onDateConfirm(val, type) {
|
onDateConfirm(val, type) {
|
||||||
console.log(val, type)
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '0':
|
case '0':
|
||||||
{
|
{
|
||||||
@@ -1675,7 +1709,7 @@ export default {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let params = {
|
let params = {
|
||||||
orderType: 'APPNT_ORDER',
|
orderType: 'APPNT_ORDER_NEW',
|
||||||
orderDTO: {
|
orderDTO: {
|
||||||
orderInfoDTO: {
|
orderInfoDTO: {
|
||||||
orderNo: this.$route.query.orderNo
|
orderNo: this.$route.query.orderNo
|
||||||
@@ -1978,10 +2012,14 @@ export default {
|
|||||||
this.userInfo.otherSalarySource = ''
|
this.userInfo.otherSalarySource = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'userInfo.marriageStatus'(nv) {
|
'userInfo.marriageStatus': {
|
||||||
for (let status of DataDictionary.marriage) {
|
deep: true,
|
||||||
if (status.text === nv) {
|
immediate: true,
|
||||||
this.userInfo.marriage = status.id
|
handler(nv) {
|
||||||
|
for (let status of DataDictionary.marriage) {
|
||||||
|
if (status.text === nv) {
|
||||||
|
this.userInfo.marriage = status.id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
<template v-if="uploadComponentInfo">
|
<template v-if="uploadComponentInfo">
|
||||||
<Component :is="uploadComponentInfo.component" v-bind="uploadComponentInfo.props" v-on="uploadComponentInfo.event" />
|
<Component :is="uploadComponentInfo.component" v-bind="uploadComponentInfo.props" v-on="uploadComponentInfo.event" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<van-field
|
<van-field
|
||||||
v-validate="'required'"
|
v-validate="'required'"
|
||||||
:value="userInfo.relationToAppnt | idToText('relationToAppnt')"
|
:value="userInfo.relationToAppnt | idToText('relationToAppnt')"
|
||||||
@@ -306,19 +305,19 @@
|
|||||||
placeholder="请输入,单位万元"
|
placeholder="请输入,单位万元"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<van-field
|
<!-- <van-field-->
|
||||||
v-if="branchType != '14'"
|
<!-- v-if="branchType != '14'"-->
|
||||||
v-model="userInfo.liabilitiesMoney"
|
<!-- v-model="userInfo.liabilitiesMoney"-->
|
||||||
v-validate="'required|onlyNumber'"
|
<!-- v-validate="'required|onlyNumber'"-->
|
||||||
:readonly="isAppnt"
|
<!-- :readonly="isAppnt"-->
|
||||||
clearable
|
<!-- clearable-->
|
||||||
maxlength="5"
|
<!-- maxlength="5"-->
|
||||||
name="负债金额"
|
<!-- name="负债金额"-->
|
||||||
placeholder="请输入,单位万元"
|
<!-- placeholder="请输入,单位万元"-->
|
||||||
required
|
<!-- required-->
|
||||||
>
|
<!-- >-->
|
||||||
<div slot="label" class="flex flex-wrap"><span>负债金额</span><span>(万元)</span></div>
|
<!-- <div slot="label" class="flex flex-wrap"><span>负债金额</span><span>(万元)</span></div>-->
|
||||||
</van-field>
|
<!-- </van-field>-->
|
||||||
<!-- <van-field
|
<!-- <van-field
|
||||||
:value="userInfo.jobStatus | idToText('workCondition')"
|
:value="userInfo.jobStatus | idToText('workCondition')"
|
||||||
readonly
|
readonly
|
||||||
@@ -430,6 +429,7 @@
|
|||||||
<van-field
|
<van-field
|
||||||
v-model="userInfo.homeAddress"
|
v-model="userInfo.homeAddress"
|
||||||
v-validate="'required|homeAddressNum|homeAddressCh'"
|
v-validate="'required|homeAddressNum|homeAddressCh'"
|
||||||
|
:disabled="withRootUser.value"
|
||||||
:readonly="isAppnt"
|
:readonly="isAppnt"
|
||||||
clearable
|
clearable
|
||||||
label=""
|
label=""
|
||||||
@@ -438,6 +438,9 @@
|
|||||||
placeholder="具体到街道、门牌号、楼号、单元号、室号"
|
placeholder="具体到街道、门牌号、楼号、单元号、室号"
|
||||||
style="font-size: 3.5vw"
|
style="font-size: 3.5vw"
|
||||||
/>
|
/>
|
||||||
|
<div class="pl10 pt10 pb10 pr10 address fs14">
|
||||||
|
<van-checkbox v-model="withRootUser.value">同投保人</van-checkbox>
|
||||||
|
</div>
|
||||||
<!-- <van-field
|
<!-- <van-field
|
||||||
v-model="userInfo.homeZip"
|
v-model="userInfo.homeZip"
|
||||||
label="邮编"
|
label="邮编"
|
||||||
@@ -470,7 +473,7 @@
|
|||||||
<van-area :area-list="areaList" :columns-num="2" value="110101" @cancel="censusShow = false" @confirm="sureArea($event, '3')" />
|
<van-area :area-list="areaList" :columns-num="2" value="110101" @cancel="censusShow = false" @confirm="sureArea($event, '3')" />
|
||||||
</van-popup>
|
</van-popup>
|
||||||
<van-popup v-model="isMarriageStatusShow" position="bottom">
|
<van-popup v-model="isMarriageStatusShow" position="bottom">
|
||||||
<van-picker :columns="columns" show-toolbar @cancel="isMarriageStatusShow = false" @confirm="onMarriageConfirm" />
|
<van-picker :columns="columns" :default-index="defaultIndex" show-toolbar @cancel="isMarriageStatusShow = false" @confirm="onMarriageConfirm" />
|
||||||
</van-popup>
|
</van-popup>
|
||||||
<van-dialog v-model="isNewPeopleFlagTipshow" :showConfirmButton="false">
|
<van-dialog v-model="isNewPeopleFlagTipshow" :showConfirmButton="false">
|
||||||
<div slot="title">
|
<div slot="title">
|
||||||
@@ -509,7 +512,7 @@ import IndexBar from '@/components/ebiz/sale/IndexBar'
|
|||||||
import SearchField from './components/SearchField'
|
import SearchField from './components/SearchField'
|
||||||
import riskRules from '@/views/ebiz/common/risk-rules'
|
import riskRules from '@/views/ebiz/common/risk-rules'
|
||||||
import { cardSide, subBusinessType, user } from '@/views/ebiz/saleFlowProImprove/js/enum'
|
import { cardSide, subBusinessType, user } from '@/views/ebiz/saleFlowProImprove/js/enum'
|
||||||
import { applicant } from '@/views/ebiz/saleFlowProImprove/js/state'
|
import { applicant, insured } from '@/views/ebiz/saleFlowProImprove/js/state'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'insuredInfo',
|
name: 'insuredInfo',
|
||||||
@@ -584,11 +587,12 @@ export default {
|
|||||||
censusShow: false, //户籍联动
|
censusShow: false, //户籍联动
|
||||||
pickerType: undefined,
|
pickerType: undefined,
|
||||||
columns: [],
|
columns: [],
|
||||||
|
defaultIndex: 0,
|
||||||
valueKey: 'text',
|
valueKey: 'text',
|
||||||
// census: '', //户籍
|
// census: '', //户籍
|
||||||
// areaName: '',
|
// areaName: '',
|
||||||
isRequired: '', //长期前是否有*
|
isRequired: '', //长期前是否有*
|
||||||
userInfo: applicant,
|
userInfo: insured,
|
||||||
areaList: areaList,
|
areaList: areaList,
|
||||||
areaLists: areaLists,
|
areaLists: areaLists,
|
||||||
currentPopupIndex: '',
|
currentPopupIndex: '',
|
||||||
@@ -626,7 +630,7 @@ export default {
|
|||||||
this.isAppnt = true
|
this.isAppnt = true
|
||||||
//获取投保人信息
|
//获取投保人信息
|
||||||
let insuredInfo = res.orderDTO.appntDTO
|
let insuredInfo = res.orderDTO.appntDTO
|
||||||
for (let key in this.userInfo) {
|
for (let key in insuredInfo) {
|
||||||
this.userInfo[key] = insuredInfo[key]
|
this.userInfo[key] = insuredInfo[key]
|
||||||
}
|
}
|
||||||
// let insuredCustomer = res.orderDTO.insuredDTOs[0]
|
// let insuredCustomer = res.orderDTO.insuredDTOs[0]
|
||||||
@@ -662,16 +666,23 @@ export default {
|
|||||||
this.effectiveDateTypeAble = age <= 45
|
this.effectiveDateTypeAble = age <= 45
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
} else if (Array.isArray(res.orderDTO.insuredDTOs) && res.orderDTO.insuredDTOs[0]) {
|
||||||
// this.appntMarriage = res.orderDTO.appntDTO.marriage
|
|
||||||
this.$utils.intLocalStorage(res)
|
|
||||||
if (res.orderDTO.insuredDTOs[0]) {
|
|
||||||
let insuredPersonInfo = res.orderDTO.insuredDTOs[0]
|
let insuredPersonInfo = res.orderDTO.insuredDTOs[0]
|
||||||
for (let key in this.userInfo) {
|
|
||||||
this.userInfo[key] = res.orderDTO.insuredDTOs[0][key]
|
const ignoreKeys = this.$route.query.source === 'productDetail' ? ['isNewPeopleFlag', 'marriage'] : []
|
||||||
|
|
||||||
|
for (let key in insuredPersonInfo) {
|
||||||
|
if (ignoreKeys.includes(key)) {
|
||||||
|
// 如果是投保人的配偶, 那么需要把婚姻状态重置为已婚
|
||||||
|
if (key === 'marriage' && Number(insuredPersonInfo.relationToAppnt) === 2) {
|
||||||
|
this.userInfo.marriageStatus = '已婚'
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
this.userInfo[key] = insuredPersonInfo[key]
|
||||||
}
|
}
|
||||||
//是否长期
|
//是否长期
|
||||||
this.userInfo.effectiveDateType = insuredPersonInfo.effectiveDateType == 'false' ? false : true
|
this.userInfo.effectiveDateType = String(insuredPersonInfo.effectiveDateType) !== 'false'
|
||||||
//设为联系地址
|
//设为联系地址
|
||||||
// this.userInfo.addressStatus = '0'
|
// this.userInfo.addressStatus = '0'
|
||||||
|
|
||||||
@@ -697,7 +708,7 @@ export default {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
//是否长期
|
//是否长期
|
||||||
this.userInfo.effectiveDateType = insuredPersonInfo.effectiveDateType == 'false' ? false : true
|
this.userInfo.effectiveDateType = String(insuredPersonInfo.effectiveDateType) !== 'false'
|
||||||
// let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
// let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
||||||
// this.userInfo = saleInsuredPersonInfo
|
// this.userInfo = saleInsuredPersonInfo
|
||||||
// this.census = getAreaName([{ code: saleInsuredPersonInfo.householdProvince }, { code: saleInsuredPersonInfo.householdCity }]) //户籍
|
// this.census = getAreaName([{ code: saleInsuredPersonInfo.householdProvince }, { code: saleInsuredPersonInfo.householdCity }]) //户籍
|
||||||
@@ -722,7 +733,7 @@ export default {
|
|||||||
if (this.userInfo.idType == '2' && idToData(this.userInfo.idNo).age < 16) {
|
if (this.userInfo.idType == '2' && idToData(this.userInfo.idNo).age < 16) {
|
||||||
// 获取出生日期年份+16
|
// 获取出生日期年份+16
|
||||||
let year = Number(this.userInfo.birthday.substr(0, 4)) + 16
|
let year = Number(this.userInfo.birthday.substr(0, 4)) + 16
|
||||||
if (this.userInfo.birthday.substr(5, 5) == '02-29') {
|
if (this.userInfo.birthday.substr(5, 5) === '02-29') {
|
||||||
// 获取某年某月一共多少天
|
// 获取某年某月一共多少天
|
||||||
let date = new Date(year, 2, 1)
|
let date = new Date(year, 2, 1)
|
||||||
let dayEnd = new Date(date.getTime() - 864e5).getDate()
|
let dayEnd = new Date(date.getTime() - 864e5).getDate()
|
||||||
@@ -735,13 +746,13 @@ export default {
|
|||||||
//------------------------专为惠企写死--begin---------------//
|
//------------------------专为惠企写死--begin---------------//
|
||||||
if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) {
|
if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) {
|
||||||
this.specilFlag = res.orderDTO.insuredDTOs[0].riskDTOLst.some(v => {
|
this.specilFlag = res.orderDTO.insuredDTOs[0].riskDTOLst.some(v => {
|
||||||
return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040'
|
return v.riskCode === 'GFRS_M0024' || v.riskCode === 'GFRS_M0040'
|
||||||
})
|
})
|
||||||
? '1'
|
? '1'
|
||||||
: '0'
|
: '0'
|
||||||
} else if (res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0024') {
|
} else if (res.orderDTO.orderInfoDTO.productCode === 'GFRS_M0024') {
|
||||||
this.specilFlag = '1'
|
this.specilFlag = '1'
|
||||||
} else if (res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0040') {
|
} else if (res.orderDTO.orderInfoDTO.productCode === 'GFRS_M0040') {
|
||||||
this.specilFlag = '1'
|
this.specilFlag = '1'
|
||||||
}
|
}
|
||||||
// ------------------------专为惠企写死--end---------------//
|
// ------------------------专为惠企写死--end---------------//
|
||||||
@@ -789,6 +800,9 @@ export default {
|
|||||||
this.registerMainTask()
|
this.registerMainTask()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setColumnIndex(index) {
|
||||||
|
this.defaultIndex = index
|
||||||
|
},
|
||||||
isNewPeopleFlagTip() {
|
isNewPeopleFlagTip() {
|
||||||
this.isNewPeopleFlagTipshow = true
|
this.isNewPeopleFlagTipshow = true
|
||||||
},
|
},
|
||||||
@@ -813,6 +827,9 @@ export default {
|
|||||||
if (this.isReadonly) {
|
if (this.isReadonly) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const age = utilsAge.getAge(this.userInfo.birthday, new Date())
|
||||||
|
this.setColumnIndex(age <= 18 ? 1 : 0)
|
||||||
|
|
||||||
this.isMarriageStatusShow = true
|
this.isMarriageStatusShow = true
|
||||||
this.columns = DataDictionary.marriage
|
this.columns = DataDictionary.marriage
|
||||||
},
|
},
|
||||||
@@ -861,6 +878,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//弹框选择
|
//弹框选择
|
||||||
toSelect(pickerType, valueKey) {
|
toSelect(pickerType, valueKey) {
|
||||||
|
this.setColumnIndex(0)
|
||||||
// 投被同人不允许编辑
|
// 投被同人不允许编辑
|
||||||
if (this.isReadonly && pickerType != '7') {
|
if (this.isReadonly && pickerType != '7') {
|
||||||
return
|
return
|
||||||
@@ -1943,7 +1961,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//地区选择
|
//地区选择
|
||||||
areaChoose(index) {
|
areaChoose(index) {
|
||||||
if (this.isReadonly) {
|
if (this.isReadonly || this.withRootUser.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
switch (index) {
|
switch (index) {
|
||||||
@@ -2145,6 +2163,9 @@ export default {
|
|||||||
imagePath: this.mediaDTOS ? applicantBack.rgssUrl : ''
|
imagePath: this.mediaDTOS ? applicantBack.rgssUrl : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
applicant() {
|
||||||
|
return applicant
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -2157,18 +2178,28 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
userInfo: {
|
userInfo: {
|
||||||
deep: true,
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
async handler() {}
|
async handler() {}
|
||||||
},
|
},
|
||||||
async 'withRootUser.value'(n) {
|
applicant: {
|
||||||
const orderNo = this.$route.query.orderNo
|
deep: true,
|
||||||
if (n && orderNo) {
|
immediate: true,
|
||||||
const rs = await getOrderDetail({ orderNo: orderNo })
|
async handler(applicant) {
|
||||||
this.userInfo.homeProvince = rs.orderDTO.appntDTO.homeProvince
|
if (this.withRootUser.value) {
|
||||||
this.userInfo.homeCity = rs.orderDTO.appntDTO.homeCity
|
this.userInfo.homeProvince = applicant.homeProvince
|
||||||
this.userInfo.homeArea = rs.orderDTO.appntDTO.homeArea
|
this.userInfo.homeCity = applicant.homeCity
|
||||||
this.userInfo.homeAddress = rs.orderDTO.appntDTO.homeAddress
|
this.userInfo.homeArea = applicant.homeArea
|
||||||
} else {
|
this.userInfo.homeAddress = applicant.homeAddress
|
||||||
this.userInfo.homeAddress = ''
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async 'withRootUser.value'(value) {
|
||||||
|
if (value) {
|
||||||
|
const applicant = this.applicant
|
||||||
|
this.userInfo.homeProvince = applicant.homeProvince
|
||||||
|
this.userInfo.homeCity = applicant.homeCity
|
||||||
|
this.userInfo.homeArea = applicant.homeArea
|
||||||
|
this.userInfo.homeAddress = applicant.homeAddress
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'userInfo.marriageStatus'(nv) {
|
'userInfo.marriageStatus'(nv) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="occupation pb70">
|
<div class="occupation pb70">
|
||||||
<van-search v-model="searchParams" @input="onSearch" placeholder="请输入搜索关键词" show-action shape="round" @clear="clearSearch" @search="onSearch">
|
<van-search v-model="searchParams" placeholder="请输入搜索关键词" shape="round" show-action @clear="clearSearch" @input="onSearch" @search="onSearch">
|
||||||
<div slot="action" @click="onSearch">搜索</div>
|
<div slot="action" @click="onSearch">搜索</div>
|
||||||
</van-search>
|
</van-search>
|
||||||
<div class="choose-result fs12 pl25" v-if="third.code">
|
<div v-if="third.code" class="choose-result fs12 pl25">
|
||||||
<p>职业代码:{{ third.code }}</p>
|
<p>职业代码:{{ third.code }}</p>
|
||||||
<p>职业:{{ chooseName }}</p>
|
<p>职业:{{ chooseName }}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<div :class="[isSearch ? 'hidden' : '']">
|
<div :class="[isSearch ? 'hidden' : '']">
|
||||||
<p class="fs14 pl20 fwb pv5">常用职业</p>
|
<p class="fs14 pl20 fwb pv5">常用职业</p>
|
||||||
<div class="common-occupation flex flex-wrap fs12 ph25">
|
<div class="common-occupation flex flex-wrap fs12 ph25">
|
||||||
<div v-for="(item, index) in commonList" @click="commonChoose(item, index)" :key="index" :class="[item.isActive ? 'active' : '', 'fwb']">
|
<div v-for="(item, index) in commonList" :key="index" :class="[item.isActive ? 'active' : '', 'fwb']" @click="commonChoose(item, index)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -20,17 +20,17 @@
|
|||||||
<p class="fs14 pl20 fwb pv5">全部职业</p>
|
<p class="fs14 pl20 fwb pv5">全部职业</p>
|
||||||
<div class="main-area fs12 ph10">
|
<div class="main-area fs12 ph10">
|
||||||
<div class="item ph10">
|
<div class="item ph10">
|
||||||
<p class="p5" v-for="(item, index) in occupationList" :key="index" @click="handleFirst(item)" :class="{ active: first.code == item.code }">
|
<p v-for="(item, index) in occupationList" :key="index" :class="{ active: first.code == item.code }" class="p5" @click="handleFirst(item)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item ph10">
|
<div class="item ph10">
|
||||||
<p class="p5" v-for="(item, index) in sec" :key="index" @click="handleSec(item)" :class="{ active: second.code == item.code }">
|
<p v-for="(item, index) in sec" :key="index" :class="{ active: second.code == item.code }" class="p5" @click="handleSec(item)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="item ph10">
|
<div class="item ph10">
|
||||||
<p class="p5" v-for="(item, index) in thi" :key="index" @click="handleThi(item)" :class="{ active: third.code == item.code }">
|
<p v-for="(item, index) in thi" :key="index" :class="{ active: third.code == item.code }" class="p5" @click="handleThi(item)">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<div :class="[isSearch ? '' : 'hidden']">
|
<div :class="[isSearch ? '' : 'hidden']">
|
||||||
<p class="fs14 pl20 fwb pv5">搜索结果</p>
|
<p class="fs14 pl20 fwb pv5">搜索结果</p>
|
||||||
<div class="item p10 search-result fs14 flex flex-direction-colunm">
|
<div class="item p10 search-result fs14 flex flex-direction-colunm">
|
||||||
<p class="p5 mv5" :class="[item.isActive ? 'active' : '']" v-for="(item, index) in searchList" @click="searchChoose(item, index)" :key="index">
|
<p v-for="(item, index) in searchList" :key="index" :class="[item.isActive ? 'active' : '']" class="p5 mv5" @click="searchChoose(item, index)">
|
||||||
<span v-html="item.showName.replace(new RegExp(searchParams, 'g'), `<span class="red">${searchParams}</span>`)"></span>
|
<span v-html="item.showName.replace(new RegExp(searchParams, 'g'), `<span class="red">${searchParams}</span>`)"></span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -141,6 +141,10 @@ export default {
|
|||||||
this.commonInit()
|
this.commonInit()
|
||||||
},
|
},
|
||||||
ensureChoose() {
|
ensureChoose() {
|
||||||
|
if (this.third.code === '2099908') {
|
||||||
|
this.$toast('投保人职业选择错误')
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (this.third.code) {
|
if (this.third.code) {
|
||||||
this.$emit('chooseOccupation', this.third)
|
this.$emit('chooseOccupation', this.third)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Vue, { ref } from 'vue'
|
import Vue from 'vue'
|
||||||
import { syncLocalstorageData } from '@/assets/js/syncLocalstorageData'
|
import { syncLocalstorageData } from '@/assets/js/syncLocalstorageData'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +57,7 @@ export const applicant = Vue.observable(
|
|||||||
// householdProvince: '', //户籍省
|
// householdProvince: '', //户籍省
|
||||||
// householdCity: '' //户籍市
|
// householdCity: '' //户籍市
|
||||||
// addressStatus: '0' //是否是联系地址
|
// addressStatus: '0' //是否是联系地址
|
||||||
isNewPeopleFlag: '', //新市民身份
|
isNewPeopleFlag: '0', //新市民身份
|
||||||
npType: '' //新市民类型
|
npType: '' //新市民类型
|
||||||
},
|
},
|
||||||
{ name: 'saleInsuredInfo', release: true }
|
{ name: 'saleInsuredInfo', release: true }
|
||||||
@@ -124,7 +124,7 @@ export const insured = Vue.observable(
|
|||||||
// householdProvince: '', //户籍省
|
// householdProvince: '', //户籍省
|
||||||
// householdCity: '' //户籍市
|
// householdCity: '' //户籍市
|
||||||
// addressStatus: '' //是否是联系地址
|
// addressStatus: '' //是否是联系地址
|
||||||
isNewPeopleFlag: '', //新市民身份
|
isNewPeopleFlag: '0', //新市民身份
|
||||||
npType: '' //新市民类型
|
npType: '' //新市民类型
|
||||||
},
|
},
|
||||||
{ name: 'saleInsuredPersonInfo', release: true }
|
{ name: 'saleInsuredPersonInfo', release: true }
|
||||||
|
|||||||
Reference in New Issue
Block a user