diff --git a/public/index.html b/public/index.html index 385b4a26b..23b59b22b 100644 --- a/public/index.html +++ b/public/index.html @@ -17,5 +17,6 @@ + diff --git a/src/api/ebiz/cardList/cardList.js b/src/api/ebiz/cardList/cardList.js new file mode 100644 index 000000000..4fdf38588 --- /dev/null +++ b/src/api/ebiz/cardList/cardList.js @@ -0,0 +1,76 @@ +// 卡单接口 + +import request from '@/assets/js/utils/request' +import getUrl from '@/assets/js/utils/get-url' + +// 获取卡单列表 +export function getCardList(data) { + return request({ + url: getUrl('/sale/product/getProList', 1), + method: 'post', + data + }) +} + +// 获取我的卡单列表 +export function getMyCardList(data) { + return request({ + url: getUrl('/sale/card/getMyCardList', 1), + method: 'post', + data + }) +} + +// 获取产品详情 +export function getProductDetails(data) { + return request({ + url: getUrl('/sale/product/getItemDetail', 1), + method: 'post', + data + }) +} + +// 获取产品试算详情 +export function getProductInfo(data) { + return request({ + url: getUrl('/sale/product/getDetail', 1), + method: 'post', + data + }) +} + +// 进行试算 +export function insureTrial(data) { + return request({ + url: getUrl('/sale/insure/trial', 1), + method: 'post', + data + }) +} + +// 保存卡单信息 +export function saveOrUpdateCard(data) { + return request({ + url: getUrl('/sale/card/saveOrUpdateCard', 1), + method: 'post', + data + }) +} + +// 保存卡单支付信息 +export function saveOrUpdateAccount(data) { + return request({ + url: getUrl('/sale/card/saveOrUpdateAccount', 1), + method: 'post', + data + }) +} + +//获取我的订单列表 +export function getOrderList(data) { + return request({ + url: getUrl('/sale/order/cardOrderList', 1), + method: 'post', + data + }) +} diff --git a/src/assets/images/u10211.jpg b/src/assets/images/u10211.jpg new file mode 100644 index 000000000..106bd78d2 Binary files /dev/null and b/src/assets/images/u10211.jpg differ diff --git a/src/assets/images/u10213.png b/src/assets/images/u10213.png new file mode 100644 index 000000000..0d9a2f2d9 Binary files /dev/null and b/src/assets/images/u10213.png differ diff --git a/src/assets/images/u10215.png b/src/assets/images/u10215.png new file mode 100644 index 000000000..31df2b416 Binary files /dev/null and b/src/assets/images/u10215.png differ diff --git a/src/assets/images/u10247.png b/src/assets/images/u10247.png new file mode 100644 index 000000000..94fdf1c37 Binary files /dev/null and b/src/assets/images/u10247.png differ diff --git a/src/assets/images/u10280.png b/src/assets/images/u10280.png new file mode 100644 index 000000000..654bed3bb Binary files /dev/null and b/src/assets/images/u10280.png differ diff --git a/src/assets/images/u10608.svg b/src/assets/images/u10608.svg new file mode 100644 index 000000000..3b038fea8 --- /dev/null +++ b/src/assets/images/u10608.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/js/utils/data-dictionary.js b/src/assets/js/utils/data-dictionary.js index e890991f9..95eef0020 100644 --- a/src/assets/js/utils/data-dictionary.js +++ b/src/assets/js/utils/data-dictionary.js @@ -165,7 +165,7 @@ export default { id: 6, text: '台湾居民来往大陆通行证' }, - /* { + /* { id: 7, text: '其他', disabled: true @@ -207,7 +207,7 @@ export default { id: 6, text: '台湾居民来往大陆通行证' }, - /* { + /* { id: 7, text: '其他', disabled: true @@ -828,6 +828,14 @@ export default { { id: '55', text: '支付失败' + }, + { + id: '56', + text: '卡单投被保人信息保存成功' + }, + { + id: '57', + text: '卡单保存账户信息成功' } ], // 产品编码 @@ -1446,21 +1454,9 @@ export default { { id: 'EAM', text: '资深部经理' }, { id: 'AD', text: '营业总监' } ], - relationType: [ - { id: '0', text: '配偶' }, - { id: '1', text: '子女' }, - { id: '2', text: '父母' } - ], - guarantRelationType: [ - { id: '0', text: '亲属' }, - { id: '1', text: '朋友' }, - { id: '2', text: '同事' }, - { id: '3', text: '其他' } - ], - classification: [ - { id: '0', text: '司内' }, - { id: '1', text: '司外' } - ], + relationType: [{ id: '0', text: '配偶' }, { id: '1', text: '子女' }, { id: '2', text: '父母' }], + guarantRelationType: [{ id: '0', text: '亲属' }, { id: '1', text: '朋友' }, { id: '2', text: '同事' }, { id: '3', text: '其他' }], + classification: [{ id: '0', text: '司内' }, { id: '1', text: '司外' }], //入司国籍/地区 rsnativeplace: [ { id: 'AGO', text: '安哥拉' }, @@ -1754,18 +1750,9 @@ export default { { id: '08', text: '其它' } ], // 申请人身份 - applicantStatus: [ - { id: '01', text: '本人' }, - { id: '02', text: '监护人' } - ], + applicantStatus: [{ id: '01', text: '本人' }, { id: '02', text: '监护人' }], // 理赔申请人身份 - lpApplicantStatus: [ - { id: '1', text: '本人' }, - { id: '2', text: '配偶' }, - { id: '3', text: '父母' }, - { id: '4', text: '子女' }, - { id: '5', text: '其他' } - ], + lpApplicantStatus: [{ id: '1', text: '本人' }, { id: '2', text: '配偶' }, { id: '3', text: '父母' }, { id: '4', text: '子女' }, { id: '5', text: '其他' }], // 出险申请类型 applyType: [ { @@ -2014,10 +2001,7 @@ export default { } ], //对象 - targetDictionary: [ - { value: '本人', code: '00' }, - { value: '配偶', code: '01' } - ], + targetDictionary: [{ value: '本人', code: '00' }, { value: '配偶', code: '01' }], nbsRelation: [ { name: '配偶', value: '00' }, { name: '子女', value: '01' }, @@ -2038,11 +2022,7 @@ export default { { code: '08', value: '其他费用' } ], //险种类型字典 - insuranceDictionary: [ - { code: '01', value: '寿险' }, - { code: '02', value: '重疾' }, - { code: '03', value: '年金' } - ], + insuranceDictionary: [{ code: '01', value: '寿险' }, { code: '02', value: '重疾' }, { code: '03', value: '年金' }], // 活动量管理 - 人才库 - 状态 talentPoolStatus: [ { id: 0, text: '暂不考虑' }, diff --git a/src/assets/js/utils/getAfterDate.js b/src/assets/js/utils/getAfterDate.js new file mode 100644 index 000000000..85278511d --- /dev/null +++ b/src/assets/js/utils/getAfterDate.js @@ -0,0 +1,17 @@ +let currentYear = new Date().getFullYear() +let currentMonth = new Date().getMonth() +let currentDay = new Date().getDate() + +export default { + getAfterYear: function(numberYear) { + //获取“多少年”之后的时间 例如 30年后 即 numberYear=30 + let afterDate = '' + afterDate = new Date(currentYear - numberYear, currentMonth, currentDay) + return afterDate + }, + getAfterDays: function(days) { + //获取“多少天数”之后的时间 例如28天后 即days=28 + let currentTime = new Date().getTime() + return new Date(Number(currentTime) + 1000 * 60 * 60 * 24 * days) + } +} diff --git a/src/assets/js/utils/request.js b/src/assets/js/utils/request.js index f277e241b..51f26db92 100644 --- a/src/assets/js/utils/request.js +++ b/src/assets/js/utils/request.js @@ -65,6 +65,8 @@ let survey = [ let manpower = [ '/customer/answer/queryList' //DISC性格分析 ] +// 卡单 +let cardList = [] let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale, ...agentEnter, ...claims, ...survey, ...manpower] // 创建axios实例 diff --git a/src/config/cardList.js b/src/config/cardList.js new file mode 100644 index 000000000..573380b8e --- /dev/null +++ b/src/config/cardList.js @@ -0,0 +1,10 @@ +// 卡单 +let mockBaseUrl = 'http://mock-api.com/9KOlmpzk.mock' +export default { + // 获取产品列表接口 + '/sale/card/getCardList': mockBaseUrl + '/sale/card/getCardList', + // 获取我的卡单接口 + getMyCardList: mockBaseUrl + '/sale/card/getMyCardList', + // 获取卡单详情接口 + getProductInfo: mockBaseUrl + '/sale/card/getCardDetail' +} diff --git a/src/config/index.js b/src/config/index.js index 6ea9d33b7..04608af99 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -16,7 +16,7 @@ switch (process.env.VUE_APP_FLAG) { // 静态服务资源 assetsUrl = 'http://139.199.50.151:8000/app/' mainUrl = 'http://139.199.50.151' - payUrl = 'http://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action' + payUrl = 'https://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action' zssqUrl = 'http://139.199.50.151/html/test/index.html#/' break case 'uat': @@ -25,7 +25,7 @@ switch (process.env.VUE_APP_FLAG) { // 静态服务资源 assetsUrl = 'http://115.159.235.59:8000/app/' mainUrl = 'http://115.159.235.59' - payUrl = 'http://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action' + payUrl = 'https://funduat.e-guofu.com/s3-modules-gateway/embed/gateway.action' zssqUrl = '' break case 'prd': diff --git a/src/config/urlMap.js b/src/config/urlMap.js index 7c06a8cee..f656fc0cb 100644 --- a/src/config/urlMap.js +++ b/src/config/urlMap.js @@ -12,6 +12,7 @@ import serve from './serve' import common from './common' import survey from './survey' import manpower from './manpower' +import cardList from './cardList' const mockBaseUrl = 'http://rap2api.taobao.org/app/mock' let baseObj = { @@ -19,6 +20,6 @@ let baseObj = { '/user/info': mockBaseUrl + '/223948/info', '/user/logout': mockBaseUrl + '/223948/logout' } -Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, survey, manpower) +Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, cardList, survey, manpower) export default baseObj diff --git a/src/router/ebiz/cardList.js b/src/router/ebiz/cardList.js new file mode 100644 index 000000000..66a345730 --- /dev/null +++ b/src/router/ebiz/cardList.js @@ -0,0 +1,85 @@ +// 卡单路由 +const information = () => import('@/views/ebiz/cardList/information') +const cardTotreasure = () => import('@/views/ebiz/cardList/CardTotreasure') +const productDetails = () => import('@/views/ebiz/cardList/productDetails') +const pay = () => import('@/views/ebiz/cardList/Pay') +const payResult = () => import('@/views/ebiz/cardList/PayResult') +const paySuccess = () => import('@/views/ebiz/cardList/PaySuccess') +const payLoser = () => import('@/views/ebiz/cardList/PayLoser') +const ShowPDF = () => import('@/views/ebiz/cardList/ShowPDF') + +export default [ + { + path: '/cardList/information', + name: 'information', + component: information, + meta: { + title: '填写投被保人信息', + index: 1 + } + }, + { + path: '/cardList/cardTotreasure', + name: 'cardTotreasure', + component: cardTotreasure, + meta: { + title: '产品列表', + index: 2 + } + }, + { + path: '/cardList/productDetails/:productDetailCode', + name: 'productDetails', + component: productDetails, + meta: { + title: '产品详情', + index: 3 + } + }, + { + path: '/cardList/pay', + name: 'pay', + component: pay, + meta: { + title: '支付', + index: 4 + } + }, + { + path: '/cardList/payResult', + name: 'payResult', + component: payResult, + meta: { + title: '支付结果', + index: 5 + } + }, + { + path: '/cardList/paySuccess', + name: 'paySuccess', + component: paySuccess, + meta: { + title: '支付成功', + index: 5 + } + }, + { + path: '/cardList/payLoser', + name: 'payLoser', + component: payLoser, + meta: { + title: '支付失败', + index: 6 + } + }, + { + path: '/cardList/ShowPDF', + name: 'ShowPDF', + component: ShowPDF, + meta: { + title: '', + index: 7 + } + } +] + diff --git a/src/router/ebiz/index.js b/src/router/ebiz/index.js index 05bdf973a..1b4815862 100644 --- a/src/router/ebiz/index.js +++ b/src/router/ebiz/index.js @@ -13,4 +13,5 @@ import report from './report' import survey from './survey' import nbs from './nbs' import manpower from './manpower' -export default [...proposal, ...sale, ...customer, ...my, ...serve, ...common, ...product, ...agentEenter, ...milestone, ...poster, ...report, ...survey, ...nbs, ...manpower] //根据需要进行删减 +import cardList from './cardList' +export default [...proposal, ...sale, ...customer, ...my, ...serve, ...common, ...product, ...cardList ,...agentEenter, ...milestone, ...poster, ...report, ...survey, ...nbs, ...manpower] //根据需要进行删减 diff --git a/src/router/index.js b/src/router/index.js index 5dbe9258e..a662dabd4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,6 +2,7 @@ import Vue from 'vue' import Router from 'vue-router' import App from './app' import Example from './example' + import Ebiz from './ebiz' Vue.use(Router) diff --git a/src/views/app/Home.vue b/src/views/app/Home.vue index 539f3bb67..47adb9579 100644 --- a/src/views/app/Home.vue +++ b/src/views/app/Home.vue @@ -32,6 +32,20 @@
  • DISC性格分析
  • +
  • +

    卡单投保

    + +
  • 首页 diff --git a/src/views/ebiz/cardList/CardTotreasure.vue b/src/views/ebiz/cardList/CardTotreasure.vue new file mode 100644 index 000000000..a1158a0a6 --- /dev/null +++ b/src/views/ebiz/cardList/CardTotreasure.vue @@ -0,0 +1,451 @@ + + + + + diff --git a/src/views/ebiz/cardList/Pay.vue b/src/views/ebiz/cardList/Pay.vue new file mode 100644 index 000000000..6b6f10ef3 --- /dev/null +++ b/src/views/ebiz/cardList/Pay.vue @@ -0,0 +1,587 @@ + + + + + + diff --git a/src/views/ebiz/cardList/PayLoser.vue b/src/views/ebiz/cardList/PayLoser.vue new file mode 100644 index 000000000..be53ad562 --- /dev/null +++ b/src/views/ebiz/cardList/PayLoser.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/views/ebiz/cardList/PayResult.vue b/src/views/ebiz/cardList/PayResult.vue new file mode 100644 index 000000000..006ac6c4d --- /dev/null +++ b/src/views/ebiz/cardList/PayResult.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/src/views/ebiz/cardList/PaySuccess.vue b/src/views/ebiz/cardList/PaySuccess.vue new file mode 100644 index 000000000..90194d543 --- /dev/null +++ b/src/views/ebiz/cardList/PaySuccess.vue @@ -0,0 +1,104 @@ + + + + + + diff --git a/src/views/ebiz/cardList/ShowPDF.vue b/src/views/ebiz/cardList/ShowPDF.vue new file mode 100644 index 000000000..56766cf26 --- /dev/null +++ b/src/views/ebiz/cardList/ShowPDF.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue new file mode 100644 index 000000000..3d0479d27 --- /dev/null +++ b/src/views/ebiz/cardList/information.vue @@ -0,0 +1,1157 @@ + + + diff --git a/src/views/ebiz/cardList/js/methods.js b/src/views/ebiz/cardList/js/methods.js new file mode 100644 index 000000000..5660096f3 --- /dev/null +++ b/src/views/ebiz/cardList/js/methods.js @@ -0,0 +1,123 @@ +//点击弹出组件 +export function selectComp(that, index, type = '') { + that.currentPopupIndex = index + let title = '' + if (index == 1) { + if (that.selectUser == '1') { + ;[that.customerShowPicker2, title] = [true, '客户列表'] + } else { + ;[that.customerShowPicker, title] = [true, '客户列表'] + } + // ;[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) { + if (type == '1') { + // 正面 + 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 + } else { + // 勾选长期 + that.userInfo.effectiveDateType = true + // 长期按钮不禁用 + that.effectiveDateTypeAble = false + // 证件截止日期不需要校验 + that.certiexpiredateRequired = false + } + } + } + if (type == '2') { + // 正面 + if (data.name && data.name != '待识别') { + that.userInfo.insuredName = data.name + that.userInfo.insuredidNo = data.idNo + that.userInfo.insuredBirthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}` + that.userInfo.insuredSex = 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 + } else { + // 勾选长期 + that.userInfo.effectiveDateType = true + // 长期按钮不禁用 + that.effectiveDateTypeAble = false + // 证件截止日期不需要校验 + that.certiexpiredateRequired = false + } + } + } + that.isScan = false + let title = type == '1' ? '投保人信息' : '被保人信息' + that.$jump({ + flag: 'navigation', + extra: { + title, + hiddenRight: '1' + } + }) +} diff --git a/src/views/ebiz/cardList/js/verification.js b/src/views/ebiz/cardList/js/verification.js new file mode 100644 index 000000000..b42c40b4b --- /dev/null +++ b/src/views/ebiz/cardList/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' + } + } +} diff --git a/src/views/ebiz/cardList/productDetails.vue b/src/views/ebiz/cardList/productDetails.vue new file mode 100644 index 000000000..c5533919a --- /dev/null +++ b/src/views/ebiz/cardList/productDetails.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/src/views/ebiz/sale/InsuredInfo.vue b/src/views/ebiz/sale/InsuredInfo.vue index 154bfc381..2a22704b6 100644 --- a/src/views/ebiz/sale/InsuredInfo.vue +++ b/src/views/ebiz/sale/InsuredInfo.vue @@ -493,6 +493,14 @@ export default { } }, created() { + localStorage.removeItem('bankCardUrlPath') + localStorage.removeItem('bankCard') + localStorage.removeItem('bankCardUrlInsuredPath') + localStorage.removeItem('bankCardInsured') + localStorage.removeItem('imgfrontPath') + localStorage.removeItem('imgfrontInsuredPath') + localStorage.removeItem('imgBackPath') + localStorage.removeItem('imgBackInsuredPath') // document.body.style.backgroundColor = '#F5F5F5' //如果是编辑/导航进来 this.isElecCont = '0'