mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-12 00:56:43 +08:00
[FIX]健告与家庭地址连动修改
This commit is contained in:
@@ -16,10 +16,10 @@ import areaNew from '@/assets/js/utils/areaNew'
|
||||
|
||||
export default function getAreaName(data, from) {
|
||||
if (data.length == 3) {
|
||||
if (from == 'customer') {
|
||||
return area.province_list[data[0].code] + '-' + area.city_list[data[1].code] + '-' + area.county_list[data[2].code]
|
||||
} else {
|
||||
if (from == 'new') {
|
||||
return areaNew.province_list[data[0].code] + '-' + areaNew.city_list[data[1].code] + '-' + areaNew.county_list[data[2].code]
|
||||
} else {
|
||||
return area.province_list[data[0].code] + '-' + area.city_list[data[1].code] + '-' + area.county_list[data[2].code]
|
||||
}
|
||||
} else {
|
||||
return area.province_list[data[0].code] + '-' + area.city_list[data[1].code]
|
||||
|
||||
@@ -460,11 +460,11 @@ export default {
|
||||
},
|
||||
areaNameInfo() {
|
||||
let area = [{ code: this.userInfo.companyProvince }, { code: this.userInfo.companyCity }, { code: this.userInfo.companyArea }]
|
||||
this.areaName = getAreaName(area, 'customer')
|
||||
this.areaName = getAreaName(area)
|
||||
},
|
||||
homeNameInfo() {
|
||||
let area = [{ code: this.userInfo.homeProvince }, { code: this.userInfo.homeCity }, { code: this.userInfo.homeArea }]
|
||||
this.homeName = getAreaName(area)
|
||||
this.homeName = getAreaName(area, 'new')
|
||||
},
|
||||
//弹框选择
|
||||
toSelect(pickerType, valueKey) {
|
||||
@@ -543,12 +543,12 @@ export default {
|
||||
sureArea(area, type) {
|
||||
switch (type) {
|
||||
case '1': //单位地址
|
||||
this.areaName = getAreaName(area, 'customer')
|
||||
this.areaName = getAreaName(area)
|
||||
;[this.userInfo.companyProvince, this.userInfo.companyCity, this.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.areaShow = false
|
||||
break
|
||||
case '2': //家庭地址
|
||||
this.homeName = getAreaName(area)
|
||||
this.homeName = getAreaName(area, 'new')
|
||||
;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.homeShow = false
|
||||
break
|
||||
|
||||
@@ -986,7 +986,7 @@ export default {
|
||||
// this.areaShow = false
|
||||
// break
|
||||
case '2': //家庭地址
|
||||
this.homeName = getAreaName(area)
|
||||
this.homeName = getAreaName(area, 'new')
|
||||
;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.homeShow = false
|
||||
break
|
||||
|
||||
@@ -977,11 +977,11 @@ export default {
|
||||
this.userInfo.jobStatus = '3'
|
||||
this.userInfo.marriage = '2'
|
||||
} else {
|
||||
this.userInfo.salarySource = ''
|
||||
this.userInfo.averageAnnualIncome = ''
|
||||
this.userInfo.liabilitiesMoney = ''
|
||||
this.userInfo.jobStatus = ''
|
||||
this.userInfo.marriage = ''
|
||||
// this.userInfo.salarySource = ''
|
||||
// this.userInfo.averageAnnualIncome = ''
|
||||
// this.userInfo.liabilitiesMoney = ''
|
||||
// this.userInfo.jobStatus = ''
|
||||
// this.userInfo.marriage = ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,6 +1017,7 @@ export default {
|
||||
},
|
||||
//选择客户
|
||||
chooseCustomer(data) {
|
||||
console.log(data)
|
||||
this.customerShowPicker = false
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
@@ -1087,7 +1088,7 @@ export default {
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
//数据是否从客户列表拉取
|
||||
this.fromCustomer = true
|
||||
this.getRelatedData(this.userInfo.idNo)
|
||||
this.getRelatedData(this.userInfo.idNo, 'select')
|
||||
},
|
||||
//下一步
|
||||
nextStep() {
|
||||
@@ -1337,7 +1338,7 @@ export default {
|
||||
// this.areaShow = false
|
||||
// break
|
||||
case '2': //家庭地址
|
||||
this.homeName = getAreaName(area)
|
||||
this.homeName = getAreaName(area, 'new')
|
||||
;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
|
||||
this.homeShow = false
|
||||
break
|
||||
@@ -1451,7 +1452,7 @@ export default {
|
||||
return this.$toast('体重输入有误')
|
||||
}
|
||||
},
|
||||
getRelatedData(val) {
|
||||
getRelatedData(val, from) {
|
||||
// debugger
|
||||
if (this.userInfo.idType != '1') {
|
||||
return
|
||||
@@ -1468,19 +1469,21 @@ export default {
|
||||
this.effectiveDateTypeAble = idToData(val).age < 45
|
||||
this.userInfo.birthday = idToData(val).birthday
|
||||
this.userInfo.sex = idToData(val).sex
|
||||
if (idToData(val).age < 16) {
|
||||
this.userInfo.salarySource = 4
|
||||
this.userInfo.otherSalarySource = '无'
|
||||
this.userInfo.averageAnnualIncome = '0'
|
||||
this.userInfo.liabilitiesMoney = '0'
|
||||
this.userInfo.jobStatus = '3'
|
||||
this.userInfo.marriage = '2'
|
||||
} else {
|
||||
this.userInfo.salarySource = ''
|
||||
this.userInfo.averageAnnualIncome = ''
|
||||
this.userInfo.liabilitiesMoney = ''
|
||||
this.userInfo.jobStatus = ''
|
||||
this.userInfo.marriage = ''
|
||||
if (!from) {
|
||||
if (idToData(val).age < 16) {
|
||||
this.userInfo.salarySource = 4
|
||||
this.userInfo.otherSalarySource = '无'
|
||||
this.userInfo.averageAnnualIncome = '0'
|
||||
this.userInfo.liabilitiesMoney = '0'
|
||||
this.userInfo.jobStatus = '3'
|
||||
this.userInfo.marriage = '2'
|
||||
} else {
|
||||
this.userInfo.salarySource = ''
|
||||
this.userInfo.averageAnnualIncome = ''
|
||||
this.userInfo.liabilitiesMoney = ''
|
||||
this.userInfo.jobStatus = ''
|
||||
this.userInfo.marriage = ''
|
||||
}
|
||||
}
|
||||
if (idToData(val).age >= 45) {
|
||||
this.idLimit = true
|
||||
|
||||
@@ -34,37 +34,74 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 第一题 -->
|
||||
<div class="mt10 pb2" v-for="(item, index) in im.impartItemDTOS" :key="index">
|
||||
<div class="mb20 ml20">
|
||||
<span>{{ item.impartCode + '.' + item.impartContent }}</span>
|
||||
</div>
|
||||
<van-radio-group
|
||||
v-model="item.impartAnswer"
|
||||
class="flex mb10 pb10"
|
||||
@change="change(item.extra2, $event)"
|
||||
v-validate="'required'"
|
||||
data-vv-name="单选"
|
||||
>
|
||||
<van-radio name="0" class="mr150 ml70">是</van-radio>
|
||||
<van-radio name="1">否</van-radio>
|
||||
</van-radio-group>
|
||||
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
|
||||
<div v-if="it.extra">
|
||||
<van-field v-model="it.answer" placeholder="请输入" :label="it.questionContent" clearable v-validate="'required'" data-vv-name="答案" />
|
||||
<div v-for="(item, index) in im.impartItemDTOS" :key="index">
|
||||
<div class="mt10 pb2" v-if="item.impartCode != '2b'">
|
||||
<div class="mb20 ml20">
|
||||
<span>{{ item.impartCode + '.' + item.impartContent }}</span>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<div v-if="item.show">
|
||||
<van-radio-group
|
||||
v-model="item.impartAnswer"
|
||||
class="flex mb10 pb10"
|
||||
@change="change(item.extra2, $event)"
|
||||
v-validate="'required'"
|
||||
data-vv-name="单选"
|
||||
>
|
||||
<van-radio name="0" class="mr150 ml70">是</van-radio>
|
||||
<van-radio name="1">否</van-radio>
|
||||
</van-radio-group>
|
||||
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
|
||||
<van-field
|
||||
v-model="it.answer"
|
||||
placeholder="请输入"
|
||||
:label="it.questionContent"
|
||||
clearable
|
||||
v-validate="'required'"
|
||||
data-vv-name="答案"
|
||||
v-if="!it.extra"
|
||||
/>
|
||||
<div v-if="it.extra">
|
||||
<van-field v-model="it.answer" placeholder="请输入" :label="it.questionContent" clearable v-validate="'required'" data-vv-name="答案" />
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<div v-if="item.show">
|
||||
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
|
||||
<van-field
|
||||
v-model="it.answer"
|
||||
placeholder="请输入"
|
||||
:label="it.questionContent"
|
||||
clearable
|
||||
v-validate="'required'"
|
||||
data-vv-name="答案"
|
||||
v-if="!it.extra"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt10 pb2" :class="{ special: !showFlag || !isShow }" v-else>
|
||||
<!-- 题目为2b -->
|
||||
<div class="mb20 ml20" v-if="item.impartCode == '2b' && showFlag && isShow">
|
||||
<span>{{ item.impartCode + '.' + item.impartContent }}</span>
|
||||
</div>
|
||||
<van-radio-group
|
||||
v-model="item.impartAnswer"
|
||||
class="flex mb10 pb10"
|
||||
@change="change(item.extra2, $event)"
|
||||
v-validate="'required'"
|
||||
data-vv-name="单选"
|
||||
v-if="showFlag && isShow"
|
||||
>
|
||||
<van-radio name="0" class="mr150 ml70">是</van-radio>
|
||||
<van-radio name="1">否</van-radio>
|
||||
</van-radio-group>
|
||||
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
|
||||
<div v-if="it.extra && showFlag && isShow">
|
||||
<van-field v-model="it.answer" placeholder="请输入" :label="it.questionContent" clearable v-validate="'required'" data-vv-name="答案" />
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<div v-if="item.show && showFlag && isShow">
|
||||
<van-cell-group v-for="(it, ind) in item.questions" :key="ind">
|
||||
<van-field
|
||||
v-model="it.answer"
|
||||
placeholder="请输入"
|
||||
:label="it.questionContent"
|
||||
clearable
|
||||
v-validate="'required'"
|
||||
data-vv-name="答案"
|
||||
v-if="!it.extra"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
@@ -105,6 +142,8 @@ export default {
|
||||
saleInsuredSex: '',
|
||||
saleInsuredPersonAge: '',
|
||||
saleInsuredPersonSex: '',
|
||||
showFlag: false,
|
||||
isShow: false,
|
||||
impartTypeNumber: {
|
||||
'0': '投保人健康告知',
|
||||
'2': '投保人财务告知',
|
||||
@@ -201,9 +240,9 @@ export default {
|
||||
if (items.extra3) {
|
||||
let obj = JSON.parse(items.extra3)
|
||||
if (obj.age && obj.sex == '2') {
|
||||
//大于18岁不显示
|
||||
//小于18岁显示
|
||||
if (that.saleInsuredPersonAge > obj.age) {
|
||||
array.splice(index, 1, '')
|
||||
this.isShow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,15 +269,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.impartType == 3 || item.impartType == 7) {
|
||||
let array = item.impartItemDTOS
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i] == '' || array[i] == null || typeof array[i] == undefined) {
|
||||
array.splice(i, 1)
|
||||
i = i - 1
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 单选改变时候
|
||||
@@ -266,6 +296,13 @@ export default {
|
||||
})
|
||||
})
|
||||
}
|
||||
if (item == 'M13A02') {
|
||||
if (val == '0') {
|
||||
this.showFlag = true
|
||||
} else {
|
||||
this.showFlag = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取告知消息,
|
||||
information() {
|
||||
@@ -534,7 +571,6 @@ export default {
|
||||
color: #4a90e2;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .van-field__label {
|
||||
width: 38%;
|
||||
}
|
||||
@@ -544,6 +580,9 @@ export default {
|
||||
/deep/.van-collapse-item__content {
|
||||
padding: 0;
|
||||
}
|
||||
/deep/ .special .van-hairline--top-bottom:first-child::after {
|
||||
border: none;
|
||||
}
|
||||
.allFalse {
|
||||
position: fixed;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user