Compare commits

..

4 Commits

Author SHA1 Message Date
liu.xiaofeng@ebiz-digits.com
577d6d7076 [20230725]ca出参格式修改 2023-08-14 17:15:29 +08:00
liu.xiaofeng@ebiz-digits.com
604c7a3656 [20230725]ca出参的数据传递格式修改为JSON.parse 2023-08-14 16:57:03 +08:00
liu.xiaofeng@ebiz-digits.com
b674f87b05 抄录页面 提交接口参数ca入参数据类型修改为字符串 2023-07-25 14:19:54 +08:00
liu.xiaofeng@ebiz-digits.com
3fcd47d3bc 抄录页面 提交接口增加入参数据 一个是ca入参 一个是ca出参 2023-07-25 13:37:33 +08:00
35 changed files with 8729 additions and 8295 deletions

View File

@@ -1,7 +1,6 @@
import request from '@/assets/js/utils/request'
import request1 from '@/assets/js/utils/request1'
import getUrl from '@/assets/js/utils/get-url'
import store from '@/store'
// 保费计算
export function saveOrUpdateOrderInfo(data) {
return request({
@@ -100,15 +99,6 @@ export function uploadImg(data) {
data
})
}
// 上传图片
export function uploadImg2(data) {
return request1({
url: getUrl('/uploadImage?imgType='+store.getters.getUploadImgType+'&orderNo='+store.getters.getUploadImgOrderNo, 1, 2),
method: 'post',
data
})
}
/*
// 人脸识别
export function recognition(data) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -559,10 +559,7 @@ export default {
)
if (insuredDTO) {
let insuredPersonAge = insuredDTO.insuredAge ? insuredDTO.insuredAge : insuredDTO.age
if(insuredDTO.birthday){
insuredPersonAge = utilsAge.getAge(insuredDTO.birthday, new Date())
}
let insuredPersonAge = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
CacheUtils.setLocItem('saleInsuredPersonInfo',
JSON.stringify({
birthday: insuredDTO.birthday,

View File

@@ -1,164 +0,0 @@
import utilsAge from '@/assets/js/utils/age'
export default {
//计算身份证起始日期
getStartDate: function(birthday, endDate) {
let startDate = '' //证件起始日期
let startage = ''
let endage = utilsAge.getAge(birthday, new Date(endDate))
/**
* @Author: LiuXiaoFeng
* @Description: 未满16周岁的公民申领的居民身份证有效期为5年
* @Date: 2023/7/4
**/
if (endage - 5 < 16) {
let date2_29 = endDate.slice(5, 11)
if(date2_29 == '02-29'){
let thisyear = Number(endDate.slice(0, 4)) - 5
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
return startDate = thisyear + '-02-29'
} else {
return startDate = thisyear + '-02-28'
}
}else{
return startDate = String(Number(endDate.slice(0, 4)) - 5) + startDate.slice(4, 11)
}
}
/**
* @Author: LiuXiaoFeng
* @Description: 年满16周岁至25周岁的公民申领的居民身份证有效期为10年
* @Date: 2023/7/4
**/
else if (endage - 5 >= 16 && endage - 10 <= 25) {
startDate = String(Number(endDate.slice(0,4)) - 10) + endDate.slice(4,11)
startage = utilsAge.getAge(birthday, new Date(startDate))
if(startage >= 16 && startage <= 25){
let date2_29 = endDate.slice(5, 11)
if(date2_29 == '02-29') {
let thisyear = Number(endDate.slice(0, 4)) - 10
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
return startDate = thisyear + '-02-29'
} else {
return startDate = thisyear + '-02-28'
}
} else {
return startDate
}
}
}
/**
* @Author: LiuXiaoFeng
* @Description: 年满26周岁至45周岁的公民申领的居民身份证有效期为20年
* @Date: 2023/7/4
**/
else if(endage - 10 >= 26 && endage - 20 <= 45) {
startDate = String(Number(endDate.slice(0,4)) - 20) + endDate.slice(4,11)
startage = utilsAge.getAge(birthday, new Date(startDate))
if(startage >= 26 && startage <= 45){
let date2_29 = endDate.slice(5, 11)
if(date2_29 == '02-29') {
let thisyear = Number(endDate.slice(0, 4)) - 20
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
return startDate = thisyear + '-02-29'
} else {
return startDate = thisyear + '-02-28'
}
} else {
return startDate
}
}
}
/**
* @Author: LiuXiaoFeng
* @Description: 年满46周岁的公民申领居民身份证有效期为长期
* @Date: 2023/7/4
**/
else if (endage - 20 >= 46) {
return startDate
}
},
//计算身份证截止日期
getEndDate: function(birthday, startDate) {
let endDate = '' //证件截止日期
let startage = utilsAge.getAge(birthday, new Date(startDate))
/**
* @Author: LiuXiaoFeng
* @Description: 未满16周岁的公民申领的居民身份证有效期为5年
* @Date: 2023/7/4
**/
if (startage < 16) {
let date2_29 = startDate.slice(5, 11)
if(date2_29 == '02-29') {
let thisyear = Number(startDate.slice(0, 4)) + 5
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
return endDate = thisyear + '-02-29'
} else {
return endDate = thisyear + '-02-28'
}
} else {
return endDate = String(Number(startDate.slice(0, 4)) + 5) + startDate.slice(4, 11)
}
}
/**
* @Author: LiuXiaoFeng
* @Description: 年满16周岁至25周岁的公民申领的居民身份证有效期为10年
* @Date: 2023/7/4
**/
else if (startage >= 16 && startage <= 25) {
let date2_29 = startDate.slice(5, 11)
if(date2_29 == '02-29') {
let thisyear = Number(startDate.slice(0, 4)) + 10
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
return endDate = thisyear + '-02-29'
} else {
return endDate = thisyear + '-02-28'
}
} else {
return endDate = String(Number(startDate.slice(0, 4)) + 10) + startDate.slice(4, 11)
}
}
/**
* @Author: LiuXiaoFeng
* @Description: 年满26周岁至45周岁的公民申领的居民身份证有效期为20年
* @Date: 2023/7/4
**/
else if (startage >= 26 && startage <= 45) {
let date2_29 = startDate.slice(5, 11)
if(date2_29 == '02-29') {
let thisyear = Number(startDate.slice(0, 4)) + 20
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
return endDate = thisyear + '-02-29'
} else {
return endDate = thisyear + '-02-28'
}
} else {
return endDate = String(Number(startDate.slice(0, 4)) + 20) + startDate.slice(4, 11)
}
}
/**
* @Author: LiuXiaoFeng
* @Description: 年满46周岁的公民申领居民身份证有效期为长期
* @Date: 2023/7/4
**/
else if (startage > 65) {
return endDate
}
},
//计算户口本截止日期
getEndDate2: function(birthday, startDate) {
let endDate = ''
let date2_29 = startDate.slice(5, 11)
if(date2_29 == '02-29'){
let thisyear = Number(startDate.slice(0, 4)) + 16
if (thisyear % 4 == 0 && thisyear % 100 != 0 || thisyear % 400 == 0){
return endDate = thisyear + '-02-29'
} else {
return endDate = thisyear + '-02-28'
}
}else{
return endDate = String(Number(startDate.slice(0, 4)) + 16) + startDate.slice(4, 11)
}
}
}

View File

@@ -965,10 +965,10 @@ export default {
id: 2,
text: '户口本'
},
// {
// id: 3,
// text: '出生证'
// },
{
id: 3,
text: '出生证'
},
{
id: 4,
text: '外国人护照'
@@ -1059,36 +1059,6 @@ export default {
text: '户口本'
}
],
// 新市民身份
isNewPeopleFlag: [
{
id: 1,
text: '是'
},
{
id: 0,
text: '否'
}
],
// 新市民类型 创业、就业、子女上学、投奔子女
npType: [
{
id: 1,
text: '创业'
},
{
id: 2,
text: '就业'
},
{
id: 3,
text: '子女上学'
},
{
id: 4,
text: '投奔子女'
}
],
//出生证明
birthType: [
{
@@ -3757,36 +3727,36 @@ export default {
label: "元"
},
{
code: "AppntModerateOrMinorDiseaseExemptionPremiumC",
label: "元"
code: "AppntModerateOrMinorDiseaseExemptionPremiumC",
label: "元"
},
{
code: "AppntDeathOrTotalDiseaseExemptionPremiumC",
label: "元"
code: "AppntDeathOrTotalDiseaseExemptionPremiumC",
label: "元"
},
{
code: "InsuredCriticalDiseaseExemptionPremiumC",
label: "元"
code: "InsuredCriticalDiseaseExemptionPremiumC",
label: "元"
},
{
code: "InsuredModerateOrMinorDiseaseExemptionPremiumC",
label: "元"
code: "InsuredModerateOrMinorDiseaseExemptionPremiumC",
label: "元"
},
{
code: "InsuredDeathOrTotalDiseaseExemptionPremiumC",
label: "元"
code: "InsuredDeathOrTotalDiseaseExemptionPremiumC",
label: "元"
},
{
code: "transport_G",
label: "元"
code: "transport_G",
label: "元"
},
{
code: "transport_H",
label: "元"
code: "transport_H",
label: "元"
},
{
code: "transport_J",
label: "元"
code: "transport_J",
label: "元"
},
{
code: "firstMajorDiseaseInsurance",
@@ -3808,14 +3778,6 @@ export default {
code: "GFRS_M0073__cashValue",
label: "元"
},
{
code: "specMajorDiseaseInsurance",
label: "元"
},
{
code: "expireSurvivalInsurance",
label: "元"
},
{
code: "currentBonus_L",
label: "元"
@@ -3831,62 +3793,6 @@ export default {
{
code: "riskAC_M",
label: "元"
},
{
code: "CardiovascularCerebrovascularDiseasesInsurance",
label: "元"
},
{
code: "childrenSpecificDiseaseInsurance",
label: "元"
},
{
code: "maleSpecificDiseaseInsurance",
label: "元"
},
{
code: "femaleSpecificDiseaseInsurance",
label: "元"
},
{
code: "supplementarySpecificDiseaseInsurance",
label: "元"
},
{
code: "deductible",
label: "元"
},
{
code: "deductible",
label: "免赔额"
},
{
code: "accidentalDeductible",
label: "元"
},
{
code: "accidentalLimit",
label: "%"
},
{
code: "policyFee",
label: "元"
},
{
code: "expireSurvivalInsurance_L",
label: "元"
},
{
code: "expireSurvivalInsurance_M",
label: "元"
},
{
code: "riskCost_L",
label: "元"
},
{
code: "riskCost_M",
label: "元"
}
],
// 卡单与短期险重新投保选择职业类别时,两个模块职业类型数据的排序不同,创建这个数据字典,用于在选择职业类别时,作为一个参数传入组件,

View File

@@ -5,14 +5,12 @@ import CacheUtils from '@/assets/js/utils/cacheUtils'
// import 'nprogress/nprogress.css' // Progress 进度条样式
export function permission() {
router.beforeEach((to, from, next) => {
// NProgress.start()
//修改title
const title = to.meta && to.meta.title
if (title) {
document.title = title
}
if(from.path == '/sale/signatureConfirmation' && to.path == '/sale/attachmentManagement'){
window.location.href = window.location.origin + '#' + from.path + '?orderNo=' + from.query.orderNo
}
//判断是否登录
let token = CacheUtils.getLocItem('token')
if (!token) {

File diff suppressed because it is too large Load Diff

View File

@@ -28,11 +28,6 @@ export default new Vuex.Store({
secondManageCode: '', //内勤所需参数
orderDetail: {},//无优卡分享微信端订单信息
answerType: false,//风险测评tab是否显示
YBidNo: '', //银保代理人电子化合同签署证件号码
YBname: '', //银保代理人电子化合同签署姓名
YBuuid: '', //银保代理人电子化合同签署代理人uuid
uploadImgType: '',
uploadImgOrderNo: '',
},
mutations: {
setOrderDetail (state, data) {
@@ -80,23 +75,8 @@ export default new Vuex.Store({
state.pcList = val
},
//更新 风险测评是否显示状态
updateUploadImgType (state, val) {
state.uploadImgType = val
},
updateUploadImgOrderNo (state, val) {
state.uploadImgOrderNo = val
},
//更新 银保代理人电子化合同签署证件号码
updateYBidNo (state, val) {
state.YBidNo = val
},
//更新 银保代理人电子化合同签署姓名
updateYBname (state, val) {
state.YBname = val
},
//更新 银保代理人电子化合同签署代理人uuid
updateYBuuid (state, val) {
state.YBuuid = val
updateAnswerType (state, val) {
state.answerType = val
},
},
getters: {
@@ -124,21 +104,6 @@ export default new Vuex.Store({
getAnswerType (state) {
return state.answerType
},
getUploadImgType (state) {
return state.uploadImgType
},
getUploadImgOrderNo (state) {
return state.uploadImgOrderNo
},
getYBidNo (state) {
return state.YBidNo
},
getYBname (state) {
return state.YBname
},
getYBuuid (state) {
return state.YBuuid
},
}
})

View File

@@ -329,7 +329,6 @@ export default {
let orderStatus = order.orderStatus
console.log(order.orderStatus,'fdkfa')
let cardOrderNo = order.orderNo
localStorage.setItem('orderNo', JSON.stringify(cardOrderNo))
let url
if(orderStatus == '59'){
url =`/cardList/GroupAppntInfo?cardOrderNo=${cardOrderNo}&editOrder=1`

View File

@@ -54,7 +54,7 @@
</template>
<script>
import {Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon, Collapse, CollapseItem, Dialog} from 'vant'
import { Field, GoodsAction, GoodsActionIcon, GoodsActionButton, Icon ,Collapse, CollapseItem} from 'vant'
import {cardOrderDetail } from '@/api/ebiz/cardList/cardList.js'
import getAreaName from '@/assets/js/utils/getAreaNameForSale'
import afterDate from '@/assets/js/utils/getAfterDate.js'
@@ -79,8 +79,7 @@ export default {
riskDTO: {},
productDate: '',
orderInfoDTO:{},
isGroupCard:'',
mainRiskCode: ''
isGroupCard:''
// isLessEighteen: true // 被保人手机号和邮箱默认展示
}
},
@@ -102,11 +101,6 @@ export default {
this.orderInfoDTO = res.orderDTO.orderInfoDTO
this.insuredInfo = res.orderDTO.insuredDTOs
this.insuredInfo.forEach(item => {
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
this.mainRiskCode = ii.mainRiskCode
}
})
item.homeName = getAreaName([{ code: item.homeProvince }, { code: item.homeCity }, { code: item.homeArea }])
})
// this.riskDTO = res.orderDTO.insuredDTOs[0].riskDTOLst[0]
@@ -138,37 +132,15 @@ export default {
},
methods: {
nextStep() {
if(this.mainRiskCode == 'GFRS_M0058'){
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
},
routerInfo: {
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
}
})
})
.catch(() => {
})
}else{
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
},
routerInfo: {
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
}
})
}
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
},
routerInfo: {
path: `/cardList/SignatureConfirmation?isGroupCard=`+this.isGroupCard
}
})
}
}
}

View File

