diff --git a/src/views/ebiz/sale/AccountInformation.vue b/src/views/ebiz/sale/AccountInformation.vue index 8056ace5c..fc1944816 100644 --- a/src/views/ebiz/sale/AccountInformation.vue +++ b/src/views/ebiz/sale/AccountInformation.vue @@ -198,7 +198,7 @@ export default { this.accBankProvince = province.code this.accBankCity = city.code this.isAreaListShow = false - this.areaStr = province.name + city.name + county.name + this.areaStr = `${province.name}-${city.name}-${county.name}` }, closePop() { //关闭选择银行弹窗 diff --git a/src/views/ebiz/sale/AddBeneficiaryInfo.vue b/src/views/ebiz/sale/AddBeneficiaryInfo.vue index 13c13a3e3..2d8b3e520 100644 --- a/src/views/ebiz/sale/AddBeneficiaryInfo.vue +++ b/src/views/ebiz/sale/AddBeneficiaryInfo.vue @@ -93,8 +93,18 @@
长期
- + + + + - - + /> - + + + + + + @@ -204,16 +230,13 @@ import FieldDatePicter from '@/components/ebiz/FieldDatePicter' import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker' import DataDictionary from '@/assets/js/utils/data-dictionary' import areaList from '@/assets/js/utils/area' -import { getOrderDetail } from '@/api/ebiz/sale/sale' import filter from '@/filters/index' -import getAreaName from '@/assets/js/utils/get-area-name' import utilsAge from '@/assets/js/utils/age' import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan' import CustomerPicker from '@/components/ebiz/customer/CustomerPicker' import idNoCheck from '@/assets/js/utils/idNoCheck' import { idToData } from './js/verification' import { selectComp } from './js/methods' -// let relationToInsured = [{ id: 2, text: '配偶' }, { id: 3, text: '父母' }, { id: 4, text: '子女' }, { id: 5, text: '其他' }] let relationToInsured = [ { id: 2, text: '配偶' }, { id: 3, text: '父母' }, @@ -237,6 +260,12 @@ export default { }, data() { return { + isAreaListShow: false, + province: '', + city: '', + county: '', + areaStr: '', + isMarriageStatusShow: false, effectiveDateTypeAble: true, //长期按钮是否禁用 isScan: false, //是否显示证件扫描组件 sexRadio: [ @@ -261,33 +290,34 @@ export default { degree: '', socialSecurity: '', taxIdentity: '', - // areaName: '', areaValue: '110101', certiexpiredateRequired: true, //证件截止日期是否需要校验 certiexpiredateShow: true, //证件截止日期是否可以选择 marriage: '', isRequired: '', //长期前是否有* userInfo: { + yearSalary: '', + maritalStatus: '', + averageAnnualIncome: '', + marriageStatus: '', + provinceCode: '', + cityCode: '', + countyCode: '', + jobCode: '', + street: '', name: '', sex: '0', nativeplace: '1', //国家地区 birthday: '', idType: '1', //证件类型 idNo: '', //证件号码 - // certificateValidate: '', //证件起始日期 certiexpiredate: '', //证件到期时间 effectiveDateType: false, //是否长期 asAppntAddress: false, //同投保人 occupationCode: '', occupationName: '', - // mobile: '', workcompany: '', //工作单位 - // village: '', - // province: '', - // city: '', - // area: '', fIncome: '', - // email: '', bnfOrder: '1', //受益顺序 bnfLot: '', //受益比例 bnfFlag: '', @@ -296,23 +326,16 @@ export default { healthGrade: '', bnfType: '0' //身故受益人 }, - areaList: areaList, + areaList, occupationShowPicker: false, customerShowPicker: false, //客户列表展示 isInsured: false, //是投保人本人, Insured: false, //投保人本人按钮是否置灰 idLimit: false, //证件起止日期是否只读 - // 开飞机的小历悦 - // area: '', - // city: '', - // province: '' saleInsuredPersonInfo: JSON.parse(localStorage.saleInsuredPersonInfo) //被保人信息 } }, mounted() { - // EWebBridge.webCallAppInJs('webview_left_button', { - // intercept: '1' //是否拦截原生返回事件 1是 其他否 - // }) window.appCallBack = this.appCallBack if (localStorage.applicant == '1' || this.saleInsuredPersonInfo.relationToAppnt == '1' || this.saleInsuredPersonInfo.relationToAppnt == '5') { this.Insured = true @@ -321,6 +344,32 @@ export default { } }, methods: { + setBankArea(areaInfo) { + let province = areaInfo[0] + let city = areaInfo[1] + let county = areaInfo[2] + this.userInfo.provinceCode = province.code + this.userInfo.cityCode = city.code + this.userInfo.countyCode = county.code + this.isAreaListShow = false + this.areaStr = `${province.name}-${city.name}-${county.name}` + }, + onMarriageConfirm(value) { + this.userInfo.marriageStatus = value.text + if (value.text === '已婚') { + this.userInfo.maritalStatus = '0' + } else { + this.userInfo.maritalStatus = '1' + } + this.isMarriageStatusShow = false + }, + setMarriageStatus() { + this.isMarriageStatusShow = true + this.columns = [ + { id: 0, text: '已婚' }, + { id: 1, text: '单身' } + ] + }, //监听名字变化 nameChange(name) { this.userInfo.name = name @@ -351,20 +400,6 @@ export default { // let that = this selectComp(this, index, '3') }, - // closeBtn() { - // // 筛选按钮的显示 - // this.$jump({ - // flag: 'webview_right_button', - // extra: { - // btns: [ - // { - // img: this.$assetsUrl + 'images/del-close.png', - // route: { flag: '', extra: {} } - // } - // ] - // } - // }) - // }, appCallBack() { this.$jump({ flag: 'goBack', @@ -426,13 +461,11 @@ export default { }, //确认选择字段 onConfirm(value) { - // console.log(value,this.pickerType) this.popupShow = false if (this.pickerType == '1') { ;[this.userInfo.nativeplace, this.nativeplace] = [value.id, value.text] } else if (this.pickerType == '2') { this.idLimit = false - // this.userInfo.idNo = this.userInfo.certificateValidate = this.userInfo.certiexpiredate = this.userInfo.birthday = '' this.userInfo.idNo = this.userInfo.certiexpiredate = this.userInfo.birthday = '' this.userInfo.sex = '0' this.effectiveDateTypeAble = false @@ -603,9 +636,7 @@ export default { hiddenRight: '1' } }) - // let { customerName, customerSex } = data this.userInfo.name = data.customerName //用户名 - //this.userInfo.sex = String(data.customerSex) //性别 if (data.dacustomerSex == null) { this.userInfo.sex = '' } else { @@ -615,9 +646,6 @@ export default { this.userInfo.birthday = data.birthday //出生日期 this.userInfo.idType = data.customerIdType //证件类型 this.userInfo.idNo = data.customerIdNumber //证件号码 - // this.userInfo.certificateValidate = data.idEffectStartDate //证件起始日期 - // this.userInfo.certiexpiredate = data.idEffectEndDate //证件截止日期 - // this.userInfo.effectiveDateType = data.idEffectEndDate == '9999-01-01' //是否长期 if (data.idEffectEndDate == '9999-01-01') { this.userInfo.effectiveDateType = true //是否长期 } else { @@ -918,7 +946,6 @@ export default { } beneficiaries.push(this.userInfo) - // console.log(beneficiaries) // 保存 新增的受益人信息 以及页面跳转字段 localStorage.beneficiaryInfo = JSON.stringify(beneficiaries) localStorage.fromAddBeneficiaryInfo = true @@ -938,24 +965,7 @@ export default { } else { this.$toast(this.$validator.errors.all()[0]) } - // }) }, - // //区域选择 - // sureArea(area, type) { - // switch (type) { - // case '1': //单位地址 - // this.areaName = getAreaName(area) - // ;[this.userInfo.province, this.userInfo.city, this.userInfo.area] = [area[0].code, area[1].code, area[2].code] - // this.areaShow = false - // break - // } - // }, - // chooseArea() { - // if (this.isInsured) { - // return - // } - // this.areaShow = true - // }, // 证件扫描 goScan() { this.isScan = true @@ -1011,7 +1021,6 @@ export default { this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期 this.userInfo.certiexpiredate = insuredDetail.certiexpiredate == '9999-01-01' ? '' : insuredDetail.certiexpiredate //证件截止日期 this.userInfo.effectiveDateType = insuredDetail.certiexpiredate == '9999-01-01' //是否长期 - // this.userInfo.effectiveDateType = insuredDetail.effectiveDateType == '9999-01-01' //是否长期 let age = utilsAge.getAge(insuredDetail.birthday, new Date()) this.effectiveDateTypeAble = age <= 45 if (age > 45) { @@ -1020,8 +1029,6 @@ export default { this.idLimit = true this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码 this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称 - // this.userInfo.mobile = insuredDetail.mobile //联系电话 - // this.userInfo.email = insuredDetail.email //电子邮箱 } else { this.isInsured = false this.userInfo.relationToInsured = '' @@ -1039,8 +1046,6 @@ export default { this.idLimit = false this.userInfo.occupationCode = '' //职业类别编码 this.userInfo.occupationName = '' //职业类别名称 - // this.userInfo.mobile = '' //联系电话 - // this.userInfo.email = '' //电子邮箱 } }, //长期状态改变时 @@ -1048,20 +1053,15 @@ export default { //勾选长期状态时,证件截止日期置空 if (val) { this.userInfo.certiexpiredate = '' - // this.isRequired = false - // this.idLimit = true this.certiexpiredateRequired = false } else { this.certiexpiredateRequired = true - // this.isRequired = true - // this.idLimit = false } }, //获取身份证扫描信息 getIdentityInfo(data) { console.log(data) if (data.name && data.name != '待识别') { - // this.userInfo.certificateValidate = data.startDate this.userInfo.certiexpiredate = data.endDate this.userInfo.name = data.name this.userInfo.idNo = data.idNo @@ -1082,7 +1082,7 @@ export default { if (this.userInfo.idType != '1') { return } - // //如果证件校验不通过,恢复默认值 + //如果证件校验不通过,恢复默认值 // if (idToData(val).text) { // ;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday, this.effectiveDateTypeAble] = ['', '0', '', false] // return this.$toast(idToData(val).text) @@ -1093,7 +1093,7 @@ export default { // if (!['1', '2', '3', 1, 2, 3].includes(this.userInfo.idType)) { // return // } - // //如果证件校验不通过,恢复默认值 + //如果证件校验不通过,恢复默认值 if (idToData(val).text) { ;[this.userInfo.idNo, this.userInfo.sex, this.userInfo.birthday, this.effectiveDateTypeAble] = ['', '0', '', false] return this.$toast(idToData(val).text) @@ -1103,17 +1103,10 @@ export default { this.userInfo.birthday = idToData(val).birthday this.userInfo.sex = idToData(val).sex if (idToData(val).age > 45) { - // this.idLimit = true - // this.isRequired = false - // this.userInfo.effectiveDateType = true if (from) { this.userInfo.effectiveDateType = true } this.effectiveDateTypeAble = false - } else { - // this.idLimit = false - // this.isRequired = true - // this.userInfo.effectiveDateType = false } //如果选择户口本 // if (this.userInfo.idType == '2') { diff --git a/src/views/ebiz/sale/Beneficiary.vue b/src/views/ebiz/sale/Beneficiary.vue index 5bce0dedf..57e0f65b5 100644 --- a/src/views/ebiz/sale/Beneficiary.vue +++ b/src/views/ebiz/sale/Beneficiary.vue @@ -67,13 +67,7 @@ export default { type: '1', insuredPerson: '', //被保险人 isAssign: false, // 是否指定受益人 - beneficiaries: [ - // { - // name: '陈明', - // relationToAppnt: '1', - // beneRatio: '99' - // } - ], // 指定受益人列表 + beneficiaries: [], // 指定受益人列表 bnfFlag: '0', // 受益人类型 bnfType: '0', // 0 身故受益人 1 身前受益人 salePageFlag: '4' @@ -107,6 +101,7 @@ export default { }, mounted() { setTimeout(() => { + // eslint-disable-next-line no-undef EWebBridge.webCallAppInJs('webview_left_button', { img: this.$assetsUrl + 'images/del-close-btn@3x.png', intercept: '1' //是否拦截原生返回事件 1是 其他否 @@ -240,17 +235,13 @@ export default { .then(() => { // on confirm - // console.log('删除受益人') console.log(this.beneficiaries[index].idNo) if (this.beneficiaries[index].asAppntAddress == true) { localStorage.removeItem('applicant') } // 删除 localStorage 中的对应数据 - // console.log(this.beneficiaries) let beneficiaries = JSON.parse(localStorage.beneficiaryInfo) - // console.log(JSON.parse(localStorage.beneficiaryInfo)) - console.log(beneficiaries) let delIdx = beneficiaries.findIndex(item => { return item.idNo == this.beneficiaries[index].idNo }) diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index 7c7c91280..b0f0e8586 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -67,6 +67,17 @@ 长期 + { @@ -1001,7 +1017,6 @@ export default { // 证件号码规则校验 if (!idNoCheck.isIdno(this.userInfo.idNo)) { - console.log('证件号码校验有误') return this.$toast('您填写的证件号码有误') } @@ -1011,7 +1026,6 @@ export default { } // 年龄在 16-25 周岁之间 if (age >= 16 && age <= 25) { - console.log('年龄在16-25周岁之间') if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1980-01-01')) { this.userInfo.certiexpiredate = '' this.$refs.certiexpiredate.date = '' @@ -1020,7 +1034,6 @@ export default { } //年龄在 26-45 周岁之间 } else if (age >= 26 && age <= 45) { - console.log('年龄在26-45周岁之间') if (Date.parse(this.userInfo.certiexpiredate) - Date.parse(new Date()) > Date.parse('1990-01-01')) { this.userInfo.certiexpiredate = '' this.$refs.certiexpiredate.date = '' @@ -1086,23 +1099,8 @@ export default { return this.$toast('学生不可以作为投保人,请更换投保人投保') } - // 职业 学龄前儿童 2099908, 离休人员 8000003,家庭主妇 4071203,无业人员 8000001, - // 亲,您填写的工作单位过于简短哦~ - if ( - this.userInfo.occupationCode == '2099908' || - this.userInfo.occupationCode == '8000003' || - this.userInfo.occupationCode == '4071203' || - this.userInfo.occupationCode == '8000001' - ) { - } else if (this.userInfo.workcompany.length < 6 && this.userInfo.workcompany.trim() != '无') { - // await this.asyncToast('亲,您填写的工作单位过于简短哦~') + if (this.userInfo.workcompany.length < 6 && this.userInfo.workcompany.trim() != '无') { this.userInfo.workcompany = '无' - // await this.$dialog.confirm({ - // title: '提示', - // message: '亲,您填写的工作单位过于简短哦~', - // confirmButtonText: '继续填写', - // cancelButtonText: '返回修改' - // }) } if (this.userInfo.salarySource == '4') { @@ -1207,10 +1205,7 @@ export default { confirmButtonColor: '#FFFFFF' }) .then(() => { - // on confirm - this.save() - // this.save('isShow=1') }) .catch(() => { return @@ -1232,6 +1227,7 @@ export default { } } let str = '' + this.userInfo.maritalStatus = this.maritalStatus params.orderDTO.appntDTO = this.userInfo //------------------------专为桂企写死--begin---------------// if (this.specilFlag == '1') { @@ -1354,10 +1350,6 @@ export default { } }) }, - //证件扫描 - // goScan() { - // this.isScan = true - // }, //长期状态改变时 effectiveDataTypeChange(val) { //勾选长期状态时,证件截止日期置空 @@ -1433,11 +1425,16 @@ export default { computed: { isShowOthenSalarySource() { - if (this.userInfo.salarySource == '4') { - return true - } else { + return this.userInfo.salarySource == '4' + }, + maritalStatus() { + return this.marriageStatus === '已婚' ? '0' : '1' + } + }, + watch: { + isShowOthenSalarySource(nVal) { + if (!nVal) { this.userInfo.otherSalarySource = '' - return false } } }, diff --git a/src/views/ebiz/sale/InsuredPerson.vue b/src/views/ebiz/sale/InsuredPerson.vue index a2834e8b5..629d34934 100644 --- a/src/views/ebiz/sale/InsuredPerson.vue +++ b/src/views/ebiz/sale/InsuredPerson.vue @@ -97,16 +97,18 @@
长期
- + + right-icon="arrow" + placeholder="请选择" + @click="setMarriageStatus('10')" + /> --> - - + + + @@ -469,6 +471,7 @@ export default { }, data() { return { + isMarriageStatusShow: false, withRootUser: { load: false, //防止重复请求 value: false @@ -513,6 +516,7 @@ export default { homeName: '', isRequired: '', //长期前是否有* userInfo: { + marriageStatus: '', name: '', // sex: '0', sex: '', @@ -702,13 +706,17 @@ export default { // // document.body.style.backgroundColor = '#F5F5F5' }, methods: { - // async asyncToast(value, ms=2000) { - // return new Promise((resolve) => { - // console.log(value); - // this.$toast(value) - // setTimeout(resolve, ms); - // }) - // }, + onMarriageConfirm(value) { + this.userInfo.marriageStatus = value.text + this.isMarriageStatusShow = false + }, + setMarriageStatus() { + this.isMarriageStatusShow = true + this.columns = [ + { id: 0, text: '已婚' }, + { id: 1, text: '单身' } + ] + }, //监听名字变化 nameChange(name) { this.userInfo.name = name @@ -752,20 +760,6 @@ export default { }) this.occupationShowPicker = false }, - // closeBtn() { - // // 筛选按钮的显示 - // this.$jump({ - // flag: 'webview_right_button', - // extra: { - // btns: [ - // { - // img: this.$assetsUrl + 'images/del-close.png', - // route: { flag: '', extra: {} } - // } - // ] - // } - // }) - // }, //弹框选择 toSelect(pickerType, valueKey) { // 投被同人不允许编辑 @@ -806,9 +800,7 @@ export default { this.userInfo.nativeplace = value.id } else if (this.pickerType == '2') { this.idLimit = false - // this.userInfo.idNo = this.userInfo.certificateValidate = this.userInfo.certiexpiredate = this.userInfo.birthday = '' this.userInfo.idNo = this.userInfo.certiexpiredate = this.userInfo.birthday = '' - // this.userInfo.sex = '0' this.effectiveDateTypeAble = false console.log(value.id) //身份证以外的证件类型可以使用长期 @@ -945,6 +937,8 @@ export default { this.userInfo.jobStatus = value.id }*/ else if (this.pickerType == '9') { this.userInfo.salarySource = value.id + } else if (this.pickerType === '10') { + this.userInfo } }, //证件起始截止日期 @@ -1189,13 +1183,14 @@ export default { if (true === valid) { // 职业 学龄前儿童 2099908, 离休人员 8000003,家庭主妇 4071203,无业人员 8000001, // 亲,您填写的工作单位过于简短哦~ - if ( - this.userInfo.occupationCode == '2099908' || - this.userInfo.occupationCode == '8000003' || - this.userInfo.occupationCode == '4071203' || - this.userInfo.occupationCode == '8000001' - ) { - } else if (this.userInfo.workcompany.length < 6 && this.userInfo.workcompany.trim() != '无') { + // if ( + // this.userInfo.occupationCode == '2099908' || + // this.userInfo.occupationCode == '8000003' || + // this.userInfo.occupationCode == '4071203' || + // this.userInfo.occupationCode == '8000001' + // ) { + // } + if (this.userInfo.workcompany.length < 6 && this.userInfo.workcompany.trim() != '无') { this.userInfo.workcompany = '无' // await this.$dialog.confirm({ // title: '提示', @@ -1450,23 +1445,17 @@ export default { } } - // this.save() this.infoUpdate() - // console.log('success') } else { return this.$toast(this.$validator.errors.all()[0]) } - // }) }, //信息变更 infoUpdate() { //local 里面是否存有险种信息 - // debugger let chooseProductCodes = localStorage.chooseProductCodesNew && JSON.parse(localStorage.chooseProductCodesNew) - // if (chooseProductCodes && chooseProductCodes.length) { if (localStorage.saleInsuredPersonInfo) { //获取险种列表 - // let chooseProductCodes = JSON.parse(localStorage.chooseProductCodes) //取出local中的被保险人信息 let saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo) //如果 性别, 出生日期, 有无社保, 职业 发生变化 @@ -1508,20 +1497,19 @@ export default { orderInfoDTO: { orderNo: localStorage.orderNo }, - // smsCodeDTO: { smsId: this.sessionId, code: this.userInfo.authCode }, appntDTO: {} } } if (this.userInfo.mediaDTOS == '') { delete this.userInfo.mediaDTOS } + this.userInfo.maritalStatus = this.maritalStatus + console.dir(this.userInfo) params.orderDTO.insuredDTOs = [this.userInfo] let str = '' let resultData = await saveOrUpdateOrderInfo(params) if (resultData.result == 0) { localStorage.salePageFlag = '3' - // localStorage.relationToAppnt = this.userInfo.relationToAppnt - //deleteFlag 0-该页面修改了信息且修改的信息影响到后面流程,后台进行了删除数据的操作 if (resultData.deleteFlag == '0') { localStorage.salePageFlag = '3' @@ -1748,6 +1736,9 @@ export default { this.userInfo.otherSalarySource = '' return false } + }, + maritalStatus() { + return this.marriageStatus === '已婚' ? '0' : '1' } }, beforeDestroy() {