diff --git a/src/api/ebiz/preserve/preserve.js b/src/api/ebiz/preserve/preserve.js index 966ee6cd6..148a5999c 100644 --- a/src/api/ebiz/preserve/preserve.js +++ b/src/api/ebiz/preserve/preserve.js @@ -60,3 +60,11 @@ export function renewalChange(data) { data }) } +//客户详情 +// export function customerInfo(data) { +// return request({ +// url: getUrl('/edor/customer/customerInfo', 0), +// method: 'post', +// data +// }) +// } diff --git a/src/config/preserve.js b/src/config/preserve.js index 841a9987a..5a2a9cb59 100644 --- a/src/config/preserve.js +++ b/src/config/preserve.js @@ -3,6 +3,7 @@ let mockBaseUrl = 'http://rap2.taobao.org:38080/app/mock/250585/' export default { '/edor/customer/customerInfo': mockBaseUrl + '/edor/customer/customerInfo', //客户详情 '/edor/customer/customerList': mockBaseUrl + '/edor/customer/customerList', //客户搜索 + '/edor/customer/policyList': mockBaseUrl + '/edor/customer/policyList', '/edor/item/change': mockBaseUrl + '/edor/item/change', '/edor/sign/save': mockBaseUrl + '/edor/sign/save', '/edor/query/queryDetails': mockBaseUrl + '/edor/query/queryDetails' diff --git a/src/router/ebiz/preserve.js b/src/router/ebiz/preserve.js index 2a5a9b295..d57f16cb4 100644 --- a/src/router/ebiz/preserve.js +++ b/src/router/ebiz/preserve.js @@ -10,6 +10,8 @@ const contactInfo = () => import('@/views/ebiz/preserve/ContactInfo') const contacAgreement = () => import('@/views/ebiz/preserve/ContacAgreement') const contactConfirmation = () => import('@/views/ebiz/preserve/ContactConfirmation') const beneficiaryInfo = () => import('@/views/ebiz/preserve/BeneficiaryInfo') +const beneficiaryInfoAdd = () => import('@/views/ebiz/preserve/BeneficiaryInfoAdd') +const beneficiaryInfoDetail = () => import('@/views/ebiz/preserve/BeneficiaryInfoDetail') const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/BeneficiaryConfirmation') const surrenderInfo = () => import('@/views/ebiz/preserve/SurrenderInfo') const surrenderConfirmation = () => import('@/views/ebiz/preserve/SurrenderConfirmation') @@ -70,6 +72,24 @@ export default [ index: 5 } }, + { + path: '/preserve/beneficiaryInfoAdd', + name: 'beneficiaryInfoAdd', + component: beneficiaryInfoAdd, + meta: { + title: '指定受益人信息', + index: 105 + } + }, + { + path: '/preserve/beneficiaryInfoDetail', + name: 'beneficiaryInfoDetail', + component: beneficiaryInfoDetail, + meta: { + title: '指定受益人信息', + index: 105 + } + }, { path: '/preserve/surrenderInfo', name: 'surrenderInfo', diff --git a/src/views/ebiz/preserve/AutopayAuthorization.vue b/src/views/ebiz/preserve/AutopayAuthorization.vue index 2a872362f..ddc951ba2 100644 --- a/src/views/ebiz/preserve/AutopayAuthorization.vue +++ b/src/views/ebiz/preserve/AutopayAuthorization.vue @@ -111,4 +111,4 @@ export default { line-height: 30px; border-bottom: 1px solid #dadada; } - \ No newline at end of file + diff --git a/src/views/ebiz/preserve/BeneficiaryConfirmation.vue b/src/views/ebiz/preserve/BeneficiaryConfirmation.vue index b09433e35..35a7b8d07 100644 --- a/src/views/ebiz/preserve/BeneficiaryConfirmation.vue +++ b/src/views/ebiz/preserve/BeneficiaryConfirmation.vue @@ -1 +1,240 @@ - \ No newline at end of file + + + + + diff --git a/src/views/ebiz/preserve/BeneficiaryInfo.vue b/src/views/ebiz/preserve/BeneficiaryInfo.vue index 048b818fd..df097ccbd 100644 --- a/src/views/ebiz/preserve/BeneficiaryInfo.vue +++ b/src/views/ebiz/preserve/BeneficiaryInfo.vue @@ -1 +1,196 @@ - \ No newline at end of file + + + + + diff --git a/src/views/ebiz/preserve/BeneficiaryInfoAdd.vue b/src/views/ebiz/preserve/BeneficiaryInfoAdd.vue new file mode 100644 index 000000000..011265e1e --- /dev/null +++ b/src/views/ebiz/preserve/BeneficiaryInfoAdd.vue @@ -0,0 +1,616 @@ + + + + diff --git a/src/views/ebiz/preserve/BeneficiaryInfoDetail.vue b/src/views/ebiz/preserve/BeneficiaryInfoDetail.vue new file mode 100644 index 000000000..627e4ead4 --- /dev/null +++ b/src/views/ebiz/preserve/BeneficiaryInfoDetail.vue @@ -0,0 +1,291 @@ + + + + diff --git a/src/views/ebiz/preserve/HandleResult.vue b/src/views/ebiz/preserve/HandleResult.vue index 4bedd891d..80c6400e6 100644 --- a/src/views/ebiz/preserve/HandleResult.vue +++ b/src/views/ebiz/preserve/HandleResult.vue @@ -35,29 +35,53 @@ export default { case 'contact': this.path = '/preserve/ContactConfirmation?entry=contact' break + case 'beneficiary': + this.path = '/preserve/BeneficiaryConfirmation?entry=beneficiary&' + break + case 'renewal': + this.path = '2' + break + case 'bonus': + this.path = '3' + break default: this.path = '' break } }, - mounted() {}, + mounted() { + // document.body.style.backgroundColor = '#fff' + }, methods: { nextStep() { - if (this.customerInfo.idType != '1') { + if (this.entry != 'beneficiary') { + // 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别 + // if (this.customerInfo.idType != '1') { // 如果证件类型不是身份证 // 直接跳过人脸识别 this.jumpNextPage(this.path) - } else if (this.entry != 'beneficiary') { - // 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别 - this.toFace() + // } else { + // this.toFace({ + // number: this.customerInfo.idNo, //身份证号码 + // name: this.customerInfo.name //姓名 + // }) + // } } else if (this.entry == 'beneficiary') { // 如果 保全项是 受益人变更、则进行特殊判断 // 若被保险人≥18周岁,人脸识别录入被保人本人 // 若被保险人<18周岁,被保险人与投保人为子女关系,人脸识别录入未成年人父亲或母亲 // toDo + // + // if (this.customerInfo.idType != '1' ) { + // // 如果证件类型不是身份证 + // // 直接跳过人脸识别 + // this.jumpNextPage(this.path) + // } + // + this.jumpNextPage(this.path) } }, - jumpNextPage(path) { + jumpNextPage(path = '/preserve/BeneficiaryInfo') { this.$jump({ flag: 'h5', extra: { @@ -68,7 +92,7 @@ export default { } }) }, - toFace() { + toFace(config) { // eslint-disable-next-line no-undef EWebBridge.webCallAppInJs('face_auth', { number: this.customerInfo.idNo, //身份证号码 diff --git a/src/views/ebiz/preserve/PolicyList.vue b/src/views/ebiz/preserve/PolicyList.vue index 8f230b2ad..ea7c60822 100644 --- a/src/views/ebiz/preserve/PolicyList.vue +++ b/src/views/ebiz/preserve/PolicyList.vue @@ -1 +1,161 @@ - \ No newline at end of file + + + diff --git a/src/views/ebiz/preserve/SubmitResult.vue b/src/views/ebiz/preserve/SubmitResult.vue index 3773a13f3..99f278085 100644 --- a/src/views/ebiz/preserve/SubmitResult.vue +++ b/src/views/ebiz/preserve/SubmitResult.vue @@ -6,7 +6,7 @@

