From a20ee3fd7c9eed692eb2b782d9f9fc02687c8e4a Mon Sep 17 00:00:00 2001 From: wangmingzhe Date: Fri, 27 Dec 2019 11:21:47 +0800 Subject: [PATCH] =?UTF-8?q?[IMP]=20=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/claims/Accident.vue | 51 +++++++++++---------------- src/views/ebiz/claims/InsuredInfo.vue | 9 +++-- 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/src/views/ebiz/claims/Accident.vue b/src/views/ebiz/claims/Accident.vue index 4d44d77d6..0b405d603 100644 --- a/src/views/ebiz/claims/Accident.vue +++ b/src/views/ebiz/claims/Accident.vue @@ -233,20 +233,19 @@ export default { ], arr: [], //后台获取反显的申请类型编码 currentDate: new Date(), //当前时间 - popupShow: false, - pickerType: '', + popupShow: false, //用于字段选择的显示隐藏 + pickerType: '', //用于区分是哪个字段选择 valueKey: '', - columns: [], - applyType: [], + columns: [], //用于字段选择绑定的数据 + applyType: [], //保存选择的申请类型数组 cause: '0', //通过该值判断出险原因 from: this.$route.query.from, //页面跳转来源 slaveStatus: 'claimApplyRisk', //进行到的状态 - insuranceId: '', //出险信息主键id - idType: '', - applyName: [], - areaName: '', //联系地址 + areaName: '', //用于页面上显示联系地址 areaShow: false, //显示隐藏地址选择 - areaList: areaList, //省市区数据 + areaList: areaList, //用于省市区组件绑定数据 + + //接口传参 userInfo: { accidentCause: '', //出险原因 applyType: '', //申请类型 @@ -268,37 +267,21 @@ export default { agentItem: '01', //代办事项 days: '', //新增委托天数 businessNo: '', //业务号码 - id: '' } } }, mounted() { - //this.ReturnShow() document.body.style.backgroundColor = '#fff' + + //获取业务号码 this.userInfo.businessNo = window.localStorage.getItem('businessNo') + //获取委托人的信息 let userModel = JSON.parse(window.localStorage.getItem('userModel')) + + //页面反显委托人信息 this.userInfo.mandatorName = userModel.name this.userInfo.mandatorCertiType = userModel.idType this.userInfo.mandatorCertiCode = userModel.idno - - // //受托人证件类型 - // switch (this.idType) { - // case '身份证': - // this.userInfo.mandatorCertiType = '0' - // break - // case '护照': - // this.userInfo.mandatorCertiType = '4' - // break - // case '台胞证': - // this.userInfo.mandatorCertiType = '8' - // break - // case '回乡证': - // this.userInfo.mandatorCertiType = '5' - // break - // case '其他': - // this.userInfo.mandatorCertiType = '9' - // break - // } }, beforeRouteLeave(to, from, next) { document.body.style.backgroundColor = '' @@ -341,6 +324,7 @@ export default { onDateConfirm(val) { //如果录入日期晚于当前日期 if (Date.parse(val) > Date.parse(new Date())) { + //将用于接口传参的出险日期和页面显示的出险日期清空 this.userInfo.accidentDate = '' this.$refs.accidentDate.date = '' return this.$toast('出险日期不能晚于当前日期') @@ -351,23 +335,29 @@ export default { ;[this.popupShow, this.pickerType] = [true, pickerType] if (valueKey) this.valueKey = valueKey if (pickerType == '1') { + //绑定治疗医院数据字典 this.columns = Hospital.hospitalList } else if (pickerType == '2') { + //绑定是否购买过其他公司保险的数据字典 this.columns = DataDictionary.cureList } }, // 确认选择字段 onConfirm(value) { + //隐藏字段选择组件 this.popupShow = false if (this.pickerType == '1') { + //保存接口传参治疗医院的码值 this.userInfo.hospitalCode = value.id } else if (this.pickerType == '2') { + //保存接口传参是否购买过其他公司保险的码值 this.userInfo.isInsureOther = value.id } }, //点击申请类型(多选) toActive(value, e) { + //判断当前点击的申请类型有无active的class类名 if (e.target.classList.contains('active')) { e.target.classList.remove('active') this.applyType.pop(value) @@ -375,6 +365,7 @@ export default { e.target.classList.add('active') this.applyType.push(value) } + //将接口传参的申请类型改为以逗号分隔的字符串 this.userInfo.applyType = this.applyType.join(',') }, //区域选择 diff --git a/src/views/ebiz/claims/InsuredInfo.vue b/src/views/ebiz/claims/InsuredInfo.vue index 5e43ea3f6..9020a34ee 100644 --- a/src/views/ebiz/claims/InsuredInfo.vue +++ b/src/views/ebiz/claims/InsuredInfo.vue @@ -222,7 +222,7 @@ export default { } ], slaveStatus: 'claimApplyInsured', //进行到的状态 - claimId: '', //用于数据反显的id + // claimId: '', //用于数据反显的id currentDate: new Date(), //当前时间 from: this.$route.query.from, //跳转来源 columns: [], @@ -243,7 +243,6 @@ export default { insuredBirthday: '', //出生日期 certiType: '1', //证件类型 certiCode: '', // 证件号码 - insuredNo: '', //被保人编号 insuredOccuCode: '', //职业类型编码 insuredOccuName: '', //职业类别名称 lifeGrade: '', //寿险等级 @@ -256,13 +255,15 @@ export default { insuredCity: '', //新增字段被保人所在市 insuredCounty: '', //新增字段被保人所在区/县 insuredAddr: '', //被保人详细地址 + businessNo: '', //业务号码 + insuredNo: '', //被保人编号 + } } }, created() { this.judge() - //this.ReturnShow() }, mounted() { document.body.style.backgroundColor = '#fff' @@ -433,7 +434,6 @@ export default { console.log(res) if (res.result == 0) { let CustomerDetails = res.content - //let Customerdetail = this.CustomerDetails[this.DataIndex] this.userInfo.insuredName = CustomerDetails.customerName this.userInfo.insuredSex = CustomerDetails.customerSex this.userInfo.certiType = CustomerDetails.idType @@ -449,7 +449,6 @@ export default { }) }, ChooseOccupation() { - // chooseOccupation(this, '2') this.occupationShowPicker = false this.$jump({ flag: 'navigation',