From a7cd37d0f5ecf846ea3bb529ee1f6698b78fc1df Mon Sep 17 00:00:00 2001 From: yuweiqi Date: Tue, 4 Feb 2020 13:29:24 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=E9=80=89=E6=8B=A9=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E4=BA=BA=E4=BF=A1=E6=81=AF=E5=B8=A6=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/claims/ApplyInfo.vue | 45 +++++++++++++++++++++++---- src/views/ebiz/claims/InsuredInfo.vue | 3 +- src/views/ebiz/sale/InsuredInfo.vue | 1 - 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/views/ebiz/claims/ApplyInfo.vue b/src/views/ebiz/claims/ApplyInfo.vue index 74e0d96db..32d4a7c1f 100644 --- a/src/views/ebiz/claims/ApplyInfo.vue +++ b/src/views/ebiz/claims/ApplyInfo.vue @@ -426,6 +426,7 @@ import { idToData } from '@/views/ebiz/customer/js/verification' import BankCardScan from '@/components/ebiz/sale/BankCardScan' import { getBankList } from '@/api/ebiz/sale/sale' import { getIdentityInfo, onDateConfirm, effectiveDataTypeChange } from '../sale/js/methods' +import occupationList from '@/components/ebiz/occipation/data/occupation' export default { name: 'applyInfo', @@ -488,10 +489,10 @@ export default { applyerCertiStartDate: '', // 证件起始日期 applyerCertiEndDate: '', // 证件截止日期 applyerRevenueType: '01', //个人税收居民身份 - applyerOccuCode: '', //职业 - applyerOccuName: '', - lifeGrade: '', - healthGrade: '', + applyerOccuCode: '', //职业类型编码 + applyerOccuName: '', //职业类别名称 + lifeGrade: '', //寿险等级 + healthGrade: '', //健康等级 applyerEmail: '', // 电子邮箱 applyerMobile: '', // 联系电话 applyerNationatlity: 'CHN', // 国家/地区 @@ -631,6 +632,25 @@ export default { this.customerNo = Detail[0][0].customerNo this.DataIndex = Detail[0][1] this.customerShowPicker = false + + this.userInfo.applyerName = Detail[0][0].customerName + this.userInfo.applyerSex = Detail[0][0].customerSex + this.userInfo.applyerCertiType = Detail[0][0].idType + this.userInfo.applyerCertiCode = Detail[0][0].idNo + this.userInfo.applyerBirthday = Detail[0][0].customerBirthday //出生日期 + this.effectiveDateType = Detail[0][0].isEndDate == '9999-01-01' //是否长期 + this.userInfo.applyerCertiEndDate = Detail[0][0].isEndDate == '9999-01-01' ? '2010-01-01' : Detail[0][0].isEndDate //截止日期 + this.userInfo.applyerNationatlity = Detail[0][0].nationality + this.userInfo.applyerEmail = Detail[0][0].customerEmail + this.userInfo.applyerMobile = Detail[0][0].customerMobile + this.userInfo.applyerAddr = Detail[0][0].homeAddress + this.userInfo.applyerOccuCode = Detail[0][0].occuCode //职业编码 + let result = this.showOccuName(Detail[0][0].occuCode) + this.userInfo.applyerOccuName = result.applyerOccuName //职业名称 + this.userInfo.lifeGrade = result.lifeGrade // + this.userInfo.healthGrade = result.healthGrade // + console.log('this.userInfo.applyerCertiEndDate == ', this.userInfo.applyerCertiEndDate) + /* let data = { customerNo: this.customerNo // surrenderType: '0' @@ -652,7 +672,20 @@ export default { this.$toast(res.resultMessage) } }) - // 字段取值 + */ + }, + + //根据职业编码显示职业名称 + showOccuName(occuCode) { + let firstTier = Number(occuCode.substr(0, 1)) - 1 + let result + occupationList[firstTier].subs.forEach(item => { + if (item.subs[0].code == occuCode) { + result = { applyerOccuName: item.subs[0].name, lifeGrade: item.subs[0].lifeGrade, healthGrade: item.subs[0].healthGrade } + return + } + }) + return result }, //失焦验证身份证 getRelatedData(val) { @@ -859,7 +892,7 @@ export default { //长期状态改变时 effectiveDataTypeChange(val) { if (val) { - this.userInfo.applyerCertiEndDate = '9999-09-09' + this.userInfo.applyerCertiEndDate = '' this.certiexpiredateRequired = false } else { this.userInfo.applyerCertiEndDate = '' diff --git a/src/views/ebiz/claims/InsuredInfo.vue b/src/views/ebiz/claims/InsuredInfo.vue index 82166b2a2..a5226fb50 100644 --- a/src/views/ebiz/claims/InsuredInfo.vue +++ b/src/views/ebiz/claims/InsuredInfo.vue @@ -59,6 +59,7 @@