提交成功

如有疑问请拨打客服电话: 4008-008-008

- +
返回
@@ -24,7 +24,7 @@ export default { document.body.style.backgroundColor = '#fff' }, methods: { - nextStep(){ + nextStep() { // service this.$jump({ flag: 'service' diff --git a/src/views/ebiz/preserve/SurrenderConfirmation.vue b/src/views/ebiz/preserve/SurrenderConfirmation.vue index 5627c94d6..e2bece42b 100644 --- a/src/views/ebiz/preserve/SurrenderConfirmation.vue +++ b/src/views/ebiz/preserve/SurrenderConfirmation.vue @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/views/ebiz/preserve/SurrenderInfo.vue b/src/views/ebiz/preserve/SurrenderInfo.vue index e680f7a0c..c185277aa 100644 --- a/src/views/ebiz/preserve/SurrenderInfo.vue +++ b/src/views/ebiz/preserve/SurrenderInfo.vue @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/views/ebiz/preserve/js/methods.js b/src/views/ebiz/preserve/js/methods.js new file mode 100644 index 000000000..da4406408 --- /dev/null +++ b/src/views/ebiz/preserve/js/methods.js @@ -0,0 +1,95 @@ +//点击弹出组件 +export function selectComp(that, index, type = '') { + that.currentPopupIndex = index + let title = '' + if (index == 1) { + ;[that.customerShowPicker, title] = [true, '客户列表'] + } else if (index == 2) { + ;[that.occupationShowPicker, title] = [true, '职业类别'] + } else if (index == 3) { + if (type == '1') { + //投保人 + localStorage.scanFromInsured = 'true' + } else if (type == '2') { + //被保险人 + localStorage.scanFromInsured = 'false' + } + ;[that.isScan, title] = [true, '身份证扫描'] + } + + setTimeout(() => { + that.$jump({ + flag: 'navigation', + extra: { + title, + hiddenLeft: '1' + } + }) + closeBtn(that) + }, 400) +} + +// 关闭按钮的显示 +function closeBtn(that) { + that.$jump({ + flag: 'webview_right_button', + extra: { + btns: [ + { + img: that.$assetsUrl + 'images/del-close.png', + route: { flag: '', extra: {} } + } + ] + } + }) +} + +// 获取身份证扫描信息 +/** + * + * @param {*} that 上下文 + * @param {*} data 扫描数据 + * @param {*} type 1 投保人 2 被保险人 + */ +export function getIdentityInfo(that, data, type) { + console.log(data) + // 正面 + if (data.name && data.name != '待识别') { + that.userInfo.name = data.name + that.userInfo.idNo = data.idNo + that.userInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}` + that.userInfo.sex = data.gender == '男' ? '0' : '1' + } + // 反面 + if (data.startDate && data.startDate != '待识别') { + that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(5, 2)}-${data.startDate.substr(8, 2)}` + //that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}` + // 是否为长期身份证 + if (data.endDate != '长期') { + that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}` + // that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}` + that.effectiveDateTypeAble = true + that.idLimit = false + that.isRequired = true + } else { + // 勾选长期 + that.userInfo.effectiveDateType = true + // 长期按钮不禁用 + that.effectiveDateTypeAble = false + // 证件截止日期不需要校验 + that.certiexpiredateRequired = false + //截止日期不可编辑 + that.idLimit = true + that.isRequired = false + } + } + that.isScan = false + let title = type == '1' ? '投保人信息' : '被保险人信息' + that.$jump({ + flag: 'navigation', + extra: { + title, + hiddenRight: '1' + } + }) +} diff --git a/src/views/ebiz/preserve/js/verification.js b/src/views/ebiz/preserve/js/verification.js new file mode 100644 index 000000000..b42c40b4b --- /dev/null +++ b/src/views/ebiz/preserve/js/verification.js @@ -0,0 +1,52 @@ +import changeFifteenToEighteen from '@/assets/js/utils/changeFifteenToEighteen' +import idNoCheck from '@/assets/js/utils/idNoCheck' +import utilsAge from '@/assets/js/utils/age' + +//身份证带出出生日期,性别,年龄 +export function idToData(idNo) { + //非空 + if (!idNo.trim()) { + return { + text: '证件号码不能为空' + } + } + + // 证件号码规则校验 + if (!idNoCheck.isIdno(idNo)) { + return { + text: '您填写的证件号码有误' + } + } + + //如果是15位身份证号先转为18位 + if (idNo.length == 15) { + idNo = changeFifteenToEighteen(idNo) + } + let birthday = getBirthById(idNo) + let age = utilsAge.getAge(birthday, new Date()) + let sex = getSexById(idNo) + return { + birthday, + age, + sex + } +} + +function getBirthById(idNo) { + // 获取生日 + var year = idNo.substr(6, 4) + var month = idNo.substr(10, 2) + var day = idNo.substr(12, 2) + return year + '-' + month + '-' + day +} + +function getSexById(idNo) { + // 获取性别 + if (idNo.charAt(16) >= '0' && idNo.charAt(16) <= '9') { + if (parseInt(idNo.charAt(16)) % 2 == 0) { + return '1' + } else { + return '0' + } + } +}