[FIX]修复家庭地址选项与长期问题

This commit is contained in:
zhouna
2019-12-17 16:07:23 +08:00
parent 0a18b6717d
commit bd59378985
3 changed files with 13 additions and 7 deletions

View File

@@ -14,9 +14,13 @@ import areaNew from '@/assets/js/utils/areaNew'
// return area.province_list[provinceCode] + '-' + area.city_list[cityCode] + '-' + area.county_list[areaCode]
// }
export default function getAreaName(data) {
export default function getAreaName(data, from) {
if (data.length == 3) {
return areaNew.province_list[data[0].code] + '-' + areaNew.city_list[data[1].code] + '-' + areaNew.county_list[data[2].code]
if (from == 'customer') {
return area.province_list[data[0].code] + '-' + area.city_list[data[1].code] + '-' + area.county_list[data[2].code]
} else {
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]
}

View File

@@ -190,7 +190,7 @@
</van-popup>
<!-- 家庭地址选择 -->
<van-popup v-model="homeShow" position="bottom">
<van-area :area-list="areaList" value="110101" @confirm="sureArea($event, '2')" @cancel="homeShow = false" />
<van-area :area-list="areaLists" value="450000" @confirm="sureArea($event, '2')" @cancel="homeShow = false" />
</van-popup>
<!-- 户籍选择 -->
<van-popup v-model="censusShow" position="bottom">
@@ -206,6 +206,7 @@ import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
import areaList from '@/assets/js/utils/area'
import areaLists from '@/assets/js/utils/areaNew'
import utilsAge from '@/assets/js/utils/age'
import getAreaName from '@/assets/js/utils/get-area-name'
import idNoCheck from '@/assets/js/utils/idNoCheck'
@@ -248,6 +249,7 @@ export default {
homeName: '', //家庭地址
marriage: '',
areaList: areaList,
areaLists: areaLists,
customerType: '',
customerSource: '',
age: '',
@@ -458,7 +460,7 @@ export default {
},
areaNameInfo() {
let area = [{ code: this.userInfo.companyProvince }, { code: this.userInfo.companyCity }, { code: this.userInfo.companyArea }]
this.areaName = getAreaName(area)
this.areaName = getAreaName(area, 'customer')
},
homeNameInfo() {
let area = [{ code: this.userInfo.homeProvince }, { code: this.userInfo.homeCity }, { code: this.userInfo.homeArea }]
@@ -541,7 +543,7 @@ export default {
sureArea(area, type) {
switch (type) {
case '1': //单位地址
this.areaName = getAreaName(area)
this.areaName = getAreaName(area, 'customer')
;[this.userInfo.companyProvince, this.userInfo.companyCity, this.userInfo.companyArea] = [area[0].code, area[1].code, area[2].code]
this.areaShow = false
break

View File

@@ -591,9 +591,10 @@ export default {
//是否长期
if (insuredInfo.effectiveDateType == 'false') {
this.userInfo.effectiveDateType = false
this.effectiveDateTypeAble = true
this.effectiveDateTypeAble = false
} else {
this.userInfo.effectiveDateType = true
this.effectiveDateTypeAble = true
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
}
@@ -777,7 +778,6 @@ export default {
console.log(value.id)
//身份证以外的证件类型可以使用长期
if (value.id == '1') {
console.log('123')
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = age <= 45
} else {