mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 18:16:44 +08:00
Compare commits
2 Commits
feature/GF
...
hotfix/【20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd0017a216 | ||
|
|
308f273b57 |
@@ -343,4 +343,22 @@ export function getUniversalCodeLst(data) {
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// redis存数据
|
||||
export function getCacheRedis(data) {
|
||||
return request({
|
||||
url: getUrl('/app/cacheConfig/getCacheRedis', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// redis取数据
|
||||
export function setCacheRedis(data) {
|
||||
return request({
|
||||
url: getUrl('/app/cacheConfig/setCacheRedis', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,30 +1,52 @@
|
||||
import {AESCacheEncrypt,AESCacheDecrypt} from '@/assets/js/utils/cryptoJsUtil'
|
||||
import configApp from '@/config'
|
||||
import cacheKeys from '@/assets/js/utils/needCacheKey'
|
||||
import { getCacheRedis, setCacheRedis } from '@/api/ebiz/sale/sale'
|
||||
export default {
|
||||
setLocItem: function(key, value) {
|
||||
const exist = cacheKeys.encodeKeys.find(item => {
|
||||
return item === key
|
||||
})
|
||||
//设置localStorage 值
|
||||
if (cacheKeys.isAll || exist) {
|
||||
window.localStorage.setItem(key, AESCacheEncrypt(value, configApp.CACHE_ENCRYP))
|
||||
} else {
|
||||
window.localStorage.setItem(key, value)
|
||||
}
|
||||
async setCacheRedis(params){
|
||||
await setCacheRedis(params)
|
||||
},
|
||||
getLocItem: function(key) {
|
||||
// 获取localStorage 中值
|
||||
let value = window.localStorage.getItem(key)
|
||||
if (value && value != '') {
|
||||
setLocItem: function(key, value) {
|
||||
if(key != 'token'){
|
||||
const exist = cacheKeys.encodeKeys.find(item => {
|
||||
return item === key
|
||||
})
|
||||
if (cacheKeys.isAll || exist) {
|
||||
return AESCacheDecrypt(value, configApp.CACHE_ENCRYP)
|
||||
let params = {
|
||||
key: key,
|
||||
value: AESCacheEncrypt(value, configApp.CACHE_ENCRYP)
|
||||
}
|
||||
this.setCacheRedis(params)
|
||||
} else {
|
||||
let params = {
|
||||
key: key,
|
||||
value: AESCacheEncrypt(value, configApp.CACHE_ENCRYP)
|
||||
}
|
||||
this.setCacheRedis(params)
|
||||
}
|
||||
}else{
|
||||
window.localStorage.setItem(key, value)
|
||||
}
|
||||
},
|
||||
getLocItem: function(key,type) {
|
||||
if(key != 'token') {
|
||||
return new Promise((resolve,reject)=>{
|
||||
let params = {
|
||||
key: key
|
||||
}
|
||||
getCacheRedis(params,type).then(res=>{
|
||||
const exist = cacheKeys.encodeKeys.find(item => {
|
||||
return item === key
|
||||
})
|
||||
if (cacheKeys.isAll || exist) {
|
||||
resolve(AESCacheDecrypt(res, configApp.CACHE_ENCRYP))
|
||||
// return AESCacheDecrypt(res, configApp.CACHE_ENCRYP)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
return window.localStorage.getItem(key)
|
||||
}
|
||||
return value
|
||||
},
|
||||
removeLocItem: function(key) {
|
||||
// 获取localStorage 中值
|
||||
|
||||
@@ -27,29 +27,29 @@ function getSearchString (key) {
|
||||
}
|
||||
return obj[key]
|
||||
}
|
||||
let apiVersion = 'v1'
|
||||
// var ua = window.navigator.userAgent.toLowerCase()
|
||||
// //通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信
|
||||
// if (localStorage.getItem('apiVersion')) {
|
||||
// apiVersion = localStorage.getItem('apiVersion')
|
||||
// } else {
|
||||
// if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||
// //report/reportList数据报表页面在浏览器可以打开了,但在微信或企业微信中打开不了,接口请求不需要token
|
||||
// if (window.location.href.indexOf('apiVersion') > 0) {
|
||||
// apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时,为v2
|
||||
// } else {
|
||||
// apiVersion = 'v3'
|
||||
// }
|
||||
// } else {
|
||||
// // 在app
|
||||
// if (navigator.userAgent.indexOf('JZG_') > 0) {
|
||||
// apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2'
|
||||
// }
|
||||
// }
|
||||
// window.localStorage.setItem('apiVersion', apiVersion)
|
||||
// }
|
||||
// // 可以多个接口域名,按需添加
|
||||
// console.log('环境:', process.env.VUE_APP_FLAG)
|
||||
let apiVersion = 'v2'
|
||||
var ua = window.navigator.userAgent.toLowerCase()
|
||||
//通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信
|
||||
if (localStorage.getItem('apiVersion')) {
|
||||
apiVersion = localStorage.getItem('apiVersion')
|
||||
} else {
|
||||
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||
//report/reportList数据报表页面在浏览器可以打开了,但在微信或企业微信中打开不了,接口请求不需要token
|
||||
if (window.location.href.indexOf('apiVersion') > 0) {
|
||||
apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时,为v2
|
||||
} else {
|
||||
apiVersion = 'v3'
|
||||
}
|
||||
} else {
|
||||
// 在app
|
||||
if (navigator.userAgent.indexOf('JZG_') > 0) {
|
||||
apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2'
|
||||
}
|
||||
}
|
||||
window.localStorage.setItem('apiVersion', apiVersion)
|
||||
}
|
||||
// 可以多个接口域名,按需添加
|
||||
console.log('环境:', process.env.VUE_APP_FLAG)
|
||||
switch (process.env.VUE_APP_FLAG) {
|
||||
case 'dev':
|
||||
apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/' + apiVersion // 国富api ///api/v1
|
||||
|
||||
@@ -978,9 +978,7 @@ export default {
|
||||
if (res.result == 0) {
|
||||
//选择保障方案
|
||||
this.trialList = res.trialList
|
||||
if (!this.allPrice) {
|
||||
this.allPrice = res.trialList[0].prem
|
||||
}
|
||||
this.allPrice = res.trialList[0].prem
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
@@ -1596,32 +1594,10 @@ export default {
|
||||
this.userInfo.homeAddress = data.homeAddress //家庭详细地址
|
||||
this.userInfo.occupationCode = data.occupationCode
|
||||
this.userInfo.occupationName = data.occupationName
|
||||
let thisoccupationType = ''
|
||||
let thislifeGrade = ''
|
||||
let thishealthGrade = ''
|
||||
let collect = (data,code) => {
|
||||
data.forEach(item => {
|
||||
if (item.code == code) {
|
||||
if (this.trialDTOS.productInsuredDTO.healthGrade && this.trialDTOS.productInsuredDTO.healthGrade != '0') {
|
||||
thisoccupationType = item.healthGrade
|
||||
}
|
||||
if (this.trialDTOS.productInsuredDTO.lifeGrade && this.trialDTOS.productInsuredDTO.lifeGrade != '0') {
|
||||
thisoccupationType = item.lifeGrade
|
||||
}
|
||||
thislifeGrade = item.lifeGrade
|
||||
thishealthGrade = item.healthGrade
|
||||
} else {
|
||||
if (item.subs && item.subs.length != 0) {
|
||||
collect(item.subs,code)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
collect(occupationList,data.occupationCode)
|
||||
|
||||
this.userInfo.occupationType =thisoccupationType
|
||||
this.userInfo.lifeGrade = thislifeGrade
|
||||
this.userInfo.healthGrade = thishealthGrade
|
||||
this.userInfo.occupationType = data.lifeGrade
|
||||
this.userInfo.lifeGrade = data.lifeGrade
|
||||
this.userInfo.healthGrade = data.healthGrade
|
||||
this.userInfo.averageAnnualIncome = this.itemProductDTOS.productCode == 'GFRS_M0032' ? data.averageYearlyIncome : '0' //平均年收入
|
||||
//2516--三个学平险--被保险人国籍默认中国,允许修改
|
||||
if (this.itemProductDTOS.productCode == 'GFRS_M0048' || this.itemProductDTOS.productCode == 'GFRS_M0049' || this.itemProductDTOS.productCode == 'GFRS_M0050'
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -405,7 +405,9 @@ export default {
|
||||
//校验该代理人是否有该产品的售卖权限
|
||||
return this.$toast(flagPermission.resultMessage)
|
||||
}
|
||||
let flagCompany = await riskRules.checkCompany(resultData.productCode, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).workcompany, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).isAsync,this)
|
||||
|
||||
let dataResp = await this.$CacheUtils.getLocItem('saleInsuredInfo')
|
||||
let flagCompany = await riskRules.checkCompany(resultData.productCode, JSON.parse(dataResp).workcompany, JSON.parse(dataResp).isAsync,this)
|
||||
if (flagCompany && localStorage.isFrom != 'proposal') {
|
||||
//校验该投保人的工作单位是否能够投保该产品
|
||||
return this.$toast('该投保人工作单位不能投保该产品')
|
||||
@@ -472,6 +474,16 @@ export default {
|
||||
this.jumpTo()
|
||||
}
|
||||
},
|
||||
async getResp(){
|
||||
let res = ''
|
||||
res = await this.$CacheUtils.getData('saleInsuredInfo',123)
|
||||
console.log('res');
|
||||
console.log(res);
|
||||
if (res){
|
||||
return res
|
||||
}
|
||||
|
||||
},
|
||||
//构建险种因子列表
|
||||
getFactorList(resultData) {
|
||||
let productTrialInfoDTO = resultData.productTrialInfoDTO
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
<div class="text-right pv5">
|
||||
<van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index,item)" class="mr5" type="danger">编辑</van-button>
|
||||
<!-- <van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index,item)" class="mr5" type="danger">编辑</van-button>-->
|
||||
<van-button size="small" round @click="deteleInsure(index)" plain type="danger">删除</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,7 +119,7 @@
|
||||
<script>
|
||||
import { Tag, SubmitBar, Icon, Dialog, RadioGroup, Radio, Image } from 'vant'
|
||||
import FieldPicker from '@/components/ebiz/FieldPicker'
|
||||
import { orderDetail, deleteOrderInfo, mainRiskList, mainRiskListProposal, calculatePremium } from '@/api/ebiz/common/common'
|
||||
import { orderDetail, deleteOrderInfo } from '@/api/ebiz/common/common'
|
||||
import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
|
||||
import { getDetail, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { saveOrderActiveType,getActivityList } from '@/api/ebiz/sale/sale.js'
|
||||
@@ -148,7 +148,6 @@ export default {
|
||||
noCheckedUrl: require('@/assets/images/kmh/no_checked.png'),
|
||||
proposalOrderNo:'',
|
||||
renovate:'',//刷新子组件
|
||||
isCrossChannel: 0, // 是否选择交叉渠道列表 0-否 1-是
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -181,30 +180,18 @@ export default {
|
||||
}
|
||||
//建议书--右上角为退出流程键(到建议书列表)×,并清除浏览记录
|
||||
if (localStorage.isFrom == 'proposal') {
|
||||
// eslint-disable-next-line no-undef
|
||||
setTimeout(() => {
|
||||
EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/del-close.png',
|
||||
route: { flag: '', extra: {} }
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 500)
|
||||
getDetail({
|
||||
orderNo: this.$route.query.proposalOrderNo
|
||||
}).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.recommendType = res.content[0].recmdDTO?res.content[0].recmdDTO.recommendType:'';
|
||||
if (this.recommendType == '02' || this.recommendType == '11') {
|
||||
// 电投 团险渠道产品 均为交叉渠道销售
|
||||
this.isCrossChannel = '1';
|
||||
}
|
||||
}
|
||||
})
|
||||
// eslint-disable-next-line no-undef
|
||||
setTimeout(() => {
|
||||
EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/del-close.png',
|
||||
route: { flag: '', extra: {} }
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
|
||||
window.appCallBack = this.appCallBack
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
this.getProductList()
|
||||
@@ -435,236 +422,8 @@ export default {
|
||||
this.$toast(resultData.resultMessage)
|
||||
}
|
||||
},
|
||||
//获取主险列表--普通产品
|
||||
async getMainRiskList(riskProductCode) {
|
||||
let mainRiskCodes = localStorage.mainRiskCodes && JSON.parse(localStorage.mainRiskCodes)
|
||||
let mainListDate = { platform: 'app' }
|
||||
switch (this.isFrom) {
|
||||
case 'proposal':
|
||||
mainListDate.platform = 'proposal'
|
||||
break
|
||||
case 'sale':
|
||||
mainListDate.platform = 'app'
|
||||
break
|
||||
}
|
||||
if (this.isCrossChannel == '1') {
|
||||
mainListDate.platform = 'cross'
|
||||
}
|
||||
let resultData
|
||||
if(this.isFrom == 'proposal'){
|
||||
resultData = await mainRiskListProposal(mainListDate)
|
||||
}else{
|
||||
resultData = await mainRiskList(mainListDate)
|
||||
}
|
||||
if (resultData.result == 0) {
|
||||
if (resultData.mainRiskDTOS && resultData.mainRiskDTOS.length > 0){
|
||||
resultData.mainRiskDTOS.forEach(item=>{
|
||||
if (item.riskProductCode == riskProductCode) {
|
||||
this.result = item
|
||||
}
|
||||
})
|
||||
this.addMainRisk()
|
||||
}
|
||||
}
|
||||
},
|
||||
//储存主险
|
||||
async addMainRisk() {
|
||||
localStorage.setItem('isTrial', '1')
|
||||
let riskProductCode = this.result.riskProductCode
|
||||
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
|
||||
if (resultData.result == 0) {
|
||||
resultData = resultData.trialDTOS[0]
|
||||
localStorage.isTrial = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? '0' : '1'
|
||||
localStorage.hint = resultData.hint
|
||||
if (resultData.productTrialInfoDTO.dutyGroup != null) {
|
||||
resultData.productTrialInfoDTO.dutyGroup.map(item => {
|
||||
if (item.dutyName == '意外身故/伤残保险金') {
|
||||
item.defaultDutyAmt = item.minDutyAmt
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (resultData.productTrialInfoDTO.ruleExpression) {
|
||||
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {}
|
||||
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
|
||||
localStorage.ruleExpression = JSON.stringify(ruleExpression)
|
||||
}
|
||||
|
||||
/********start 主险选择限制 start******/
|
||||
|
||||
// 检验投被人关系 惠企保特殊校验
|
||||
if (riskProductCode == 'GFRS_M0040') {
|
||||
if (riskRules.relationLimit(resultData, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt, this)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
// 检验投被人关系 国富人寿特定疾病药品费用医疗保险特殊校验
|
||||
if (riskProductCode == 'GFRS_M0045') {
|
||||
if (riskRules.relationCommonLimit(resultData, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt, this)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (riskRules.ageLimit(resultData, this, null,riskProductCode)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (riskRules.medicalLimit(resultData, this)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (riskRules.healthGradeLimit(resultData, this)) {
|
||||
return
|
||||
}
|
||||
// if (riskRules.lifeGradeLimit(resultData, this)) {
|
||||
// return
|
||||
// }
|
||||
//validateAppntFlag 0-职业寿险等级需校验主合同的投保人;1-职业寿险等级无需校验主合同的投保人
|
||||
if (resultData.productInsuredDTO.validateAppntFlag == '0') {
|
||||
//校验主合同投保人寿险职业等级
|
||||
if (riskRules.lifeGradeLimitForBaby(resultData, this)) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
//校验主合同被保险人寿险职业等级
|
||||
if (riskRules.lifeGradeLimit(resultData, this)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let flagPermission = await riskRules.getProductSellPermissionList(resultData.productCode, this,this.isCrossChannel)
|
||||
if (flagPermission.flag && localStorage.isFrom != 'proposal') {
|
||||
//校验该代理人是否有该产品的售卖权限
|
||||
return this.$toast(flagPermission.resultMessage)
|
||||
}
|
||||
let flagCompany = await riskRules.checkCompany(resultData.productCode, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).workcompany, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).isAsync,this)
|
||||
if (flagCompany && localStorage.isFrom != 'proposal') {
|
||||
//校验该投保人的工作单位是否能够投保该产品
|
||||
return this.$toast('该投保人工作单位不能投保该产品')
|
||||
}
|
||||
/********end 主险选择限制 end******/
|
||||
|
||||
//保存附加险
|
||||
localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst)
|
||||
localStorage.isAutoPay = resultData.isAutoPay
|
||||
localStorage.isRenew = resultData.isRenew
|
||||
localStorage.isForceRenew = resultData.isForceRenew
|
||||
localStorage.isRelated = resultData.isRelated
|
||||
|
||||
let calFactorLst = this.getFactorList(resultData)
|
||||
let productTrialYearDTOS = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? resultData.productTrialInfoDTO.productTrialYearDTOS : null
|
||||
let hasAddtionRisk = (resultData.productTrialInfoDTO.addtionRiskLst != null && resultData.productTrialInfoDTO.addtionRiskLst.length) ? true : false
|
||||
let currentProductInfo = localStorage.isTrial == '1' ? {
|
||||
isCrossChannel:this.isCrossChannel,
|
||||
calFactorLst,
|
||||
hasAddtionRisk,
|
||||
isMainRisk: 0,
|
||||
hint: resultData.hint,
|
||||
riskType: resultData.riskType,
|
||||
riskName: this.result.riskName,
|
||||
productCode: this.result.riskProductCode,
|
||||
mainRiskCode: this.result.riskProductCode,
|
||||
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
|
||||
influences: resultData.productTrialInfoDTO.influences,
|
||||
isRemit: resultData.productTrialInfoDTO.isRemit,
|
||||
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
|
||||
predictTransferPrem: null //建议书使用 预计转入保费字段
|
||||
} : {
|
||||
isCrossChannel:this.isCrossChannel,
|
||||
productTrialYearDTOS,
|
||||
calFactorLst,
|
||||
hasAddtionRisk,
|
||||
isMainRisk: 0,
|
||||
hint: resultData.hint,
|
||||
riskType: resultData.riskType,
|
||||
riskName: this.result.riskName,
|
||||
productCode: this.result.riskProductCode,
|
||||
mainRiskCode: this.result.riskProductCode,
|
||||
documentDTOS: resultData.productTrialInfoDTO.documentDTOS,
|
||||
influences: resultData.productTrialInfoDTO.influences,
|
||||
isRemit: resultData.productTrialInfoDTO.isRemit,
|
||||
hasPredictTransferPrem: resultData.productTrialInfoDTO.hasPredictTransferPrem, //建议书使用 是否展示预计转入保费
|
||||
predictTransferPrem: null //建议书使用 预计转入保费字段
|
||||
}
|
||||
|
||||
//构建险种数组
|
||||
let productsData
|
||||
if (localStorage.chooseProducts) {
|
||||
productsData = JSON.parse(localStorage.chooseProducts)
|
||||
productsData.push(currentProductInfo)
|
||||
} else {
|
||||
productsData = [currentProductInfo]
|
||||
}
|
||||
//保存选择险种
|
||||
productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况
|
||||
localStorage.chooseProducts = JSON.stringify(productsData)
|
||||
this.jumpTo(this.thisEditIndex,this.thisEditData)
|
||||
}
|
||||
},
|
||||
//构建险种因子列表
|
||||
getFactorList(resultData) {
|
||||
let productTrialInfoDTO = resultData.productTrialInfoDTO
|
||||
console.log(productTrialInfoDTO, 'wode')
|
||||
let calFactorLst = resultData.productTrialInfoDTO.calFactorLst
|
||||
console.log('calFactorLst', calFactorLst)
|
||||
|
||||
calFactorLst.forEach(item => {
|
||||
item['isMainRisk'] = 0
|
||||
item.columns = []
|
||||
if (item.type == 0) {
|
||||
//1、type=0 select 2、type=1 input+stepper
|
||||
productTrialInfoDTO[item.code].forEach(factor => {
|
||||
if (factor.defaultValue == 0) {
|
||||
item.showContent = factor.showContent
|
||||
if (factor[item.code + 'Flag'] != undefined) {
|
||||
item[item.code] = factor[item.code]
|
||||
item[item.code + 'Flag'] = factor[item.code + 'Flag']
|
||||
item.hasFlag = '1'
|
||||
}else if(item.code == 'pensionAge'){
|
||||
//养老保险金领取年龄
|
||||
item[item.code] = factor[item.code]
|
||||
item['sex'] = factor.sex
|
||||
}else {
|
||||
item[item.code] = factor[item.code]
|
||||
}
|
||||
}
|
||||
let itemColumns = { text: factor.showContent, value: factor[item.code], flag: factor[item.code + 'Flag'],sex:factor.sex}
|
||||
if (factor.medical !== undefined) {
|
||||
itemColumns.medical = factor.medical
|
||||
}
|
||||
item.columns.push(itemColumns)
|
||||
})
|
||||
} else if (item.type == 1) {
|
||||
//按年龄选择
|
||||
if (productTrialInfoDTO[item.code] != null) {
|
||||
productTrialInfoDTO[item.code].forEach(factor => {
|
||||
// item = Object.assign(item, factor)
|
||||
if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge <= Number(factor.maxAge)){
|
||||
// if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age <= Number(factor.maxAge)){
|
||||
item = Object.assign(item, factor)
|
||||
}
|
||||
})
|
||||
if (item.code == 'inputPrem') {
|
||||
item['inputPrem'] = Number(item.minPrem) * Number(item.moneyUnit)
|
||||
} else {
|
||||
item['amt'] = Number(item.minAmt) * Number(item.moneyUnit)
|
||||
}
|
||||
}
|
||||
}
|
||||
//规则储存
|
||||
item['rules'] = productTrialInfoDTO[item.code]
|
||||
})
|
||||
// // 用于意外险初始化保额
|
||||
// calFactorLst.map(item => {
|
||||
// if (item.code == '"dutyGroup"') {
|
||||
// item.rules.map(factor => {
|
||||
// factor[0].defaultDutyAmt = 50
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
return calFactorLst
|
||||
},
|
||||
jumpTo(index,data){
|
||||
//编辑
|
||||
editInsure(index,data){
|
||||
let insuanceIdInfo = [{insuanceId: data.insuanceId, riskCode: data.riskCode, isMainRisk: 0 }]
|
||||
if(data.addtion && data.addtion.length != 0){
|
||||
data.addtion.forEach(item=>{
|
||||
@@ -678,12 +437,11 @@ export default {
|
||||
let isProposal = localStorage.isFrom == 'proposal' ? true : false
|
||||
let thismyurl = ''
|
||||
if (this.$route.query.orderNo) {
|
||||
thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo)
|
||||
thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceId='+insuanceId
|
||||
} else if (this.$route.query.proposalOrderNo) {
|
||||
thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo)
|
||||
thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceId='+insuanceId
|
||||
}
|
||||
if (isProposal) {
|
||||
window.localStorage.removeItem("editproposaladdrisk")
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
@@ -695,12 +453,6 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
editInsure(index,data){
|
||||
this.thisEditIndex = index
|
||||
this.thisEditData = data
|
||||
this.getMainRiskList(data.riskCode)
|
||||
},
|
||||
//下一步
|
||||
async nextStep() {
|
||||
if (!this.$route.query.salePageFlag) {
|
||||
|
||||
@@ -453,10 +453,21 @@ export default {
|
||||
//编辑被保险人
|
||||
edit(item) {
|
||||
item.birthday = item.birthdayLabel
|
||||
// item.age = item.insuredAge
|
||||
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(item)) //存储被保险人信息
|
||||
localStorage.isFrom = 'proposal'
|
||||
// let url = `/common/selectedProduct?proposalEdit=1&proposalOrderNo=${item.orderNo}`
|
||||
let url = `/proposal/insuredPerson?proposalOrderNo=${this.proposalOrderNo}&insuredId=`+item.insuredId
|
||||
this.$router.push({ path: url })
|
||||
// this.$jump({
|
||||
// flag: 'h5',
|
||||
// extra: {
|
||||
// url: location.origin + `/#${url}`
|
||||
// },
|
||||
// routerInfo: {
|
||||
// path: url
|
||||
// }
|
||||
// })
|
||||
},
|
||||
//添加被保险人 添加一个没有险种的被保险人
|
||||
addPerson(item) {
|
||||
|
||||
@@ -326,11 +326,11 @@ export default {
|
||||
//点击下一步
|
||||
nextStep() {
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
// let sex = this.insured.sex == '0'?'男':'女'
|
||||
// let name = sex + this.insured.insuredAge+'岁'
|
||||
// if(this.insured.name == name){
|
||||
// this.insured.name = ''
|
||||
// }
|
||||
let sex = this.insured.sex == '0'?'男':'女'
|
||||
let name = sex + this.insured.insuredAge+'岁'
|
||||
if(this.insured.name == name){
|
||||
this.insured.name = ''
|
||||
}
|
||||
//保存有没有社保,在保费计算用到
|
||||
//localStorage.setItem('proposalMedical', this.insured.medical == '0' ? '1' : '0')
|
||||
localStorage.proposalMedical = this.insured.medical == '0' ? '1' : '0'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)">
|
||||
@@ -279,7 +279,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>
|
||||
@@ -382,7 +382,6 @@ export default {
|
||||
mainRiskCodes: [],
|
||||
time: 5,
|
||||
proposalNo:'',
|
||||
mainRiskName: ''
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@@ -438,7 +437,6 @@ export default {
|
||||
})
|
||||
}, 1000)
|
||||
window['appCallBack'] = this.appCallBack*/
|
||||
// init方法在微信端存储token,接口请求用此token,所以init方法前不要请求接口,会影响分享微信功能,接口会报token为空
|
||||
this.init()
|
||||
//校验当前用户权限
|
||||
funcPermCheck({}).then(res => {
|
||||
@@ -598,7 +596,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) {
|
||||
@@ -610,34 +608,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)
|
||||
@@ -648,23 +637,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') {
|
||||
@@ -714,32 +691,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
|
||||
@@ -929,17 +880,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: {
|
||||
|
||||
@@ -136,9 +136,6 @@
|
||||
data-vv-name="联系地址"
|
||||
/>
|
||||
<van-field v-model="userInfo.village" label="" name="详细地址" placeholder="请输入详细地址" v-validate="'required'" clearable maxlength="30" />
|
||||
<div class="pl10 pt10 pb10 pr10 address fs14">
|
||||
<van-checkbox v-model="withRootUser.value">同投保人地址</van-checkbox>
|
||||
</div>
|
||||
<van-field
|
||||
v-model="userInfo.yearSalary"
|
||||
label="平均年收入(万元)"
|
||||
@@ -274,10 +271,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
withRootUser: {
|
||||
load: false, //防止重复请求
|
||||
value: false,
|
||||
},
|
||||
nameLimit: false,
|
||||
idNoLimit: false,
|
||||
birthdayLimit: false,
|
||||
@@ -1203,64 +1196,31 @@ export default {
|
||||
}
|
||||
|
||||
this.isInsured = true
|
||||
let params = {
|
||||
orderNo: this.$route.query.orderNo
|
||||
let insuredDetail = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||
console.log(insuredDetail,'insuredDetailqqqqqqqqq')
|
||||
this.userInfo.name = insuredDetail.name //姓名
|
||||
this.nameLimit = Boolean(insuredDetail.name)
|
||||
this.userInfo.sex = insuredDetail.sex //性别
|
||||
this.sexLimit = Boolean(insuredDetail.sex)
|
||||
this.userInfo.nativeplace = insuredDetail.nativeplace //国家地区
|
||||
this.userInfo.birthday = insuredDetail.birthday //出生日期
|
||||
this.birthdayLimit = Boolean(insuredDetail.birthday)
|
||||
this.userInfo.idType = insuredDetail.idType //证件类型
|
||||
this.userInfo.idNo = insuredDetail.idNo //证件号码
|
||||
this.idNoLimit = Boolean(insuredDetail.idNo)
|
||||
this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期
|
||||
this.userInfo.certiexpiredate = insuredDetail.certiexpiredate == '9999-12-31' ? '' : insuredDetail.certiexpiredate //证件截止日期
|
||||
this.userInfo.effectiveDateType = insuredDetail.certiexpiredate == '9999-12-31' //是否长期
|
||||
this.userInfo.mobile = insuredDetail.mobile
|
||||
this.mobileLimit = Boolean(insuredDetail.mobile)
|
||||
let age = utilsAge.getAge(insuredDetail.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if (age > 45) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
}
|
||||
getOrderDetail(params).then(res=>{
|
||||
if(res.result == 0){
|
||||
let insuredDetail = res.orderDTO.appntDTO
|
||||
this.userInfo.name = insuredDetail.name //姓名
|
||||
this.nameLimit = Boolean(insuredDetail.name)
|
||||
this.userInfo.sex = insuredDetail.sex //性别
|
||||
this.sexLimit = Boolean(insuredDetail.sex)
|
||||
this.userInfo.nativeplace = insuredDetail.nativeplace //国家地区
|
||||
this.userInfo.birthday = insuredDetail.birthday //出生日期
|
||||
this.birthdayLimit = Boolean(insuredDetail.birthday)
|
||||
this.userInfo.idType = insuredDetail.idType //证件类型
|
||||
this.userInfo.idNo = insuredDetail.idNo //证件号码
|
||||
this.idNoLimit = Boolean(insuredDetail.idNo)
|
||||
this.userInfo.certificateValidate = insuredDetail.certificateValidate //证件起始日期
|
||||
this.userInfo.certiexpiredate = insuredDetail.certiexpiredate == '9999-12-31' ? '' : insuredDetail.certiexpiredate //证件截止日期
|
||||
this.userInfo.effectiveDateType = insuredDetail.certiexpiredate == '9999-12-31' //是否长期
|
||||
this.userInfo.mobile = insuredDetail.mobile
|
||||
this.mobileLimit = Boolean(insuredDetail.mobile)
|
||||
this.userInfo.marriage =insuredDetail.marriage
|
||||
if(this.userInfo.marriage == 1){
|
||||
this.userInfo.marriageStatus = '已婚'
|
||||
}
|
||||
else if(this.userInfo.marriage == 2){
|
||||
this.userInfo.marriageStatus = '未婚'
|
||||
}
|
||||
else if(this.userInfo.marriage == 3){
|
||||
this.userInfo.marriageStatus = '离异'
|
||||
}
|
||||
else if(this.userInfo.marriage == 4){
|
||||
this.userInfo.marriageStatus = '丧偶'
|
||||
}
|
||||
let age = utilsAge.getAge(insuredDetail.birthday, new Date())
|
||||
this.effectiveDateTypeAble = age <= 45
|
||||
if (age > 45) {
|
||||
this.userInfo.effectiveDateType = true
|
||||
}
|
||||
this.idLimit = true
|
||||
this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码
|
||||
this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称
|
||||
|
||||
this.areaStr = getAreaName([
|
||||
{ code: insuredDetail.homeProvince },
|
||||
{ code: insuredDetail.homeCity },
|
||||
{ code: insuredDetail.homeArea },
|
||||
])
|
||||
this.userInfo.province = insuredDetail.homeProvince
|
||||
this.userInfo.city = insuredDetail.homeCity
|
||||
this.userInfo.area = insuredDetail.homeArea
|
||||
this.userInfo.village = insuredDetail.homeAddress
|
||||
|
||||
this.userInfo.yearSalary = insuredDetail.averageAnnualIncome
|
||||
this.userInfo.averageAnnualIncome = insuredDetail.averageAnnualIncome
|
||||
}
|
||||
})
|
||||
|
||||
this.idLimit = true
|
||||
this.userInfo.occupationCode = insuredDetail.occupationCode //职业类别编码
|
||||
this.userInfo.occupationName = insuredDetail.occupationName //职业类别名称
|
||||
} else {
|
||||
this.isInsured = false
|
||||
this.userInfo.relationToInsured = ''
|
||||
@@ -1347,25 +1307,6 @@ export default {
|
||||
filters: {
|
||||
idToText: filter.idToText
|
||||
},
|
||||
watch: {
|
||||
async 'withRootUser.value'(n) {
|
||||
const orderNo = this.$route.query.orderNo
|
||||
if (n && orderNo) {
|
||||
const rs = await getOrderDetail({ orderNo: orderNo});
|
||||
this.areaStr = getAreaName([
|
||||
{ code: rs.orderDTO.appntDTO.homeProvince },
|
||||
{ code: rs.orderDTO.appntDTO.homeCity },
|
||||
{ code: rs.orderDTO.appntDTO.homeArea },
|
||||
])
|
||||
this.userInfo.province = rs.orderDTO.appntDTO.homeProvince
|
||||
this.userInfo.city = rs.orderDTO.appntDTO.homeCity
|
||||
this.userInfo.area = rs.orderDTO.appntDTO.homeArea
|
||||
this.userInfo.village = rs.orderDTO.appntDTO.homeAddress
|
||||
} else {
|
||||
this.homeName = this.userInfo.homeAddress = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
@@ -1381,9 +1322,5 @@ export default {
|
||||
/deep/.van-checkbox {
|
||||
margin-left: auto;
|
||||
}
|
||||
.address {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -606,12 +606,10 @@ export default {
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user