@@ -290,7 +290,6 @@ export default {
accBankProvince: '',
accBankCity: '',
areaStr: '',
mainRiskCode: '',
isGroupCard:'' //1 团险标识
}
},
@@ -311,13 +310,17 @@ export default {
this.bankListName = orderDetail.orderAccountDTO.bankName
this.orderStatus = orderDetail.orderInfoDTO.orderStatus
localStorage.orderNo = orderDetail.orderInfoDTO.orderNo
orderDetail.insuredDTOs.forEach(item=>{
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
this.mainRiskCode = ii.mainRiskCode
}
})
})
// this.radio = '3'
// this.isLoading = true
// this.$toast.loading({
// duration: 0, // 持续展示 toast
// forbidClick: true, // 禁用背景点击
// loadingType: 'spinner',
// message: '加载中……'
// })
// setTimeout(() => {
// this.pay()
// }, 500)
} else {
document.title = '支付分享'
// 再次支付 调详情 获取信息
@@ -510,13 +513,6 @@ export default {
getOrderDetail({ orderNo: window.localStorage.getItem('orderNo') }).then(res => {
if (res.result == '0') {
this.insuredDTOs = res.orderDTO.insuredDTOs
res.orderDTO.insuredDTOs.forEach(item=>{
item.riskDTOLst.forEach(ii=>{
if(ii.isMainRisk == '0'){
this.mainRiskCode = ii.mainRiskCode
}
})
})
this.orderStatus = res.orderDTO.orderInfoDTO.orderStatus
try {
if (this.noEdit) {
@@ -746,69 +742,58 @@ export default {
支付之前要先保存银行账户信息
*/
let res = await saveOrUpdateAccount(data)
// .then(res => {
console.log('res', res)
this.$toast.clear()
if (res.result == '0') {
if(this.mainRiskCode == 'GFRS_M0058'){
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
})
.catch(() => {
})
}else{
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
}
} else {
this.$toast(res.resultMessage)
this.isLoading = false
}
} else {
if(this.mainRiskCode == 'GFRS_M0058'){
Dialog.alert({
title: '特别提醒',
messageAlign: 'left',
confirmButtonText: '确认',
message: `2023年9月1日起生效的惠桂保保单不能参保的5类既往症中增加了“神经性耳聋”敬请注意`,
})
.then(() => {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
})
.catch(() => {
})
}else{
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
this.acceptInsurance()
}
// if (!flag) {
// let rs = await this.underWrite()
// if (rs.result != '0') {
// this.$toast.clear()
// return this.$toast(rs.resultMessage)
// }
// if (rs.uwResult != '02') {
// return this.$toast(rs.message)
// }
// }
this.acceptInsurance()
} else {
this.$toast(res.resultMessage)
this.isLoading = false
}
// })
} else {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
// if (!flag) {
// let rs = await this.underWrite()
// if (rs.result != '0') {
// this.$toast.clear()
// return this.$toast(rs.resultMessage)
// }
// if (rs.uwResult != '02') {
// return this.$toast(rs.message)
// }
// }
this.acceptInsurance()
}
},
// 选择微信支付校验身份证类型

View File

@@ -127,8 +127,7 @@ export default {
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 + ''
productDateTime = afterDate.getAfterDateTime(insuYear.cvaliDate,1)
productDateTime = productDate.getFullYear() + '' + insuYearM + '' + insuYearD + ''
this.productDate = currentData + '0时至' + productDateTime + '24时止'
this.orderAmount = this.orderDTO.orderInfoDTO.orderAmount
},

File diff suppressed because it is too large Load Diff

View File

@@ -3,24 +3,24 @@
<!-- 基本信息 -->
<p class="title pl10 pv12 mt10">基本信息</p>
<van-field
v-model="userInfo.customerName"
required
clearable
label="姓名"
name="姓名"
placeholder="请输入"
v-validate="'required|name'"
v-model="userInfo.customerName"
required
clearable
label="姓名"
name="姓名"
placeholder="请输入"
v-validate="'required|name'"
/>
<van-field
v-model="userInfo.customerPhone"
required
clearable
label="移动电话"
name="移动电话"
placeholder="请输入"
maxlength="11"
type="tel"
v-validate="'required|mobile'"
v-model="userInfo.customerPhone"
required
clearable
label="移动电话"
name="移动电话"
placeholder="请输入"
maxlength="11"
type="tel"
v-validate="'required|mobile'"
/>
<form-block :userInfo="userInfo" ref="formBlock"></form-block>
<van-button type="danger" class="bottom-btn" @click="save" v-no-more-click="1000">保存</van-button>
@@ -28,307 +28,303 @@
</template>
<script>
import { Field, CellGroup, Cell, RadioGroup, Radio, } from 'vant'
import { updateCustomerInfo } from '@/api/ebiz/customer/customer'
import formBlock from '@/components/ebiz/customer/formBlock'
import { Field, CellGroup, Cell } from 'vant'
import { updateCustomerInfo } from '@/api/ebiz/customer/customer'
import formBlock from '@/components/ebiz/customer/formBlock'
export default {
name: 'addCustomer',
components: {
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[formBlock.name]: formBlock
},
data() {
return {
userInfo: {
customerName: '', //姓名
customerPhone: '', // 手机号
customerSex: '0', //性别
nativeplace: '1', //国家地区
province: '', //户籍省
city: '', //户籍市
birthday: '', //出生日期
idType: '1', //证件类型
customerIdNumber: '', //证件号码
certificateValidate: '', //证件起始日期
certiexpiredate: '', //证件到期时间
effectiveDateType: false, //是否长期
email: '', //电子邮箱
stature: '', //身高
weight: '', //体重,
customerType: '0', //客户类别
customerSource: '-1', //客户来源
degree: '', //文化程度
socialSecurity: '0', //有无社保
taxIdentity: '1', //税收居民身份
occupationCode: '', //职业类别
occupationName: '',
lifeGrade: '', //寿险等级
healthGrade: '', //健康等级
averageYearlyIncome: '', //平均年收入
liabilitiesMoney: '', //负债金额
workUnits: '', //工作单位
workCondition: '', //在职情况
companyProvince: '', //单位省
companyCity: '', //单位市
companyArea: '', //单位区
companyAddress: '', //单位详细地址
companyZip: '', //单位邮编
companyPhone: '', //单位电话
marriage: '', //婚姻状况
familyAnnualIncome: '', //家庭年收入
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '', //家庭区
homeAddress: '', //家庭详细地址
homeZip: '', //家庭邮编
homePhone: '', //家庭电话
isNewPeopleFlag: '', //新市民身份
npType: '', //新市民类型
}
export default {
name: 'addCustomer',
components: {
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[formBlock.name]: formBlock
},
data() {
return {
userInfo: {
customerName: '', //姓名
customerPhone: '', // 手机号
customerSex: '0', //性别
nativeplace: '1', //国家地区
province: '', //户籍省
city: '', //户籍市
birthday: '', //出生日期
idType: '1', //证件类型
customerIdNumber: '', //证件号码
certificateValidate: '', //证件起始日期
certiexpiredate: '', //证件到期时间
effectiveDateType: false, //是否长期
email: '', //电子邮箱
stature: '', //身高
weight: '', //体重,
customerType: '0', //客户类别
customerSource: '-1', //客户来源
degree: '', //文化程度
socialSecurity: '0', //有无社保
taxIdentity: '1', //税收居民身份
occupationCode: '', //职业类别
occupationName: '',
lifeGrade: '', //寿险等级
healthGrade: '', //健康等级
averageYearlyIncome: '', //平均年收入
liabilitiesMoney: '', //负债金额
workUnits: '', //工作单位
workCondition: '', //在职情况
companyProvince: '', //单位省
companyCity: '', //单位市
companyArea: '', //单位区
companyAddress: '', //单位详细地址
companyZip: '', //单位邮编
companyPhone: '', //单位电话
marriage: '', //婚姻状况
familyAnnualIncome: '', //家庭年收入
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '', //家庭区
homeAddress: '', //家庭详细地址
homeZip: '', //家庭邮编
homePhone: '' //家庭电话
}
},
mounted() {
//this.filterBtn() //按钮初始化
//window.appCallBack = this.appCallBack //app回调
},
methods: {
// filterBtn() {
// EWebBridge.webCallAppInJs('webview_right_button', {
// btns: [
// {
// // img:"@/assets/images/u12045.png",
// title: '保存'
// }
// ]
// })
// },
// appCallBack(data) {
// if (data.trigger == 'right_button_click') {
// if (data.index == 0 && this.loading) {
// this.$validator.validate().then(valid => {
// if (true === valid) {
// this.updateCustomerInfo()
// } else {
// this.$toast(this.$validator.errors.all()[0])
// }
// })
// }
// }
// },
save() {
this.$validator.validate().then(valid => {
if (true === valid) {
let vf1 = this.$refs.formBlock.validateForm()
Promise.all([vf1]).then(result => {
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 if (this.userInfo.birthday && this.userInfo.marriage) {
}
},
mounted() {
//this.filterBtn() //按钮初始化
//window.appCallBack = this.appCallBack //app回调
},
methods: {
// filterBtn() {
// EWebBridge.webCallAppInJs('webview_right_button', {
// btns: [
// {
// // img:"@/assets/images/u12045.png",
// title: '保存'
// }
// ]
// })
// },
// appCallBack(data) {
// if (data.trigger == 'right_button_click') {
// if (data.index == 0 && this.loading) {
// this.$validator.validate().then(valid => {
// if (true === valid) {
// this.updateCustomerInfo()
// } else {
// this.$toast(this.$validator.errors.all()[0])
// }
// })
// }
// }
// },
save() {
this.$validator.validate().then(valid => {
if (true === valid) {
let vf1 = this.$refs.formBlock.validateForm()
Promise.all([vf1]).then(result => {
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 if (this.userInfo.birthday && this.userInfo.marriage) {
this.$refs.formBlock.validateMarr()
} else {
if (this.userInfo.birthday && this.userInfo.marriage) {
this.$refs.formBlock.validateMarr()
} else {
if (this.userInfo.birthday && this.userInfo.marriage) {
this.$refs.formBlock.validateMarr()
} else {
this.updateCustomerInfo()
}
this.updateCustomerInfo()
}
}
})
} else {
this.$toast(this.$validator.errors.all()[0])
}
})
},
updateCustomerInfo() {
let $this = this
let data = {
agentCustomerInfoDTO: {
customerNumber: '',
customerName: $this.userInfo.customerName,
customerPhone: $this.userInfo.customerPhone,
customerSex: $this.userInfo.customerSex,
country: $this.userInfo.nativeplace,
//rgtaddress: $this.userInfo.census,
birthday: $this.userInfo.birthday,
customerIdType: $this.userInfo.idType,
customerIdNumber: $this.userInfo.customerIdNumber,
idEffectStartDate: $this.userInfo.certificateValidate,
idEffectEndDate: $this.userInfo.certiexpiredate,
email: $this.userInfo.email,
height: $this.userInfo.stature,
weight: $this.userInfo.weight,
customerType: $this.userInfo.customerType,
customerSource: $this.userInfo.customerSource,
educationLevel: $this.userInfo.degree,
socialSecurity: $this.userInfo.socialSecurity,
residentStatus: $this.userInfo.taxIdentity,
occupationCode: $this.userInfo.occupationCode,
occupationName: $this.userInfo.occupationName,
lifeGrade: $this.userInfo.lifeGrade,
healthGrade: $this.userInfo.healthGrade,
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
workUnits: $this.userInfo.workUnits,
jobStatus: $this.userInfo.workCondition,
companyProvince: $this.userInfo.companyProvince,
companyCity: $this.userInfo.companyCity,
companyArea: $this.userInfo.companyArea,
companyAddress: $this.userInfo.companyAddress,
companyZip: $this.userInfo.companyZip,
companyPhone: $this.userInfo.companyPhone,
marryStatus: $this.userInfo.marriage,
homeProvince: $this.userInfo.homeProvince,
homeCity: $this.userInfo.homeCity,
homeArea: $this.userInfo.homeArea,
homeAddress: $this.userInfo.homeAddress,
homeZip: $this.userInfo.homeZip,
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
province: $this.userInfo.province,
city: $this.userInfo.city,
homePhone: $this.userInfo.homePhone
}
}
switch (data.agentCustomerInfoDTO.companyArea) {
case '500129':
data.agentCustomerInfoDTO.companyArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.companyArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.companyArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.companyArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.companyArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.companyArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.companyArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.companyArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.companyArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.companyArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.companyArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.companyArea = '500243'
break
}
switch (data.agentCustomerInfoDTO.homeArea) {
case '500129':
data.agentCustomerInfoDTO.homeArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.homeArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.homeArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.homeArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.homeArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.homeArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.homeArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.homeArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.homeArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.homeArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.homeArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.homeArea = '500243'
break
}
updateCustomerInfo(data)
.then(res => {
if (res.result == 0) {
// EWebBridge.webCallAppInJs('goBack', { refresh: '1' })
this.$jump({
flag: 'goBack',
extra: {
refresh: '1'
},
routerInfo: {
path: '/customer/customerList'
}
})
} else {
this.$toast(this.$validator.errors.all()[0])
$this.$toast(res.resultMessage)
}
})
},
updateCustomerInfo() {
let $this = this
let data = {
agentCustomerInfoDTO: {
customerNumber: '',
customerName: $this.userInfo.customerName,
customerPhone: $this.userInfo.customerPhone,
customerSex: $this.userInfo.customerSex,
country: $this.userInfo.nativeplace,
//rgtaddress: $this.userInfo.census,
birthday: $this.userInfo.birthday,
customerIdType: $this.userInfo.idType,
customerIdNumber: $this.userInfo.customerIdNumber,
idEffectStartDate: $this.userInfo.certificateValidate,
idEffectEndDate: $this.userInfo.certiexpiredate,
email: $this.userInfo.email,
height: $this.userInfo.stature,
weight: $this.userInfo.weight,
customerType: $this.userInfo.customerType,
customerSource: $this.userInfo.customerSource,
educationLevel: $this.userInfo.degree,
socialSecurity: $this.userInfo.socialSecurity,
residentStatus: $this.userInfo.taxIdentity,
occupationCode: $this.userInfo.occupationCode,
occupationName: $this.userInfo.occupationName,
lifeGrade: $this.userInfo.lifeGrade,
healthGrade: $this.userInfo.healthGrade,
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
workUnits: $this.userInfo.workUnits,
jobStatus: $this.userInfo.workCondition,
companyProvince: $this.userInfo.companyProvince,
companyCity: $this.userInfo.companyCity,
companyArea: $this.userInfo.companyArea,
companyAddress: $this.userInfo.companyAddress,
companyZip: $this.userInfo.companyZip,
companyPhone: $this.userInfo.companyPhone,
marryStatus: $this.userInfo.marriage,
homeProvince: $this.userInfo.homeProvince,
homeCity: $this.userInfo.homeCity,
homeArea: $this.userInfo.homeArea,
homeAddress: $this.userInfo.homeAddress,
homeZip: $this.userInfo.homeZip,
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
province: $this.userInfo.province,
city: $this.userInfo.city,
homePhone: $this.userInfo.homePhone,
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
npType: $this.userInfo.npType,
}
}
switch (data.agentCustomerInfoDTO.companyArea) {
case '500129':
data.agentCustomerInfoDTO.companyArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.companyArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.companyArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.companyArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.companyArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.companyArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.companyArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.companyArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.companyArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.companyArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.companyArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.companyArea = '500243'
break
}
switch (data.agentCustomerInfoDTO.homeArea) {
case '500129':
data.agentCustomerInfoDTO.homeArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.homeArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.homeArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.homeArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.homeArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.homeArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.homeArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.homeArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.homeArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.homeArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.homeArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.homeArea = '500243'
break
}
updateCustomerInfo(data)
.then(res => {
if (res.result == 0) {
// EWebBridge.webCallAppInJs('goBack', { refresh: '1' })
this.$jump({
flag: 'goBack',
extra: {
refresh: '1'
},
routerInfo: {
path: '/customer/customerList'
}
})
} else {
$this.$toast(res.resultMessage)
}
})
.catch(err => {})
}
.catch(err => {})
}
}
}
</script>
<style lang="scss" scoped>
.van-index-anchor {
background: #fff;
.van-index-anchor {
background: #fff;
}
.container {
padding-bottom: 45px;
.header {
display: flex;
justify-content: flex-end;
padding: 10px;
}
.container {
padding-bottom: 45px;
.header {
.title {
font-size: 15px;
font-weight: bold;
background: #fff;
border-bottom: 1px solid #ebedf0;
}
.sex-radio {
.radio-area {
display: -webkit-flex;
display: flex;
justify-content: flex-end;
padding: 10px;
}
.title {
font-size: 15px;
font-weight: bold;
background: #fff;
border-bottom: 1px solid #ebedf0;
}
.sex-radio {
.radio-area {
display: -webkit-flex;
display: flex;
justify-content: flex-start;
.item {
width: 70px;
height: 30px;
line-height: 30px;
border: 1px solid #ea5b50;
border-radius: 20px;
text-align: center;
color: #ea5b50;
margin-right: 10px;
}
.active {
background: #ea5b50;
color: #fff;
}
justify-content: flex-start;
.item {
width: 70px;
height: 30px;
line-height: 30px;
border: 1px solid #ea5b50;
border-radius: 20px;
text-align: center;
color: #ea5b50;
margin-right: 10px;
}
.active {
background: #ea5b50;
color: #fff;
}
}
}
}
</style>

View File

@@ -3,24 +3,24 @@
<p class="title pl10 pv12 mt10">基本信息</p>
<div v-if="source == 'app'">
<van-field
v-model="userInfo.customerName"
required
clearable
label="姓名"
name="姓名"
placeholder="请输入"
v-validate="'required|name'"
v-model="userInfo.customerName"
required
clearable
label="姓名"
name="姓名"
placeholder="请输入"
v-validate="'required|name'"
/>
<van-field
v-model="userInfo.customerPhone"
required
clearable
label="移动电话"
name="移动电话"
placeholder="请输入"
maxlength="11"
type="tel"
v-validate="'required|mobile'"
v-model="userInfo.customerPhone"
required
clearable
label="移动电话"
name="移动电话"
placeholder="请输入"
maxlength="11"
type="tel"
v-validate="'required|mobile'"
/>
</div>
<div v-else>
@@ -34,462 +34,456 @@
</template>
<script>
import { Field, CellGroup, Cell } from 'vant'
import { getAgentCustomerInfo, updateCustomerInfo } from '@/api/ebiz/customer/customer'
import formBlock from '@/components/ebiz/customer/formBlock'
import { constants } from 'crypto'
import { Field, CellGroup, Cell } from 'vant'
import { getAgentCustomerInfo, updateCustomerInfo } from '@/api/ebiz/customer/customer'
import formBlock from '@/components/ebiz/customer/formBlock'
import { constants } from 'crypto'
export default {
name: 'editCustomer',
components: {
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[formBlock.name]: formBlock
},
data() {
return {
source: this.$route.query.from,
appName: this.$route.query.name,
appPhone: this.$route.query.tel,
customerNumber: localStorage.getItem('customerNumber'),
userInfo: {
customerName: '', //姓名
customerPhone: '', // 手机号
customerSex: '0', //性别
nativeplace: '1', //国家地区
province: '', //户籍省
city: '', //户籍市
birthday: '', //出生日期
idType: '1', //证件类型
customerIdNumber: '', //证件号码
certificateValidate: '', //证件起始日期
certiexpiredate: '', //证件到期时间
effectiveDateType: false, //是否长期
email: '', //电子邮箱
stature: '', //身高
weight: '', //体重,
customerType: '0', //客户类别
customerSource: '-1', //客户来源
degree: '', //文化程度
socialSecurity: '0', //有无社保
taxIdentity: '1', //税收居民身份
occupationCode: '', //职业类别
occupationName: '',
lifeGrade: '', //寿险等级
healthGrade: '', //健康等级
averageYearlyIncome: '', //平均年收入
liabilitiesMoney: '', //负债金额
workUnits: '', //工作单位
workCondition: '', //在职情况
companyProvince: '', //单位省
companyCity: '', //单位市
companyArea: '', //单位区
companyAddress: '', //单位详细地址
companyZip: '', //单位邮编
companyPhone: '', //单位电话
marriage: '', //婚姻状况
familyAnnualIncome: '', //家庭年收入
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '', //家庭区
homeAddress: '', //家庭详细地址
homeZip: '', //家庭邮编
homePhone: '', //家庭电话
isNewPeopleFlag: '', //新市民身份
npType: '', //新市民类型
}
export default {
name: 'editCustomer',
components: {
[Field.name]: Field,
[CellGroup.name]: CellGroup,
[Cell.name]: Cell,
[formBlock.name]: formBlock
},
data() {
return {
source: this.$route.query.from,
appName: this.$route.query.name,
appPhone: this.$route.query.tel,
customerNumber: localStorage.getItem('customerNumber'),
userInfo: {
customerName: '', //姓名
customerPhone: '', // 手机号
customerSex: '0', //性别
nativeplace: '1', //国家地区
province: '', //户籍省
city: '', //户籍市
birthday: '', //出生日期
idType: '1', //证件类型
customerIdNumber: '', //证件号码
certificateValidate: '', //证件起始日期
certiexpiredate: '', //证件到期时间
effectiveDateType: false, //是否长期
email: '', //电子邮箱
stature: '', //身高
weight: '', //体重,
customerType: '0', //客户类别
customerSource: '-1', //客户来源
degree: '', //文化程度
socialSecurity: '0', //有无社保
taxIdentity: '1', //税收居民身份
occupationCode: '', //职业类别
occupationName: '',
lifeGrade: '', //寿险等级
healthGrade: '', //健康等级
averageYearlyIncome: '', //平均年收入
liabilitiesMoney: '', //负债金额
workUnits: '', //工作单位
workCondition: '', //在职情况
companyProvince: '', //单位省
companyCity: '', //单位市
companyArea: '', //单位区
companyAddress: '', //单位详细地址
companyZip: '', //单位邮编
companyPhone: '', //单位电话
marriage: '', //婚姻状况
familyAnnualIncome: '', //家庭年收入
homeProvince: '', //家庭省
homeCity: '', //家庭市
homeArea: '', //家庭区
homeAddress: '', //家庭详细地址
homeZip: '', //家庭邮编
homePhone: '' //家庭电话
}
},
mounted() {
//this.filterBtn() //按钮初始化
//window.appCallBack = this.appCallBack //app回调
//数据回显
if (this.source == 'app') {
this.userInfo.customerName = this.appName
this.userInfo.customerPhone = this.appPhone
this.customerNumber = ''
} else {
this.getCustomerInfo() //获取客户信息
}
},
mounted() {
//this.filterBtn() //按钮初始化
//window.appCallBack = this.appCallBack //app回调
//数据回显
if (this.source == 'app') {
this.userInfo.customerName = this.appName
this.userInfo.customerPhone = this.appPhone
this.customerNumber = ''
} else {
this.getCustomerInfo() //获取客户信息
}
},
methods: {
// filterBtn() {
// EWebBridge.webCallAppInJs('webview_right_button', {
// btns: [
// {
// img:"@/assets/images/u12045.png",
// }
// ]
// })
// },
// appCallBack(data) {
// if (data.trigger == 'right_button_click') {
// if (data.index == 0 && this.loading) {
// this.updateCustomerInfo() //保存信息
// }
// }
// },
getCustomerInfo() {
let $this = this
let data = {
customerNumber: $this.customerNumber
}
},
methods: {
// filterBtn() {
// EWebBridge.webCallAppInJs('webview_right_button', {
// btns: [
// {
// img:"@/assets/images/u12045.png",
// }
// ]
// })
// },
// appCallBack(data) {
// if (data.trigger == 'right_button_click') {
// if (data.index == 0 && this.loading) {
// this.updateCustomerInfo() //保存信息
// }
// }
// },
getCustomerInfo() {
let $this = this
let data = {
customerNumber: $this.customerNumber
}
getAgentCustomerInfo(data)
.then(res => {
if (res.result == 0) {
let result = res.content
$this.userInfo.nativeplace = result.country
$this.userInfo.idType = result.customerIdType
$this.userInfo.degree = result.educationLevel
$this.userInfo.taxIdentity = result.residentStatus
$this.userInfo.marriage = result.marryStatus
$this.userInfo.socialSecurity = result.socialSecurity
$this.userInfo.customerName = result.customerName
$this.userInfo.customerPhone = result.customerPhone
$this.userInfo.customerSex = result.customerSex
$this.userInfo.birthday = result.birthday
$this.userInfo.customerIdNumber = result.customerIdNumber
$this.userInfo.certificateValidate = result.idEffectStartDate
$this.userInfo.certiexpiredate = result.idEffectEndDate
$this.userInfo.email = result.email
$this.userInfo.stature = result.height
$this.userInfo.weight = result.weight
$this.userInfo.customerType = result.customerType
$this.userInfo.customerSource = result.customerSource
$this.userInfo.occupationName = result.occupationName
$this.userInfo.occupationCode = result.occupationCode
$this.userInfo.lifeGrade = result.lifeGrade
$this.userInfo.healthGrade = result.healthGrade
$this.userInfo.averageYearlyIncome = result.averageYearlyIncome
$this.userInfo.workUnits = result.workUnits
$this.userInfo.province = result.province
$this.userInfo.city = result.city
$this.userInfo.homeAddress = result.homeAddress
$this.userInfo.homeZip = result.homeZip
$this.userInfo.homePhone = result.homePhone
$this.userInfo.familyAnnualIncome = result.familyAnnualIncome
$this.userInfo.workCondition = result.jobStatus
$this.userInfo.companyAddress = result.companyAddress
$this.userInfo.companyZip = result.companyZip
$this.userInfo.companyPhone = result.companyPhone
$this.userInfo.liabilitiesMoney = result.liabilitiesMoney
$this.userInfo.companyProvince = result.companyProvince
$this.userInfo.companyCity = result.companyCity
$this.userInfo.companyArea = result.companyArea
$this.userInfo.homeProvince = result.homeProvince
$this.userInfo.homeCity = result.homeCity
$this.userInfo.homeArea = result.homeArea
$this.userInfo.isNewPeopleFlag = result.isNewPeopleFlag
$this.userInfo.npType = result.npType
sessionStorage.setItem('birthday', result.birthday)
sessionStorage.setItem('idType', result.customerIdType)
getAgentCustomerInfo(data)
.then(res => {
if (res.result == 0) {
let result = res.content
$this.userInfo.nativeplace = result.country
$this.userInfo.idType = result.customerIdType
$this.userInfo.degree = result.educationLevel
$this.userInfo.taxIdentity = result.residentStatus
$this.userInfo.marriage = result.marryStatus
$this.userInfo.socialSecurity = result.socialSecurity
$this.userInfo.customerName = result.customerName
$this.userInfo.customerPhone = result.customerPhone
$this.userInfo.customerSex = result.customerSex
$this.userInfo.birthday = result.birthday
$this.userInfo.customerIdNumber = result.customerIdNumber
$this.userInfo.certificateValidate = result.idEffectStartDate
$this.userInfo.certiexpiredate = result.idEffectEndDate
$this.userInfo.email = result.email
$this.userInfo.stature = result.height
$this.userInfo.weight = result.weight
$this.userInfo.customerType = result.customerType
$this.userInfo.customerSource = result.customerSource
$this.userInfo.occupationName = result.occupationName
$this.userInfo.occupationCode = result.occupationCode
$this.userInfo.lifeGrade = result.lifeGrade
$this.userInfo.healthGrade = result.healthGrade
$this.userInfo.averageYearlyIncome = result.averageYearlyIncome
$this.userInfo.workUnits = result.workUnits
$this.userInfo.province = result.province
$this.userInfo.city = result.city
$this.userInfo.homeAddress = result.homeAddress
$this.userInfo.homeZip = result.homeZip
$this.userInfo.homePhone = result.homePhone
$this.userInfo.familyAnnualIncome = result.familyAnnualIncome
$this.userInfo.workCondition = result.jobStatus
$this.userInfo.companyAddress = result.companyAddress
$this.userInfo.companyZip = result.companyZip
$this.userInfo.companyPhone = result.companyPhone
$this.userInfo.liabilitiesMoney = result.liabilitiesMoney
$this.userInfo.companyProvince = result.companyProvince
$this.userInfo.companyCity = result.companyCity
$this.userInfo.companyArea = result.companyArea
$this.userInfo.homeProvince = result.homeProvince
$this.userInfo.homeCity = result.homeCity
$this.userInfo.homeArea = result.homeArea
sessionStorage.setItem('birthday', result.birthday)
sessionStorage.setItem('idType', result.customerIdType)
switch ($this.userInfo.companyArea) {
case '500229':
$this.userInfo.companyArea = '500129'
break
case '500230':
$this.userInfo.companyArea = '500130'
break
case '500231':
$this.userInfo.companyArea = '500131'
break
case '500233':
$this.userInfo.companyArea = '500133'
break
case '500235':
$this.userInfo.companyArea = '500135'
break
case '500236':
$this.userInfo.companyArea = '500136'
break
case '500237':
$this.userInfo.companyArea = '500137'
break
case '500238':
$this.userInfo.companyArea = '500138'
break
case '500240':
$this.userInfo.companyArea = '500140'
break
case '500241':
$this.userInfo.companyArea = '500141'
break
case '500242':
$this.userInfo.companyArea = '500142'
break
case '500243':
$this.userInfo.companyArea = '500143'
break
}
switch ($this.userInfo.homeArea) {
case '500229':
$this.userInfo.homeArea = '500129'
break
case '500230':
$this.userInfo.homeArea = '500130'
break
case '500231':
$this.userInfo.homeArea = '500131'
break
case '500233':
$this.userInfo.homeArea = '500133'
break
case '500235':
$this.userInfo.homeArea = '500135'
break
case '500236':
$this.userInfo.homeArea = '500136'
break
case '500237':
$this.userInfo.homeArea = '500137'
break
case '500238':
$this.userInfo.homeArea = '500138'
break
case '500240':
$this.userInfo.homeArea = '500140'
break
case '500241':
$this.userInfo.homeArea = '500141'
break
case '500242':
$this.userInfo.homeArea = '500142'
break
case '500243':
$this.userInfo.homeArea = '500143'
break
}
this.$refs.formBlock.isEndFlag()
//查询职业名称
// occupationList.forEach(first => {
// first.subs.forEach(second => {
// second.subs.forEach(third => {
// if (third.code == result.occupationCode) {
// $this.userInfo.occupationName = third.name
// }
// })
// })
// })
}
})
.catch(err => {})
},
save() {
this.$validator.validate().then(valid => {
if (true === valid) {
let vf1 = this.$refs.formBlock.validateForm()
Promise.all([vf1]).then(result => {
if (result.indexOf(false) > -1) {
this.$toast(this.$refs.formBlock.$validator.errors.all()[0])
return
} else if (this.userInfo.customerIdNumber) {
this.$refs.formBlock.validateIdType()
switch ($this.userInfo.companyArea) {
case '500229':
$this.userInfo.companyArea = '500129'
break
case '500230':
$this.userInfo.companyArea = '500130'
break
case '500231':
$this.userInfo.companyArea = '500131'
break
case '500233':
$this.userInfo.companyArea = '500133'
break
case '500235':
$this.userInfo.companyArea = '500135'
break
case '500236':
$this.userInfo.companyArea = '500136'
break
case '500237':
$this.userInfo.companyArea = '500137'
break
case '500238':
$this.userInfo.companyArea = '500138'
break
case '500240':
$this.userInfo.companyArea = '500140'
break
case '500241':
$this.userInfo.companyArea = '500141'
break
case '500242':
$this.userInfo.companyArea = '500142'
break
case '500243':
$this.userInfo.companyArea = '500143'
break
}
switch ($this.userInfo.homeArea) {
case '500229':
$this.userInfo.homeArea = '500129'
break
case '500230':
$this.userInfo.homeArea = '500130'
break
case '500231':
$this.userInfo.homeArea = '500131'
break
case '500233':
$this.userInfo.homeArea = '500133'
break
case '500235':
$this.userInfo.homeArea = '500135'
break
case '500236':
$this.userInfo.homeArea = '500136'
break
case '500237':
$this.userInfo.homeArea = '500137'
break
case '500238':
$this.userInfo.homeArea = '500138'
break
case '500240':
$this.userInfo.homeArea = '500140'
break
case '500241':
$this.userInfo.homeArea = '500141'
break
case '500242':
$this.userInfo.homeArea = '500142'
break
case '500243':
$this.userInfo.homeArea = '500143'
break
}
this.$refs.formBlock.isEndFlag()
//查询职业名称
// occupationList.forEach(first => {
// first.subs.forEach(second => {
// second.subs.forEach(third => {
// if (third.code == result.occupationCode) {
// $this.userInfo.occupationName = third.name
// }
// })
// })
// })
}
})
.catch(err => {})
},
save() {
this.$validator.validate().then(valid => {
if (true === valid) {
let vf1 = this.$refs.formBlock.validateForm()
Promise.all([vf1]).then(result => {
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 {
if (this.userInfo.birthday && this.userInfo.marriage) {
this.$refs.formBlock.validateMarr()
} else {
if (this.userInfo.birthday && this.userInfo.marriage) {
this.$refs.formBlock.validateMarr()
} else {
this.updateCustomerInfo()
}
this.updateCustomerInfo()
}
}
})
} else {
this.$toast(this.$validator.errors.all()[0])
}
})
},
updateCustomerInfo() {
let $this = this
let data = {
agentCustomerInfoDTO: {
customerNumber: $this.customerNumber,
customerName: $this.userInfo.customerName,
customerPhone: $this.userInfo.customerPhone,
customerSex: $this.userInfo.customerSex,
country: $this.userInfo.nativeplace,
//rgtaddress: $this.userInfo.census,
birthday: $this.userInfo.birthday,
customerIdType: $this.userInfo.idType,
customerIdNumber: $this.userInfo.customerIdNumber,
idEffectStartDate: $this.userInfo.certificateValidate,
idEffectEndDate: sessionStorage.getItem('isEnd') || $this.userInfo.certiexpiredate,
email: $this.userInfo.email,
height: $this.userInfo.stature,
weight: $this.userInfo.weight,
customerType: $this.userInfo.customerType,
customerSource: $this.userInfo.customerSource,
educationLevel: $this.userInfo.degree,
socialSecurity: $this.userInfo.socialSecurity,
residentStatus: $this.userInfo.taxIdentity,
occupationCode: $this.userInfo.occupationCode,
occupationName: $this.userInfo.occupationName,
lifeGrade: $this.userInfo.lifeGrade,
healthGrade: $this.userInfo.healthGrade,
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
workUnits: $this.userInfo.workUnits,
jobStatus: $this.userInfo.workCondition,
companyProvince: $this.userInfo.companyProvince,
companyCity: $this.userInfo.companyCity,
companyArea: $this.userInfo.companyArea,
companyAddress: $this.userInfo.companyAddress,
companyZip: $this.userInfo.companyZip,
companyPhone: $this.userInfo.companyPhone,
marryStatus: $this.userInfo.marriage,
homeProvince: $this.userInfo.homeProvince,
homeCity: $this.userInfo.homeCity,
homeArea: $this.userInfo.homeArea,
homeAddress: $this.userInfo.homeAddress,
homeZip: $this.userInfo.homeZip,
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
province: $this.userInfo.province,
city: $this.userInfo.city,
homePhone: $this.userInfo.homePhone
}
}
switch (data.agentCustomerInfoDTO.companyArea) {
case '500129':
data.agentCustomerInfoDTO.companyArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.companyArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.companyArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.companyArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.companyArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.companyArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.companyArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.companyArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.companyArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.companyArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.companyArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.companyArea = '500243'
break
}
switch (data.agentCustomerInfoDTO.homeArea) {
case '500129':
data.agentCustomerInfoDTO.homeArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.homeArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.homeArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.homeArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.homeArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.homeArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.homeArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.homeArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.homeArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.homeArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.homeArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.homeArea = '500243'
break
}
updateCustomerInfo(data)
.then(res => {
if (res.result == 0) {
// EWebBridge.webCallAppInJs("bridge",{
// "flag":"webview_toast",
// "extra":{"content":res.resultMessage}
// })
//EWebBridge.webCallAppInJs('goBack', { refresh: '1', index: '-2' })
this.$jump({
flag: 'goBack',
extra: {
refresh: '1',
index: this.$route.query.from == 2 ? '-2' : '-1'
},
routerInfo: {
path: '/customer/customerList'
}
})
} else {
this.$toast(this.$validator.errors.all()[0])
$this.$toast(res.resultMessage)
// EWebBridge.webCallAppInJs("bridge",{
// "flag":"webview_toast",
// "extra":{"content":res.resultMessage}
// })
}
})
},
updateCustomerInfo() {
let $this = this
let data = {
agentCustomerInfoDTO: {
customerNumber: $this.customerNumber,
customerName: $this.userInfo.customerName,
customerPhone: $this.userInfo.customerPhone,
customerSex: $this.userInfo.customerSex,
country: $this.userInfo.nativeplace,
//rgtaddress: $this.userInfo.census,
birthday: $this.userInfo.birthday,
customerIdType: $this.userInfo.idType,
customerIdNumber: $this.userInfo.customerIdNumber,
idEffectStartDate: $this.userInfo.certificateValidate,
idEffectEndDate: sessionStorage.getItem('isEnd') || $this.userInfo.certiexpiredate,
email: $this.userInfo.email,
height: $this.userInfo.stature,
weight: $this.userInfo.weight,
customerType: $this.userInfo.customerType,
customerSource: $this.userInfo.customerSource,
educationLevel: $this.userInfo.degree,
socialSecurity: $this.userInfo.socialSecurity,
residentStatus: $this.userInfo.taxIdentity,
occupationCode: $this.userInfo.occupationCode,
occupationName: $this.userInfo.occupationName,
lifeGrade: $this.userInfo.lifeGrade,
healthGrade: $this.userInfo.healthGrade,
averageYearlyIncome: $this.userInfo.averageYearlyIncome,
liabilitiesMoney: $this.userInfo.liabilitiesMoney,
workUnits: $this.userInfo.workUnits,
jobStatus: $this.userInfo.workCondition,
companyProvince: $this.userInfo.companyProvince,
companyCity: $this.userInfo.companyCity,
companyArea: $this.userInfo.companyArea,
companyAddress: $this.userInfo.companyAddress,
companyZip: $this.userInfo.companyZip,
companyPhone: $this.userInfo.companyPhone,
marryStatus: $this.userInfo.marriage,
homeProvince: $this.userInfo.homeProvince,
homeCity: $this.userInfo.homeCity,
homeArea: $this.userInfo.homeArea,
homeAddress: $this.userInfo.homeAddress,
homeZip: $this.userInfo.homeZip,
familyAnnualIncome: $this.userInfo.familyAnnualIncome,
province: $this.userInfo.province,
city: $this.userInfo.city,
homePhone: $this.userInfo.homePhone,
isNewPeopleFlag: $this.userInfo.isNewPeopleFlag,
npType: $this.userInfo.npType,
}
}
switch (data.agentCustomerInfoDTO.companyArea) {
case '500129':
data.agentCustomerInfoDTO.companyArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.companyArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.companyArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.companyArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.companyArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.companyArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.companyArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.companyArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.companyArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.companyArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.companyArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.companyArea = '500243'
break
}
switch (data.agentCustomerInfoDTO.homeArea) {
case '500129':
data.agentCustomerInfoDTO.homeArea = '500229'
break
case '500130':
data.agentCustomerInfoDTO.homeArea = '500230'
break
case '500131':
data.agentCustomerInfoDTO.homeArea = '500231'
break
case '500133':
data.agentCustomerInfoDTO.homeArea = '500233'
break
case '500135':
data.agentCustomerInfoDTO.homeArea = '500235'
break
case '500136':
data.agentCustomerInfoDTO.homeArea = '500236'
break
case '500137':
data.agentCustomerInfoDTO.homeArea = '500237'
break
case '500138':
data.agentCustomerInfoDTO.homeArea = '500238'
break
case '500140':
data.agentCustomerInfoDTO.homeArea = '500240'
break
case '500141':
data.agentCustomerInfoDTO.homeArea = '500241'
break
case '500142':
data.agentCustomerInfoDTO.homeArea = '500242'
break
case '500143':
data.agentCustomerInfoDTO.homeArea = '500243'
break
}
updateCustomerInfo(data)
.then(res => {
if (res.result == 0) {
// EWebBridge.webCallAppInJs("bridge",{
// "flag":"webview_toast",
// "extra":{"content":res.resultMessage}
// })
//EWebBridge.webCallAppInJs('goBack', { refresh: '1', index: '-2' })
this.$jump({
flag: 'goBack',
extra: {
refresh: '1',
index: this.$route.query.from == 2 ? '-2' : '-1'
},
routerInfo: {
path: '/customer/customerList'
}
})
} else {
$this.$toast(res.resultMessage)
// EWebBridge.webCallAppInJs("bridge",{
// "flag":"webview_toast",
// "extra":{"content":res.resultMessage}
// })
}
})
.catch(err => {
console.log(err)
})
},
go(path) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/customer/' + path
},
routerInfo: {
path: '/customer/' + path
}
.catch(err => {
console.log(err)
})
}
},
go(path) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/customer/' + path
},
routerInfo: {
path: '/customer/' + path
}
})
}
}
}
</script>
<style lang="scss" scoped>
.van-index-anchor {
.van-index-anchor {
background: #fff;
}
.container {
padding-bottom: 45px;
.header {
display: flex;
justify-content: flex-end;
padding: 10px;
}
.title {
font-size: 15px;
font-weight: bold;
background: #fff;
}
.container {
padding-bottom: 45px;
.header {
display: flex;
justify-content: flex-end;
padding: 10px;
}
.title {
font-size: 15px;
font-weight: bold;
background: #fff;
border-bottom: 1px solid #ebedf0;
}
}
.bd {
border-bottom: 1px solid #ebedf0;
margin-left: 15px;
}
}
.bd {
border-bottom: 1px solid #ebedf0;
margin-left: 15px;
}
</style>

View File

@@ -338,7 +338,7 @@ export default {
}
submit(data).then(res => {
if (res.result == '0') {
if (res.reslut == '0') {
this.$toast.clear()
window.localStorage.setItem('submitStatus', res.result)
this.$jump({

View File

@@ -44,7 +44,7 @@
<div class="pcenter-list mr20 mb10 ml15">
<template v-if="branchType != '6'">
<div class="pcenter-item text-center">
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0073')" />
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0056')" />
</div>
<div class="pcenter-item text-center">
<img src="../../../assets/images/home_cp_2.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0072')" />
@@ -122,7 +122,7 @@
<div class="home-product-pcenter">
<div class="pcenter-list mr20 mb10 ml15">
<div class="pcenter-item text-center">
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0073')" />
<img src="../../../assets/images/home_cp_1.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0056')" />
</div>
<div class="pcenter-item text-center">
<img src="../../../assets/images/home_cp_2.png" style="width: 100%;" @click="goDetail('GFRSPRO_M0072')" />

View File

@@ -4,12 +4,11 @@
</div>
</template>
<script>
import { makePdf, share, getDemo } from '@/api/ebiz/proposal/proposal.js'
import { makePdf, share } from '@/api/ebiz/proposal/proposal.js'
import { Toast } from 'vant'
import config from '@/config'
import dataDictionary from '@/assets/js/utils/data-dictionary' //使用数据字典中的险种类型
import { weixinShare } from '@/assets/js/utils/wxShare.js'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
import { queryPersonal } from '@/api/ebiz/laurelClub/laurelClub'
export default {
data() {
@@ -17,8 +16,7 @@ export default {
return {
pdfUrl: '',
isWeixin,
title: '',
agent:{}
title: ''
}
},
components: {
@@ -33,7 +31,7 @@ export default {
this.init()
}
},
async mounted() {
mounted() {
let riskCode = localStorage.pdfShareCode
dataDictionary.riskType.some(item => {
if (item.code == riskCode) {
@@ -41,78 +39,10 @@ export default {
return true
}
})
if(this.$route.query.proposalOrderNo){
let params = {
proposalInfoDTO: {
proposalNo: this.$route.query.proposalOrderNo
}
}
let res = await getDemo(params)
if(res.result == 0){
let mainRiskNameList = []
res.content.orderDTO.insuredDTOs.forEach(item => {
item.riskDTOLst.forEach(item01 => {
if (item01.isMainRisk == '0') {
mainRiskNameList.push(item01.riskName)
}
})
})
// 一、单个被保险人
// 1、1个主险含附加险的情况直接显示“主险产品名称”
// 2、有2个及以上主险组合建议书名称显示“保险产品组合计划”
// 二、有多个被保险人
// 都显示“家庭保障计划”
if(mainRiskNameList.length == 1){
if (res.content.orderDTO.insuredDTOs.length > 1) {
this.title = '家庭保障计划'
} else {
this.title = mainRiskNameList[0]
}
}else{
if (res.content.orderDTO.insuredDTOs.length > 1) {
this.title = '家庭保障计划'
} else {
this.title = '保险产品组合计划'
}
}
}
}
let agentResult = await getAgentInfo({}) //调取代理人查询接口
if (agentResult.result == '0'){
let { agent } = this
let { name } = agentResult
agent.name = name
}
let date = new Date()
let month = date.getMonth() + 1
if (month <= 9) {
month = '0' + month
}
let reqData = {
mdType: 'm',
monthStr:date.getFullYear() + month
}
let shareContent;
let resData = await queryPersonal(reqData)
if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade) {
if(resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
}
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
let sgrade =this.memberConversion(resData.content[0].sgrade);
shareContent='国富双冠精英'+resData.content[0].slevel+'级'+sgrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
let ggrade =this.memberConversion(resData.content[0].ggrade);
shareContent='国富桂冠精英'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
} else {
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
}
weixinShare({
title: this.title,
imgUrl: this.$assetsUrl + 'images/logo.png',
desc: shareContent
desc: '国富为您量身定制的保险产品,请查收'
})
//重置左上角按钮,变成返回
window.EWebBridge.webCallAppInJs("webview_left_button",{
@@ -179,15 +109,10 @@ export default {
if(resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
}
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
let sgrade =this.memberConversion(resData.content[0].sgrade);
shareContent='国富双冠精英'+resData.content[0].slevel+'级'+sgrade+resData.content[0].name+'为您量身定制的保险产品,请查收';
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
let ggrade =this.memberConversion(resData.content[0].ggrade);
shareContent='国富桂冠精英'+resData.content[0].glevel+'级'+ggrade+resData.content[0].name+'为您量身定制的保险产品请查收';
shareContent='国富桂冠人力'+resData.content[0].glevel+''+ggrade+resData.content[0].name+'为您量身定制的保险产品请查收';
} else {
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
shareContent='国富为您量身定制的保险产品,请查收';
}
if (data.trigger == 'right_button_click') {
// eslint-disable-next-line no-undef

View File

@@ -4,7 +4,7 @@
<div>
<div class="mb50">
<img class="w178 h41 div_1" src="@/assets/images/proposal/proposal_logo.png" />
<div class="white fw500 fs18 div_2">{{mainRiskName}}</div>
<div class="white fw500 fs18 div_2">家庭保障计划</div>
<van-sticky @scroll="testSticky">
<div class="pl15 pt15 flex justify-content-fs align-items-c sticky_div" :class="pageShowType.isFixed ? 'divbg_1' : 'divbg_2'">
<div class="mr9 title_item" v-for="(item, index) in pageShowInfo.insuredDTOs" :key="index" @click="checkInsure(item.insuredId)">
@@ -51,14 +51,14 @@
<div class="fs12 div_4">
<div class="risk_head flex text-center line-height table fs12 bg_DBEFFE">
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7">投保险种</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border" v-if="mainRiskCodes[0] != 'GFRS_M0080'">保额(</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">保额(</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">保险期间</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">交费期间</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">首年保费()</div>
</div>
<div class="risk_body flex text-center table bg_f7fbff" v-for="(riskItem, index) in pageShowInfo.showInsuredDTO.riskDTOLst" :key="index">
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7">{{ riskItem.riskName }}</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border" v-if="mainRiskCodes[0] != 'GFRS_M0080'">{{ riskItem.amt ? riskItem.amt : '--' }}</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">{{ riskItem.amt ? riskItem.amt : '--' }}</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">{{ riskItem.insureName }}</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">{{ riskItem.payName }}</div>
<div class="flex justify-content-c align-items-c pl7 pr7 pt7 pb7 table_border">{{ riskItem.showPrem ? riskItem.showPrem : '--' }}</div>
@@ -283,7 +283,7 @@
</div>
<div class="div_02">
<div class="text-center div_021">
<div class="text-center div_022">{{mainRiskName}}</div>
<div class="text-center div_022">家庭保障计划</div>
<!-- 如果没有姓名的话根据性别展示男士或女士 -->
<div class="text-center div_023">尊敬的<span v-if="pageShowInfo.appntDTO.name">{{ pageShowInfo.appntDTO.name.substr(0, 1) }}</span>{{ pageShowInfo.appntDTO.sex == '0' ? '先生' : '女士' }}</div>
</div>
@@ -386,7 +386,6 @@ export default {
mainRiskCodes: [],
time: 5,
proposalNo:'',
mainRiskName: ''
}
},
filters: {
@@ -449,7 +448,6 @@ export default {
})
}, 1000)
window['appCallBack'] = this.appCallBack*/
// init方法在微信端存储token接口请求用此token所以init方法前不要请求接口会影响分享微信功能接口会报token为空
this.init()
//校验当前用户权限
funcPermCheck({}).then(res => {
@@ -609,7 +607,7 @@ export default {
}
},
async sharePeople() {
console.log(this.pageShowInfo.insuredDTOs,'this.pageShowInfo.insuredDTOs')
console.log(this.agent,'this.agent.name')
let date = new Date()
let month = date.getMonth() + 1
if (month <= 9) {
@@ -621,34 +619,25 @@ export default {
}
let shareContent;
let resData = await queryPersonal(reqData)
// debugger
//准会员话术改为普通人话术
if(resData.content.length&&resData.content[0].slevel<3){
resData.content[0].sgrade='00'
}
if(resData.content.length&&resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
if (resData.content.length&&resData.content[0].slevel>0&&resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
// if(resData.content[0].slevel<3){
// resData.content[0].sgrade='00'
// }
if(resData.content[0].slevel<3){
resData.content[0].sgrade='00'
}
let sgrade =this.memberConversion(resData.content[0].sgrade);
shareContent='国富双冠精英'+resData.content[0].slevel+''+sgrade+resData.content[0].name+'为您量身定制的保险产品请查收';
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&resData.content[0].ggrade!='00') {
// if(resData.content[0].glevel<3){
// resData.content[0].ggrade='00'
// }
}else if (resData.content.length&&resData.content[0].glevel>0&&resData.content[0].ggrade&&!resData.content[0].sgrade&&resData.content[0].sgrade!='00') {
if(resData.content[0].glevel<3){
resData.content[0].ggrade='00'
}
let ggrade =this.memberConversion(resData.content[0].ggrade);
shareContent='国富桂冠精英'+resData.content[0].glevel+''+ggrade+resData.content[0].name+'为您量身定制的保险产品请查收';
} else {
shareContent = this.agent.name+'为您设计的专属保险计划书,请查阅!因为国富,所以民安!';
shareContent = this.agent.name+'为您设计的专属保险计划书请查阅因为国富所以民安';
}
console.log(shareContent,'shareContent')
let title
let riskList = [] //所有险种
let riskCodeList = [] //所有险种code
this.pageShowInfo.insuredDTOs.map(item => {
this.pageShowInfo.insuredDTOs.map(item => {
item.mainRisk.map(item01 => {
if (item01.isMainRisk == '0') { //主险
riskList.push(item01)
@@ -659,23 +648,11 @@ export default {
riskCodeList.push(item.riskCode)
})
let sameRisk = isAllEqual(riskCodeList)
// 一、单个被保险人
// 1、1个主险含附加险的情况直接显示“主险产品名称”
// 2、有2个及以上主险组合建议书名称显示“保险产品组合计划”
// 二、有多个被保险人
// 都显示“家庭保障计划”
// 以主险为单位,一个主险,显示主险名称。 多个主险,显示“家庭综合保障计划”,跟被保人人数无关
if(sameRisk){
if(this.pageShowInfo.insuredDTOs.length > 1){
title='家庭保障计划'
}else{
title= riskList[0].riskName
}
title= riskList[0].riskName
}else{
if(this.pageShowInfo.insuredDTOs.length > 1){
title='家庭保障计划'
}else{
title= '保险产品组合计划'
}
title='家庭综合保障计划'
}
let res = await getSharingToken({ shareType: 'proposal_demonstrate' })
if (res.result == '0') {
@@ -725,32 +702,6 @@ export default {
this.pageShowInfo.appntDTO = res.content.orderDTO.appntDTO
this.pageShowInfo.insuredDTOs = res.content.orderDTO.insuredDTOs
this.pageShowInfo.showInsuredDTO = this.pageShowInfo.insuredDTOs[0]
let mainRiskNameList = []
that.pageShowInfo.insuredDTOs.forEach(item => {
item.riskDTOLst.forEach(item01 => {
if (item01.isMainRisk == '0') {
mainRiskNameList.push(item01.riskName)
}
})
})
// 一、单个被保险人
// 1、1个主险含附加险的情况直接显示“主险产品名称”
// 2、有2个及以上主险组合建议书名称显示“保险产品组合计划”
// 二、有多个被保险人
// 都显示“家庭保障计划”
if(mainRiskNameList.length == 1){
if (this.pageShowInfo.insuredDTOs.length > 1) {
that.mainRiskName = '家庭保障计划'
} else {
that.mainRiskName = mainRiskNameList[0]
}
}else{
if (this.pageShowInfo.insuredDTOs.length > 1) {
that.mainRiskName = '家庭保障计划'
} else {
that.mainRiskName = '保险产品组合计划'
}
}
//投保人年龄
// this.pageShowInfo.appntDTO.age = getAge.getAge(this.pageShowInfo.appntDTO.birthdayLabel, new Date())
let { insuredLabelResult, insuredResult, insuredInfoResult } = res.content.calculusResDTO
@@ -940,17 +891,7 @@ export default {
},
//跳转到pdf 进入建议书后 根据建议书编码来查找相应的pdf
async goPDF() {
if(this.$route.query.proposalOrderNo){
this.$router.push({
path: '/proposal/pdf',
query: {
proposalOrderNo:this.$route.query.proposalOrderNo
}
})
}else{
this.$router.push({ path: '/proposal/pdf' })
}
this.$router.push({ path: '/proposal/pdf' })
// this.$jump({
// flag: 'h5',
// extra: {

View File

@@ -115,10 +115,6 @@ export function relevance(insured, insuredLabelResult, insuredResult, insuredInf
//将被保人与利益演示相关联(被保人维度)
export function relevanceByInsure(insured, insuredLabelResult, insuredResult, insuredInfoResult) {
console.log(insured)
console.log(insuredLabelResult)
console.log(insuredResult)
console.log(insuredInfoResult)
insured.forEach(insure => {
for (let key in insuredLabelResult[insure.insuredId]) {
insure.demoLabel = insuredLabelResult[insure.insuredId][key]
@@ -148,25 +144,20 @@ export function relevanceByInsure(insured, insuredLabelResult, insuredResult, in
let currentInsuredInfo = insuredInfoResult[insure.insuredId][risk.riskCode]
if (currentInsuredInfo.plan && currentInsuredInfo.plan === '0') {
let defaulValue = 'M' //档位默认值
let radios = []
if(currentInsuredInfo.L){
radios.push({
let radios = [
{
label: '低档' + currentInsuredInfo.L,
value: 'L'
})
}
if(currentInsuredInfo.M){
radios.push({
},
{
label: '中档' + currentInsuredInfo.M,
value: 'M'
})
}
if(currentInsuredInfo.H){
radios.push({
},
{
label: '高档' + currentInsuredInfo.H,
value: 'H'
})
}
}
]
insure.tap = defaulValue
radios.forEach(item => {
insure.radios.push(item)

View File

@@ -241,7 +241,6 @@ import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import OccupationPicker from '@/components/ebiz/occipation/OccupationPicker'
import DataDictionary from '@/assets/js/utils/data-dictionary'
import areaList from '@/assets/js/utils/areaForSale'
import countCredentialValidity from '@/assets/js/utils/countCredentialValidity'
import filter from '@/filters/index'
import utilsAge from '@/assets/js/utils/age'
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
@@ -641,9 +640,6 @@ export default {
if (this.userInfo.idType == '1') {
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
this.effectiveDateTypeAble = age <= 45
if(this.userInfo.birthday){
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,val)
}
}
}
break
@@ -668,9 +664,63 @@ export default {
if (this.userInfo.idType == '1') {
//获取年龄
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
if(this.userInfo.birthday){
this.userInfo.certificateValidate = countCredentialValidity.getStartDate(age,val)
}
console.log(age)
//年龄在16周岁以下
if (age < 16) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('16周岁以下的证件有效期为5年')
}
//年龄在16-21周岁之间
}else if (age >= 16 && age <= 21) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
}
//年龄在22-25周岁之间
}else if (age >= 22 && age <= 25) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('22周岁~25周岁的证件有效期为10年')
}
//年龄在26-35周岁之间
}else if (age >= 26 && age <= 35) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
}
//年龄在36-45周岁之间
} else if (age >= 36 && age <= 45) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('36周岁~45周岁的证件有效期为20年')
}
//年龄在46-65周岁之间
} else if (age >= 46 && age <= 65) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 || this.effectiveDateType == false) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
}
//年龄在65周岁以上
} else if (age > 65) {
if (this.userInfo.effectiveDateType == false) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('65周岁以上的证件有效期为长期')
}
}
//此外的年龄段不支持
// else {
// this.userInfo.certiexpiredate = ''
// this.$refs.certiexpiredate.date = ''
// return this.$toast('身份证不支持此年龄段')
// }
}
}
break
@@ -696,13 +746,6 @@ export default {
return this.$toast('出生证有效期或出生日期有误')
}
}
let age = utilsAge.getAge(this.userInfo.birthday, new Date())
if (this.userInfo.certificateValidate && !this.userInfo.certiexpiredate) {
this.userInfo.certiexpiredate = countCredentialValidity.getEndDate(age,this.userInfo.certificateValidate)
}
if (this.userInfo.certiexpiredate && !this.userInfo.certificateValidate) {
this.userInfo.certificateValidate = countCredentialValidity.getEndDate(age,this.userInfo.certiexpiredate)
}
}
break
}
@@ -923,36 +966,50 @@ export default {
//年龄在16周岁以下
if (age < 16) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('16周岁以下的证件有效期为5年')
}
//年龄在16-21周岁之间
}else if (age >= 16 && age <= 21) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 5) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('16周岁~21周岁的证件有效期为10年或5年')
}
//年龄在22-25周岁之间
}else if (age >= 22 && age <= 25) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('22周岁~25周岁的证件有效期为10年')
}
//年龄在26-35周岁之间
}else if (age >= 26 && age <= 35) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 10) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('26周岁~35周岁的证件有效期为20年或10年')
}
//年龄在36-45周岁之间
} else if (age >= 36 && age <= 45) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('36周岁~45周岁的证件有效期为20年')
}
//年龄在46-65周岁之间
} else if (age >= 46 && age <= 65) {
if (new Date(val).getFullYear() - new Date(this.userInfo.certificateValidate).getFullYear() != 20 && this.userInfo.effectiveDateType == false) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('46周岁~65周岁的证件有效期为20年或长期')
}
//年龄在65周岁以上
} else if (age > 65) {
if (this.userInfo.effectiveDateType == false) {
this.userInfo.certiexpiredate = ''
this.$refs.certiexpiredate.date = ''
return this.$toast('65周岁以上的证件有效期为长期')
}
}
@@ -1254,7 +1311,7 @@ export default {
let year = date.getFullYear()
let month = date.getMonth() + 1
month = month.toString().padStart(2, '0')
let day = Number(date.getDate()) + 1
let day = date.getDate()
day = day.toString().padStart(2, '0')
return `${year}-${month}-${day}`
},
@@ -1290,14 +1347,6 @@ export default {
}
this.effectiveDateTypeAble = false
}
//如果选择户口本
if (this.userInfo.idType == '2') {
let exipreDate = Date.parse(this.userInfo.birthday) + Date.parse('1985-12-31')
this.userInfo.certificateValidate = this.userInfo.birthday
this.userInfo.certiexpiredate = this.timeStampFormat(exipreDate)
this.idLimit = true
//如果选择出生证明
}
}
},
filters: {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,16 @@
</van-tabs>
</van-sticky>
<van-list v-model="loading" :immediate-check="false" :finished="finished" :finished-text="finishedText" error-text="请求失败,点击重新加载" :error.sync="error" @load="loadMore" class="pb45">
<van-list
v-model="loading"
:immediate-check="false"
:finished="finished"
:finished-text="finishedText"
error-text="请求失败点击重新加载"
:error.sync="error"
@load="loadMore"
class="pb45"
>
<div v-if="isSuccess">
<div v-if="saleList.length > 0">
<div v-for="(order, index) in saleList" :key="index">
@@ -74,38 +83,57 @@
</div>
<div class="text-right mt15 ">
<van-button v-if="active == 'uncommit'" round @click="goDetail(order)" size="small" class="mr5" type="danger" v-no-more-click="1000">
编辑
</van-button>
<van-button v-if="active == 'uncommit'" plain round @click.stop="del(order, index)" size="small" class="mr5" type="danger" v-no-more-click="1000">
删除
</van-button>
<van-button @click="againPay(order)" v-if="active == 'commit' && order.orderInfoDTO.orderStatus == '19'" size="small" class="mr5" type="danger" round>
重新支付
</van-button>
<van-button @click="changeCard(order)" v-if="(active == 'commit' && order.orderInfoDTO.orderStatus == '48') || (active == 'commit' && order.orderInfoDTO.orderStatus == '49')" size="small" class="mr5" type="danger" round>
修改卡号
</van-button>
<van-button v-if="active == 'uncommit'" round @click="goDetail(order)" size="small" class="mr5" type="danger" v-no-more-click="1000"
>编辑</van-button
>
<van-button
v-if="active == 'uncommit'"
plain
round
@click.stop="del(order, index)"
size="small"
class="mr5"
type="danger"
v-no-more-click="1000"
>删除</van-button
>
<van-button
@click="againPay(order)"
v-if="active == 'commit' && order.orderInfoDTO.orderStatus == '19'"
size="small"
class="mr5"
type="danger"
round
>重新支付</van-button
>
<van-button
@click="changeCard(order)"
v-if="(active == 'commit' && order.orderInfoDTO.orderStatus == '48') || (active == 'commit' && order.orderInfoDTO.orderStatus == '49')"
size="small"
class="mr5"
type="danger"
round
>修改卡号</van-button
>
<template v-if="active == 'commit' && order.orderInfoDTO.orderStatus == '55'">
<van-button @click="changeCard(order)" size="small" class="mr5" type="danger" round>
修改卡号
</van-button>
<van-button @click="againPay(order)" size="small" class="mr5" type="danger" round>
重新支付
</van-button>
<van-button @click="changeCard(order)" size="small" class="mr5" type="danger" round>修改卡号</van-button>
<van-button @click="againPay(order)" size="small" class="mr5" type="danger" round>重新支付</van-button>
</template>
<template v-if="active == 'commit' && (order.orderInfoDTO.orderStatus == '02' || order.orderInfoDTO.orderStatus == '58')">
<van-button @click="goPay(order)" size="small" class="mr5" type="danger" round>
去支付
</van-button>
<van-button @click="goPay(order)" size="small" class="mr5" type="danger" round>去支付</van-button>
</template>
<!-- doubleFlag 1- 0-doubleFlag为0双录时canRevokeDouble加 orderStatus 16 -->
<van-button @click="revokeOrder(order)" v-if="active == 'commit' && ((canRevoke[order.orderInfoDTO.orderStatus] && (order.orderInfoDTO.doubleFlag == '1' || order.orderInfoDTO.doubleFlag == null || order.orderInfoDTO.doubleFlag == ''))|| (canRevokeDouble[order.orderInfoDTO.orderStatus] && order.orderInfoDTO.doubleFlag == '0'))" size="small" class="mr5" type="danger" round>
撤单
</van-button>
<van-button @click="seePolicy(order)" v-if="active == 'commit'" size="small" type="danger" round>
查看投保单
</van-button>
<van-button
@click="revokeOrder(order)"
v-if="active == 'commit' && ((canRevoke[order.orderInfoDTO.orderStatus] && (order.orderInfoDTO.doubleFlag == '1' || order.orderInfoDTO.doubleFlag == null || order.orderInfoDTO.doubleFlag == ''))
|| (canRevokeDouble[order.orderInfoDTO.orderStatus] && order.orderInfoDTO.doubleFlag == '0'))"
size="small"
class="mr5"
type="danger"
round
>撤单</van-button
>
<van-button @click="seePolicy(order)" v-if="active == 'commit'" size="small" type="danger" round>查看投保单</van-button>
</div>
</div>
</div>
@@ -119,7 +147,16 @@
</van-list>
<van-button type="danger" class="bottom-btn" @click="add" v-no-more-click="1000">点我新增</van-button>
<van-dialog class="dialog-delete" @confirm="checkCaptchaCode" @cancel="cancelCaptchaCode" :before-close="beforeClose" confirm-button-color="#fff" v-model="revokePanelShow" title="短信验证" show-cancel-button>
<van-dialog
class="dialog-delete"
@confirm="checkCaptchaCode"
@cancel="cancelCaptchaCode"
:before-close="beforeClose"
confirm-button-color="#fff"
v-model="revokePanelShow"
title="短信验证"
show-cancel-button
>
<p class="captchaReceiver">投保人手机号: {{ captchaReceiver | phoneNumFilter }}</p>
<van-field v-model="sms" center clearable placeholder="请输入短信验证码">
<template #button>
@@ -501,6 +538,44 @@ export default {
}else if(orderStatus == '63'){//风险测评保存成功, 跳到账户信息--
url = '/sale/AccountInformation?edit=1&orderNo='+orderNo
}
// switch (orderStatus) {
// case '01': //已签名待客户确认, 跳到签名确认页面
// url = '/sale/SignatureConfirmation?edit=1'
// break
// case '43': //未签名待客户确认, 跳到签名确认页面
// url = '/sale/SignatureConfirmation?edit=1'
// break
// case '35': //投保人保存成功, 跳到被保险人页面--
// url = '/sale/insuredPerson?edit=1'
// break
// case '36': //被保险人保存成功, 跳到已选产品列表
// url = '/common/selectedProduct?edit=1'
// break
// case '37': //受益人保存成功, 跳到告知信息--
// url = '/sale/NotifyingMessage?edit=1'
// break
// case '38': //账户信息保存成功, 跳到附件管理--
// url = '/sale/AttachmentManagement?edit=1'
// break
// case '39': //险种信息保存成功, 跳到已选产品列表
// url = '/common/selectedProduct?edit=1'
// break
// case '40': //告知信息保存成功, 跳到风险测评--
// url = '/sale/answerPage?edit=1'
// break
// case '': //跳到投保人
// url = '/sale/insuredInfo?edit=1'
// break
// case '44': //建议书转投保, 跳到投保人
// url = '/sale/insuredInfo?edit=1'
// break
// case '62': //风险测评保存成功, 跳到账户信息--
// // url = '/sale/AccountInformation?edit=1'
// url = '/sale/answerSuccess?edit=1'
// break
// default:
// break
// }
this.$jump({
flag: 'h5',
extra: {

View File

@@ -98,7 +98,6 @@ import { Cell, CellGroup, RadioGroup, Radio, Dialog } from 'vant'
import { acceptInsurance, getBankCardSignState,payFlag, underWrite, getOrderDetail,signConfirm} from '@/api/ebiz/sale/sale'
import Loading from '@/components/ebiz/Loading'
import config from '@/config'
import { wxShare } from '@/api/ebiz/common/common.js'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
@@ -203,25 +202,6 @@ export default {
}
},
methods: {
getOpenid(){
wxShare({ url: location.href }).then(response => {
if (response.result == '0') {
let orderNo = this.$route.query.orderNo
let code = this.getUrlParam('code')
if(!code){
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + response.content.appid + '&redirect_uri=' + encodeURIComponent(location.href + '?orderNo=' + orderNo) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
}else{
window.location.href = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' + response.content.appid + '&secret=' + response.content.appsecret + '&code=' + code + '&grant_type=authorization_code'
}
}
})
},
// 获取地址上的参数
getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
},
async payMentWx(orderNo){
const res = await payFlag({ orderNo: orderNo })
console.dir(res)
@@ -245,9 +225,6 @@ export default {
orderNo: this.orderNo,
payType: this.radio
}
if(that.isWeixin){
data.payType = 'WXJSAPI'
}
acceptInsurance(data).then(res => {
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'}}
@@ -455,7 +432,7 @@ export default {
flag: 'share',
extra: {
title: `国富人寿电子投保单(${shareName})付款`,
content: '投保单号:'+ localStorage.orderNo + '\n' + '支付金额:' + this.underWriteData.orderAmount + '元',
content: '付款进行',
url: location.origin + '/#/sale/payMent?orderNo=' + localStorage.orderNo + '&token=' + localStorage.token,
img: this.$assetsUrl + 'images/logo.png'
}

View File

@@ -21,21 +21,13 @@
<!-- <div v-if="payStatus != '2' && payStatus != '1'" class=" p10 pb250 bg-white">
<span class="pt150 fs14"> 如有相关问题请联系信息技术部运维人员</span>
</div> -->
<!-- <div v-if="payStatus == '1'" class=" p10 pb250 bg-white">-->
<!-- <span class="pt150 fs14"> 核心承保中请您稍后查看</span>-->
<!-- <div class="mt15" v-if="this.manageComCode == '45'">-->
<!-- <span class="pt150 fs14 green fwb">-->
<!-- 温馨提示为维护您的合法权益广西保险行业协会将向您发送满意度调查短信欢迎回复短信对我们的销售和服务进行监督-->
<!-- </span>-->
<!-- </div>-->
<!-- </div>-->
<div v-if="payStatus == '1'" class="p10 pb250 bg-white" style="text-align: center;padding-top: 50px!important;">
<p style="text-align: center;font-weight: bold;">温馨提示</p>
<p style="text-align: center;">您可识别下方官方微信"国富人寿"二维码关注公众号查询您的保单信息和服务</p>
<div style="padding: 20px;">
<img :src="erweima" style="width: 60vw;"/>
<div v-if="payStatus == '1'" class=" p10 pb250 bg-white">
<span class="pt150 fs14"> 核心承保中请您稍后查看</span>
<div class="mt15" v-if="this.manageComCode == '45'">
<span class="pt150 fs14 green fwb">
温馨提示为维护您的合法权益广西保险行业协会将向您发送满意度调查短信欢迎回复短信对我们的销售和服务进行监督
</span>
</div>
<p style="text-align: center;font-weight: bold;">长按识别二维码</p>
</div>
<div v-if="payStatus == '2' || payStatus == '4' || payStatus == '8'" class=" p10 pb250 bg-white">
<span v-html="resMessage"></span>
@@ -59,162 +51,161 @@
</template>
<script>
import { Cell, CellGroup } from 'vant'
import { getPayState } from '@/api/ebiz/sale/sale'
import riskRules from '@/views/ebiz/common/risk-rules'
import erweima from '@/assets/images/erweima.png'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
isWeixin,
// 保融收银台返回的支付流水号
paySeqNo: '',
// 接口返回数据前,不做页面渲染
isReady: true,
// 是否已重新获取支付状态。(首次进入本页,立即查询支付结果。如果是‘支付中’,两秒后再次(最后一次)再次获取一次支付状态。)
isReloaded: false,
// 结果原因
resMessage: '',
// 支付结果
payStatus: '',
// 支付信息
payInfo: {
appntName: '', // 投保人
prtNo: '', // 投保单号
amnt: '' // 支付金额
},
// 图片
srcSuccess: this.$assetsUrl + 'images/success.png',
srcPending: this.$assetsUrl + 'images/pending.png',
srcFail: this.$assetsUrl + 'images/fail.png',
erweima,
manageComCode:''//代理人管理机构 52贵州 45广西
import { Cell, CellGroup } from 'vant'
import { getPayState } from '@/api/ebiz/sale/sale'
import riskRules from '@/views/ebiz/common/risk-rules'
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
isWeixin,
// 保融收银台返回的支付流水号
paySeqNo: '',
// 接口返回数据前,不做页面渲染
isReady: true,
// 是否已重新获取支付状态。(首次进入本页,立即查询支付结果。如果是‘支付中’,两秒后再次(最后一次)再次获取一次支付状态。)
isReloaded: false,
// 结果原因
resMessage: '',
// 支付结果
payStatus: '',
// 支付信息
payInfo: {
appntName: '', // 投保人
prtNo: '', // 投保单号
amnt: '' // 支付金额
},
// 图片
srcSuccess: this.$assetsUrl + 'images/success.png',
srcPending: this.$assetsUrl + 'images/pending.png',
srcFail: this.$assetsUrl + 'images/fail.png',
manageComCode:''//代理人管理机构 52贵州 45广西
}
},
components: {
[Cell.name]: Cell,
[CellGroup.name]: CellGroup
},
methods: {
// 返回列表页
next() {
if(this.isWeixin){
WeixinJSBridge.call("closeWindow");
}else{
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/list'
},
routerInfo: {
path: '/sale/list'
}
})
}
},
components: {
[Cell.name]: Cell,
[CellGroup.name]: CellGroup
},
methods: {
// 返回列表页
next() {
if(this.isWeixin){
WeixinJSBridge.call("closeWindow");
}else{
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/list'
},
routerInfo: {
path: '/sale/list'
}
})
}
},
// 查询支付状态
queryPayState() {
// 查询支付状态
queryPayState() {
this.$toast.clear()
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = { orderNo: this.paySeqNo }
getPayState(data).then(res => {
this.$toast.clear()
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = { orderNo: this.paySeqNo }
getPayState(data).then(res => {
this.$toast.clear()
this.isReady = true
console.log('----支付结果查询', JSON.stringify(res))
if (res.result == '0') {
this.payStatus = res.payStatus
this.payInfo = { appntName: res.appntName, prtNo: res.prtNo, amnt: res.amnt }
this.resMessage = res.message
// 如果是支付中2秒后重新获取一次支付状态
if (this.payStatus == '4' && !this.isReloaded) {
this.isReloaded = true
setTimeout(() => {
this.queryPayState()
}, 2000)
}
} else {
this.$toast(res.resultMessage)
this.isReady = true
console.log('----支付结果查询', JSON.stringify(res))
if (res.result == '0') {
this.payStatus = res.payStatus
this.payInfo = { appntName: res.appntName, prtNo: res.prtNo, amnt: res.amnt }
this.resMessage = res.message
// 如果是支付中2秒后重新获取一次支付状态
if (this.payStatus == '4' && !this.isReloaded) {
this.isReloaded = true
setTimeout(() => {
this.queryPayState()
}, 2000)
}
})
},
// 重新支付
rePayMent() {
// localStorage.orderNo = order.orderInfoDTO.orderNo
// 再次支付 salelist为 0
localStorage.salelist = '0'
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/payMent'
},
routerInfo: {
path: '/sale/payMent'
}
})
},
//更换卡号
changeCard() {
localStorage.setItem('changeCard', true)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/AccountInformation'
},
routerInfo: {
path: '/sale/AccountInformation'
}
})
}
},
created() {
EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否
} else {
this.$toast(res.resultMessage)
}
})
},
async mounted() {
let that = this
// document.body.style.backgroundColor = '#fff'
that.payStatus = window.localStorage.getItem('payStatus')
that.payInfo = JSON.parse(window.localStorage.getItem('payInfo'))
if (window.localStorage.getItem('resMessage') != null) {
that.resMessage = window.localStorage.getItem('resMessage').replace(/\\n/g, '<br>')
}
this.paySeqNo = this.$route.query.RdSeq
if (!this.paySeqNo) {
this.$toast({ message: '参数错误缺少支付流水号RdSeq查询参数', duration: 5000 })
} else {
this.queryPayState()
}
//获取代理人管理机构 52贵州 45广西
let dataReturn = await riskRules.getAgentInfoFunc(this)
this.manageComCode = dataReturn.manageComCode
// 重新支付
rePayMent() {
// localStorage.orderNo = order.orderInfoDTO.orderNo
// 再次支付 salelist为 0
localStorage.salelist = '0'
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/payMent'
},
routerInfo: {
path: '/sale/payMent'
}
})
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
//更换卡号
changeCard() {
localStorage.setItem('changeCard', true)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/AccountInformation'
},
routerInfo: {
path: '/sale/AccountInformation'
}
})
}
},
created() {
EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
},
async mounted() {
let that = this
// document.body.style.backgroundColor = '#fff'
that.payStatus = window.localStorage.getItem('payStatus')
that.payInfo = JSON.parse(window.localStorage.getItem('payInfo'))
if (window.localStorage.getItem('resMessage') != null) {
that.resMessage = window.localStorage.getItem('resMessage').replace(/\\n/g, '<br>')
}
this.paySeqNo = this.$route.query.RdSeq
if (!this.paySeqNo) {
this.$toast({ message: '参数错误缺少支付流水号RdSeq查询参数', duration: 5000 })
} else {
this.queryPayState()
}
//获取代理人管理机构 52贵州 45广西
let dataReturn = await riskRules.getAgentInfoFunc(this)
this.manageComCode = dataReturn.manageComCode
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
}
}
</script>
<style lang="scss" scoped>
.payResult-container {
.payResult-header {
width: 345px;
// height: 143px;
.payResult-img {
width: 70px;
height: 70px;
}
.payResult-container {
.payResult-header {
width: 345px;
// height: 143px;
.payResult-img {
width: 70px;
height: 70px;
}
}
// /deep/ .van-cell__value {
// text-align: left;
// }
}
// /deep/ .van-cell__value {
// text-align: left;
// }
</style>

View File

@@ -7,8 +7,8 @@
<div v-if="isWeixin" class="bg-white mt10 p20 fs14 tips">
<p>
尊敬的
<span>{{ tipsName }}</span>
先生/女士您好
<span>{{ tipsName }}</span
>先生/女士您好
</p>
<p>该保单由国富人寿保险股份有限公司进行承保具体确认信息如下</p>
</div>
@@ -47,9 +47,16 @@
</div>
<p class="start" v-if="airSign != '1'">点击开始进行相关操作</p>
<div v-if="!isInvalid" class="flex justify-content-a mt20">
<van-button type="danger" size="normal" class="w150" plain :disabled="changeCard ? agentSign.documentStatus == '1' : agentSignStatus == '3'" v-no-more-click="1000" @click="start_agent('3')">
开始
</van-button>
<van-button
type="danger"
size="normal"
class="w150"
plain
:disabled="changeCard ? agentSign.documentStatus == '1' : agentSignStatus == '3'"
v-no-more-click="1000"
@click="start_agent('3')"
>开始</van-button
>
</div>
<div class="text" v-else>操作时间已失效请联系销售人员</div>
</van-collapse-item>
@@ -82,13 +89,28 @@
</div>
<p class="start" v-if="airSign != '1'">点击开始分享进行相关操作</p>
<div v-if="!isInvalid" class="flex justify-content-a mt20">
<van-button v-if="isShow" type="danger" size="normal" class="w150" plain v-no-more-click="1000" :disabled="changeCard ? appntSign.documentStatus == '1' : appntSignStatus == '3'" @click="share(saleInsuredPersonInfo.relationToAppnt == '1' ? '2' : '0')">
分享
</van-button>
<van-button
v-if="isShow"
type="danger"
size="normal"
class="w150"
plain
v-no-more-click="1000"
:disabled="changeCard ? appntSign.documentStatus == '1' : appntSignStatus == '3'"
@click="share(saleInsuredPersonInfo.relationToAppnt == '1' ? '2' : '0')"
>分享</van-button
>
<!-- 前端测试 -->
<van-button type="danger" size="normal" class="w150" plain :disabled="changeCard ? appntSign.documentStatus == '1' : appntSignStatus == '3'" v-no-more-click="1000" @click="start_ocr(saleInsuredPersonInfo.relationToAppnt == '1' ? '2' : '0')">
开始
</van-button>
<van-button
type="danger"
size="normal"
class="w150"
plain
:disabled="changeCard ? appntSign.documentStatus == '1' : appntSignStatus == '3'"
v-no-more-click="1000"
@click="start_ocr(saleInsuredPersonInfo.relationToAppnt == '1' ? '2' : '0')"
>开始</van-button
>
</div>
<div class="text" v-else>操作时间已失效请联系销售人员</div>
</van-collapse-item>
@@ -112,12 +134,20 @@
</div>
<p class="start" v-if="airSign != '1'">点击开始分享进行相关操作</p>
<div v-if="!isInvalid" class="flex justify-content-a mt20">
<van-button v-if="isShow" type="danger" size="normal" class="w150" :disabled="insuredSignStatus == '3'" @click="share('1')" plain v-no-more-click="1000">
分享
</van-button>
<van-button type="danger" size="normal" plain class="w150" :disabled="insuredSignStatus == '3'" @click="start_ocr('1')" v-no-more-click="1000">
开始
</van-button>
<van-button
v-if="isShow"
type="danger"
size="normal"
class="w150"
:disabled="insuredSignStatus == '3'"
@click="share('1')"
plain
v-no-more-click="1000"
>分享</van-button
>
<van-button type="danger" size="normal" plain class="w150" :disabled="insuredSignStatus == '3'" @click="start_ocr('1')" v-no-more-click="1000"
>开始</van-button
>
</div>
<div class="text" v-else>操作时间已失效请联系销售人员</div>
</van-collapse-item>
@@ -153,9 +183,16 @@
</div>
<p class="start" v-if="airSign != '1'">点击开始分享进行相关操作</p>
<div v-if="!isInvalid" class="flex justify-content-a mt20">
<van-button type="danger" size="normal" style="width: 157px" plain :disabled="changeCard ? appntSign.documentStatus == '1' : appntSignStatus == '3'" v-no-more-click="1000" @click="start_ocr(saleInsuredPersonInfo.relationToAppnt == '1' ? '2' : '0')">
开始
</van-button>
<van-button
type="danger"
size="normal"
style="width: 157px"
plain
:disabled="changeCard ? appntSign.documentStatus == '1' : appntSignStatus == '3'"
v-no-more-click="1000"
@click="start_ocr(saleInsuredPersonInfo.relationToAppnt == '1' ? '2' : '0')"
>开始</van-button
>
</div>
<div class="text" v-else>操作时间已失效请联系销售人员</div>
</van-collapse-item>
@@ -179,9 +216,16 @@
</div>
<p class="start" v-if="airSign != '1'">点击开始分享进行相关操作</p>
<div v-if="!isInvalid" class="flex justify-content-a mt20">
<van-button type="danger" size="normal" plain style="width: 157px" :disabled="insuredSignStatus == '3'" @click="start_ocr('1')" v-no-more-click="1000">
开始
</van-button>
<van-button
type="danger"
size="normal"
plain
style="width: 157px"
:disabled="insuredSignStatus == '3'"
@click="start_ocr('1')"
v-no-more-click="1000"
>开始</van-button
>
</div>
<div class="text" v-else>操作时间已失效请联系销售人员</div>
</van-collapse-item>
@@ -192,17 +236,27 @@
<div v-if="!isWeixin">
<div v-if="changeCard">
<div class="bottom-btn bg-white" v-if="appntSign.documentStatus == '1'">
<van-button type="danger" v-if="relationToAppnt == '1' ? true : appntSign.documentStatus == '1' ? true : false" size="large" @click="rePayMent" v-no-more-click="1000">
支付
</van-button>
<van-button
type="danger"
v-if="relationToAppnt == '1' ? true : appntSign.documentStatus == '1' ? true : false"
size="large"
@click="rePayMent"
v-no-more-click="1000"
>支付</van-button
>
</div>
</div>
<div v-else>
<!--判断代理人自保件承诺书是否签名 或者不是自保件 投保人是否都签名-->
<div class="bottom-btn bg-white" v-if="(agentSignStatus == '3'&& appntSignStatus == '3')||(agentSignStatus == ''&& appntSignStatus == '3')">
<van-button type="danger" v-if="relationToAppnt == '1' ? true : insuredSignStatus == '3' ? true : false" size="large" @click="next" v-no-more-click="1000">
提交
</van-button>
<van-button
type="danger"
v-if="relationToAppnt == '1' ? true : insuredSignStatus == '3' ? true : false"
size="large"
@click="next"
v-no-more-click="1000"
>提交</van-button
>
</div>
</div>
</div>
@@ -210,7 +264,13 @@
<!-- <video controls style="width: 100%; max-height: calc(100vh - 60px)" src="/app/video/rlsb.mp4"></video> -->
<div class="" v-if="videoShow" style="height: calc(100vh - 60px); display: flex; align-items: center; flex-flow: column; justify-content: center">
<!-- <van-notice-bar :scrollable="false" class="notice" style="width: 100%">为维护您的合法权益请您务必观看防范销售误导视频</van-notice-bar> -->
<video controls style="width: 100%; max-height: calc(100vh - 60px)" :src="'https://gf-dev-202005-1254138932.cos.ap-shanghai-fsi.myqcloud.com/gfapp/pub01/2021/04/28/guofulive.MP4'" ref="vid" @timeupdate="timeupdate"></video>
<video
controls
style="width: 100%; max-height: calc(100vh - 60px)"
:src="'https://gf-dev-202005-1254138932.cos.ap-shanghai-fsi.myqcloud.com/gfapp/pub01/2021/04/28/guofulive.MP4'"
ref="vid"
@timeupdate="timeupdate"
></video>
</div>
<div class="bottom-btn bg-white">
<van-button type="danger" size="large" @click="isVideoUrlClick()" v-no-more-click="1000">下一步</van-button>
@@ -226,16 +286,18 @@
}}</van-button>
</van-cell-group>
</van-dialog>
<van-dialog v-model="thisnewpeopledialogshow" title="提示" confirmButtonText="确定">
<div style="padding: 20px;font-size: 14px;padding-top: 0px;">
<div style="line-height: 25px;letter-spacing: 1px;">尊敬的客户您好</div>
<div style="line-height: 25px;letter-spacing: 1px;text-indent: 2em;">感谢您投保我公司爱心保/安心保产品在本保险合同生效后被保险人将获得一份专属的健康管理服务详情请登录公司官方微信公众号国富人寿保险>发现国富>新市民专区 查询或拨打公司客服热线400-694-6688咨询本服务为无偿提供</div>
</div>
</van-dialog>
<!-- <UploadImageFile
:typeface="idcardData.typeface && faceAuthCount.weixin < smsAuthNum"
:realName="idcardData.idcardName"
:idno="idcardData.idcardNumber"
@sendimage="sendimage"
>
</UploadImageFile> -->
</div>
</template>
<script>
// import UploadImageFile from '@/components/ebiz/sale/UploadImageFile'
import { Field, Cell, CellGroup, Collapse, CollapseItem, Dialog, NoticeBar } from 'vant'
import {
underWrite,
@@ -259,7 +321,6 @@ export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
thisnewpeopledialogshow: false,
isInsuYearFlag: false, //是否为长期险
isVideo: false, //是否已阅读视频
isVideoNext: false,
@@ -269,7 +330,7 @@ export default {
timeId: null, // 计时器ID
countDown: 60, // 倒计时
authCode: '', // 验证码
smsAuthNum: 2,
smsAuthNum: 3,
operaFlag: null,
encyCustomerMobile: null,
sid: null,
@@ -351,120 +412,122 @@ export default {
}
},
methods: {
timeupdate() {
console.log(this.$refs['vid'].paused)
if (!this.$refs['vid'].paused) {
this.isVideoNext = true
}
},
fakeFaceAuth(expect) {
console.log('模拟调用人脸识别')
return new Promise(function (resolve, reject) {
setTimeout(() => {
console.log('模拟人脸识别完成')
if (expect) {
resolve({ state: '0' })
} else {
reject({ state: '0' })
timeupdate() {
console.log(this.$refs['vid'].paused)
if (!this.$refs['vid'].paused) {
this.isVideoNext = true
}
},
fakeFaceAuth(expect) {
console.log('模拟调用人脸识别')
return new Promise(function (resolve, reject) {
setTimeout(() => {
console.log('模拟人脸识别完成')
if (expect) {
resolve({ state: '0' })
} else {
reject({ state: '0' })
}
}, 2000)
})
},
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (this.videoShow) {
this.$jump({
flag: 'navigation',
extra: {
title: '签名确认',
hiddenRight: '1'
}
}, 2000)
})
},
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (this.videoShow) {
})
return (this.videoShow = false)
}
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'navigation',
flag: 'h5',
extra: {
title: '签名确认',
hiddenRight: '1'
title: '电子投保单列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
return (this.videoShow = false)
}
return this.$dialog
.confirm({
className: 'dialog-delete',
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
flag: 'h5',
extra: {
title: '电子投保单列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1'
}
})
})
.catch(() => {
return
})
})
.catch(() => {
return
})
}
},
isVideoUrlClick() {
console.log(this.isVideoUrl)
if (!this.isVideoNext) {
this.$dialog
.alert({
className: 'dialog-alert',
title: '提示',
message: '为维护您的合法权益,请您务必认真观看防范销售误导视频。',
confirmButtonColor: '#ee0a24',
confirmButtonText: '确认'
})
.then(() => {})
} else {
this.isVideoNext = !this.isVideoNext
this.isVideoUrl == 'goUrl' ? this.goUrl() : this.insuredUrl()
}
},
// 初始化
async init() {
localStorage.doubleRecordFlag = '0' //0不是双录单 1是双录单
if (this.isWeixin) {
if (this.$route.query.airSign) {
sessionStorage.setItem('airSign', this.$route.query.airSign)
}
},
isVideoUrlClick() {
console.log(this.isVideoUrl)
if (!this.isVideoNext) {
this.$dialog
.alert({
className: 'dialog-alert',
title: '提示',
message: '为维护您的合法权益,请您务必认真观看防范销售误导视频。',
confirmButtonColor: '#ee0a24',
confirmButtonText: '确认'
})
.then(() => {})
// this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo)
// window.localStorage.setItem('saleInsuredPersonInfo', this.$route.query.saleInsuredPersonInfo)
window.localStorage.setItem('token', this.$route.query.token)
window.localStorage.setItem('orderNo', this.$route.query.orderNo)
// window.localStorage.setItem('relationToAppnt', this.$route.query.relationToAppnt)
// window.localStorage.setItem('productCode', this.$route.query.productCode)
if (this.$route.query.changeCard == '0') {
localStorage.setItem('changeCard', true)
} else {
this.isVideoNext = !this.isVideoNext
this.isVideoUrl == 'goUrl' ? this.goUrl() : this.insuredUrl()
localStorage.removeItem('changeCard')
}
},
// 初始化
async init() {
localStorage.doubleRecordFlag = '0' //0不是双录单 1是双录单
if (this.isWeixin) {
if (this.$route.query.airSign) {
sessionStorage.setItem('airSign', this.$route.query.airSign)
}
// this.$CacheUtils.setLocItem('saleInsuredInfo', this.$route.query.saleInsuredInfo)
// window.localStorage.setItem('saleInsuredPersonInfo', this.$route.query.saleInsuredPersonInfo)
window.localStorage.setItem('token', this.$route.query.token)
window.localStorage.setItem('orderNo', this.$route.query.orderNo)
// window.localStorage.setItem('relationToAppnt', this.$route.query.relationToAppnt)
// window.localStorage.setItem('productCode', this.$route.query.productCode)
if (this.$route.query.changeCard == '0') {
localStorage.setItem('changeCard', true)
} else {
localStorage.removeItem('changeCard')
}
if (this.$route.query.signInvalid) {
sessionStorage.setItem('signInvalid', this.$route.query.signInvalid)
}
if (this.$route.query.shareCode) {
sessionStorage.setItem('shareCode', this.$route.query.shareCode)
}
let signInvalid = sessionStorage.getItem('signInvalid')
let rs = await this.checkSignInvalid(signInvalid)
console.log('````````````')
console.log('rs: ' + rs)
if (rs == '1') {
this.isInvalid = false
} else {
this.isInvalid = true
}
this.airSign = sessionStorage.getItem('airSign')
this.shareCode = sessionStorage.getItem('shareCode')
this.changeCard = localStorage.getItem('changeCard')
this.relationToAppnt = this.$route.query.relationToAppnt
this.isShow = false
await this.getOrderDetail()
if (this.$route.query.signInvalid) {
sessionStorage.setItem('signInvalid', this.$route.query.signInvalid)
}
if (this.$route.query.shareCode) {
sessionStorage.setItem('shareCode', this.$route.query.shareCode)
}
let signInvalid = sessionStorage.getItem('signInvalid')
let rs = await this.checkSignInvalid(signInvalid)
console.log('````````````')
console.log('rs: ' + rs)
if (rs == '1') {
this.isInvalid = false
} else {
this.isInvalid = true
}
this.airSign = sessionStorage.getItem('airSign')
this.shareCode = sessionStorage.getItem('shareCode')
this.changeCard = localStorage.getItem('changeCard')
this.relationToAppnt = this.$route.query.relationToAppnt
this.isShow = false
await this.getOrderDetail()
console.log('初始化this.appntSign ==', this.appntSign)
if (
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '0') ||
(this.appntSignStatus == '3' && sessionStorage.getItem('shareCode') == '2')
@@ -1353,19 +1416,6 @@ export default {
},
// 获取消息和阅读状态
getOrderDetail() {
if(!this.$route.query.orderNo || this.$route.query.orderNo == 'undefined'){
Dialog.confirm({
title: '提示',
message: '订单号信息缺失,跳转订单系统重新获取',
showCancelButton: false
}).then(() => {
this.$router.push({
path:'/sale/list'
})
})
return false
}
let that = this
this.$toast.loading({
// 持续展示 toast
@@ -1484,28 +1534,28 @@ export default {
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
this.relationToAppnt = this.saleInsuredPersonInfo.relationToAppnt //将缓存中的与被保险人关系赋值给页面
that.recmd = res.orderDTO.recmdDTO
that.orderInfo = res.orderDTO.orderInfoDTO
that.insured = res.orderDTO.insuredDTOs
// 初始化RID状态
this.realPeopleRidInfo.appntRidFlag = res.orderDTO.appntDTO.ridStatus
this.realPeopleRidInfo.insureRidFlag = res.orderDTO.insuredDTOs[0].ridStatus
//存code区分万能型产品
let productCode, riskName
let isDoubleMailRisk = that.orderInfo.isDoubleMailRisk
if (isDoubleMailRisk == '1') {
productCode = 'GFRS_M0017'
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[1].riskName
} else {
productCode = that.insured[0].riskDTOLst[0].mainRiskCode
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName
}
if (that.orderInfo && that.orderInfo.activeType) {
that.$CacheUtils.setLocItem('activeType',that.orderInfo.activeType)
}
localStorage.setItem('productCode', productCode)
this.riskName = riskName
localStorage.setItem('riskName', riskName)
that.recmd = res.orderDTO.recmdDTO
that.orderInfo = res.orderDTO.orderInfoDTO
that.insured = res.orderDTO.insuredDTOs
// 初始化RID状态
this.realPeopleRidInfo.appntRidFlag = res.orderDTO.appntDTO.ridStatus
this.realPeopleRidInfo.insureRidFlag = res.orderDTO.insuredDTOs[0].ridStatus
//存code区分万能型产品
let productCode, riskName
let isDoubleMailRisk = that.orderInfo.isDoubleMailRisk
if (isDoubleMailRisk == '1') {
productCode = 'GFRS_M0017'
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[1].riskName
} else {
productCode = that.insured[0].riskDTOLst[0].mainRiskCode
riskName = res.orderDTO.insuredDTOs[0].riskDTOLst[0].riskName
}
if (that.orderInfo && that.orderInfo.activeType) {
that.$CacheUtils.setLocItem('activeType',that.orderInfo.activeType)
}
localStorage.setItem('productCode', productCode)
this.riskName = riskName
localStorage.setItem('riskName', riskName)
if (this.relationToAppnt != '1') {
this.activeNames.push(res.orderDTO.insuredDTOs.length + 1)
@@ -1576,103 +1626,90 @@ export default {
}
})
}
if(res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0076' || res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0077') {
that.thisnewpeopledialogshow = true
}
resolve('success')
} else {
Dialog.confirm({
title: '提示',
message: res.resultMessage,
showCancelButton: false
}).then(() => {
this.$router.push({
path:'/sale/list'
})
})
}
}
})
})
},
//自定义key值排序用
addKey(item) {
//ducumentCode 1投保须知 2投保单 3产品说明书 4提示书 6免除保险人责任条款说明书 7保险销售行为双录说明
// 8指定保单生效日 9短期险投保须知 10国富人寿自保件承诺书 11柳州保险行业寿险投保风险提示书 12个人信息使用授权
// documentStatus: 文档状态 0 未读 1 已读 2 未签名 3 已签名
// documentType: 文档类型 0 阅读文档 1 签名文档
// signType: 签名类型 0 投保人 1 被保人 2 本人
if (item.documentCode == '1') {
item.key = 2
// item.key = 4
item.routePath = 'insuranceInformation'
} else if (item.documentCode == '2') {
// item.key = 9
item.key = 11
item.routePath = 'SignatureOfElectronic'
} else if (item.documentCode == '3') {
// item.key = 4
item.key = 6
item.routePath = 'productTip'
} else if (item.documentCode == '4') {
// item.key = 5
item.key = 7
item.routePath = 'InsuranceTip'
} else if (item.documentCode == '6') {
// item.key = 7
item.key = 9
item.routePath = 'avoidDutyTip'
} else if (item.documentCode == '7') {
// item.key = 8
item.key = 10
item.routePath = 'doubleRecordTip'
} else if (item.documentCode == '8') {
item.key = 1
item.routePath = 'apointValidDoc'
} else if (item.documentCode == '9') {
// item.key = 3
item.key = 5
item.routePath = 'shortPeriodProduct'
}else if (item.documentCode == '10') {
item.key = 1
item.routePath = 'commitmentSelfProtect'
} else if (item.documentCode == '11') {
// item.key = 6
item.key = 8
item.routePath = 'InsuranceRiskReminder'
} else if (item.documentCode == '12') {
// item.key = 10
item.key = 12
item.routePath = 'PersonalInformation'
} else if (item.documentCode == '13') {
// item.key = 2
item.key = 4
item.routePath = 'insuranceClauses'
}else if (item.documentCode == '14') {//风险评估pdf
item.key = 3
item.routePath = 'AnswerTip'
} else if (item.documentCode == '15') {
item.key = 7.1
item.routePath = 'universalRiskNotifyingMessageTip'
}
//自定义key值排序用
addKey(item) {
//ducumentCode 1投保须知 2投保单 3产品说明书 4提示书 6免除保险人责任条款说明书 7保险销售行为双录说明
// 8指定保单生效日 9短期险投保须知 10国富人寿自保件承诺书 11柳州保险行业寿险投保风险提示书 12个人信息使用授权
// documentStatus: 文档状态 0 未读 1 已读 2 未签名 3 已签名
// documentType: 文档类型 0 阅读文档 1 签名文档
// signType: 签名类型 0 投保人 1 被保人 2 本人
if (item.documentCode == '1') {
item.key = 2
// item.key = 4
item.routePath = 'insuranceInformation'
} else if (item.documentCode == '2') {
// item.key = 9
item.key = 11
item.routePath = 'SignatureOfElectronic'
} else if (item.documentCode == '3') {
// item.key = 4
item.key = 6
item.routePath = 'productTip'
} else if (item.documentCode == '4') {
// item.key = 5
item.key = 7
item.routePath = 'InsuranceTip'
} else if (item.documentCode == '6') {
// item.key = 7
item.key = 9
item.routePath = 'avoidDutyTip'
} else if (item.documentCode == '7') {
// item.key = 8
item.key = 10
item.routePath = 'doubleRecordTip'
} else if (item.documentCode == '8') {
item.key = 1
item.routePath = 'apointValidDoc'
} else if (item.documentCode == '9') {
// item.key = 3
item.key = 5
item.routePath = 'shortPeriodProduct'
}else if (item.documentCode == '10') {
item.key = 1
item.routePath = 'commitmentSelfProtect'
} else if (item.documentCode == '11') {
// item.key = 6
item.key = 8
item.routePath = 'InsuranceRiskReminder'
} else if (item.documentCode == '12') {
// item.key = 10
item.key = 12
item.routePath = 'PersonalInformation'
} else if (item.documentCode == '13') {
// item.key = 2
item.key = 4
item.routePath = 'insuranceClauses'
}else if (item.documentCode == '14') {//风险评估pdf
item.key = 3
item.routePath = 'AnswerTip'
} else if (item.documentCode == '15') {
item.key = 7.1
item.routePath = 'universalRiskNotifyingMessageTip'
}
},
getSignInvalid() {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = {}
getSignInvalid(data).then((res) => {
if (res.result == '0') {
this.$toast.clear()
this.signInvalid = res.content.sign
}
})
},
getSignInvalid() {
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = {}
getSignInvalid(data).then((res) => {
if (res.result == '0') {
this.$toast.clear()
this.signInvalid = res.content.sign
}
})
},
async checkSignInvalid(signInvalid) {
let that = this
this.$toast.loading({

View File

@@ -170,6 +170,8 @@ export default {
// chooseProductCodes: '',
// pdf名字
pdfName: '',
caSignEnteringGinseng: '', //ca签名入参
caSignExoticGinseng: '', //ca签名出参
isPersonalInformation:'' // -1不存在 其他值是下标
}
},
@@ -368,12 +370,14 @@ export default {
let data = {
contNo: window.localStorage.getItem('contNo'),
baseEncryp: this.base64,
caSignEnteringGinseng: this.caSignEnteringGinseng, //ca签名入参
caSignExoticGinseng: JSON.stringify(this.caSignExoticGinseng), //ca签名出参
pdfAddresss: window.localStorage.getItem('insurance-policyUrl'),
orderNo: this.$route.query.orderNo
}
submit(data).then(res => {
if (res.result == '0') {
if (res.reslut == '0') {
this.$toast.clear()
window.localStorage.setItem('submitStatus', res.result)
this.$jump({
@@ -426,6 +430,8 @@ export default {
documentStatus: '3',
signType: that.signVal,
baseEncryp: that.base64,
caSignEnteringGinseng: this.caSignEnteringGinseng, //ca签名入参
caSignExoticGinseng: JSON.stringify(this.caSignExoticGinseng), //ca签名出参
documentType: that.appntSign.documentType,
documentCode: that.appntSign.documentCode
}
@@ -502,6 +508,8 @@ export default {
documentStatus: '3',
signType: that.signVal,
baseEncryp: that.base64,
caSignEnteringGinseng: this.caSignEnteringGinseng, //ca签名入参
caSignExoticGinseng: JSON.stringify(this.caSignExoticGinseng), //ca签名出参
documentType: that.insuredSign.documentType,
documentCode: that.insuredSign.documentCode
}
@@ -602,16 +610,30 @@ export default {
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
let temp = JSON.parse(data)
let caSignEnteringGinseng = {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '申请日期',
pageNo: '1',
index: '1',
offset: this.caOffset,
pos: '3', //设置偏移量 3表示右侧
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}
this.caSignEnteringGinseng = JSON.stringify(caSignEnteringGinseng)
this.caSignExoticGinseng = temp
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt},CA_state:${temp.state}`)
this.$toast.clear()
if (JSON.parse(data).state == '1') {
this.base64 = decodeURI(JSON.parse(data).sign)
if(this.base64){
this.appntSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSubmit = false
this.isSign = false
}
this.appntSign.documentStatus = '3'
this.isDisabledComplite = false
this.isSubmit = false
this.isSign = false
}
})
}
@@ -636,6 +658,23 @@ export default {
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
let temp = JSON.parse(data)
let caSignEnteringGinseng = {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '被保险人或法定监护人签名',
pageNo: '1',
index: '1',
offset: '-250',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}
this.caSignEnteringGinseng = JSON.stringify(caSignEnteringGinseng)
this.caSignExoticGinseng = temp
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`, JSON.stringify(data))
this.$toast.clear()
if (JSON.parse(data).state == '1') {
@@ -697,6 +736,23 @@ export default {
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
let temp = JSON.parse(data)
let caSignEnteringGinseng = {
//身份证号码
number: that.saleInsuredInfo.idNo,
//姓名
name: that.saleInsuredInfo.name,
type: that.saleInsuredInfo.idType,
keyword: '投保人签字',
pageNo: '1',
index: '1',
offset: '20',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}
this.caSignEnteringGinseng = JSON.stringify(caSignEnteringGinseng)
this.caSignExoticGinseng = temp
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`, JSON.stringify(data))
this.$toast.clear()
if (JSON.parse(data).state == '1') {
@@ -730,6 +786,23 @@ export default {
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
let temp = JSON.parse(data)
let caSignEnteringGinseng = {
//身份证号码
number: that.saleInsuredPersonInfo.idNo,
//姓名
name: that.saleInsuredPersonInfo.name,
type: that.saleInsuredPersonInfo.idType,
keyword: '被保险人或法定监护人签名',
pageNo: '1',
index: '1',
offset: '50',
pos: '3',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}
this.caSignEnteringGinseng = JSON.stringify(caSignEnteringGinseng)
this.caSignExoticGinseng = temp
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt}`, JSON.stringify(data))
this.$toast.clear()
if (JSON.parse(data).state == '1') {
@@ -834,7 +907,28 @@ export default {
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
// let temp = JSON.parse(data)
let temp = JSON.parse(data)
let caSignEnteringGinseng = {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '投保人签名',
pageNo: '1',
index: '1',
offset: '10',
pos: '3', //设置偏移量 3表示右侧
commentKeyword: '认真',
commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性',
commentOffset: '28',
commentPos: '2',
caType: '1',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}
this.caSignEnteringGinseng = JSON.stringify(caSignEnteringGinseng)
this.caSignExoticGinseng = temp
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt},CA_state:${temp.state}`)
this.$toast.clear()
if (JSON.parse(data).state == '1') {
@@ -866,7 +960,28 @@ export default {
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}).then(data => {
// let temp = JSON.parse(data)
let temp = JSON.parse(data)
let caSignEnteringGinseng = {
//身份证号码
number: this.saleInsuredInfo.idNo,
//姓名
name: this.saleInsuredInfo.name,
type: this.saleInsuredInfo.idType,
keyword: '申请日期',
pageNo: '1',
index: '1',
offset: this.caOffset,
pos: '3', //设置偏移量 3表示右侧
commentKeyword: '认真',
commentText: '本人已阅读保险条款、产品说明书和投保提示书,了解本产品的特点和保单利益的不确定性',
commentOffset: '28',
commentPos: '2',
caType: '1',
signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight
}
this.caSignEnteringGinseng = JSON.stringify(caSignEnteringGinseng)
this.caSignExoticGinseng = temp
// console.log(`--签名返回val:${val},this.detailJump:${this.detailJump},this.relationToAppnt:${this.relationToAppnt},CA_state:${temp.state}`)
this.$toast.clear()
if (JSON.parse(data).state == '1') {

View File

@@ -343,7 +343,7 @@ export default {
}
submit(data).then(res => {
if (res.result == '0') {
if (res.reslut == '0') {
this.$toast.clear()
window.localStorage.setItem('submitStatus', res.result)
this.$jump({

View File

@@ -148,11 +148,6 @@ export default {
if (res.result == '0') {
res.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => {
if(item.isMainRisk == '0'){
/**
* @Author: LiuXiaoFeng
* @Description: 保险期间大于1年或者是保终身的才展示产品说明书
* @Date: 2023/7/4
**/
if(item.insuYearFlag == 'Y' && item.insuYear > 1){
this.hasProductTip = true
}

View File

@@ -20,8 +20,6 @@
<van-cell title="证件类型" :value="appntDTO.idTypeText" />
<van-cell title="证件号码" :value="appntDTO.idNo" />
<van-cell title="联系电话" :value="appntDTO.mobileStar" />
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="appntDTO.isNewPeopleFlagText" />-->
<!-- <van-cell v-if="appntDTO.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="appntDTO.npTypeTypeText" />-->
</van-cell-group>
</van-collapse-item>
@@ -35,8 +33,6 @@
<van-cell title="证件类型" :value="item.idTypeText" />
<van-cell title="证件号码" :value="item.idNo" />
<van-cell title="联系电话" :value="item.mobile" />
<!-- <van-cell title="新市民身份" v-if="manageComCode == '45'" :value="item.isNewPeopleFlagText" />-->
<!-- <van-cell v-if="item.isNewPeopleFlagText == '是' && manageComCode == '45'" title="新市民类型" :value="item.npTypeText" />-->
</van-cell-group>
</van-collapse-item>
<div v-for="(itm, i) in item.bnfDTOs" :key="i" class="pb10">
@@ -89,7 +85,7 @@
<van-field maxlength="6" placeholder="请输入短信验证码" v-model="authCode" clearable label-width="0" />
<van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">{{
codeDisabled ? `${countDown}s后重新获取` : '获取验证码'
}}</van-button>
}}</van-button>
</van-cell-group>
</van-dialog>
<!-- 2019-09-27 版上线不含回执签收 marked by panglizong on 2019-09-26 -->
@@ -100,366 +96,355 @@
</template>
<script>
import { Collapse, CollapseItem, Cell, CellGroup, Button, Field, Dialog } from 'vant'
import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve'
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
import { checkPhone } from '@/api/ebiz/customer/customer'
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典进行页面展示
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
import riskRules from '@/views/ebiz/common/risk-rules'
export default {
data() {
return {
show: false, // 获取短信验证码
codeDisabled: false, // 获取验证码按钮是否禁用
timeId: null, // 计时器ID
countDown: 60, // 倒计时
authCode: '', // 验证码
smsAuthNum: 3,
operaFlag: null,
encyCustomerMobile: null,
customerMobile: null,
sid: null,
//人脸识别认证次数
faceAuthCount: {
appnt: 0,
insured: 0,
weixin: 0
},
// 折叠面板
activeNames: ['1'],
// 保单基本信息
OrderInfoDTO: {},
// 投保人信息
appntDTO: {},
// 被保险人信息
insuredDTOs: [],
// 保单号
contNo: '',
manageComCode:'',//代理人管理机构 52贵州 45广西
list: []
}
},
created() {
setTimeout(() => {
// 右上角的显示
window.EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/share@3x.png'
}
]
})
}, 1000)
window['appCallBack'] = this.appCallBack
// 获取保单详情
this.getPolicyDetail()
},
async mounted() {
let dataReturn = await riskRules.getAgentInfoFunc(this)
this.manageComCode = dataReturn.manageComCode
},
components: {
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Button.name]: Button,
[Field.name]: Field,
[Dialog.name]: Dialog
},
methods: {
// 获取短信验证码
getAuthCode() {
this.codeDisabled = true
//倒计时
this.timeId = setInterval(() => {
this.countDown--
if (this.countDown <= 0) {
window.clearInterval(this.timeId)
this.codeDisabled = false
this.countDown = 60
import { Collapse, CollapseItem, Cell, CellGroup, Button, Field, Dialog } from 'vant'
import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve'
import { getAuthCode, autchCodeCheck } from '@/api/ebiz/sale/sale'
import { checkPhone } from '@/api/ebiz/customer/customer'
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典进行页面展示
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
export default {
data() {
return {
show: false, // 获取短信验证码
codeDisabled: false, // 获取验证码按钮是否禁用
timeId: null, // 计时器ID
countDown: 60, // 计时
authCode: '', // 验证码
smsAuthNum: 3,
operaFlag: null,
encyCustomerMobile: null,
customerMobile: null,
sid: null,
//人脸识别认证次数
faceAuthCount: {
appnt: 0,
insured: 0,
weixin: 0
},
// 折叠面板
activeNames: ['1'],
// 保单基本信息
OrderInfoDTO: {},
// 投保人信息
appntDTO: {},
// 被保险人信息
insuredDTOs: [],
// 保单号
contNo: '',
list: []
}
},
created() {
setTimeout(() => {
// 右上角的显示
window.EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
img: this.$assetsUrl + 'images/share@3x.png'
}
}, 1000)
getAuthCode({
operateType: 'appntInfoEntry',
type: 'H5',
operateCode: this.customerMobile,
system: 'agentApp',
operateCodeType: '0'
}).then(res => {
console.log(res)
if (res.result == 0) {
this.sid = res.sessionId
} else {
this.$toast(res.resultMessage)
}
})
},
// 验证码确认事件
async authConfirm() {
//清理计时器
this.clearTimer()
this.changeSubmit()
},
// 清理计时器
clearTimer() {
window.clearInterval(this.timeId)
this.timeId = null
this.countDown = 60
this.codeDisabled = false
},
//提交变更申请
async changeSubmit() {
if (null == this.sid) {
this.$toast('请先进行发送短信验证码')
return
]
})
}, 1000)
window['appCallBack'] = this.appCallBack
// 获取保单详情
this.getPolicyDetail()
},
components: {
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[Cell.name]: Cell,
[CellGroup.name]: CellGroup,
[Button.name]: Button,
[Field.name]: Field,
[Dialog.name]: Dialog
},
methods: {
// 获取短信验证码
getAuthCode() {
this.codeDisabled = true
//倒计时
this.timeId = setInterval(() => {
this.countDown--
if (this.countDown <= 0) {
window.clearInterval(this.timeId)
this.codeDisabled = false
this.countDown = 60
}
let res = await autchCodeCheck({
smsId: this.sid,
code: this.authCode
})
}, 1000)
getAuthCode({
operateType: 'appntInfoEntry',
type: 'H5',
operateCode: this.customerMobile,
system: 'agentApp',
operateCodeType: '0'
}).then(res => {
console.log(res)
if (res.result == 0) {
this.toNextPage()
this.sid = res.sessionId
} else {
this.$toast(res.resultMessage)
}
},
realPeopelCheck() {
this.$toast.loading({
// 持续展示 toast
duration: 0,
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '加载中……'
})
let data = {
name: this.appntDTO.name,
idType: this.appntDTO.idType,
idNo: this.appntDTO.idNo,
mobile: this.appntDTO.mobile
}
this.customerMobile = this.appntDTO.mobile
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
this.authCode = null
// eslint-disable-next-line no-unused-vars
return new Promise((resolve, reject) => {
checkPhone(data).then(res => {
if (res.result == '0') {
console.log(res)
this.show = true
} else {
Dialog.confirm({
title: '提示',
message: '抱歉,您预留的手机号非您本人的手机号!',
showCancelButton: false
})
}
})
})
},
// 获取保单详情
getPolicyDetail() {
let that = this
let data = {
policyNo: window.localStorage.getItem('policyNo')
}
getPolicyDetail(data).then(res => {
if (res.result == '0') {
let appntDTO = res.content.appntDTO
let orderInfoDTO = res.content.orderInfoDTO
// 保单信息
if (orderInfoDTO.orderStatus == '0') {
orderInfoDTO.orderStatusText = '未签收'
} else if (orderInfoDTO.orderStatus == '1') {
orderInfoDTO.orderStatusText = '已签收'
} else {
orderInfoDTO.orderStatusText = ''
}
//团险渠道 查看团单号
if (orderInfoDTO.saleChnl === '2' || orderInfoDTO.saleChnl === '团险') {
orderInfoDTO.contNo=orderInfoDTO.grpContNo;
}
// 测试用
// orderInfoDTO.orderStatus = '0'
that.OrderInfoDTO = orderInfoDTO
// 投保人信息
this.filterData(dataDictionary.sex, 'sex', appntDTO)
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', appntDTO)
this.filterData(dataDictionary.npType, 'isNewPeopleFlag', appntDTO)
this.filterData(dataDictionary.idType, 'idType', appntDTO)
that.appntDTO = appntDTO
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
// 被保险人信息
res.content.insuredDTOs.map(insured => {
insured.riskDTOLst.map(risk => {
Number(risk.payIntv)
switch (risk.payIntv) {
case -1:
risk.payIntv = '不定期交'
break
case 0:
risk.payIntv = '一次交清'
break
case 1:
risk.payIntv = '月交'
break
case 3:
risk.payIntv = '季交'
break
case 6:
risk.payIntv = '半年交'
break
case 12:
risk.payIntv = '年交'
break
}
if (risk.insuYear == '70') {
risk.insuYear = '至70周岁'
} else if (risk.insuYear == '75') {
risk.insuYear = '至75周岁'
} else if (risk.insuYear == '80') {
risk.insuYear = '至80周岁'
} else if (risk.insuYear == '106') {
risk.insuYear = '终身'
} else {
risk.insuYear = risk.insuYearFlag == 'D' ? `${risk.insuYear}` : `${risk.insuYear}`
}
})
this.filterData(dataDictionary.sex, 'sex', insured)
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', insured)
this.filterData(dataDictionary.npType, 'npType', insured)
this.filterData(dataDictionary.idType, 'idType', insured)
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
insured.bnfDTOs.map(bnf => {
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
this.filterData(dataDictionary.sex, 'sex', bnf)
this.filterData(dataDictionary.isNewPeopleFlag, 'isNewPeopleFlag', bnf)
this.filterData(dataDictionary.npType, 'npType', bnf)
this.filterData(dataDictionary.idType, 'idType', bnf)
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
})
})
that.insuredDTOs = res.content.insuredDTOs
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
} else {
this.$toast(res.resultMessage)
}
})
},
appCallBack(data) {
if (data.trigger == 'right_button_click') {
console.log(this.$CacheUtils.getLocItem('saleInsuredInfo'))
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
extra: {
title: '国富人寿保单回执签字',
content: '国富人寿保单回执签收',
url:
location.origin +
'/#/serve/airSign?policyNo=' +
localStorage.policyNo +
'&token=' +
localStorage.token +
'&saleInsuredInfo=' +
encodeURI(this.$CacheUtils.getLocItem('saleInsuredInfo')),
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
img: this.$assetsUrl + 'images/logo.png'
}
})
}
},
//根据数据字典 将后端返回的数据渲染到页面中
filterData(dictionary, key, pageData) {
dictionary.forEach(item => {
if (pageData[key] == item.id) {
pageData[key + 'Text'] = item.text //渲染页面使用的字段
}
})
},
// 回执签收
next() {
})
},
// 验证码确认事件
async authConfirm() {
//清理计时器
this.clearTimer()
this.changeSubmit()
},
// 清理计时器
clearTimer() {
window.clearInterval(this.timeId)
this.timeId = null
this.countDown = 60
this.codeDisabled = false
},
//提交变更申请
async changeSubmit() {
if (null == this.sid) {
this.$toast('请先进行发送短信验证码')
return
}
let res = await autchCodeCheck({
smsId: this.sid,
code: this.authCode
})
if (res.result == 0) {
this.toNextPage()
// let that = this
// if (this.faceAuthCount.appnt < this.smsAuthNum) {
// if (this.appntDTO.idType == '1') {
// //证件类型为身份证时,进行人脸识别
// EWebBridge.webCallAppInJs('face_auth', {
// number: this.appntDTO.idNo, //身份证号码
// name: this.appntDTO.name //姓名
// }).then(data => {
// this.$toast.loading({
// duration: 0, // 持续展示 toast
// forbidClick: true, // 禁用背景点击
// loadingType: 'spinner',
// message: '加载中……'
// })
// this.$toast.clear()
// if (JSON.parse(data).state == '1') {
// this.toNextPage()
// } else {
// that.faceAuthCount.appnt++
// if (that.faceAuthCount.appnt >= this.smsAuthNum) {
// this.realPeopelCheck()
// }
// }
// })
// } else {
// this.toNextPage()
// }
// } else {
// this.realPeopelCheck()
// }
},
toNextPage() {
let params = {
contNo: window.localStorage.getItem('policyNo')
}
getReceiptSign(params).then(res => {
} else {
this.$toast(res.resultMessage)
}
},
realPeopelCheck() {
this.$toast.loading({
// 持续展示 toast
duration: 0,
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '加载中……'
})
let data = {
name: this.appntDTO.name,
idType: this.appntDTO.idType,
idNo: this.appntDTO.idNo,
mobile: this.appntDTO.mobile
}
this.customerMobile = this.appntDTO.mobile
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
this.authCode = null
// eslint-disable-next-line no-unused-vars
return new Promise((resolve, reject) => {
checkPhone(data).then(res => {
if (res.result == '0') {
this.$toast.clear()
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
window.localStorage.setItem('detailJump', '1')
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic',
forbidSwipeBack: '1',
title: '保险合同签收回执电子确认书签名'
},
routerInfo: {
path: '/sale/signatureOfElectronic'
console.log(res)
this.show = true
} else {
Dialog.confirm({
title: '提示',
message: '抱歉,您预留的手机号非您本人的手机号!',
showCancelButton: false
})
}
})
})
},
// 获取保单详情
getPolicyDetail() {
let that = this
let data = {
policyNo: window.localStorage.getItem('policyNo')
}
getPolicyDetail(data).then(res => {
if (res.result == '0') {
let appntDTO = res.content.appntDTO
let orderInfoDTO = res.content.orderInfoDTO
// 保单信息
if (orderInfoDTO.orderStatus == '0') {
orderInfoDTO.orderStatusText = '未签收'
} else if (orderInfoDTO.orderStatus == '1') {
orderInfoDTO.orderStatusText = '已签收'
} else {
orderInfoDTO.orderStatusText = ''
}
//团险渠道 查看团单号
if (orderInfoDTO.saleChnl === '2' || orderInfoDTO.saleChnl === '团险') {
orderInfoDTO.contNo=orderInfoDTO.grpContNo;
}
// 测试用
// orderInfoDTO.orderStatus = '0'
that.OrderInfoDTO = orderInfoDTO
// 投保人信息
this.filterData(dataDictionary.sex, 'sex', appntDTO)
this.filterData(dataDictionary.idType, 'idType', appntDTO)
that.appntDTO = appntDTO
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
// 被保险人信息
res.content.insuredDTOs.map(insured => {
insured.riskDTOLst.map(risk => {
Number(risk.payIntv)
switch (risk.payIntv) {
case -1:
risk.payIntv = '不定期交'
break
case 0:
risk.payIntv = '一次交清'
break
case 1:
risk.payIntv = '月交'
break
case 3:
risk.payIntv = '季交'
break
case 6:
risk.payIntv = '半年交'
break
case 12:
risk.payIntv = '年交'
break
}
if (risk.insuYear == '70') {
risk.insuYear = '至70周岁'
} else if (risk.insuYear == '75') {
risk.insuYear = '至75周岁'
} else if (risk.insuYear == '80') {
risk.insuYear = '至80周岁'
} else if (risk.insuYear == '106') {
risk.insuYear = '终身'
} else {
risk.insuYear = risk.insuYearFlag == 'D' ? `${risk.insuYear}` : `${risk.insuYear}`
}
})
} else {
this.$toast(res.resultMessage)
this.filterData(dataDictionary.sex, 'sex', insured)
this.filterData(dataDictionary.idType, 'idType', insured)
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
insured.bnfDTOs.map(bnf => {
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
this.filterData(dataDictionary.sex, 'sex', bnf)
this.filterData(dataDictionary.idType, 'idType', bnf)
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
})
})
that.insuredDTOs = res.content.insuredDTOs
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
} else {
this.$toast(res.resultMessage)
}
})
},
appCallBack(data) {
if (data.trigger == 'right_button_click') {
console.log(this.$CacheUtils.getLocItem('saleInsuredInfo'))
EWebBridge.webCallAppInJs('bridge', {
flag: 'share',
extra: {
title: '国富人寿保单回执签字',
content: '国富人寿保单回执签收',
url:
location.origin +
'/#/serve/airSign?policyNo=' +
localStorage.policyNo +
'&token=' +
localStorage.token +
'&saleInsuredInfo=' +
encodeURI(this.$CacheUtils.getLocItem('saleInsuredInfo')),
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
img: this.$assetsUrl + 'images/logo.png'
}
})
}
},
//根据数据字典 将后端返回的数据渲染到页面中
filterData(dictionary, key, pageData) {
dictionary.forEach(item => {
if (pageData[key] == item.id) {
pageData[key + 'Text'] = item.text //渲染页面使用的字段
}
})
},
// 回执签收
next() {
this.toNextPage()
// let that = this
// if (this.faceAuthCount.appnt < this.smsAuthNum) {
// if (this.appntDTO.idType == '1') {
// //证件类型为身份证时,进行人脸识别
// EWebBridge.webCallAppInJs('face_auth', {
// number: this.appntDTO.idNo, //身份证号码
// name: this.appntDTO.name //姓名
// }).then(data => {
// this.$toast.loading({
// duration: 0, // 持续展示 toast
// forbidClick: true, // 禁用背景点击
// loadingType: 'spinner',
// message: '加载中……'
// })
// this.$toast.clear()
// if (JSON.parse(data).state == '1') {
// this.toNextPage()
// } else {
// that.faceAuthCount.appnt++
// if (that.faceAuthCount.appnt >= this.smsAuthNum) {
// this.realPeopelCheck()
// }
// }
// })
// } else {
// this.toNextPage()
// }
// } else {
// this.realPeopelCheck()
// }
},
toNextPage() {
let params = {
contNo: window.localStorage.getItem('policyNo')
}
getReceiptSign(params).then(res => {
if (res.result == '0') {
this.$toast.clear()
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
window.localStorage.setItem('detailJump', '1')
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
this.$CacheUtils.setLocItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/signatureOfElectronic',
forbidSwipeBack: '1',
title: '保险合同签收回执电子确认书签名'
},
routerInfo: {
path: '/sale/signatureOfElectronic'
}
})
} else {
this.$toast(res.resultMessage)
}
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-container {
.van-hairline--top-bottom::after {
border: none;
}
/deep/ .van-collapse-item__content {
padding-top: 0;
}
/deep/.van-collapse-item__title {
padding-left: 30px;
}
/deep/ .van-cell__value {
text-align: left !important;
}
.detail-container {
.van-hairline--top-bottom::after {
border: none;
}
/deep/ .van-collapse-item__content {
padding-top: 0;
}
/deep/.van-collapse-item__title {
padding-left: 30px;
}
/deep/ .van-cell__value {
text-align: left !important;
}
}
</style>

View File

@@ -32,11 +32,13 @@ module.exports = {
chainWebpack: config => {
// 移除 prefetch 插件
config.plugins.delete('prefetch')
// // 压缩代码
// config.optimization.minimize(true)
// // 分割代码
// config.optimization.splitChunks({
// chunks: 'all',
// 或者
// 修改它的选项:
// config.plugin('prefetch').tap(options => {
// options[0].fileBlacklist = options[0].fileBlacklist || []
// options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
// return options
// })
},
devServer: {