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..ab590d8a4 --- /dev/null +++ b/src/api/ebiz/cardList/cardList.js @@ -0,0 +1,67 @@ +// 卡单接口 + +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 + }) +} 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/request.js b/src/assets/js/utils/request.js index f277e241b..afafcf814 100644 --- a/src/assets/js/utils/request.js +++ b/src/assets/js/utils/request.js @@ -65,6 +65,9 @@ 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/components/ebiz/customer/Customer.vue b/src/components/ebiz/customer/Customer.vue index 827a9fc04..72e75cf5b 100644 --- a/src/components/ebiz/customer/Customer.vue +++ b/src/components/ebiz/customer/Customer.vue @@ -52,6 +52,7 @@ export default { mounted() {}, methods: { choose(data) { + console.log(data) let params = { customerNumber: data.customerNumber } @@ -59,17 +60,21 @@ export default { console.log(res, '详情') if (res.result == '0') { this.isSuccess = true + let Data = [] let content = res.content + let value = localStorage.getItem('value') + Data.push(content) + Data.push(value) if (content.birthday) { content.age = utils.jsGetAge(content.birthday) } - this.$emit('on-choose', content) + this.$emit('on-choose', Data) } }) }, getList() { getCustomersList({}).then(res => { - console.log(res) + // console.log(res) if (res.result == '0') { let customerList = [] //根据数据字典中的客户等级 展示 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/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..d22a6a273 --- /dev/null +++ b/src/router/ebiz/cardList.js @@ -0,0 +1,73 @@ +// 卡单路由 +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') +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 + } + } +] diff --git a/src/router/ebiz/index.js b/src/router/ebiz/index.js index 05bdf973a..2ebd1640a 100644 --- a/src/router/ebiz/index.js +++ b/src/router/ebiz/index.js @@ -13,4 +13,4 @@ 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] //根据需要进行删减 +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..1fb9ee09b --- /dev/null +++ b/src/views/ebiz/cardList/CardTotreasure.vue @@ -0,0 +1,301 @@ + + + + + \ No newline at end of file diff --git a/src/views/ebiz/cardList/Pay.vue b/src/views/ebiz/cardList/Pay.vue new file mode 100644 index 000000000..8330f6165 --- /dev/null +++ b/src/views/ebiz/cardList/Pay.vue @@ -0,0 +1,480 @@ + + + + + + diff --git a/src/views/ebiz/cardList/PayLoser.vue b/src/views/ebiz/cardList/PayLoser.vue new file mode 100644 index 000000000..c88818773 --- /dev/null +++ b/src/views/ebiz/cardList/PayLoser.vue @@ -0,0 +1,52 @@ + + + + + \ No newline at end of file diff --git a/src/views/ebiz/cardList/PayResult.vue b/src/views/ebiz/cardList/PayResult.vue new file mode 100644 index 000000000..ffcc0ef6e --- /dev/null +++ b/src/views/ebiz/cardList/PayResult.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/views/ebiz/cardList/PaySuccess.vue b/src/views/ebiz/cardList/PaySuccess.vue new file mode 100644 index 000000000..4b2f8366b --- /dev/null +++ b/src/views/ebiz/cardList/PaySuccess.vue @@ -0,0 +1,88 @@ + + + + + + diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue new file mode 100644 index 000000000..b94cfb82e --- /dev/null +++ b/src/views/ebiz/cardList/information.vue @@ -0,0 +1,964 @@ + + + diff --git a/src/views/ebiz/cardList/js/methods.js b/src/views/ebiz/cardList/js/methods.js new file mode 100644 index 000000000..474a37f04 --- /dev/null +++ b/src/views/ebiz/cardList/js/methods.js @@ -0,0 +1,118 @@ +//点击弹出组件 +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) { + 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..7cde37fe9 --- /dev/null +++ b/src/views/ebiz/cardList/productDetails.vue @@ -0,0 +1,267 @@ + + + + + \ No newline at end of file