mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 23:46:44 +08:00
GFRS-2504 指定生效日需求-修改localstorage取值为空问题-提交人:白金岩
This commit is contained in:
@@ -384,7 +384,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeRadio: '1',
|
activeRadio: '1',
|
||||||
activeType: localStorage.getItem('active_type'),
|
activeType: this.$CacheUtils.getLocItem('active_type'),
|
||||||
cvalidateFlag : false,
|
cvalidateFlag : false,
|
||||||
cvalidateStr:'',
|
cvalidateStr:'',
|
||||||
chooseProducts: [],
|
chooseProducts: [],
|
||||||
@@ -404,7 +404,7 @@ export default {
|
|||||||
influenceAddRiskCodes: [],
|
influenceAddRiskCodes: [],
|
||||||
influences: [],
|
influences: [],
|
||||||
nextStepFlag: false,
|
nextStepFlag: false,
|
||||||
isRelated: localStorage.isRelated === '0', //关联保单号
|
isRelated: this.$CacheUtils.getLocItem('isRelated') === '0', //关联保单号
|
||||||
policyNo: '',
|
policyNo: '',
|
||||||
// 份数
|
// 份数
|
||||||
mult: '',
|
mult: '',
|
||||||
@@ -412,7 +412,7 @@ export default {
|
|||||||
// 默认钱数
|
// 默认钱数
|
||||||
defalutAmt: '',
|
defalutAmt: '',
|
||||||
//是否需存在特殊配置 0-是 1-否
|
//是否需存在特殊配置 0-是 1-否
|
||||||
isTrial: localStorage.isTrial,
|
isTrial: this.$CacheUtils.getLocItem('isTrial'),
|
||||||
//缴费期间对应index索引
|
//缴费期间对应index索引
|
||||||
payEndYearColumnsIndex: 0,
|
payEndYearColumnsIndex: 0,
|
||||||
// 后台配置的校验规则
|
// 后台配置的校验规则
|
||||||
@@ -445,7 +445,7 @@ export default {
|
|||||||
//初始化数据
|
//初始化数据
|
||||||
init() {
|
init() {
|
||||||
// 获取是否从建议书过来的
|
// 获取是否从建议书过来的
|
||||||
this.isFrom = window.localStorage.isFrom
|
this.isFrom = this.$CacheUtils.getLocItem('isFrom')
|
||||||
//获取投保人信息
|
//获取投保人信息
|
||||||
if (this.$CacheUtils.getLocItem('saleInsuredInfo')) {
|
if (this.$CacheUtils.getLocItem('saleInsuredInfo')) {
|
||||||
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
this.saleInsuredInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo'))
|
||||||
@@ -455,7 +455,7 @@ export default {
|
|||||||
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
this.saleInsuredPersonInfo = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||||
}
|
}
|
||||||
//构建提交数据、渲染险种
|
//构建提交数据、渲染险种
|
||||||
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
|
this.chooseProducts = JSON.parse(this.$CacheUtils.getLocItem('chooseProducts'))
|
||||||
this.chooseProducts.map(item => {
|
this.chooseProducts.map(item => {
|
||||||
this.cvalidateFlag = item.isMainRisk == 0 && (this.activeType == 'KMH'||this.activeType == 'SQY') && this.isFrom != 'proposal'
|
this.cvalidateFlag = item.isMainRisk == 0 && (this.activeType == 'KMH'||this.activeType == 'SQY') && this.isFrom != 'proposal'
|
||||||
this.cvalidateStr = this.cvalidateFlag?this.activeType == 'KMH'?'2021-01-01':this.activeType == 'SQY'?'2021-06-01':'':''
|
this.cvalidateStr = this.cvalidateFlag?this.activeType == 'KMH'?'2021-01-01':this.activeType == 'SQY'?'2021-06-01':'':''
|
||||||
@@ -537,8 +537,8 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 判断是否 含有 后台配置js验证函数
|
// 判断是否 含有 后台配置js验证函数
|
||||||
if (localStorage.ruleExpression) {
|
if (this.$CacheUtils.getLocItem('ruleExpression')) {
|
||||||
let ruleExpression = JSON.parse(localStorage.ruleExpression)
|
let ruleExpression = JSON.parse(this.$CacheUtils.getLocItem('ruleExpression'))
|
||||||
this.ruleExpression = ruleExpression
|
this.ruleExpression = ruleExpression
|
||||||
let productCodes = Object.keys(ruleExpression)
|
let productCodes = Object.keys(ruleExpression)
|
||||||
productCodes.forEach(itemKey => {
|
productCodes.forEach(itemKey => {
|
||||||
@@ -655,8 +655,8 @@ export default {
|
|||||||
},
|
},
|
||||||
//特殊处理 GFRS_M0016 GFRS_A0004 GFRS_A0005 赔付比例处理
|
//特殊处理 GFRS_M0016 GFRS_A0004 GFRS_A0005 赔付比例处理
|
||||||
async dogetLimitAndGetRate() {
|
async dogetLimitAndGetRate() {
|
||||||
const orderNo = localStorage.getItem('orderNo')
|
const orderNo = this.$CacheUtils.getLocItem('orderNo')
|
||||||
let detailPromise = this.isFrom === 'proposal' ? localStorage.proposalMedical : await getOrderDetail({ orderNo })
|
let detailPromise = this.isFrom === 'proposal' ? this.$CacheUtils.getLocItem('proposalMedical') : await getOrderDetail({ orderNo })
|
||||||
this.chooseProducts.map(item => {
|
this.chooseProducts.map(item => {
|
||||||
if (
|
if (
|
||||||
!(item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005')
|
!(item.mainRiskCode === 'GFRS_M0016' || item.productCode === 'GFRS_A0004' || item.productCode === 'GFRS_A0008' || item.productCode === 'GFRS_A0005')
|
||||||
@@ -1179,7 +1179,7 @@ export default {
|
|||||||
item.showContent = item.insuYear + '年'
|
item.showContent = item.insuYear + '年'
|
||||||
}
|
}
|
||||||
if (item.code == 'amt') {
|
if (item.code == 'amt') {
|
||||||
let trialList = JSON.parse(localStorage.trialList)
|
let trialList = JSON.parse(this.$CacheUtils.getLocItem('trialList'))
|
||||||
item.amt = trialList[0].prem
|
item.amt = trialList[0].prem
|
||||||
item.defaultValue = trialList[0].prem
|
item.defaultValue = trialList[0].prem
|
||||||
item.moneyUnit = 1
|
item.moneyUnit = 1
|
||||||
@@ -1198,7 +1198,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
v.amt = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
v.amt = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
let trialList = JSON.parse(localStorage.trialList)
|
let trialList = JSON.parse(this.$CacheUtils.getLocItem('trialList'))
|
||||||
v.amt = trialList[0].prem
|
v.amt = trialList[0].prem
|
||||||
// v.amt = mainRiskInfo.inputAmt.displayAmount * mainRiskInfo.inputAmt.moneyUnit
|
// v.amt = mainRiskInfo.inputAmt.displayAmount * mainRiskInfo.inputAmt.moneyUnit
|
||||||
}
|
}
|
||||||
@@ -1213,7 +1213,7 @@ export default {
|
|||||||
item.amt = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
item.amt = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
||||||
item.defaultValue = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
item.defaultValue = mainRiskInfo.inputPrem.displayAmount * mainRiskInfo.inputPrem.moneyUnit
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
let trialList = JSON.parse(localStorage.trialList)
|
let trialList = JSON.parse(this.$CacheUtils.getLocItem('trialList'))
|
||||||
item.defaultValue = trialList[0].prem
|
item.defaultValue = trialList[0].prem
|
||||||
item.amt = trialList[0].prem
|
item.amt = trialList[0].prem
|
||||||
}
|
}
|
||||||
@@ -1309,12 +1309,11 @@ export default {
|
|||||||
path: '/common/selectedProduct'
|
path: '/common/selectedProduct'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
localStorage.trialList = ''
|
this.$CacheUtils.setLocItem('trialList','')
|
||||||
} else {
|
} else {
|
||||||
this.chooseProducts.splice(index, 1)
|
this.chooseProducts.splice(index, 1)
|
||||||
}
|
}
|
||||||
|
this.$CacheUtils.setLocItem('chooseProducts',JSON.stringify(this.chooseProducts))
|
||||||
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
|
||||||
this.getTrial()
|
this.getTrial()
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
@@ -1343,7 +1342,7 @@ export default {
|
|||||||
this.richChildrenFlag = true
|
this.richChildrenFlag = true
|
||||||
}
|
}
|
||||||
this.trialList = resultData.trialList
|
this.trialList = resultData.trialList
|
||||||
localStorage.trialList = JSON.stringify(resultData.trialList)
|
this.$CacheUtils.setLocItem('trialList',JSON.stringify(resultData.trialList))
|
||||||
//设置豁免险保额
|
//设置豁免险保额
|
||||||
this.setRemitRisk()
|
this.setRemitRisk()
|
||||||
this.nextStepFlag = false
|
this.nextStepFlag = false
|
||||||
@@ -1351,7 +1350,7 @@ export default {
|
|||||||
this.nextStepFlag = true
|
this.nextStepFlag = true
|
||||||
this.$toast(resultData.resultMessage)
|
this.$toast(resultData.resultMessage)
|
||||||
}
|
}
|
||||||
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
this.$CacheUtils.setLocItem('chooseProducts', JSON.stringify(this.chooseProducts))
|
||||||
},
|
},
|
||||||
//获取试算参数
|
//获取试算参数
|
||||||
getParams() {
|
getParams() {
|
||||||
@@ -1465,15 +1464,14 @@ export default {
|
|||||||
addRiskCodes.push(item.productCode)
|
addRiskCodes.push(item.productCode)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (localStorage.oldAddRiskCodes && JSON.parse(localStorage.oldAddRiskCodes)) {
|
if (this.$CacheUtils.getLocItem('oldAddRiskCodes') && JSON.parse(this.$CacheUtils.getLocItem('oldAddRiskCodes'))) {
|
||||||
addRiskCodes = addRiskCodes.concat(JSON.parse(localStorage.oldAddRiskCodes))
|
addRiskCodes = addRiskCodes.concat(JSON.parse(this.$CacheUtils.getLocItem('oldAddRiskCodes')))
|
||||||
}
|
}
|
||||||
//930折中方案,豁免险挂订单
|
//930折中方案,豁免险挂订单
|
||||||
addRiskCodes = addRiskCodes.filter(riskCode => {
|
addRiskCodes = addRiskCodes.filter(riskCode => {
|
||||||
return riskCode != 'DCRS_A0001'
|
return riskCode != 'DCRS_A0001'
|
||||||
})
|
})
|
||||||
|
this.$CacheUtils.setLocItem('addRiskCodes',JSON.stringify(addRiskCodes))
|
||||||
localStorage.addRiskCodes = JSON.stringify(addRiskCodes)
|
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
@@ -1487,13 +1485,13 @@ export default {
|
|||||||
//保额份数变化
|
//保额份数变化
|
||||||
stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) {
|
stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) {
|
||||||
let currentEle =
|
let currentEle =
|
||||||
localStorage.isTrial !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'
|
this.$CacheUtils.getLocItem('isTrial') !== '1' && this.chooseProducts[productIndex].isMainRisk == '0'
|
||||||
? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex]
|
? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex]
|
||||||
: this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
|
: this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
|
||||||
//改动原因:孝心保产品有对年龄的特殊要求
|
//改动原因:孝心保产品有对年龄的特殊要求
|
||||||
//添加判断,是否是孝心保产品
|
//添加判断,是否是孝心保产品
|
||||||
let showHint = this.chooseProducts[productIndex].hint
|
let showHint = this.chooseProducts[productIndex].hint
|
||||||
let productCode = localStorage.trialList == '' ? '' : JSON.parse(localStorage.trialList)[0].productCode
|
let productCode = this.$CacheUtils.getLocItem('trialList') == '' ? '' : JSON.parse(this.$CacheUtils.getLocItem('trialList'))[0].productCode
|
||||||
if (productCode == 'GFRS_M0014') {
|
if (productCode == 'GFRS_M0014') {
|
||||||
//被保险人年龄如果在50-65区间
|
//被保险人年龄如果在50-65区间
|
||||||
if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) {
|
if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) {
|
||||||
@@ -1712,7 +1710,7 @@ export default {
|
|||||||
let rollInResult = '' //校验预计转入保费结果
|
let rollInResult = '' //校验预计转入保费结果
|
||||||
this.chooseProducts.forEach((item, index) => {
|
this.chooseProducts.forEach((item, index) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (localStorage.trialList != '') {
|
if (this.$CacheUtils.getLocItem('trialList') != '') {
|
||||||
if (item.isMainRisk == 0) {
|
if (item.isMainRisk == 0) {
|
||||||
mainRiskCode = item.productCode
|
mainRiskCode = item.productCode
|
||||||
}
|
}
|
||||||
@@ -1757,7 +1755,7 @@ export default {
|
|||||||
}
|
}
|
||||||
//万能型产品保费赋值给保额
|
//万能型产品保费赋值给保额
|
||||||
//增加判断是否是从建议书跳转过来了的
|
//增加判断是否是从建议书跳转过来了的
|
||||||
if (localStorage.isFrom != 'proposal') {
|
if (this.$CacheUtils.getLocItem('isFrom') != 'proposal') {
|
||||||
if (
|
if (
|
||||||
this.trialList[index].productCode == 'GFRS_M0003' ||
|
this.trialList[index].productCode == 'GFRS_M0003' ||
|
||||||
this.trialList[index].productCode == 'GFRS_M0015' ||
|
this.trialList[index].productCode == 'GFRS_M0015' ||
|
||||||
@@ -1810,7 +1808,7 @@ export default {
|
|||||||
orderType: 'RISK_ORDER',
|
orderType: 'RISK_ORDER',
|
||||||
orderDTO: {
|
orderDTO: {
|
||||||
orderInfoDTO: {
|
orderInfoDTO: {
|
||||||
orderNo: localStorage.orderNo
|
orderNo: this.$CacheUtils.getLocItem('orderNo')
|
||||||
},
|
},
|
||||||
// appntDTO: {},
|
// appntDTO: {},
|
||||||
insuredDTOs: [insuredDTOItem]
|
insuredDTOs: [insuredDTOItem]
|
||||||
@@ -1836,7 +1834,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let resultData
|
let resultData
|
||||||
if (localStorage.isFrom == 'proposal') {
|
if (this.$CacheUtils.getLocItem('isFrom') == 'proposal') {
|
||||||
// 从建议书进入, 豁免险保费空值特殊处理
|
// 从建议书进入, 豁免险保费空值特殊处理
|
||||||
let prdCodes = ['GFRS_A0001', 'GFRS_A0007']
|
let prdCodes = ['GFRS_A0001', 'GFRS_A0007']
|
||||||
params.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => {
|
params.orderDTO.insuredDTOs[0].riskDTOLst.forEach(item => {
|
||||||
@@ -1855,11 +1853,11 @@ export default {
|
|||||||
|
|
||||||
if (resultData.result == 0) {
|
if (resultData.result == 0) {
|
||||||
//电投
|
//电投
|
||||||
if (localStorage.isFrom == 'sale' && resultData.deleteFlag == '0') {
|
if (this.$CacheUtils.getLocItem('isFrom') == 'sale' && resultData.deleteFlag == '0') {
|
||||||
localStorage.salePageFlag = '3'
|
this.$CacheUtils.setLocItem('salePageFlag','3')
|
||||||
}
|
}
|
||||||
//建议书
|
//建议书
|
||||||
if (localStorage.isFrom == 'proposal' && resultData.content.id) {
|
if (this.$CacheUtils.getLocItem('isFrom') == 'proposal' && resultData.content.id) {
|
||||||
this.saleInsuredPersonInfo.insuredId = resultData.content.id
|
this.saleInsuredPersonInfo.insuredId = resultData.content.id
|
||||||
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(this.saleInsuredPersonInfo))
|
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(this.saleInsuredPersonInfo))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ export default {
|
|||||||
result: '',
|
result: '',
|
||||||
delList: [],
|
delList: [],
|
||||||
radioVal: '',
|
radioVal: '',
|
||||||
isFrom: localStorage.isFrom,
|
isFrom: this.$CacheUtils.getLocItem('isFrom'),
|
||||||
activeFlag: ''
|
activeFlag: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
if (localStorage.isFrom == 'sale') {
|
if (this.$CacheUtils.getLocItem('isFrom') == 'sale') {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getOrderDetail({ orderNo: localStorage.orderNo }).then(
|
getOrderDetail({ orderNo: this.$CacheUtils.getLocItem('orderNo') }).then(
|
||||||
res => {
|
res => {
|
||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
//------------------------专为桂/惠企写死--begin---------------//
|
//------------------------专为桂/惠企写死--begin---------------//
|
||||||
@@ -97,7 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//获取主险列表
|
//获取主险列表
|
||||||
async getMainRiskList() {
|
async getMainRiskList() {
|
||||||
let mainRiskCodes = localStorage.mainRiskCodes && JSON.parse(localStorage.mainRiskCodes)
|
let mainRiskCodes = this.$CacheUtils.getLocItem('mainRiskCodes') && JSON.parse(this.$CacheUtils.getLocItem('mainRiskCodes'))
|
||||||
let mainListDate = { platform: 'app' }
|
let mainListDate = { platform: 'app' }
|
||||||
switch (this.isFrom) {
|
switch (this.isFrom) {
|
||||||
case 'proposal':
|
case 'proposal':
|
||||||
@@ -127,7 +127,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.list = resultData.mainRiskDTOS
|
this.list = resultData.mainRiskDTOS
|
||||||
//------------------------专为惠企写死--begin---------------//
|
//------------------------专为惠企写死--begin---------------//
|
||||||
if (this.list.length > 0 && this.specilFlag == '1' && localStorage.isFrom == 'sale') {
|
if (this.list.length > 0 && this.specilFlag == '1' && this.$CacheUtils.getLocItem('isFrom') == 'sale') {
|
||||||
this.result = this.list.find(v => {
|
this.result = this.list.find(v => {
|
||||||
return v.riskProductCode == 'GFRS_M0040'
|
return v.riskProductCode == 'GFRS_M0040'
|
||||||
})
|
})
|
||||||
@@ -159,20 +159,20 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
//置空产品
|
//置空产品
|
||||||
localStorage.chooseProducts = ''
|
this.$CacheUtils.setLocItem('chooseProducts','')
|
||||||
|
|
||||||
//添加主险
|
//添加主险
|
||||||
this.addMainRisk()
|
this.addMainRisk()
|
||||||
},
|
},
|
||||||
//储存主险
|
//储存主险
|
||||||
async addMainRisk() {
|
async addMainRisk() {
|
||||||
localStorage.setItem('isTrial', '1')
|
this.$CacheUtils.setLocItem('isTrial', '1')
|
||||||
let riskProductCode = this.result.riskProductCode
|
let riskProductCode = this.result.riskProductCode
|
||||||
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
|
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
|
||||||
if (resultData.result == 0) {
|
if (resultData.result == 0) {
|
||||||
resultData = resultData.trialDTOS[0]
|
resultData = resultData.trialDTOS[0]
|
||||||
localStorage.isTrial = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? '0' : '1'
|
this.$CacheUtils.setLocItem('isTrial',resultData.productTrialInfoDTO.productTrialYearDTOS != null ? '0' : '1')
|
||||||
localStorage.hint = resultData.hint
|
this.$CacheUtils.setLocItem('hint',resultData.hint)
|
||||||
if (resultData.productTrialInfoDTO.dutyGroup != null) {
|
if (resultData.productTrialInfoDTO.dutyGroup != null) {
|
||||||
resultData.productTrialInfoDTO.dutyGroup.map(item => {
|
resultData.productTrialInfoDTO.dutyGroup.map(item => {
|
||||||
if (item.dutyName == '意外身故/伤残保险金') {
|
if (item.dutyName == '意外身故/伤残保险金') {
|
||||||
@@ -182,9 +182,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (resultData.productTrialInfoDTO.ruleExpression) {
|
if (resultData.productTrialInfoDTO.ruleExpression) {
|
||||||
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {}
|
let ruleExpression = this.$CacheUtils.getLocItem('ruleExpression') ? JSON.parse(this.$CacheUtils.getLocItem('ruleExpression')) : {}
|
||||||
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
|
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
|
||||||
localStorage.ruleExpression = JSON.stringify(ruleExpression)
|
this.$CacheUtils.setLocItem('ruleExpression',JSON.stringify(ruleExpression))
|
||||||
}
|
}
|
||||||
|
|
||||||
/********start 主险选择限制 start******/
|
/********start 主险选择限制 start******/
|
||||||
@@ -224,30 +224,30 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let flagPermission = await riskRules.getProductSellPermissionList(resultData.productCode, this)
|
let flagPermission = await riskRules.getProductSellPermissionList(resultData.productCode, this)
|
||||||
if (flagPermission && localStorage.isFrom != 'proposal') {
|
if (flagPermission && this.$CacheUtils.getLocItem('isFrom') != 'proposal') {
|
||||||
//校验该代理人是否有该产品的售卖权限
|
//校验该代理人是否有该产品的售卖权限
|
||||||
return this.$toast('抱歉,您没有该产品的销售权限!')
|
return this.$toast('抱歉,您没有该产品的销售权限!')
|
||||||
}
|
}
|
||||||
|
|
||||||
let flagCompany = await riskRules.checkCompany(resultData.productCode, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).workcompany, this)
|
let flagCompany = await riskRules.checkCompany(resultData.productCode, JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).workcompany, this)
|
||||||
if (flagCompany && localStorage.isFrom != 'proposal') {
|
if (flagCompany && this.$CacheUtils.getLocItem('isFrom') != 'proposal') {
|
||||||
//校验该投保人的工作单位是否能够投保该产品
|
//校验该投保人的工作单位是否能够投保该产品
|
||||||
return this.$toast('该投保人工作单位不能投保该产品')
|
return this.$toast('该投保人工作单位不能投保该产品')
|
||||||
}
|
}
|
||||||
/********end 主险选择限制 end******/
|
/********end 主险选择限制 end******/
|
||||||
|
|
||||||
//保存附加险
|
//保存附加险
|
||||||
localStorage.addtionRiskLst = JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst)
|
this.$CacheUtils.setLocItem('addtionRiskLst',JSON.stringify(resultData.productTrialInfoDTO.addtionRiskLst))
|
||||||
localStorage.isAutoPay = resultData.isAutoPay
|
this.$CacheUtils.setLocItem('isAutoPay',resultData.isAutoPay)
|
||||||
localStorage.isRenew = resultData.isRenew
|
this.$CacheUtils.setLocItem('isRenew',resultData.isRenew)
|
||||||
localStorage.isForceRenew = resultData.isForceRenew
|
this.$CacheUtils.setLocItem('isForceRenew',resultData.isForceRenew)
|
||||||
localStorage.isRelated = resultData.isRelated
|
this.$CacheUtils.setLocItem('isRelated',resultData.isRelated)
|
||||||
|
|
||||||
let calFactorLst = this.getFactorList(resultData)
|
let calFactorLst = this.getFactorList(resultData)
|
||||||
let productTrialYearDTOS = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? resultData.productTrialInfoDTO.productTrialYearDTOS : null
|
let productTrialYearDTOS = resultData.productTrialInfoDTO.productTrialYearDTOS != null ? resultData.productTrialInfoDTO.productTrialYearDTOS : null
|
||||||
let hasAddtionRisk = resultData.productTrialInfoDTO.addtionRiskLst ? true : false
|
let hasAddtionRisk = resultData.productTrialInfoDTO.addtionRiskLst ? true : false
|
||||||
let currentProductInfo =
|
let currentProductInfo =
|
||||||
localStorage.isTrial == '1'
|
this.$CacheUtils.getLocItem('isTrial') == '1'
|
||||||
? {
|
? {
|
||||||
calFactorLst,
|
calFactorLst,
|
||||||
hasAddtionRisk,
|
hasAddtionRisk,
|
||||||
@@ -282,15 +282,15 @@ export default {
|
|||||||
|
|
||||||
//构建险种数组
|
//构建险种数组
|
||||||
let productsData
|
let productsData
|
||||||
if (localStorage.chooseProducts) {
|
if (this.$CacheUtils.getLocItem('chooseProducts')) {
|
||||||
productsData = JSON.parse(localStorage.chooseProducts)
|
productsData = JSON.parse(this.$CacheUtils.getLocItem('chooseProducts'))
|
||||||
productsData.push(currentProductInfo)
|
productsData.push(currentProductInfo)
|
||||||
} else {
|
} else {
|
||||||
productsData = [currentProductInfo]
|
productsData = [currentProductInfo]
|
||||||
}
|
}
|
||||||
//保存选择险种
|
//保存选择险种
|
||||||
productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况
|
productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况
|
||||||
localStorage.chooseProducts = JSON.stringify(productsData)
|
this.$CacheUtils.setLocItem('chooseProducts',JSON.stringify(productsData))
|
||||||
this.jumpTo()
|
this.jumpTo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
nextStepFlag: true,
|
nextStepFlag: true,
|
||||||
isShow: true,
|
isShow: true,
|
||||||
appntDTO: {},
|
appntDTO: {},
|
||||||
isFrom: localStorage.isFrom,
|
isFrom: this.$CacheUtils.getLocItem('isFrom'),
|
||||||
salePageFlag: '3',
|
salePageFlag: '3',
|
||||||
active_show: false,
|
active_show: false,
|
||||||
active_sqy_show:false,
|
active_sqy_show:false,
|
||||||
@@ -142,9 +142,9 @@ export default {
|
|||||||
[VanImage.name]: VanImage
|
[VanImage.name]: VanImage
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (localStorage.isFrom == 'sale') {
|
if (this.$CacheUtils.getLocItem('isFrom') == 'sale') {
|
||||||
// 清除活动标志
|
// 清除活动标志
|
||||||
localStorage.removeItem('active_type')
|
this.$CacheUtils.removeLocItem('active_type')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||||
@@ -158,14 +158,14 @@ export default {
|
|||||||
this.getProductList()
|
this.getProductList()
|
||||||
if (!this.$route.query.edit) {
|
if (!this.$route.query.edit) {
|
||||||
//如果不是编辑/导航条跳转进来的
|
//如果不是编辑/导航条跳转进来的
|
||||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
this.$CacheUtils.setLocItem('salePageFlag', this.salePageFlag)
|
||||||
} else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
|
} else if (this.$route.query.edit && !this.$route.query.salePageFlag) {
|
||||||
//如果从保单列表点击编辑按钮进入
|
//如果从保单列表点击编辑按钮进入
|
||||||
this.salePageFlag = '3'
|
this.salePageFlag = '3'
|
||||||
localStorage.setItem('salePageFlag', this.salePageFlag)
|
this.$CacheUtils.setLocItem('salePageFlag', this.salePageFlag)
|
||||||
} else if (this.$route.query.salePageFlag) {
|
} else if (this.$route.query.salePageFlag) {
|
||||||
//如果是从导航栏点击进入
|
//如果是从导航栏点击进入
|
||||||
this.salePageFlag = localStorage.salePageFlag
|
this.salePageFlag = this.$CacheUtils.getLocItem('salePageFlag')
|
||||||
}
|
}
|
||||||
|
|
||||||
// localStorage.orderNo = '19090510425500178912'
|
// localStorage.orderNo = '19090510425500178912'
|
||||||
@@ -187,7 +187,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
appCallBack(data) {
|
appCallBack(data) {
|
||||||
if (data.trigger == 'left_button_click' && localStorage.isFrom == 'sale') {
|
if (data.trigger == 'left_button_click' && this.$CacheUtils.getLocItem('isFrom') == 'sale') {
|
||||||
return this.$dialog
|
return this.$dialog
|
||||||
.confirm({
|
.confirm({
|
||||||
className: 'dialog-delete',
|
className: 'dialog-delete',
|
||||||
@@ -219,7 +219,7 @@ export default {
|
|||||||
async getProductList() {
|
async getProductList() {
|
||||||
//建议书、电投详情
|
//建议书、电投详情
|
||||||
let resultData
|
let resultData
|
||||||
let isProposal = localStorage.isFrom == 'proposal' ? true : false
|
let isProposal = this.$CacheUtils.getLocItem('isFrom') == 'proposal' ? true : false
|
||||||
if (isProposal) {
|
if (isProposal) {
|
||||||
let saleInsuredPersonInfo = this.$CacheUtils.getLocItem('saleInsuredPersonInfo') && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
let saleInsuredPersonInfo = this.$CacheUtils.getLocItem('saleInsuredPersonInfo') && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||||
console.log(saleInsuredPersonInfo)
|
console.log(saleInsuredPersonInfo)
|
||||||
@@ -235,7 +235,7 @@ export default {
|
|||||||
message: '加载中……'
|
message: '加载中……'
|
||||||
})
|
})
|
||||||
resultData = await getDetail({
|
resultData = await getDetail({
|
||||||
orderNo: localStorage.orderNo,
|
orderNo: this.$CacheUtils.getLocItem('orderNo'),
|
||||||
isMerge: '1',
|
isMerge: '1',
|
||||||
orderType: 'proposalInsuredInfo',
|
orderType: 'proposalInsuredInfo',
|
||||||
orderDTO: { insuredDTOs: [{ insuredId: insuredId }] }
|
orderDTO: { insuredDTOs: [{ insuredId: insuredId }] }
|
||||||
@@ -247,7 +247,7 @@ export default {
|
|||||||
loadingType: 'spinner',
|
loadingType: 'spinner',
|
||||||
message: '加载中……'
|
message: '加载中……'
|
||||||
})
|
})
|
||||||
resultData = await orderDetail({ orderNo: localStorage.orderNo, isMerge: '1' })
|
resultData = await orderDetail({ orderNo: this.$CacheUtils.getLocItem('orderNo'), isMerge: '1' })
|
||||||
}
|
}
|
||||||
if (resultData.result == 0) {
|
if (resultData.result == 0) {
|
||||||
let riskDTOLst
|
let riskDTOLst
|
||||||
@@ -309,14 +309,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async delProduct(index) {
|
async delProduct(index) {
|
||||||
let isProposal = localStorage.isFrom == 'proposal' ? true : false
|
let isProposal = this.$CacheUtils.getLocItem('isFrom') == 'proposal' ? true : false
|
||||||
let resultData = ''
|
let resultData = ''
|
||||||
|
|
||||||
if (isProposal) {
|
if (isProposal) {
|
||||||
resultData = await deleteProposal({
|
resultData = await deleteProposal({
|
||||||
orderDTO: {
|
orderDTO: {
|
||||||
orderInfoDTO: {
|
orderInfoDTO: {
|
||||||
orderNo: localStorage.orderNo
|
orderNo: this.$CacheUtils.getLocItem('orderNo')
|
||||||
},
|
},
|
||||||
insuredDTOs: [
|
insuredDTOs: [
|
||||||
{
|
{
|
||||||
@@ -336,7 +336,7 @@ export default {
|
|||||||
id: this.chooseProducts[index].insuanceId,
|
id: this.chooseProducts[index].insuanceId,
|
||||||
orderDTO: {
|
orderDTO: {
|
||||||
orderInfoDTO: {
|
orderInfoDTO: {
|
||||||
orderNo: localStorage.orderNo
|
orderNo: this.$CacheUtils.getLocItem('orderNo')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -352,14 +352,14 @@ export default {
|
|||||||
nextStep() {
|
nextStep() {
|
||||||
if (!this.$route.query.salePageFlag) {
|
if (!this.$route.query.salePageFlag) {
|
||||||
//如果从保单列表编辑按钮进入
|
//如果从保单列表编辑按钮进入
|
||||||
localStorage.salePageFlag = '4'
|
this.$CacheUtils.setLocItem('salePageFlag','4')
|
||||||
}
|
}
|
||||||
console.log('this.chooseProducts', this.chooseProducts)
|
console.log('this.chooseProducts', this.chooseProducts)
|
||||||
if (this.chooseProducts.length == 0) {
|
if (this.chooseProducts.length == 0) {
|
||||||
return this.$toast('请添加产品')
|
return this.$toast('请添加产品')
|
||||||
}
|
}
|
||||||
//930折中方案,豁免险选择
|
//930折中方案,豁免险选择
|
||||||
let oldAddRiskCodes = JSON.parse(localStorage.oldAddRiskCodes)
|
let oldAddRiskCodes = JSON.parse(this.$CacheUtils.getLocItem('oldAddRiskCodes'))
|
||||||
if (oldAddRiskCodes.includes('DCRS_A0001')) {
|
if (oldAddRiskCodes.includes('DCRS_A0001')) {
|
||||||
let chooseProducts = this.chooseProducts
|
let chooseProducts = this.chooseProducts
|
||||||
for (let i = 0; i < chooseProducts.length; i++) {
|
for (let i = 0; i < chooseProducts.length; i++) {
|
||||||
@@ -378,7 +378,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let routerUrl
|
let routerUrl
|
||||||
if (localStorage.isFrom == 'proposal') {
|
if (this.$CacheUtils.getLocItem('isFrom') == 'proposal') {
|
||||||
routerUrl = '/proposal/chooseInsuredPerson'
|
routerUrl = '/proposal/chooseInsuredPerson'
|
||||||
let page = this.$route.query.proposalEdit == '1' ? '-1' : '-2'
|
let page = this.$route.query.proposalEdit == '1' ? '-1' : '-2'
|
||||||
|
|
||||||
@@ -411,7 +411,7 @@ export default {
|
|||||||
//添加产品
|
//添加产品
|
||||||
async addProduct() {
|
async addProduct() {
|
||||||
// 1、处理判断活动 1、电投流程 2、后端接口提供弹出判断
|
// 1、处理判断活动 1、电投流程 2、后端接口提供弹出判断
|
||||||
if (localStorage.isFrom == 'sale') {
|
if (this.$CacheUtils.getLocItem('isFrom') == 'sale') {
|
||||||
let param = {
|
let param = {
|
||||||
activeType: 'KMH'
|
activeType: 'KMH'
|
||||||
}
|
}
|
||||||
@@ -458,7 +458,7 @@ export default {
|
|||||||
let param = {
|
let param = {
|
||||||
orderDTO: {
|
orderDTO: {
|
||||||
orderInfoDTO: {
|
orderInfoDTO: {
|
||||||
orderNo: localStorage.orderNo,
|
orderNo: this.$CacheUtils.getLocItem('orderNo'),
|
||||||
activeType: type=='KMH'?this.active_radio == '1'?'KMH':'':type=='SQY'?this.active_sqy_radio=='1'?'SQY':'':''
|
activeType: type=='KMH'?this.active_radio == '1'?'KMH':'':type=='SQY'?this.active_sqy_radio=='1'?'SQY':'':''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -466,7 +466,7 @@ export default {
|
|||||||
saveOrderActiveType(param).then(res => {
|
saveOrderActiveType(param).then(res => {
|
||||||
this.active_show = false
|
this.active_show = false
|
||||||
this.active_sqy_show = false
|
this.active_sqy_show = false
|
||||||
localStorage.setItem('active_type', type=='KMH'?this.active_radio == '1'?'KMH':'':type=='SQY'?this.active_sqy_radio=='1'?'SQY':'':'')
|
this.$CacheUtils.setLocItem('active_type', type=='KMH'?this.active_radio == '1'?'KMH':'':type=='SQY'?this.active_sqy_radio=='1'?'SQY':'':'')
|
||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
@@ -498,9 +498,9 @@ export default {
|
|||||||
},
|
},
|
||||||
nextPageShow() {
|
nextPageShow() {
|
||||||
let routerUrl = '/sale/beneficiary'
|
let routerUrl = '/sale/beneficiary'
|
||||||
localStorage.beneficiaryInfo = ''
|
this.$CacheUtils.setLocItem('beneficiaryInfo','')
|
||||||
localStorage.fromAddBeneficiaryInfo = ''
|
this.$CacheUtils.setLocItem('fromAddBeneficiaryInfo','')
|
||||||
localStorage.removeItem('applicant')
|
this.$CacheUtils.removeLocItem('applicant')
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
|
|||||||
Reference in New Issue
Block a user