diff --git a/src/assets/js/utils/get-area-name.js b/src/assets/js/utils/get-area-name.js index ace60eee8..d92af7450 100644 --- a/src/assets/js/utils/get-area-name.js +++ b/src/assets/js/utils/get-area-name.js @@ -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] } diff --git a/src/components/ebiz/customer/formBlock.vue b/src/components/ebiz/customer/formBlock.vue index 9bb24b857..4709a1c3e 100644 --- a/src/components/ebiz/customer/formBlock.vue +++ b/src/components/ebiz/customer/formBlock.vue @@ -190,7 +190,7 @@ - + @@ -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 diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index 907c03ada..5d81ef0af 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -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 {