diff --git a/README.md b/README.md
index 78e4955a8..34e21dbff 100644
--- a/README.md
+++ b/README.md
@@ -89,6 +89,10 @@ git clone http://112.124.100.131/dcrs/ebiz-h5.git
cd ebiz-h5
+npm install --global --production window-build-tools (全局安装依赖)
+
+npm install --global node-gyp (全局安装依赖)
+
yarn install(推荐使用yarn)
yarn serve(开发环境)
diff --git a/src/api/ebiz/cardList/cardList.js b/src/api/ebiz/cardList/cardList.js
index 609394833..6ae2628be 100644
--- a/src/api/ebiz/cardList/cardList.js
+++ b/src/api/ebiz/cardList/cardList.js
@@ -1,7 +1,7 @@
/*
* @Author: PangXingYue
* @Date: 2021-03-26 10:38:37
- * @LastEditTime: 2021-03-29 18:42:28
+ * @LastEditTime: 2021-04-02 16:10:30
* @LastEditors: PangXingYue
* @Description:
* @FilePath: \ebiz-h5\src\api\ebiz\cardList\cardList.js
@@ -92,10 +92,18 @@ export function getPayTemp(data) {
})
}
-// 获取订单支付状态
+//
export function getShareParam(data) {
return request({
- url: getUrl('/customer/account/getShareParam', 1),
+ url: getUrl('/customer/account/getShareParam', 1),
+ method: 'post',
+ data
+ })
+}
+// 更新险种文档阅读状态
+export function saveOrUpdateDocument(data) {
+ return request({
+ url: getUrl('/sale/card/saveOrUpdateDocument', 1),
method: 'post',
data
})
diff --git a/src/assets/js/utils/request.js b/src/assets/js/utils/request.js
index 040949aee..f229d13f6 100644
--- a/src/assets/js/utils/request.js
+++ b/src/assets/js/utils/request.js
@@ -201,6 +201,7 @@ service.interceptors.response.use(
res = JSON.parse(AESTools.AESDecrypt(res.response, configApp.REQ_PWD))
}
}
+
Toast.clear()
if (res.code != 0) {
if (res.code == 10001 || res.code == 10002) {
diff --git a/src/config/index.js b/src/config/index.js
index b4e95b8ae..63ec17375 100644
--- a/src/config/index.js
+++ b/src/config/index.js
@@ -1,7 +1,7 @@
/*
* @Author: PangXingYue
* @Date: 2021-03-23 13:34:15
- * @LastEditTime: 2021-03-23 13:48:26
+ * @LastEditTime: 2021-04-02 16:11:35
* @LastEditors: PangXingYue
* @Description:
* @FilePath: \ebiz-h5\src\config\index.js
diff --git a/src/router/ebiz/cardList.js b/src/router/ebiz/cardList.js
index 66a345730..d5981432b 100644
--- a/src/router/ebiz/cardList.js
+++ b/src/router/ebiz/cardList.js
@@ -7,6 +7,9 @@ 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')
+const phoneCode = () => import('@/views/ebiz/cardList/phoneCode')
+const cardDetail = () => import('@/views/ebiz/cardList/cardDetail')
+const SignatureConfirmation = () => import('@/views/ebiz/cardList/SignatureConfirmation')
export default [
{
@@ -80,6 +83,33 @@ export default [
title: '',
index: 7
}
- }
+ },
+ {
+ path: '/cardList/phoneCode',
+ name: 'phoneCode',
+ component: phoneCode,
+ meta: {
+ title: '短信验证',
+ index: 8
+ }
+ },
+ {
+ path: '/cardList/cardDetail',
+ name: 'cardDetail',
+ component: cardDetail,
+ meta: {
+ title: '核对投被保人信息',
+ index: 9
+ }
+ },
+ {
+ path: '/cardList/SignatureConfirmation',
+ name: 'SignatureConfirmation',
+ component: SignatureConfirmation,
+ meta: {
+ title: '阅读确认',
+ index: 10
+ }
+ },
]
diff --git a/src/store/index.js b/src/store/index.js
index 2a55ff865..968e5f93b 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,3 +1,11 @@
+/*
+ * @Author: PangXingYue
+ * @Date: 2021-04-02 16:04:38
+ * @LastEditTime: 2021-04-02 16:13:50
+ * @LastEditors: PangXingYue
+ * @Description:
+ * @FilePath: \ebiz-h5\src\store\index.js
+ */
import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
@@ -18,9 +26,25 @@ export default new Vuex.Store({
eodrApplyNo: '', //保全-保全受理号
agentGrade: '', //用户的agentGrade,判断用户权限
secondManageCode: '', //内勤所需参数
- thirdManageCode: '' //内勤所需参数
+ thirdManageCode: '' ,//内勤所需参数
+ orderDetail:{},//无优卡分享微信端订单信息
},
mutations: {
+ setOrderDetail(state,data){
+ console.log('更新订单信息')
+ state.orderDetail = data;
+ },
+ setThirdManageCode(state, code) {
+ state.thirdManageCode = code
+ },
+ setSecondManageCode(state, code) {
+ state.secondManageCode = code
+ },
+ //设置用户的agentGrade,判断用户权限
+
+ setAgentGrade(state, code) {
+ state.agentGrade = code
+ },
//更新 理赔申请-区分被保险人/申请人页面flag
updatePageFlag(state, val) {
state.pageFlag = val
diff --git a/src/views/ebiz/cardList/Pay.vue b/src/views/ebiz/cardList/Pay.vue
index b7169c100..0698d6f0d 100644
--- a/src/views/ebiz/cardList/Pay.vue
+++ b/src/views/ebiz/cardList/Pay.vue
@@ -2,7 +2,10 @@
-
+
+
+
+
@@ -15,27 +18,29 @@
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
- 支付
-
-
支付
-
分享
+
+
+ 支付分享
+
+ 支付
+
-
+
-
+
-
+
@@ -182,8 +189,7 @@ export default {
[Cell.name]: Cell,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
- [Dialog.name]: Dialog,
- Loading
+ Loading,
},
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
@@ -200,7 +206,8 @@ export default {
orderAmount: '', //支付金额
name: '',
bankCode: '', //银行卡号
- bankName: '' //开户银行
+ bankName: '', //开户银行
+ schemeName: '' //保障金额
},
radio: '3',
result: [],
@@ -245,42 +252,50 @@ export default {
ReqReserved4: '', // 备用字段4
ReqReserved5: '', // 备用字段5
S3Sign: '', // 验签信息
- tradeState: '' // 状态
+ tradeState: '', // 状态
},
gotPayParam: false, // 是否已正确获取支付参数,
payStatus: '', // 接口返回的支付状态
noEdit: true, //是否为编辑
isWeixin, // 是否为微信环境
- isLoading: false // 分享到微信后的页面loading
+ isLoading: false, // 分享到微信后的页面loading
}
},
created() {
if (this.isWeixin) {
- this.radio = '3'
- let token = this.$route.query.token
- let orderNo = this.$route.query.orderNo
- localStorage.token = token
- localStorage.orderNo = orderNo
- this.isLoading = true
- this.$toast.loading({
- duration: 0, // 持续展示 toast
- forbidClick: true, // 禁用背景点击
- loadingType: 'spinner',
- message: '加载中……'
- })
- setTimeout(() => {
- this.pay()
- }, 500)
+ let orderDetail = JSON.parse(sessionStorage.orderDetail)
+ this.underWriteData = {
+ 'riskName': orderDetail.insuredDTOs[0].riskDTOLst[0].riskName,
+ 'appntName': orderDetail.appntDTO.name,
+ 'insuredName': orderDetail.insuredDTOs[0].name,
+ 'orderAmount': orderDetail.insuredDTOs[0].riskDTOLst[0].prem,
+ 'schemeName': orderDetail.insuredDTOs[0].riskDTOLst[0].proScheme,
+ 'idType': orderDetail.appntDTO.idType,
+ }
+ this.orderStatus = orderDetail.orderInfoDTO.orderStatus
+ localStorage.orderNo = orderDetail.orderInfoDTO.orderNo
+ // this.radio = '3'
+ // this.isLoading = true
+ // this.$toast.loading({
+ // duration: 0, // 持续展示 toast
+ // forbidClick: true, // 禁用背景点击
+ // loadingType: 'spinner',
+ // message: '加载中……'
+ // })
+ // setTimeout(() => {
+ // this.pay()
+ // }, 500)
+ } else {
+ // 再次支付 调详情 获取信息
+ this.getOrderDetail()
}
- // 再次支付 调详情 获取信息
- this.getOrderDetail()
},
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是 其他否
+ intercept: '1', //是否拦截原生返回事件 1是 其他否
})
}, 100)
// window.appCallBack = this.appCallBack
@@ -288,27 +303,24 @@ export default {
// this.underWrite.orderAmount = this.trialList[0].prem
document.body.style.backgroundColor = '#fff'
window.appCallBack = this.appCallBack
-
- // 不在微信环境下
- // if (!this.isWeixin) {
// 获取银行卡
this.getBankList()
- // this.getOrderDetail()
- // console.log('----保融form.action', config.payUrl)
- // if (localStorage.salelist == '1') {
- // 第一次支付 调核保获取
- // this.underWrite()
- // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
- // } else {
- // 再次支付 调详情 获取信息
- this.getOrderDetail()
- // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
- // }
- // console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
- this.getPayTemp()
-
-
- // }
+ // 不在微信环境下
+ if (!this.isWeixin) {
+ // this.getOrderDetail()
+ // console.log('----保融form.action', config.payUrl)
+ // if (localStorage.salelist == '1') {
+ // 第一次支付 调核保获取
+ // this.underWrite()
+ // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
+ // } else {
+ // 再次支付 调详情 获取信息
+ this.getOrderDetail()
+ // this.underWriteData = JSON.parse(window.localStorage.getItem('underWriteData'))
+ // }
+ // console.log('--自核结果--支付信息:', JSON.stringify(this.underWriteData))
+ this.getPayTemp()
+ }
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
@@ -318,7 +330,7 @@ export default {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
- intercept: '0' //是否拦截原生返回事件 1是 其他否
+ intercept: '0', //是否拦截原生返回事件 1是 其他否
})
// window.appCallBack = this.appCallBack
}, 100)
@@ -332,7 +344,7 @@ export default {
title: '提示',
message: '是否确认退出?',
cancelButtonColor: '#E9332E',
- confirmButtonColor: '#FFFFFF'
+ confirmButtonColor: '#FFFFFF',
})
.then(() => {
this.$jump({
@@ -340,12 +352,12 @@ export default {
extra: {
title: '产品列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
- url: location.origin + `/#/cardList/CardTotreasure`
+ url: location.origin + `/#/cardList/CardTotreasure`,
},
routerInfo: {
path: `/cardList/CardTotreasure`,
- type: '1'
- }
+ type: '1',
+ },
})
})
.catch(() => {
@@ -357,8 +369,8 @@ export default {
flag: 'navigation',
extra: {
title: '支付',
- hiddenRight: '1'
- }
+ hiddenRight: '1',
+ },
})
this.isScan = false
}
@@ -370,8 +382,8 @@ export default {
flag: 'navigation',
extra: {
title: '账户信息',
- hiddenRight: '1'
- }
+ hiddenRight: '1',
+ },
})
this.isScan = false
},
@@ -387,8 +399,8 @@ export default {
flag: 'navigation',
extra: {
title,
- hiddenLeft: '1'
- }
+ hiddenLeft: '1',
+ },
})
this.closeBtn()
}, 400)
@@ -401,10 +413,10 @@ export default {
btns: [
{
img: this.$assetsUrl + 'images/del-close.png',
- route: { flag: '', extra: {} }
- }
- ]
- }
+ route: { flag: '', extra: {} },
+ },
+ ],
+ },
})
},
// 获取银行列表的focus
@@ -417,9 +429,9 @@ export default {
getBankList() {
let self = this
let data = {
- operateType: 'bank_type'
+ operateType: 'bank_type',
}
- getBankList(data).then(res => {
+ getBankList(data).then((res) => {
if (res.result == '0') {
console.log('银行卡列表', res.content)
self.bankList = res.content
@@ -437,19 +449,19 @@ export default {
},
getPayTemp() {
getPayTemp({ orderNo: window.localStorage.getItem('orderNo') })
- .then(res => {
+ .then((res) => {
if (res.result == '0') {
this.noEdit = res.content.flag != 'false'
}
})
- .catch(e => {
+ .catch((e) => {
console.error(e)
})
},
- // 再次支付
+ // 获取支付详情
getOrderDetail() {
- var orderParms
- getOrderDetail({orderNo: window.localStorage.getItem('orderNo')}).then(res => {
+ getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then((res) => {
+ console.log('getOrderDetail', res)
if (res.result == '0') {
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
try {
@@ -466,17 +478,19 @@ export default {
this.$toast.clear()
console.log(res.orderDTO.orderAccountDTO.bankCode)
this.underWriteData = {
- appntName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
- name: res.orderDTO.appntDTO.name,
+ riskName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName,
+ appntName: res.orderDTO.appntDTO.name,
+ insuredName: res.orderDTO.insuredDTOs[0].name,
// bankName: res.orderDTO.orderAccountDTO.bankCode,
// bankCode: res.orderDTO.orderAccountDTO.cardBookCode,
// cardBookCode: res.orderDTO.orderAccountDTO.cardBookCode,
+ schemeName: res.orderDTO.insuredDTOs[0].riskDTOLst[0].proScheme,
idType: res.orderDTO.appntDTO.idType,
- orderAmount: res.orderDTO.orderInfoDTO.orderAmount,
+ orderAmount: res.orderDTO.insuredDTOs[0].riskDTOLst[0].prem,
orderNo: res.orderDTO.orderAccountDTO.orderNo,
result: '',
resultMessage: '交易处理成功',
- uwResult: '02'
+ uwResult: '02',
}
// this.bankListName = res.orderDTO.orderAccountDTO.bankName
this.underWriteData.bankCode =
@@ -484,8 +498,7 @@ export default {
this.underWriteData.bankName = res.orderDTO.orderAccountDTO.bankCode !== null ? res.orderDTO.orderAccountDTO.bankCode : this.$route.query.bankName
this.underWriteData.cardBookCode =
res.orderDTO.orderAccountDTO.cardBookCode !== null ? res.orderDTO.orderAccountDTO.cardBookCode : this.$route.query.bankCode
- this.bankListName = res.orderDTO.orderAccountDTO.bankName !== null ? res.orderDTO.orderAccountDTO.bankName : this.$route.query.bankListName
-
+ this.bankListName = res.orderDTO.orderAccountDTO.bankName !== null ? res.orderDTO.orderAccountDTO.bankName : this.$route.query.bankListName
// if (this.isWeixin) {
// this.pay()
// }
@@ -494,7 +507,9 @@ export default {
} else {
this.underWriteData = {
accountName: '',
+ riskName: '',
appntName: '',
+ insuredName: '',
idType: '',
bankCode: '',
bankName: '',
@@ -503,7 +518,7 @@ export default {
orderNo: '',
result: '',
resultMessage: '交易处理失败',
- uwResult: '00'
+ uwResult: '00',
}
// window.localStorage.setItem('underWriteData', JSON.stringify(underWriteData))
this.$toast(res.resultMessage)
@@ -568,9 +583,33 @@ export default {
let data = {
orderNo: window.localStorage.getItem('orderNo'),
cardOrder: 'cardOrder',
- payType: this.radio
+ payType: this.radio,
}
- acceptInsurance(data).then(res => {
+ acceptInsurance(data).then((res) => {
+ // this.$jump({
+ // flag: 'h5',
+ // extra: {
+ // forbidSwipeBack: 1, //当前页面禁止右滑返回
+ // url: location.origin + `/#/cardList/payLoser`,
+ // },
+ // routerInfo: {
+ // path: `/cardList/payLoser`,
+ // type: '1',
+ // },
+ // })
+ // return;
+ this.$jump({
+ flag: 'h5',
+ extra: {
+ forbidSwipeBack: 1, //当前页面禁止右滑返回
+ url: location.origin + `/#/cardList/paySuccess`,
+ },
+ routerInfo: {
+ path: `/cardList/paySuccess`,
+ type: '1',
+ },
+ })
+ return
console.log('----取支付参数结果:', JSON.stringify(res))
// res = {'result':'0','resultMessage':'','content':null,'prtNo':'8186270000000008','payStatus':'4','amnt':'63700.00','appntName':'投保人','message':null,'brPayReturnData':{'result':'','resultMessage':'','content':null,'businessId':'1569125393518','businessNo':'8186270000000008','tradeSubType':'COMM','businessType':'SALE','systemType':'GF','money':63700,'businessSubType':'XDCB','thirdType':'0002','thirdName':null,'bankCode':'ABC','epayOrderNo':'1909221209536259999900','companyAccount':null,'tradeState':'TRADING','standardCode':'DEALING','standardMsg':null,'thirdOrderNo':null,'respRemark':null,'tradeTime':'2019-09-22T04:09:53.518+0000','description':'','version':'1','sourceNotecode':'8186270000000008','payType':'MIT01','expireDate':'20191010101010','transSeq':'20190922120953782','transSource':'MIT','applyEntity':'11860000','paymentCode':'8186270000000008','transDate':'20190922','rdSeq':'1909221209536259999900','settleMode':null,'cur':'CNY','transTime':'120953','ourAmount':63700,'fixUser':'1','insurer':'投保人','certType':'0','certNum':'110101199009210011','oppBank':'ABC','oppAct':'6228481200290317812','oppActName':'投保人','cellPhone':null,'purpose':null,'memo':null,'returnURL':'http://139.199.50.151/#/sale/payResult','notifyURL':'http://139.199.50.151:7000/api/v1/epay/epay/payResult','s3Sign':'e3f0581ec6b751337e8eca360a0746bc'}}
if (res.result == '0') {
@@ -599,7 +638,7 @@ export default {
window.localStorage.setItem('payStatus', res.payStatus)
window.localStorage.setItem('payInfo', JSON.stringify(res))
this.underWriteData.bankListName = this.bankListName
- if(this.radio == '3'){
+ if (this.radio == '3') {
this.underWriteData.bankCode = ''
}
localStorage['cardList-detail'] = JSON.stringify(this.underWriteData)
@@ -609,7 +648,7 @@ export default {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
- intercept: '0' //是否拦截原生返回事件 1是 其他否
+ intercept: '0', //是否拦截原生返回事件 1是 其他否
})
}, 100)
})
@@ -629,7 +668,7 @@ export default {
let data = {
orderDTO: {
orderInfoDTO: {
- orderNo: window.localStorage.getItem('orderNo')
+ orderNo: window.localStorage.getItem('orderNo'),
},
orderAccountDTO: {
accountType: '0',
@@ -639,15 +678,15 @@ export default {
cardBookType: '1',
cardBookCode: this.underWriteData.bankCode,
isAutoPay: '0',
- isAutoRenewal: '1'
- }
- }
+ isAutoRenewal: '1',
+ },
+ },
}
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
- message: '加载中……'
+ message: '加载中……',
})
/*
支付之前要先保存银行账户信息
@@ -661,7 +700,7 @@ export default {
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
- message: '加载中……'
+ message: '加载中……',
})
// if (!flag) {
@@ -688,7 +727,7 @@ export default {
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
- message: '加载中……'
+ message: '加载中……',
})
// if (!flag) {
@@ -713,28 +752,26 @@ export default {
this.$dialog
.confirm({
message: '证件类型不是身份证,无法使用微信支付',
- showCancelButton: false
+ showCancelButton: false,
})
.then(() => {
this.radio = ''
})
}
},
- async share() {
+ async share() {
let valid = await this.$validator.validate()
console.log(valid)
if (true !== valid) {
console.log(this.$validator)
return this.$toast(this.$validator.errors.all()[0])
}
- let shareName = this.underWriteData.name
localStorage.name = this.underWriteData.name
localStorage.bankName = this.underWriteData.bankName
localStorage.bankCode = this.underWriteData.bankCode
- localStorage.bankListName = this.bankListName
- console.log(this.underWriteData.bankName, this.underWriteData.bankCode, this.bankListName, this.underWriteData.name)
- let res = await getShareParam({ shareType: 'card_pay' })
- let url = location.origin + '/#/cardList/pay?orderNo=' + localStorage.orderNo + '&token=' + res.content
+ localStorage.bankListName = this.bankListName
+ let res = await getShareParam({ shareType: 'card_pay' })
+ let url = location.origin + '/#/cardList/phoneCode?orderNo=' + localStorage.orderNo + '&token=' + res.content
if (res.result == '0') {
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
@@ -749,7 +786,7 @@ export default {
return this.$toast(res.resultMessage)
}
}
- }
+ },
}
@@ -766,4 +803,8 @@ export default {
padding-right: 3px;
box-sizing: content-box;
}
+.bottom-btn {
+ display: flex;
+ justify-content: center;
+}
diff --git a/src/views/ebiz/cardList/PayLoser.vue b/src/views/ebiz/cardList/PayLoser.vue
index be53ad562..b9a6846b9 100644
--- a/src/views/ebiz/cardList/PayLoser.vue
+++ b/src/views/ebiz/cardList/PayLoser.vue
@@ -1,10 +1,11 @@
-

+
+
支付失败
-
返回首页
+
返回首页
diff --git a/src/views/ebiz/cardList/PaySuccess.vue b/src/views/ebiz/cardList/PaySuccess.vue
index 90194d543..46db6149a 100644
--- a/src/views/ebiz/cardList/PaySuccess.vue
+++ b/src/views/ebiz/cardList/PaySuccess.vue
@@ -1,22 +1,22 @@
-
+
-
+
支付成功
-
-
-
+
+
+
-
+
返回首页
diff --git a/src/views/ebiz/cardList/ShowPDF.vue b/src/views/ebiz/cardList/ShowPDF.vue
index 56766cf26..a62fe2a1c 100644
--- a/src/views/ebiz/cardList/ShowPDF.vue
+++ b/src/views/ebiz/cardList/ShowPDF.vue
@@ -1,28 +1,92 @@
+
+
+
diff --git a/src/views/ebiz/cardList/cardDetail.vue b/src/views/ebiz/cardList/cardDetail.vue
new file mode 100644
index 000000000..892c94b02
--- /dev/null
+++ b/src/views/ebiz/cardList/cardDetail.vue
@@ -0,0 +1,107 @@
+
+
+
+ 投保人信息
+
+
+
+
+
+
+
+
+
+ 被保人信息
+
+
+
+
+
+
+
+
+
+ 受益人信息
+
+
+
+ 产品信息
+
+
+
+
+
+
注:2020年04月03日0时至2021年04月02日24时止。
+
+ 总保费:{{ riskDTO.prem }}元
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/ebiz/cardList/information.vue b/src/views/ebiz/cardList/information.vue
index 18a0c61c5..e8389e4fd 100644
--- a/src/views/ebiz/cardList/information.vue
+++ b/src/views/ebiz/cardList/information.vue
@@ -3,146 +3,71 @@
投保人信息
-
-
+
+
+
-
- 证件扫描
+
+ 证件扫描
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
- 被保险人信息
-
-
+ 被保人信息
+
+
-
- 证件扫描
+
+ 证件扫描
-
+
+
+
+
+
+
+
+
被保人信息
@@ -151,66 +76,49 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
受益人信息
-
+
- 产品信息
-
+ 产品信息
+
+
-
-
+
+
+
-
- 总保费:{{ allPrice }}元
-
+
+ 总保费:{{
+ allPrice }}元
+
+
+
+
+
-
+
-
+
-
+
@@ -277,7 +181,9 @@ import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
import idNoCheck from '@/assets/js/utils/idNoCheck'
import beforeDate from '@/assets/js/utils/getBeforeDate.js'
import afterDate from '@/assets/js/utils/getAfterDate.js'
+import CacheUtils from '@/assets/js/utils/cacheUtils'
import { idToData } from './js/verification'
+import OccupationForLoop from '@/components/ebiz/occipation/OccupationForLoop'
import { selectComp, getIdentityInfo } from './js/methods'
import Vue from 'vue'
import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
@@ -301,16 +207,21 @@ export default {
[Area.name]: Area,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
- [IdentityCardScan.name]: IdentityCardScan
+ [IdentityCardScan.name]: IdentityCardScan,
+ OccupationForLoop
},
data() {
return {
+ schemeName: '', //保障方案
+ schemeCode: '',
+ productDate: '', //保险期间
now: afterDate.getAfterDays(1), //指定生效日期最小值
insuredSex: '男',
isScan: false, //是否显示证件扫描组件
allPrice: 0,
result: [],
checked: true,
+ current: 'userInfo',
sexRadio: [
{
label: '男',
@@ -354,10 +265,17 @@ export default {
relationToInsured: '1',
idType: '1', //证件类型
idNo: '', //证件号码
- // homeProvince: '1', //家庭省
- // homeCity: '1', //家庭市
- // homeArea: '1', //家庭区
- // homeAddress: '1', //详细地址
+ occupationCode: '', //职业代码
+ occupationName: '', //职业名称
+ lifeGrade: '', //寿险等级
+ healthGrade: '', //健康等级
+ nativeplace: '1', //国家地区
+ marriageStatus: '', //婚姻状况
+ homeProvince: '1', //家庭省
+ homeCity: '1', //家庭市
+ homeArea: '1', //家庭区
+ homeName: '', //联系地址
+ homeAddress: '', //详细地址
mobile: '', //移动电话
email: '' //电子邮箱
// effectiveDate: '' //指定生效日期
@@ -368,7 +286,20 @@ export default {
idType: '1', //被保人证件类型
idNo: '', //被保人证件号码
sex: '0', //被保人性别
- birthday: '' //被保人出生日期
+ birthday: '', //被保人出生日期
+ occupationCode: '', //职业代码
+ occupationName: '', //职业名称
+ lifeGrade: '', //寿险等级
+ healthGrade: '', //健康等级
+ nativeplace: '1', //国家地区
+ marriageStatus: '', //婚姻状况
+ homeProvince: '1', //家庭省
+ homeCity: '1', //家庭市
+ homeArea: '1', //家庭区
+ homeName: '', //联系地址
+ homeAddress: '1', //详细地址
+ mobile: '', //移动电话
+ email: '' //电子邮箱
},
selectUser: '',
areaList: areaList,
@@ -378,8 +309,11 @@ export default {
occupationShowPicker: false,
timeId: null,
chooseProducts: JSON.parse(localStorage.chooseProducts),
- trialList: JSON.parse(localStorage.trialList),
- pdf: ['', '', '']
+ trialList: JSON.parse(CacheUtils.getLocItem('trialList')),
+ pdf: ['', '', ''],
+ insureType: '',
+ pickerIndex: 0,
+ areaCode: '110101'
}
},
created() {
@@ -411,6 +345,53 @@ export default {
this.allPrice = this.trialList[0].prem
},
methods: {
+ /**
+ * @description:
+ * @param {*} data
+ * @return {*}
+ */
+ chooseOccupation(data) {
+ let { code, name, healthGrade, lifeGrade } = data
+ this.$jump({
+ flag: 'navigation',
+ extra: {
+ title: '职业类别',
+ hiddenRight: '1'
+ }
+ })
+ this.occupationShowPicker = false
+ if (this.insureType === '1') {
+ this.userInfo.occupationName = name
+ this.userInfo.occupationCode = code
+ } else if (this.insureType === '2') {
+ this.insuredInfo.occupationName = name
+ this.insuredInfo.occupationCode = code
+ }
+ },
+ /**
+ * @description:
+ * @param {*}
+ * @return {*}
+ */
+ openOccupation(insureType) {
+ this.occupationShowPicker = !this.occupationShowPicker
+ this.insureType = insureType
+ if (this.insureType === '1') {
+ this.occupationName = this.userInfo.occupationName
+ this.occupationCode = this.userInfo.occupationCode
+ } else if (this.insureType === '2') {
+ this.occupationName = this.insuredInfo.occupationName
+ this.occupationCode = this.insuredInfo.occupationCode
+ }
+ },
+ areaSelect(insureType) {
+ ;[this.homeShow, this.insureType] = [true, insureType]
+ if (insureType === '1') {
+ this.areaCode = this.userInfo.homeArea
+ } else if (insureType === '2') {
+ this.areaCode = this.insuredInfo.homeArea
+ }
+ },
underWrite(orderNo) {
let data = {
platform: 'app',
@@ -475,13 +456,21 @@ export default {
// console.log('name',name)
this.insuredInfo.name = name
},
- selectClick(index, value) {
+ /**
+ * @description:
+ * @param {*} index
+ * @param {*} value
+ * @param {*} insureType '1'为投保人 '2'为被投保人
+ * @return {*}
+ */
+ selectClick(index, value, insureType) {
if (value !== undefined) {
this.selectUser = value
}
+ this.insureType = insureType
+ selectComp(this, index, insureType)
// console.log(index, value)
// localStorage.setItem('value', value)
- selectComp(this, index, '1')
},
// closeBtn() {
// // 筛选按钮的显示
@@ -518,45 +507,104 @@ export default {
this.isScan = false
}
},
- chooseOccupation() {
- this.$jump({
- flag: 'navigation',
- extra: {
- title: '投被保人信息',
- hiddenRight: '1'
- }
- })
- this.occupationShowPicker = false
- },
//弹框选择
toSelect(pickerType, valueKey) {
- console.log(valueKey)
//pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保(弃用) 5、税收居民身份 6、婚姻状况 7、在职情况 8、收入来源, 9 关系
;[this.popupShow, this.pickerType] = [true, pickerType]
if (valueKey) this.valueKey = valueKey
if (pickerType == '1') {
this.columns = DataDictionary.nativeplace
+ this.pickerIndex = this.userInfo.nativeplace - 1 > 0 ? this.userInfo.nativeplace - 1 : 0
} else if (pickerType == '2') {
this.columns = DataDictionary.cardListInsuredIdType
} else if (pickerType == '3') {
this.columns = DataDictionary.degree
} else if (pickerType == '4') {
- this.columns = [
- { id: 0, text: '有' },
- { id: 1, text: '无' }
- ]
+ this.columns = [{ id: 0, text: '有' }, { id: 1, text: '无' }]
} else if (pickerType == '5') {
this.columns = DataDictionary.taxIdentity
} else if (pickerType == '6') {
this.columns = DataDictionary.marriage
+ this.pickerIndex = this.userInfo.marriage - 1 > 0 ? this.userInfo.marriage - 1 : 0
} else if (pickerType == '7') {
this.columns = DataDictionary.workCondition
} else if (pickerType == '8') {
this.columns = DataDictionary.salarySource
} else if (pickerType == '9') {
this.columns = DataDictionary.relationToAppnt
+ } else if (pickerType == '66') {
+ this.columns = DataDictionary.marriage
+ this.pickerIndex = this.insuredInfo.marriage - 1 > 0 ? this.insuredInfo.marriage - 1 : 0
} else if (pickerType == '11') {
- this.columns = DataDictionary.insuredIdType
+ this.columns = DataDictionary.nativeplace
+ this.pickerIndex = this.insuredInfo.nativeplace - 1 > 0 ? this.insuredInfo.nativeplace - 1 : 0
+ } else if (pickerType == '10') {
+ this.trialList = `{
+ "code": 0,
+ "message": "成功",
+ "content": {
+ "result": "0",
+ "resultMessage": "",
+ "content": null,
+ "trialList": [
+ {
+ "productCode": "GFRS_M0041",
+ "amt": null,
+ "standPrem": null,
+ "prem": 100,
+ "isMainRisk": null,
+ "isRemit": null,
+ "remitType": null,
+ "duty": null,
+ "showPrem": 100,
+ "trialType": null,
+ "schemeName": "国富无忧卡A",
+ "schemeCode": "M0041A",
+ "timeliness": 3
+ },
+ {
+ "productCode": "GFRS_M0041",
+ "amt": null,
+ "standPrem": null,
+ "prem": 200,
+ "isMainRisk": null,
+ "isRemit": null,
+ "remitType": null,
+ "duty": null,
+ "showPrem": 200,
+ "trialType": null,
+ "schemeName": "国富无忧卡B",
+ "schemeCode": "M0041B",
+ "timeliness": 3
+ },
+ {
+ "productCode": "GFRS_M0041",
+ "amt": null,
+ "standPrem": null,
+ "prem": 300,
+ "isMainRisk": null,
+ "isRemit": null,
+ "remitType": null,
+ "duty": null,
+ "showPrem": 300,
+ "trialType": null,
+ "schemeName": "国富无忧卡C",
+ "schemeCode": "M0041C",
+ "timeliness": 3
+ }
+ ],
+ "flag": "0"
+ }
+}`
+ this.columns = []
+ this.trialList = JSON.parse(this.trialList).content.trialList
+ console.log(this.trialList, '================this.trialList================')
+ this.trialList.forEach(item => {
+ this.columns.push({
+ id: item.schemeCode,
+ text: item.schemeName
+ })
+ })
}
},
//确认选择字段
@@ -581,14 +629,27 @@ export default {
this.userInfo.taxResidentId = value.id
} else if (this.pickerType == '6') {
this.userInfo.marriage = value.id
+ this.userInfo.marriageStatus = value.text
} else if (this.pickerType == '7') {
this.userInfo.jobStatus = value.id
} else if (this.pickerType == '8') {
this.userInfo.salarySource = value.id
} else if (this.pickerType == '9') {
this.userInfo.relationToInsured = value.id
+ } else if (this.pickerType == '66') {
+ this.insuredInfo.marriage = value.id
+ this.insuredInfo.marriageStatus = value.text
} else if (this.pickerType == '11') {
- this.insuredInfo.idType = value.id
+ this.insuredInfo.nativeplace = value.id
+ } else if (this.pickerType == '10') {
+ this.schemeName = value.text
+ this.schemeCode = value.id
+ for (let item of this.trialList) {
+ if (item.schemeCode === this.schemeCode) {
+ this.allPrice = item.prem
+ break
+ }
+ }
}
},
//证件起始截止日期
@@ -689,15 +750,72 @@ export default {
{
//指定生效日期
//如果录入日期晚于当前日期
- // if (Date.parse(val) < Date.parse(new Date())) {
- // this.userInfo.birthday = ''
- // this.$refs.birthday.date = ''
- // return this.$toast('当前日期早于当日')
- // }
+ if (Date.parse(val) < Date.parse(new Date())) {
+ return this.$toast('当前日期早于当日')
+ }
+ let currentDataArr = val.split('-')
+ let currentData = currentDataArr[0] + '年' + currentDataArr[1] + '月' + currentDataArr[2] + '日'
+ let insuYear = JSON.parse(localStorage.insuYear)
+ let insuYearM,productDate,productDateTime
+ let insuYearD
+ switch (insuYear.insuYearFlag) {
+ case 'D':
+ let hoDate = Date.parse(val) / 1000 + insuYear['insuYear'] * 24 * 3600
+ productDate = new Date(parseInt(hoDate) * 1000)
+ insuYearM = (productDate.getMonth() + 1) < 10 ? '0' + (productDate.getMonth() + 1) : (productDate.getMonth() + 1)
+ insuYearD = productDate.getDate() < 10 ? '0' + productDate.getDate() : productDate.getDate()
+ productDateTime = productDate.getFullYear() + '年' + insuYearM + '月' + insuYearD + '日'
+ this.productDate = currentData + '0时至' + productDateTime + '24时止'
+ break
+ case 'Y':
+ productDate = new Date(val)
+ insuYearM = (productDate.getMonth() + 1) < 10 ? '0' + (productDate.getMonth() + 1) : (productDate.getMonth() + 1)
+ insuYearD = productDate.getDate() < 10 ? '0' + productDate.getDate() : productDate.getDate()
+ productDateTime =
+ parseInt(productDate.getFullYear()) +
+ parseInt(insuYear['insuYear']) +
+ '年' +
+ insuYearM +
+ '月' +
+ insuYearD +
+ '日'
+ this.productDate = currentData + '0时至' + productDateTime + '24时止'
+ break
+ case 'M':
+ productDateTime = this.GetNextMonthDay(val, insuYear['insuYear'])
+ this.productDate = currentData + '0时至' + productDateTime + '24时止'
+ break
+ }
}
break
}
},
+ GetNextMonthDay(date, monthNum) {
+ var dateArr = date.split('-')
+ var year = dateArr[0] //获取当前日期的年份
+ var month = dateArr[1] //获取当前日期的月份
+ var day = dateArr[2] //获取当前日期的日
+ var days = new Date(year, month, 0)
+ days = days.getDate() //获取当前日期中的月的天数
+ var year2 = year
+ var month2 = parseInt(month) + parseInt(monthNum)
+ if (month2 > 12) {
+ year2 = parseInt(year2) + parseInt(parseInt(month2) / 12 == 0 ? 1 : parseInt(month2) / 12)
+ month2 = parseInt(month2) % 12
+ }
+ var day2 = day
+ var days2 = new Date(year2, month2, 0)
+ days2 = days2.getDate()
+ if (day2 > days2) {
+ day2 = days2
+ }
+ if (month2 < 10) {
+ month2 = '0' + month2
+ }
+
+ var t2 = year2 + '年' + month2 + '月' + day2 + '日'
+ return t2
+ },
//选择客户
chooseCustomer(data) {
data = data[0]
@@ -723,19 +841,26 @@ export default {
this.userInfo.sex = customerSex ? customerSex.toString() : '0' //性别
this.userInfo.birthday = data.birthday //出生日期
if (data.customerIdType == 1) {
+ console.log(data)
this.userInfo.idType = data.customerIdType //证件类型
this.userInfo.idNo = data.customerIdNumber //证件类别
}
this.userInfo.email = data.email //邮箱
this.userInfo.mobile = data.customerPhone //移动电话
- // this.userInfo.homeProvince = data.homeProvince //家庭省
- // this.userInfo.homeCity = data.homeCity //家庭市
- // this.userInfo.homeArea = data.homeArea //家庭区
- // if (data.homeProvince && data.homeCity && data.homeArea) {
- // this.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
- // }
- // this.userInfo.homeAddress = data.homeAddress //家庭详细地址
+ this.userInfo.homeProvince = data.homeProvince //家庭省
+ this.userInfo.homeCity = data.homeCity //家庭市
+ this.userInfo.homeArea = data.homeArea //家庭区
+ if (data.homeProvince && data.homeCity && data.homeArea) {
+ this.userInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
+ }
+ this.userInfo.homeAddress = data.homeAddress //家庭详细地址
+ this.userInfo.occupationCode = data.occupationCode
+ this.userInfo.occupationName = data.occupationName
+ this.userInfo.lifeGrade = data.lifeGrade
+ this.userInfo.healthGrade = data.healthGrade
+ this.userInfo.nativeplace = data.country
+ this.userInfo.marriage = data.marryStatus
// 计算年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
@@ -751,6 +876,22 @@ export default {
this.insuredInfo.idType = data.customerIdType //证件类型
this.insuredInfo.idNo = data.customerIdNumber //证件类别
}
+
+ this.insuredInfo.email = data.email //邮箱
+ this.insuredInfo.mobile = data.customerPhone //移动电话
+ this.insuredInfo.homeProvince = data.homeProvince //家庭省
+ this.insuredInfo.homeCity = data.homeCity //家庭市
+ this.insuredInfo.homeArea = data.homeArea //家庭区
+ if (data.homeProvince && data.homeCity && data.homeArea) {
+ this.insuredInfo.homeName = getAreaName([{ code: data.homeProvince }, { code: data.homeCity }, { code: data.homeArea }]) //家庭地址
+ }
+ this.insuredInfo.homeAddress = data.homeAddress //家庭详细地址
+ this.insuredInfo.occupationCode = data.occupationCode
+ this.insuredInfo.occupationName = data.occupationName
+ this.insuredInfo.lifeGrade = data.lifeGrade
+ this.insuredInfo.healthGrade = data.healthGrade
+ this.insuredInfo.nativeplace = data.country
+ this.insuredInfo.marriage = data.marryStatus
// 计算年龄
// let age = utilsAge.getAge(this.userInfo.birthday, new Date())
@@ -986,19 +1127,14 @@ export default {
let params = {
orderDTO: {
orderInfoDTO: {
- bnfFlag: '0'
- // cvaliDate: this.cvaliDate
+ bnfFlag: '0',
+ supportBank: '0'
},
- appntDTO: {},
- insuredDTOs: [
- {
- riskDTOLst: this.riskDTOLst
- }
- ]
+ appntDTO: this.userInfo,
+ insuredDTOs: [this.insuredInfo]
}
}
- params.orderDTO.appntDTO = this.userInfo
- params.orderDTO.insuredDTOs = [this.insuredInfo]
+
//组装险种提交数据
let [mainRiskCode, riskDTOLst] = ['', []]
let rollInResult = '' //校验预计转入保费结果
@@ -1007,6 +1143,7 @@ export default {
if (item.isMainRisk == 0) {
mainRiskCode = item.productCode
}
+ let insuYearDate = JSON.parse(localStorage.insuYear)
let riskItem = {
cvaliDate: this.cvaliDate,
isMainRisk: item.isMainRisk,
@@ -1018,7 +1155,11 @@ export default {
standPrem: this.trialList[index] && this.trialList[index].standPrem,
predictTransferPrem: item.predictTransferPrem,
thirdInsuraceNo: this.policyNo,
- mult: this.mult
+ mult: this.mult,
+ proScheme: this.schemeName,
+ proSchemeCode: this.schemeCode,
+ insuYear: insuYearDate.insuYear,
+ insuYearFlag: insuYearDate.insuYearFlag,
}
if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') {
//增加万能险 预计转入保费校验
@@ -1046,6 +1187,7 @@ export default {
// }
// console.log()
// riskItem = Object.assign(riskItem, this.trialInfos[index])
+
riskDTOLst.push(riskItem)
})
if (!rollInResult) {
@@ -1086,9 +1228,15 @@ export default {
this.areaShow = false
break
case '2': //家庭地址
- this.homeName = getAreaName(area)
- ;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
- this.homeShow = false
+ if (this.insureType === '1') {
+ this.userInfo.homeName = getAreaName(area)
+ ;[this.userInfo.homeProvince, this.userInfo.homeCity, this.userInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
+ this.homeShow = false
+ } else if (this.insureType === '2') {
+ this.insuredInfo.homeName = getAreaName(area)
+ ;[this.insuredInfo.homeProvince, this.insuredInfo.homeCity, this.insuredInfo.homeArea] = [area[0].code, area[1].code, area[2].code]
+ this.homeShow = false
+ }
break
case '3': //户籍
this.census = getAreaName(area)
@@ -1099,7 +1247,7 @@ export default {
},
//获取身份证扫描信息
getIdentityInfo(data) {
- getIdentityInfo(this, data, '1')
+ getIdentityInfo(this, data, this.insureType)
},
// getIdentityInfo(data) {
// console.log(data)
@@ -1185,4 +1333,9 @@ export default {
.van-checkbox__label {
font-size: 13px;
}
+.tips {
+ font-size: 14px;
+ color: #333;
+ padding: 15px;
+}
diff --git a/src/views/ebiz/cardList/js/methods.js b/src/views/ebiz/cardList/js/methods.js
index 5660096f3..29afd6275 100644
--- a/src/views/ebiz/cardList/js/methods.js
+++ b/src/views/ebiz/cardList/js/methods.js
@@ -88,7 +88,7 @@ export function getIdentityInfo(that, data, type) {
// 正面
if (data.name && data.name != '待识别') {
that.userInfo.insuredName = data.name
- that.userInfo.insuredidNo = data.idNo
+ that.insuredInfo.idNo = that.userInfo.insuredidNo = data.idNo
that.userInfo.insuredBirthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}`
that.userInfo.insuredSex = data.gender == '男' ? '0' : '1'
}
diff --git a/src/views/ebiz/cardList/phoneCode.vue b/src/views/ebiz/cardList/phoneCode.vue
new file mode 100644
index 000000000..cb715ed19
--- /dev/null
+++ b/src/views/ebiz/cardList/phoneCode.vue
@@ -0,0 +1,779 @@
+
+
+
+
+
+ {{
+ codeDisabled ? `${countDown}s后重新获取` : '发送验证码'
+ }}
+
+
下一步
+
+
+
+
\ No newline at end of file
diff --git a/src/views/ebiz/cardList/productDetails.vue b/src/views/ebiz/cardList/productDetails.vue
index 66ff9b774..23f4eea9d 100644
--- a/src/views/ebiz/cardList/productDetails.vue
+++ b/src/views/ebiz/cardList/productDetails.vue
@@ -21,13 +21,14 @@
+