diff --git a/package-lock.json b/package-lock.json index bc73d1468..44d9b6fc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6387,8 +6387,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -6409,14 +6408,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6431,20 +6428,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -6561,8 +6555,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -6574,7 +6567,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6589,7 +6581,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6597,14 +6588,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -6623,7 +6612,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -6704,8 +6692,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -6717,7 +6704,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -6803,8 +6789,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -6840,7 +6825,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6860,7 +6844,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6904,14 +6887,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -12789,8 +12770,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true, - "optional": true + "dev": true }, "rx-lite-aggregates": { "version": "4.0.8", diff --git a/package.json b/package.json index 2239b89d1..f9889dcc6 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "ebiz-h5", "version": "1.0.0", - "description": "鼎诚人寿", - "author": "wangfangbo ", + "description": "国富人寿", + "author": "", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/public.lnk b/public.lnk deleted file mode 100644 index a25110272..000000000 Binary files a/public.lnk and /dev/null differ diff --git a/src/App.vue b/src/App.vue index f3f406286..184ba9078 100644 --- a/src/App.vue +++ b/src/App.vue @@ -41,8 +41,7 @@ export default { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #2c3e50; - max-height: 100%; - height:auto; + height: 100%; } .slide-left-leave-active, .slide-left-enter-active, diff --git a/src/api/app/user.js b/src/api/app/user.js index bd75d3318..5084f8c8b 100644 --- a/src/api/app/user.js +++ b/src/api/app/user.js @@ -3,7 +3,6 @@ import getUrl from '@/assets/js/utils/get-url' // 登录 export function login(data) { - console.log('--login', getUrl('/user/login', 0), 'param:', JSON.stringify(data)) return request({ url: getUrl('/user/login', 0), method: 'post', diff --git a/src/api/ebiz/customer/customer.js b/src/api/ebiz/customer/customer.js index 1cba548bf..8f33d6c27 100644 --- a/src/api/ebiz/customer/customer.js +++ b/src/api/ebiz/customer/customer.js @@ -1,4 +1,3 @@ - import request from '@/assets/js/utils/request' import getUrl from '@/assets/js/utils/get-url' @@ -37,4 +36,3 @@ export function deleteCustomerInfo(data) { data }) } - diff --git a/src/api/ebiz/sale/sale.js b/src/api/ebiz/sale/sale.js index 77c775fe3..ee8b8da45 100644 --- a/src/api/ebiz/sale/sale.js +++ b/src/api/ebiz/sale/sale.js @@ -65,12 +65,13 @@ export function getAuthCode(data) { // 上传图片 export function uploadImg(data) { return request({ - url: getUrl('/app/uploadImage', 1, 2), + url: getUrl('/uploadImage', 1, 2), method: 'post', data }) } +// 139.9.27.13:7002/updown/uploadImage // 核保接口 export function underWrite(data) { return request({ @@ -92,7 +93,7 @@ export function acceptInsurance(data) { // 获取银行卡接口 export function getBankList(data) { return request({ - url: getUrl('/app/code/getCodeValue', 1, 2), + url: getUrl('/app/code/getCodeValue', 1), method: 'post', data }) @@ -133,3 +134,30 @@ export function getDetail(data) { data }) } + +// http://47.96.143.111:7000/api/v1/sale/record/check +export function check(data) { + return request({ + url: getUrl('/sale/record/check', 1), + method: 'post', + data + }) +} + +// 微信分享获取校验值 +export function getSignInvalid(data) { + return request({ + url: getUrl('/ppf/sign', 1), + method: 'post', + data + }) +} + +// 微信分享校验失效 +export function checkSignInvalid(data) { + return request({ + url: getUrl('/ppf/check', 1), + method: 'post', + data + }) +} diff --git a/src/assets/js/business-common.js b/src/assets/js/business-common.js index c7b62b823..3a8807e21 100644 --- a/src/assets/js/business-common.js +++ b/src/assets/js/business-common.js @@ -510,7 +510,9 @@ export default { idType: appntDTO.idType, age, idNo: appntDTO.idNo, - appntId: appntDTO.appntId + appntId: appntDTO.appntId, + healthGrade: appntDTO.healthGrade, + lifeGrade: appntDTO.lifeGrade }) if (insuredDTO) { @@ -526,7 +528,9 @@ export default { occupationName: insuredDTO.occupationName, occupationCode: insuredDTO.occupationCode, insuredId: insuredDTO.insuredId, - idNo: insuredDTO.idNo + idNo: insuredDTO.idNo, + healthGrade: insuredDTO.healthGrade, + lifeGrade: insuredDTO.lifeGrade }) let [chooseProductCodes, mainRiskCodes, addRiskCodes] = [[], [], []] if (insuredDTO.riskDTOLst && insuredDTO.riskDTOLst.length > 0) { diff --git a/src/assets/js/utils/changeFifteenToEighteen.js b/src/assets/js/utils/changeFifteenToEighteen.js new file mode 100644 index 000000000..fad655c03 --- /dev/null +++ b/src/assets/js/utils/changeFifteenToEighteen.js @@ -0,0 +1,67 @@ +var v = new Array() +var vs = '10X98765432' + +function checkCardID(cardID) { + v.push(2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4, 8, 5, 10, 9, 7) + var month = cardID.substring(8, 10) //获得15位号码中的月份 + if (!checkMonth(month)) { + return false + } + var year = '19' + cardID.substring(6, 8) + var day = cardID.substring(10, 12) + if (!checkDay(year, month, day)) { + return false + } //alert(checkDay(year,month,day)); //将15位的号码转换位17位 + var cardIDcardID17 = cardID.substring(0, 6) + '19' + cardID.substring(6) + var N = 0 + var R = -1 + var T = '0' //储存最后一个数字 + var j = 0 + var cardID18 = '' //计数出第18位数字 + for (var i = 16; i >= 0; i--) { + N += parseInt(cardIDcardID17.substring(i, i + 1)) * v[j] + j++ + } + R = N % 11 + T = vs.charAt(R) + cardID18 = cardIDcardID17 + T + return cardID18 +} +//判断输入的月份是否正确 +function checkMonth(month) { + if (month < 1 || month > 12) { + return false + } + return true +} +/** + **检查你输入的天数是否正确 + **yean为年 + **month为月 + **day为日 + **/ +function checkDay(year, month, day) { + var Mday = 0 + if (day < 1 || day > 31) { + return false + } + if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { + Mday = 31 + } + if (month == 4 || month == 6 || month == 9 || month == 11) { + Mday = 30 + } + if (month == 2) { + Mday = isLeapYear(year) + } + if (day > Mday) { + return false + } + return true +} +//判断你输入的年是否位闰年 +function isLeapYear(year) { + return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 29 : 28 +} + +export default checkCardID diff --git a/src/assets/js/utils/data-dictionary.js b/src/assets/js/utils/data-dictionary.js index cadae0177..c08ceb10d 100644 --- a/src/assets/js/utils/data-dictionary.js +++ b/src/assets/js/utils/data-dictionary.js @@ -84,7 +84,7 @@ export default { { id: 9, text: '小学以下' } ], //居民身份 仅支持中国 - taxIdentity: [{ id: 1, text: '仅为中国' }, { id: 2, text: '仅为外国', disabled: true }, { id: 3, text: '都是', disabled: true }], + taxIdentity: [{ id: 1, text: '仅为中国' }], //交费期限 payEndYear: [ { @@ -293,7 +293,7 @@ export default { }, { id: '08', - text: '订单成交' + text: '保单承保' }, { id: '09', @@ -393,11 +393,11 @@ export default { }, { id: '33', - text: '待人核导核心' + text: '核心人工核保中' }, { id: '34', - text: '人核导核心成功' + text: '核心人工核保中' }, { id: '35', @@ -425,11 +425,11 @@ export default { }, { id: '41', - text: '待转批扣' + text: '转线下批扣中' }, { id: '42', - text: '转批扣成功' + text: '转线下批扣中' }, { id: '43', @@ -439,5 +439,22 @@ export default { id: '44', text: '计划书转投保' } + ], + riskType: [ + { + shortName: '鼎诚终身重疾', + name: '鼎诚鼎康保终身重大疾病保险', + code: 'DCRS_M0001' + }, + { + shortName: '鼎诚定期重疾(A)', + name: '鼎诚鼎康保定期重大疾病保险(A款)', + code: 'DCRS_M0002' + }, + { + shortName: '鼎诚定期重疾(B)', + name: '鼎诚鼎康保定期重大疾病保险(B款)', + code: 'DCRS_M0003' + } ] } diff --git a/src/assets/js/utils/formatRiskList.js b/src/assets/js/utils/formatRiskList.js index 9b2260b94..0319ff907 100644 --- a/src/assets/js/utils/formatRiskList.js +++ b/src/assets/js/utils/formatRiskList.js @@ -34,6 +34,7 @@ export function formatAllRisk(list) { let riskList = [] list.forEach(risk => { if (risk.isMainRisk == '0') { + risk.mainPremDetail = risk.prem riskList.push(risk) } }) diff --git a/src/assets/js/utils/getBeforeDate.js b/src/assets/js/utils/getBeforeDate.js new file mode 100644 index 000000000..58fd58b1c --- /dev/null +++ b/src/assets/js/utils/getBeforeDate.js @@ -0,0 +1,17 @@ +let currentYear = new Date().getFullYear() +let currentMonth = new Date().getMonth() +let currentDay = new Date().getDate() + +export default { + getBeforeYear: function(numberYear) { + //获取“多少年”之前的时间 例如 30年前 即 numberYear=30 + let beforeDate = '' + beforeDate = new Date(currentYear - numberYear, currentMonth, currentDay) + return beforeDate + }, + getBeforeDays: function(days) { + //获取“多少天数”之前的时间 例如28天前 即days=28 + let currentTime = new Date().getTime() + return new Date(currentTime - 1000 * 60 * 60 * 24 * days) + } +} diff --git a/src/assets/js/utils/idNoCheck.js b/src/assets/js/utils/idNoCheck.js index 69f9cc8ba..6902d9550 100644 --- a/src/assets/js/utils/idNoCheck.js +++ b/src/assets/js/utils/idNoCheck.js @@ -1,3 +1,5 @@ +import changeFifteenToEighteen from './changeFifteenToEighteen' + const idNoCheck = { //是否以9开头 startWithNine: function(card) { @@ -77,7 +79,9 @@ const idNoCheck = { //校验位的检测 checkParity: function(card) { //15位转18位 - //card = changeFivteenToEighteen(card); + if (card.length == '15') { + card = changeFifteenToEighteen(card) + } var len = card.length if (len == '18') { var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2) diff --git a/src/assets/js/utils/request.js b/src/assets/js/utils/request.js index 38d18340c..5cc56ccbe 100644 --- a/src/assets/js/utils/request.js +++ b/src/assets/js/utils/request.js @@ -1,6 +1,17 @@ import axios from 'axios' import { Dialog, Toast } from 'vant' -let whiteList = ['/sale/order/orderList', '/proposal/proposal/list'] +let proposal = [ + '/proposal/proposal/list', + '/proposal/proposal/toInsurance', + '/proposal/proposal/info', + '/proposal/proposal/demo', + '/proposal/proposal/saveOrUpdateProposal', + '/proposal/proposal/updateInsured', + '/proposal/file/getFile', + '/proposal/proposal/deleteProposal' +] //建议书 +let sale = ['/sale/order/orderList', '/sale/order/saveOrUpdateOrderInfo'] //在线投保 +let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale] // 创建axios实例 const service = axios.create({ @@ -20,9 +31,7 @@ service.interceptors.request.use( }) } - // config.headers['token'] = 'e101d96a278b44b6ab4db362f393f6d7' - config.headers['token'] = localStorage.token - // 6734ded83fbf4481aab6eef2a88440a6 + config.headers['token'] = window.localStorage.getItem('token') return config }, error => { diff --git a/src/assets/js/utils/validator.js b/src/assets/js/utils/validator.js index e36c9f908..bab6112e4 100644 --- a/src/assets/js/utils/validator.js +++ b/src/assets/js/utils/validator.js @@ -55,6 +55,13 @@ Validator.extend('age', { return value > 17 && /^\d{1,3}$/.test(value) } }) +//被保人年龄(不得小于16周岁) +Validator.extend('appntAge', { + getMessage: () => '年龄不得小于16周岁', + validate: value => { + return value > 15 && /^\d{1,3}$/.test(value) + } +}) //身份证号校验规则 Validator.extend('idNo', { @@ -68,14 +75,6 @@ Validator.extend('idNo', { return false } }) -Validator.extend('idNoTemp', { - getMessage() { - return '证件号输入错误' - }, - validate: value => { - return /^[0-9a-zA-Z]*$/g.test(value) - } -}) // 银行卡校验规则则 Validator.extend('bankCard', { @@ -121,7 +120,7 @@ Validator.extend('onlyInteger', { Validator.extend('stature', { getMessage: () => '身高输入有误', validate: value => { - return /^[0-9]{3}$/.test(value) + return /^[0-9]{0,3}([.]{1}[0-9]{1})?$/.test(value) && value < 300 && value > 10 // if (value > 250) { // return false // } @@ -132,6 +131,6 @@ Validator.extend('stature', { Validator.extend('avoirdupois', { getMessage: () => '体重输入有误', validate: value => { - return /^(\d){1,3}(\.\d{2}){1}$/.test(value) && value < 250 + return /^[0-9]{0,3}([.]{1}[0-9]{1})?$/.test(value) && value > 0.1 } }) diff --git a/src/assets/sass/utils.scss b/src/assets/sass/utils.scss index b8a5c431e..6861eab3a 100644 --- a/src/assets/sass/utils.scss +++ b/src/assets/sass/utils.scss @@ -91,6 +91,10 @@ flex: 1; } +.flex-wrap { + flex-wrap: wrap; +} + .inline-flex { display: -webkit-inline-flex; display: inline-flex; @@ -128,6 +132,10 @@ align-items: center; } +.align-items-e { + align-items: flex-end; +} + .align-items-b { align-items: baseline; } @@ -203,6 +211,10 @@ text-align: center !important; } +.text-left { + text-align: left !important +} + .text-underline { text-decoration: underline; } @@ -251,7 +263,7 @@ } .bg-green-dark { - background: #E9332E !important; + background: #4fc6b3 !important; } .bg-blue-dark { @@ -268,7 +280,7 @@ .border-bt:not(:last-child)::after { position: absolute; - z-index: 99; + // z-index: 99; box-sizing: border-box; content: ' '; pointer-events: none; @@ -289,6 +301,7 @@ left: 0; bottom: 0; width: 100%; + z-index: 999; } .radius50 { diff --git a/src/components/ebiz/FieldDatePicter.vue b/src/components/ebiz/FieldDatePicter.vue index ca2c12ad0..16d4d6b90 100644 --- a/src/components/ebiz/FieldDatePicter.vue +++ b/src/components/ebiz/FieldDatePicter.vue @@ -19,6 +19,7 @@ - + diff --git a/src/components/ebiz/SelectRadio.vue b/src/components/ebiz/SelectRadio.vue index 64840730b..9be593065 100644 --- a/src/components/ebiz/SelectRadio.vue +++ b/src/components/ebiz/SelectRadio.vue @@ -5,10 +5,10 @@
{{ label }}
- - + +
- {{ itemRadio.label }} + {{ itemRadio.label }}
@@ -35,6 +35,10 @@ export default { required: { type: Boolean, default: true + }, + disabled: { + type: Boolean, + default: false } }, data() { @@ -43,6 +47,9 @@ export default { mounted() {}, methods: { handleChoose(value) { + if(this.disabled) { + return + } this.$emit('update:value', value) } }, diff --git a/src/components/ebiz/customer/CustomerPicker.vue b/src/components/ebiz/customer/CustomerPicker.vue index d42c38f4d..cd32abc29 100644 --- a/src/components/ebiz/customer/CustomerPicker.vue +++ b/src/components/ebiz/customer/CustomerPicker.vue @@ -8,6 +8,7 @@ :required="required" :right-icon="$assetsUrl + 'images/avatar.png'" @click-right-icon="chooseCustomer" + :readonly="readonly" /> @@ -62,6 +63,10 @@ export default { parentShowPicker: { type: Boolean, default: false + }, + readonly: { + type: Boolean, + default: false } }, data() { diff --git a/src/components/ebiz/customer/formBlock.vue b/src/components/ebiz/customer/formBlock.vue index ed5706716..946b6ea8f 100644 --- a/src/components/ebiz/customer/formBlock.vue +++ b/src/components/ebiz/customer/formBlock.vue @@ -2,7 +2,12 @@
- + - + - +
- 长期 + 长期
- - - + + + - + - + - - - - + + + +
@@ -167,10 +248,33 @@ placeholder="请输入" clearable /> - + - - + + @@ -179,15 +283,31 @@ - + - + - +
@@ -201,6 +321,7 @@ import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker' import areaList from '@/assets/js/utils/area' import utilsAge from '@/assets/js/utils/age' import getAreaName from '@/assets/js/utils/get-area-name' +import idNoCheck from '@/assets/js/utils/idNoCheck' import filter from '@/filters/index' import { constants } from 'crypto' import { userInfo } from 'os' @@ -305,6 +426,84 @@ export default { validateForm() { return this.$validator.validateAll() }, + //证件类型校验 + validateIdType() { + //证件是身份证 + if (this.userInfo.idType == '1') { + console.log('证件类型是身份证') + if (this.userInfo.customerIdNumber.length == '15') { + //15位身份证第15位是性别位, 奇男偶女 + let sexSign = this.userInfo.customerIdNumber.substr(14, 1) + if ((parseInt(sexSign) % 2 == 0 && this.userInfo.customerSex != 1) || (parseInt(sexSign) % 2 != 0 && this.userInfo.customerSex != 0)) { + return this.$toast('性别录入与身份证不符') + } + + //15位身份证第7-12位是生日位, 年月日 + let birthSign = this.userInfo.customerIdNumber.substr(6, 6) + if (this.userInfo.birthday) { + if ( + this.userInfo.birthday.substr(2, 2) != birthSign.substr(0, 2) || + this.userInfo.birthday.substr(5, 2) != birthSign.substr(2, 2) || + this.userInfo.birthday.substr(8, 2) != birthSign.substr(4, 2) + ) { + return this.$toast('生日录入与身份证不符') + } + } + } else if (this.userInfo.customerIdNumber.length == '18') { + //18位身份证第17位是性别位, 奇男偶女 + let sexSign = this.userInfo.customerIdNumber.substr(16, 1) + if ((parseInt(sexSign) % 2 == 0 && this.userInfo.customerSex != 1) || (parseInt(sexSign) % 2 != 0 && this.userInfo.customerSex != 0)) { + return this.$toast('性别录入与身份证不符') + } + + //18位身份证第7-14位是生日位, 年月日 + let birthSign = this.userInfo.customerIdNumber.substr(6, 8) + if (this.userInfo.birthday) { + if ( + this.userInfo.birthday.substr(0, 4) != birthSign.substr(0, 4) || + this.userInfo.birthday.substr(5, 2) != birthSign.substr(4, 2) || + this.userInfo.birthday.substr(8, 2) != birthSign.substr(6, 2) + ) { + return this.$toast('生日录入与身份证不符') + } + } + } + // 证件号码规则校验 + if (!idNoCheck.isIdno(this.userInfo.customerIdNumber)) { + return this.$toast('您填写的证件号码有误,只能为18位以内数字或字母组合') + } else { + this.$parent.updateCustomerInfo() + } + //证件是户口本 + } else if (this.userInfo.idType == '2' && this.userInfo.customerIdNumber.length != 18) { + console.log('证件类型是户口本') + return this.$toast('户口本的证件号码长度应等于18位') + //证件是出生证明 + } else if (this.userInfo.idType == '3' && this.userInfo.customerIdNumber.length < 3) { + console.log('证件类型是出生证') + return this.$toast('出生证须大于等于3个字符') + //证件是护照 + } else if (this.userInfo.idType == '4' && this.userInfo.customerIdNumber.length < 3) { + console.log('证件类型是护照') + return this.$toast('护照须大于等于3个字符') + //证件是港澳居民通行证 + } else if (this.userInfo.idType == '5') { + console.log('证件类型是港澳居民通行证') + if (this.userInfo.customerIdNumber.length != 9) { + return this.$toast('证件类型为港澳居民通行证的,证件号码须为9位') + } else if (!/^(H|M)[0-9]{8}$/.test(this.userInfo.customerIdNumber)) { + return this.$toast('证件类型为港澳居民通行证的,证件号码首位字母为"H"/"M",证件号码第2位至第9位为阿拉伯数字') + } else { + this.$parent.updateCustomerInfo() + } + //证件是台湾居民通行证 + } else if (this.userInfo.idType == '6' && this.userInfo.customerIdNumber.length != 8) { + console.log('证件类型是台湾居民通行证') + return this.$toast('证件类型为台湾居民通行证的,证件号码须为8位数字') + } else { + this.$parent.updateCustomerInfo() + } + }, censusInfo() { let area = [{ code: this.userInfo.province }, { code: this.userInfo.city }] this.census = getAreaName(area) @@ -361,6 +560,7 @@ export default { ;[this.userInfo.nativeplace, this.nativeplace] = [value.id, value.text] this.valueKey = value.text } else if (this.pickerType == '2') { + ;[this.userInfo.idType, this.idType] = [value.id, value.text] //身份证以外的证件类型可以使用长期 if (value.id != '1') { this.effectiveDateTypeAble = false @@ -368,7 +568,6 @@ export default { let age = utilsAge.getAge(this.userInfo.birthday, new Date()) this.effectiveDateTypeAble = !(age >= 45) } - ;[this.userInfo.idType, this.idType] = [value.id, value.text] } else if (this.pickerType == '3') { ;[this.userInfo.degree, this.degree] = [value.id, value.text] // } else if (this.pickerType == '4') { @@ -445,11 +644,9 @@ export default { return this.$toast('证件起始日期填写错误') } // 计算年龄 - let certificateAge = utilsAge.getAge(val, new Date()) - let birthAge = utilsAge.getAge(this.userInfo.birthday, new Date()) - let age = birthAge - certificateAge + let age = utilsAge.getAge(this.userInfo.birthday, new Date()) // 长期按钮是否禁用 - this.effectiveDateTypeAble = age >= 16 && age <= 45 + this.effectiveDateTypeAble = age <= 45 // if(age < 45){ // this.userInfo.effectiveDateType = false // } diff --git a/src/components/ebiz/sale/BankCardScan.vue b/src/components/ebiz/sale/BankCardScan.vue index 9009da09f..638ce1eed 100644 --- a/src/components/ebiz/sale/BankCardScan.vue +++ b/src/components/ebiz/sale/BankCardScan.vue @@ -3,7 +3,7 @@
银行卡号: - {{ bankCard }} + {{ bankCard }}
请拍摄或上传银行卡正面 @@ -29,6 +29,11 @@ export default { scanShow: { type: Boolean, default: false + }, + // 是否清空 + clear: { + type: Boolean, + default: false } }, data() { @@ -42,7 +47,7 @@ export default { // 是否可以点击完成 isDisabled: true, // 是投保人还是被保人扫描 0是投保人 1是被保人 - cardScanningType: '', + // cardScanningType: '', // 是否成功扫描 state: '' } @@ -50,62 +55,72 @@ export default { methods: { click() { let that = this - // eslint-disable-next-line no-undef - EWebBridge.webCallAppInJs('bank_auth', { - // 1是扫描。0是相册。 - scan: '1' - }).then(data => { - if (that.cardScanningType == '0') { + if (window.localStorage.getItem('cardScanningType') == '0') { + // console.log('11111') + EWebBridge.webCallAppInJs('bank_auth', { + // 1是扫描。0是相册。 + scan: '1' + }).then(data => { if (JSON.parse(data).state == '1') { that.state = JSON.parse(data).state that.bankCard = JSON.parse(data).number that.src = JSON.parse(data).base64 - window.localStorage.setItem('bankCardUrl', JSON.parse(data).base64) - window.localStorage.setItem('bankCardUrlPath', JSON.parse(data).path) + + window.localStorage.setItem('bankCardUrlPath', encodeURI(JSON.parse(data).path).replace(/\+/g, '%2B')) window.localStorage.setItem('bankCard', JSON.parse(data).number) that.isDisabled = false } else { - this.$toast('识别失败') + console.log('') } - } else { + }) + } else if (window.localStorage.getItem('cardScanningType') == '1') { + // console.log('22222') + EWebBridge.webCallAppInJs('bank_auth', { + // 1是扫描。0是相册。 + scan: '1' + }).then(data => { if (JSON.parse(data).state == '1') { that.state = JSON.parse(data).state that.bankCard = JSON.parse(data).number that.src = JSON.parse(data).base64 - window.localStorage.setItem('bankCardUrlInsured', JSON.parse(data).base64) - window.localStorage.setItem('bankCardUrlInsuredPath', JSON.parse(data).path) + window.localStorage.setItem('bankCardUrlInsuredPath', encodeURI(JSON.parse(data).path).replace(/\+/g, '%2B')) window.localStorage.setItem('bankCardInsured', JSON.parse(data).number) that.isDisabled = false } else { - this.$toast('识别失败') + console.log('') } - } - }) + }) + } }, - // // 完成 complete() { this.$emit('getScanInfo', { name: this.bankCard }) - - // that.$jump({ - // flag: 'h5', - // extra: { - // url: location.origin + '/#/sale/accountInformation' - // } - // }) + this.state = '' + ;(this.src = this.$assetsUrl + 'images/bankCard.png'), (this.bankCard = '待识别') } }, + created() {}, mounted() { - let that = this + // let that = this document.body.style.backgroundColor = '#F5F5F5' document.body.style.height = '100%' - that.cardScanningType = window.localStorage.getItem('cardScanningType') + // this.closeBtn() }, beforeRouteLeave(to, from, next) { document.body.style.backgroundColor = '' next() + }, + watch: { + clear(newVal, oldVal) { + // console.log('监听成功') + if (newVal == true) { + // console.log('清空') + this.state = '' + ;(this.src = this.$assetsUrl + 'images/bankCard.png'), (this.bankCard = '待识别') + } + } } } @@ -121,9 +136,6 @@ export default { align-items: center; .card-scan-info { width: 100%; - .card-scan-text { - color: #dadada; - } } .card-scan-area { position: relative; diff --git a/src/components/ebiz/sale/IdentityCardScan.vue b/src/components/ebiz/sale/IdentityCardScan.vue index 347885a5c..0454539f9 100644 --- a/src/components/ebiz/sale/IdentityCardScan.vue +++ b/src/components/ebiz/sale/IdentityCardScan.vue @@ -47,6 +47,7 @@ diff --git a/src/views/ebiz/common/MainRiskList.vue b/src/views/ebiz/common/MainRiskList.vue index 807c006bf..0b56793c7 100644 --- a/src/views/ebiz/common/MainRiskList.vue +++ b/src/views/ebiz/common/MainRiskList.vue @@ -37,7 +37,6 @@ export default { }, mounted() { this.getMainRiskList() - document.body.style.backgroundColor = '#F5F5F5' }, methods: { //获取主险列表 diff --git a/src/views/ebiz/common/SelectedProduct.vue b/src/views/ebiz/common/SelectedProduct.vue index 24c5b760e..3c365c783 100644 --- a/src/views/ebiz/common/SelectedProduct.vue +++ b/src/views/ebiz/common/SelectedProduct.vue @@ -11,7 +11,7 @@
- 附加 + 附加
{{ addtion.riskName }} @@ -21,7 +21,7 @@
首期保费(元)
-
{{ item.prem.toFixed(2) }}
+
{{ item.prem.toFixed(2) | moneyFormat }}
@@ -36,7 +36,12 @@
- + +
+ 合计:¥{{ (total / 100).toFixed(2) | moneyFormat }}元 +
+
@@ -78,6 +83,10 @@ export default { // }) // localStorage.saleInsuredInfo = JSON.stringify({ birthday: '2012-08-31', name: '张三三', sex: '0', idType: '1', age: 7 }) }, + beforeRouteLeave(to, from, next) { + document.body.style.backgroundColor = '' + next() + }, methods: { //获取已选产品列表 async getProductList() { @@ -90,9 +99,14 @@ export default { if (saleInsuredPersonInfo && saleInsuredPersonInfo.insuredId) { insuredId = saleInsuredPersonInfo.insuredId } - resultData = await getDetail({ orderNo: localStorage.orderNo, orderType: 'proposalInsuredInfo', orderDTO: { insuredDTOs: [{ insuredId: insuredId }] } }) + resultData = await getDetail({ + orderNo: localStorage.orderNo, + isMerge: '1', + orderType: 'proposalInsuredInfo', + orderDTO: { insuredDTOs: [{ insuredId: insuredId }] } + }) } else { - resultData = await orderDetail({ orderNo: localStorage.orderNo }) + resultData = await orderDetail({ orderNo: localStorage.orderNo, isMerge: '1' }) } if (resultData.result == 0) { let riskDTOLst @@ -114,19 +128,6 @@ export default { this.chooseProducts = formatAllRisk(riskDTOLst) - // //存储险种 用于告知单请求 - // let [chooseProductCodes, mainRiskCodes] = [[], []] - - // riskDTOLst.forEach(item => { - // chooseProductCodes.push(item.riskCode) - // if (item.isMainRisk == 0) { - // mainRiskCodes.push(item.riskCode) - // } - // }) - - // localStorage.chooseProductCodes = JSON.stringify(chooseProductCodes) - // localStorage.mainRiskCodes = JSON.stringify(mainRiskCodes) - if (riskDTOLst.length > 0) { this.nextStepFlag = false } @@ -137,7 +138,11 @@ export default { //删除已选产品列表 deteleInsure(index) { Dialog.confirm({ - title: '确认删除当前产品?' + className: 'dialog-delete', + title: '提示', + message: '您确认要删除该产品信息吗?', + cancelButtonColor: '#4FC6B3', + confirmButtonColor: '#FFFFFF' }) .then(() => { this.delProduct(index) @@ -188,6 +193,25 @@ export default { }, //下一步 nextStep() { + //930折中方案,豁免险选择 + let oldAddRiskCodes = JSON.parse(localStorage.oldAddRiskCodes) + if (oldAddRiskCodes.includes('DCRS_A0001')) { + let chooseProducts = this.chooseProducts + for (let i = 0; i < chooseProducts.length; i++) { + if (chooseProducts[i].addtion.length > 0) { + let remitRisk = chooseProducts[i].addtion.find(riskInfo => { + return riskInfo.riskCode == 'DCRS_A0001' + }) + if (!remitRisk) { + this.$toast('请针对所有主险搭配豁免险!') + return + } + } else { + this.$toast('请针对所有主险搭配豁免险!') + return + } + } + } let routerUrl if (localStorage.isFrom == 'proposal') { routerUrl = '/proposal/chooseInsuredPerson' diff --git a/src/views/ebiz/customer/addCustomer.vue b/src/views/ebiz/customer/addCustomer.vue index cbfe2215c..b5d71b2ab 100644 --- a/src/views/ebiz/customer/addCustomer.vue +++ b/src/views/ebiz/customer/addCustomer.vue @@ -76,8 +76,7 @@ export default { homeArea: '', //家庭区 homeAddress: '', //家庭详细地址 homeZip: '', //家庭邮编 - homePhone: '', //家庭电话 - isDisable: true //默认不是长期 + homePhone: '' //家庭电话 } } }, @@ -117,6 +116,8 @@ export default { if (result.indexOf(false) > -1) { this.$toast(this.$refs.formBlock.$validator.errors.all()[0]) return + } else if (this.userInfo.customerIdNumber) { + this.$refs.formBlock.validateIdType() } else { this.updateCustomerInfo() } @@ -129,7 +130,6 @@ export default { updateCustomerInfo() { let $this = this let data = { - // userModel: { id: '22222' }, //测试数据 agentCustomerInfoDTO: { customerNumber: '', customerName: $this.userInfo.customerName, @@ -194,17 +194,6 @@ export default { } }) .catch(err => {}) - }, - go(path) { - this.$jump({ - flag: 'h5', - extra: { - url: location.origin + '/#/customer/' + path - }, - routerInfo: { - path: '/customer/' + path - } - }) } } } diff --git a/src/views/ebiz/customer/customerInfo.vue b/src/views/ebiz/customer/customerInfo.vue index 8b8098c41..d712cb701 100644 --- a/src/views/ebiz/customer/customerInfo.vue +++ b/src/views/ebiz/customer/customerInfo.vue @@ -12,7 +12,7 @@
    -
  • +
  • 基本信息
  • @@ -35,7 +35,7 @@ export default { }, data() { return { - customerNumber: this.$route.query.id, + customerNumber: localStorage.getItem("customerNumber"), list: {} } }, @@ -84,7 +84,7 @@ export default { go(path, id) { let url = '' if (id) { - url = path + '?id=' + encodeURIComponent(id) + '&from=1' + url = path + '?from=2' } else { url = path } @@ -130,7 +130,11 @@ export default { } } Dialog.confirm({ - title: '确认删除当前客户?' + className: 'dialog-delete', + title: '提示', + message: '确认删除当前客户?', + cancelButtonColor: '#4FC6B3', + confirmButtonColor: '#FFFFFF' }) .then(() => { deleteCustomerInfo(data).then(res => { @@ -211,9 +215,9 @@ export default { display: flex; justify-content: space-between; align-items: center; - &:last-child { - border-bottom: none; - } + // &:last-child { + // border-bottom: none; + // } } } .van-icon[data-v-9ecf59d4], diff --git a/src/views/ebiz/customer/customerList.vue b/src/views/ebiz/customer/customerList.vue index 6d6f64678..b63ddca65 100644 --- a/src/views/ebiz/customer/customerList.vue +++ b/src/views/ebiz/customer/customerList.vue @@ -6,29 +6,47 @@
    -
    +
    {{ item.customerName }}
    {{ item.customerPhone }}
    - {{ item.customerType | toCustomer }} + {{ item.customerType | toCustomer }}
    -
    +
    {{ item.customerName }}
    {{ item.customerPhone }}
    - {{ item.customerType | toCustomer }} + {{ item.customerType | toCustomer }}
    -
    +
    暂无客户
    @@ -36,13 +54,23 @@

    客户筛选

      -
    • {{ item.name }}
    • +
    • {{ item.name }}

    客户来源

      -
    • {{ item.name }}
    • +
    • {{ item.name }}
    @@ -82,6 +110,7 @@ export default { show2: false, active1: 0, active2: 0, + isFlag: false, // type: ['success', 'primary', 'danger', ''], type: ['success', 'primary', ''], indexList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '#'], @@ -123,9 +152,9 @@ export default { } }, mounted() { + this.getCustomerList() //客户列表查询 setTimeout(() => { this.filterBtn() // 初始化显示按钮 - this.getCustomerList() //客户列表查询 window.appCallBack = this.appCallBack //app回调 }, 1000) }, @@ -152,6 +181,7 @@ export default { ] }) }, + appCallBack(data) { if (data.trigger == 'right_button_click') { if (data.index == 0) { @@ -174,13 +204,20 @@ export default { searchList() { let $this = this $this.newList = [] - $this.customerList.map(function(item) { - item.list.map(function(item) { - if (item.customerName.search($this.searchVal) != -1 || item.customerPhone.search($this.searchVal) != -1) { - $this.newList.push(item) - } + if ($this.searchVal) { + $this.customerList.map(function(item) { + item.list.map(function(item) { + if (item.customerName.search($this.searchVal) != -1 || item.customerPhone.search($this.searchVal) != -1) { + $this.newList.push(item) + if ($this.length <= 0) { + $this.isFlag = true + } + } + }) }) - }) + } else { + $this.getCustomerList() + } }, selectTab(name, index) { if (name == 'tab1') { @@ -206,6 +243,40 @@ export default { this.active1 = '' this.active2 = '' }, + //获取客户列表 + getCustomerList(customerType, customerSource) { + let $this = this + $this.customerList = [] + let data = { + customerType: customerType, + customerSource: customerSource + } + getCustomersList(data) + .then(res => { + if (res.result == 0) { + $this.formatData(res) + $this.isSuccess = true + if ($this.customerList[0].key == '#') { + let tempObj = $this.customerList[0] + $this.customerList.splice(0, 1) + $this.customerList.push(tempObj) + } + //根据新数据获取筛选列表 + $this.newList = [] + $this.customerList.map(function(item) { + item.list.map(function(item) { + if (item.customerName.search($this.searchVal) != -1 || item.customerPhone.search($this.searchVal) != -1) { + $this.newList.push(item) + if ($this.length <= 0) { + $this.isFlag = true + } + } + }) + }) + } + }) + .catch(err => {}) + }, formatData(data) { //数据重新组装 let i @@ -215,27 +286,6 @@ export default { list: data.agentCustomerList[i] }) } - if (this.customerList[0].key == '#') { - let tempObj = this.customerList[0] - this.customerList.splice(0, 1) - this.customerList.push(tempObj) - } - }, - //获取客户列表 - getCustomerList(customerType, customerSource) { - this.customerList = [] - let data = { - customerType: customerType, - customerSource: customerSource - } - getCustomersList(data) - .then(res => { - if (res.result == 0) { - this.formatData(res) - this.isSuccess = true - } - }) - .catch(err => {}) }, close() { this.show2 = false @@ -246,19 +296,17 @@ export default { EWebBridge.webCallAppInJs('contactList', {}) }, go(path, id) { - let url = '' if (id) { - url = path + '?id=' + encodeURIComponent(id) - } else { - url = path + // url = path + '?id=' + encodeURIComponent(id) + localStorage.setItem('customerNumber', id) } this.$jump({ flag: 'h5', extra: { - url: location.origin + '/#/customer/' + url + url: location.origin + '/#/customer/' + path }, routerInfo: { - path: url + path: path } }) this.close() @@ -310,6 +358,10 @@ export default { flex-grow: 1; } } + .list.lists { + margin: 0; + padding-left: 15px; + } .tab { border-bottom: 1px solid #f5f5f5; padding: 10px 20px 10px 20px; @@ -333,7 +385,7 @@ export default { background: #f5f5f5; color: #333; &.active { - background: #E9332E; + background: #4fc6b3; color: #fff; border: none; } @@ -356,8 +408,8 @@ export default { border: none !important; } button:first-child { - color: #E9332E; - background: #FEEFD8 !important; + color: #4fc6b3; + background: #bbe2ef !important; } } .no-data { @@ -375,4 +427,13 @@ export default { } } } +.van-tag--plain { + margin-right: 10px; +} +.van-tag--primary.van-tag--plain { + color: #5ca7de; +} +.van-tag--success.van-tag--plain { + color: #7ed321; +} diff --git a/src/views/ebiz/customer/editCustomer.vue b/src/views/ebiz/customer/editCustomer.vue index e8f59f8b0..8929ddfb5 100644 --- a/src/views/ebiz/customer/editCustomer.vue +++ b/src/views/ebiz/customer/editCustomer.vue @@ -2,7 +2,15 @@

    基本信息

    - + import { Field, CellGroup, Cell } from 'vant' import { getAgentCustomerInfo, updateCustomerInfo } from '@/api/ebiz/customer/customer' -import occupationList from '@/components/ebiz/occipation/data/occupation.js' import formBlock from '@/components/ebiz/customer/formBlock' import { constants } from 'crypto' -import utilsAge from '@/assets/js/utils/age' export default { name: 'editCustomer', @@ -46,7 +52,7 @@ export default { source: this.$route.query.from, appName: this.$route.query.name, appPhone: this.$route.query.tel, - customerNumber: this.$route.query.id, + customerNumber: localStorage.getItem('customerNumber'), userInfo: { customerName: '', //姓名 customerPhone: '', // 手机号 @@ -89,18 +95,20 @@ export default { homeArea: '', //家庭区 homeAddress: '', //家庭详细地址 homeZip: '', //家庭邮编 - homePhone: '' //单位电话 + homePhone: '' //家庭电话 } } }, mounted() { //this.filterBtn() //按钮初始化 - this.getCustomerInfo() //获取客户信息 //window.appCallBack = this.appCallBack //app回调 //数据回显 - if (this.source) { + if (this.source == 'app') { this.userInfo.customerName = this.appName this.userInfo.customerPhone = this.appPhone + this.customerNumber = '' + } else { + this.getCustomerInfo() //获取客户信息 } }, methods: { @@ -192,6 +200,8 @@ export default { if (result.indexOf(false) > -1) { this.$toast(this.$refs.formBlock.$validator.errors.all()[0]) return + } else if (this.userInfo.customerIdNumber) { + this.$refs.formBlock.validateIdType() } else { this.updateCustomerInfo() } @@ -262,7 +272,7 @@ export default { flag: 'goBack', extra: { refresh: '1', - index: this.$route.query.from == 1 ? '-2' : '-1' + index: this.$route.query.from == 2 ? '-2' : '-1' }, routerInfo: { path: '/customer/customerList' diff --git a/src/views/ebiz/my/UserIncome.vue b/src/views/ebiz/my/UserIncome.vue index 943ef5c0a..9e679c4c5 100644 --- a/src/views/ebiz/my/UserIncome.vue +++ b/src/views/ebiz/my/UserIncome.vue @@ -1,6 +1,6 @@