mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-12 10:16:43 +08:00
feat: 针对保费计算做出修改
This commit is contained in:
@@ -11,8 +11,7 @@
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
|
||||
<van-button class="bottom-btn" type="danger" @click="nextStep">完成</van-button>
|
||||
<van-button class="bottom-btn" type="danger" @click="nextStep" v-if="showNext">完成</van-button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -39,12 +38,18 @@ export default {
|
||||
mainRiskCode: ''
|
||||
}
|
||||
},
|
||||
props: {
|
||||
showNext: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$jump({
|
||||
flag: 'navigation',
|
||||
extra: {
|
||||
title: '附加险选择列表'
|
||||
},
|
||||
}
|
||||
})
|
||||
//获取投保人信息
|
||||
if (this.$CacheUtils.getLocItem('saleInsuredPersonInfo')) {
|
||||
@@ -52,7 +57,7 @@ export default {
|
||||
}
|
||||
getAgentInfo({}).then(res => {
|
||||
// branchType N1、1代表个险渠道 和 N5、5 代表中介渠道,N代表内勤
|
||||
if (res.branchType == 'N1' || res.branchType == '1') {
|
||||
if (res.branchType === 'N1' || res.branchType == '1') {
|
||||
this.branchTypeVal = 'G'
|
||||
} else if (res.branchType == 'N5' || res.branchType == '5') {
|
||||
this.branchTypeVal = 'Z'
|
||||
@@ -78,8 +83,13 @@ export default {
|
||||
if (
|
||||
currentMainRiskInfo.mainRiskPayEndYearFlag == 'Y' &&
|
||||
currentMainRiskInfo.mainRiskPayEndYear == '1000' &&
|
||||
(item.productCode == 'GFRS_A0007' || item.productCode == 'GFRS_A0009'|| item.productCode == 'GFRS_A0010'|| item.productCode == 'GFRS_A0013' || item.productCode == 'GFRS_A0014'
|
||||
|| item.productCode == 'GFRS_A0015' || item.productCode == 'GFRS_A0016')
|
||||
(item.productCode == 'GFRS_A0007' ||
|
||||
item.productCode == 'GFRS_A0009' ||
|
||||
item.productCode == 'GFRS_A0010' ||
|
||||
item.productCode == 'GFRS_A0013' ||
|
||||
item.productCode == 'GFRS_A0014' ||
|
||||
item.productCode == 'GFRS_A0015' ||
|
||||
item.productCode == 'GFRS_A0016')
|
||||
) {
|
||||
item.isHidden = 1
|
||||
}
|
||||
@@ -96,14 +106,13 @@ export default {
|
||||
}
|
||||
|
||||
//添加附加险
|
||||
this.addAddtionRisk()
|
||||
this.addAdditionRisk()
|
||||
},
|
||||
//储存附加险
|
||||
async addAddtionRisk() {
|
||||
async addAdditionRisk() {
|
||||
let riskProductCode = this.result.productCode
|
||||
let resultData = await calculatePremium({ productCodes: [riskProductCode], platform: 'app', type: '1' })
|
||||
if (resultData.result === '0') {
|
||||
|
||||
resultData = resultData.trialDTOS[0]
|
||||
localStorage.isAutoPay = localStorage.isAutoPay === '0' ? '0' : resultData.isAutoPay //自动垫交
|
||||
localStorage.isRenew = localStorage.isRenew === '0' ? '0' : resultData.isRenew //自动续保
|
||||
@@ -194,7 +203,7 @@ export default {
|
||||
|
||||
/********start 附加险选择限制 start******/
|
||||
//判断被保 八桂D
|
||||
/* let mainRisk = JSON.parse(this.$CacheUtils.getLocItem('chooseProducts'))[0];
|
||||
/* let mainRisk = JSON.parse(this.$CacheUtils.getLocItem('chooseProducts'))[0];
|
||||
let mainRiskCode = mainRisk.productCode;
|
||||
let addRiskCodes = localStorage.addRiskCodes && JSON.parse(localStorage.addRiskCodes)
|
||||
if(mainRiskCode =='GFRS_M0044'||mainRiskCode =='GFRS_M0051'){
|
||||
@@ -280,7 +289,7 @@ export default {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
/*"let risks = JSON.parse(localStorage.chooseProducts);",
|
||||
/*"let risks = JSON.parse(localStorage.chooseProducts);",
|
||||
"let checkRisk = true;",
|
||||
"for (let i = 1; i < risks.length; i++) {",
|
||||
"for(let j = 0; j < risks.calFactorLst.length; j++){",
|
||||
@@ -305,7 +314,7 @@ export default {
|
||||
}
|
||||
productsData = this.$utils.unrepeatObj(productsData, 'productCode') //产品数组去重,跳转试算页面未成功重复添加同一产品的情况
|
||||
localStorage.chooseProducts = JSON.stringify(productsData)
|
||||
this.jumpTo()
|
||||
// this.jumpTo()
|
||||
} else {
|
||||
this.$toast(resultData.resultMessage)
|
||||
}
|
||||
@@ -390,7 +399,14 @@ export default {
|
||||
//国富人寿附加豁免保险费重大疾病保险(B款) GFRS_A0009
|
||||
//国富人寿鑫享年年终身寿险--只针对这款产品
|
||||
if (this.mainRiskCode == 'GFRS_M0036') {
|
||||
if (this.branchTypeVal == 'Z' && (productCode == 'GFRS_A0007' || productCode == 'GFRS_A0009'|| productCode == 'GFRS_A0010'||productCode == 'GFRS_A0013'|| productCode == 'GFRS_A0014')) {
|
||||
if (
|
||||
this.branchTypeVal == 'Z' &&
|
||||
(productCode == 'GFRS_A0007' ||
|
||||
productCode == 'GFRS_A0009' ||
|
||||
productCode == 'GFRS_A0010' ||
|
||||
productCode == 'GFRS_A0013' ||
|
||||
productCode == 'GFRS_A0014')
|
||||
) {
|
||||
if (relationToAppnt == 1) {
|
||||
this.$toast('投被同人不能选取此款险种!')
|
||||
return true
|
||||
|
||||
@@ -42,34 +42,37 @@ export default {
|
||||
return false
|
||||
},
|
||||
//投、被保险人年龄对险种的限制
|
||||
ageLimit(resultData, vm, isApplicant,riskProductCode) {
|
||||
let age, tips,maxAge
|
||||
ageLimit(resultData, vm, isApplicant, riskProductCode) {
|
||||
let age, tips, maxAge
|
||||
if (isApplicant) {
|
||||
age = this.getSaleInsuredInfo().age
|
||||
tips = '投保人年龄不适合此款险种,请选择其他险种!'
|
||||
} else {
|
||||
if (['GFRS_M0061', 'GFRS_M0102', 'GFRS_M0101'].includes(riskProductCode)) {
|
||||
age = this.getSaleInsuredPersonInfo().birthday?utilsAge.getAge29(this.getSaleInsuredPersonInfo().birthday, new Date()):this.getSaleInsuredPersonInfo().insuredAge
|
||||
}else{
|
||||
|
||||
age = this.getSaleInsuredPersonInfo().birthday?utilsAge.getAgeByValue(this.getSaleInsuredPersonInfo().birthday, new Date()):this.getSaleInsuredPersonInfo().insuredAge
|
||||
if (riskProductCode === 'GFRS_M0061' || riskProductCode === 'GFRS_M0102' || riskProductCode === 'GFRS_M0101') {
|
||||
age = this.getSaleInsuredPersonInfo().birthday
|
||||
? utilsAge.getAge29(this.getSaleInsuredPersonInfo().birthday, new Date())
|
||||
: this.getSaleInsuredPersonInfo().insuredAge
|
||||
} else {
|
||||
age = this.getSaleInsuredPersonInfo().birthday
|
||||
? utilsAge.getAgeByValue(this.getSaleInsuredPersonInfo().birthday, new Date())
|
||||
: this.getSaleInsuredPersonInfo().insuredAge
|
||||
}
|
||||
tips = '被保险人年龄不适合此款险种,请选择其他险种!'
|
||||
}
|
||||
let minAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.minAge
|
||||
if(riskProductCode == 'GFRS_M0111'){
|
||||
if(this.getSaleInsuredPersonInfo().sex==0){
|
||||
maxAge=70
|
||||
}else {
|
||||
maxAge=73
|
||||
if (riskProductCode === 'GFRS_M0111') {
|
||||
if (this.getSaleInsuredPersonInfo().sex == 0) {
|
||||
maxAge = 70
|
||||
} else {
|
||||
maxAge = 73
|
||||
}
|
||||
}else if(riskProductCode == 'GFRS_M0110'){
|
||||
if(this.getSaleInsuredPersonInfo().sex==0){
|
||||
maxAge=68
|
||||
}else {
|
||||
maxAge=70
|
||||
} else if (riskProductCode === 'GFRS_M0110') {
|
||||
if (this.getSaleInsuredPersonInfo().sex == 0) {
|
||||
maxAge = 68
|
||||
} else {
|
||||
maxAge = 70
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
maxAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.maxAge
|
||||
}
|
||||
|
||||
@@ -117,7 +120,7 @@ export default {
|
||||
return false
|
||||
},
|
||||
//寿险等级对附加险的影响 标识--卡单
|
||||
lifeGradeLimitCard(resultData, vm ,cuttentLifeGrade) {
|
||||
lifeGradeLimitCard(resultData, vm, cuttentLifeGrade) {
|
||||
let lifeGrade = resultData.productInsuredDTO.lifeGrade
|
||||
if (lifeGrade == 0) return false
|
||||
if (Number(cuttentLifeGrade) > Number(lifeGrade)) {
|
||||
@@ -139,7 +142,11 @@ export default {
|
||||
},
|
||||
//获取被保险人信息
|
||||
getSaleInsuredPersonInfo() {
|
||||
return CacheUtils.getLocItem('saleInsuredPersonInfo') && JSON.parse(CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
const saleInsuredPersonInfo = CacheUtils.getLocItem('saleInsuredPersonInfo')
|
||||
if (saleInsuredPersonInfo !== null && saleInsuredPersonInfo) {
|
||||
return JSON.parse(CacheUtils.getLocItem('saleInsuredPersonInfo'))
|
||||
}
|
||||
return ""
|
||||
},
|
||||
//获取投保人信息
|
||||
getSaleInsuredInfo() {
|
||||
@@ -149,10 +156,10 @@ export default {
|
||||
//获取产品售卖权限列表
|
||||
getProductSellPermissionList(val, that, isCrossChannel) {
|
||||
let resultData = {
|
||||
flag:true,
|
||||
resultMessage:''
|
||||
flag: true,
|
||||
resultMessage: ''
|
||||
}
|
||||
const data = { productCodes: [val] ,isCrossChannel: isCrossChannel}
|
||||
const data = { productCodes: [val], isCrossChannel: isCrossChannel }
|
||||
if (Object.prototype.toString.call(val) === '[object Array]') data.productCodes = [...val]
|
||||
return new Promise((resolve, reject) => {
|
||||
productCheck(data).then(
|
||||
@@ -178,7 +185,7 @@ export default {
|
||||
},
|
||||
//校验投保人工作单位是否有权限投保该产品
|
||||
//isAsync 是否协同工作单位 0否 1是
|
||||
checkCompany(val, workcompany,isAsync, that) {
|
||||
checkCompany(val, workcompany, isAsync, that) {
|
||||
let flag = true
|
||||
let columns = []
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -213,7 +220,7 @@ export default {
|
||||
flag.manageComCode = res.manageComCode ? res.manageComCode.substring(2, 4) : ''
|
||||
flag.jobNo = res.jobNo
|
||||
flag.branchType = res.branchType
|
||||
// branchType N1、1代表个险渠道 和 N5、5 代表中介渠道,N代表内勤
|
||||
// branchType N1、1代表个险渠道 和 N5、5 代表中介渠道,N代表内勤
|
||||
if (res.branchType == 'N1' || res.branchType == '1') {
|
||||
flag.branchTypeVal = 'G'
|
||||
} else if (res.branchType == 'N5' || res.branchType == '5') {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
# 获取内容详情
|
||||
POST https://iagentsales-test2.e-guofu.com:5200/api/v1/sale/product/getDetail HTTP/1.1
|
||||
Accept: application/json, text/plain, */*
|
||||
Accept-Encoding: gzip, deflate, br, zstd
|
||||
@@ -28,3 +29,39 @@ token: {{token}}
|
||||
"type": "1"
|
||||
}
|
||||
|
||||
###
|
||||
# 进行试算
|
||||
POST https://iagentsales-test2.e-guofu.com:5200/api/v1/sale/insure/trial HTTP/1.1
|
||||
Accept: application/json, text/plain, */*
|
||||
Accept-Encoding: gzip, deflate, br, zstd
|
||||
Accept-Language: zh,zh-CN;q=0.9
|
||||
Connection: keep-alive
|
||||
Content-Type: application/json;charset=UTF-8
|
||||
DNT: 1
|
||||
Host: iagentsales-test2.e-guofu.com:5200
|
||||
Origin: http://localhost:8082
|
||||
Referer: http://localhost:8082/
|
||||
Sec-Fetch-Dest: empty
|
||||
Sec-Fetch-Mode: cors
|
||||
Sec-Fetch-Site: cross-site
|
||||
timeStr: 1761117811135
|
||||
token: cc4674542fa541ca830bfc2042da4917
|
||||
|
||||
{
|
||||
"trialInfos": [
|
||||
{
|
||||
"payIntv": "12",
|
||||
"insuYear": "106",
|
||||
"insuYearFlag": "A",
|
||||
"payEndYear": "5",
|
||||
"payEndYearFlag": "Y",
|
||||
"amt": 1,
|
||||
"birthday": "1995-10-22",
|
||||
"sex": "0",
|
||||
"platformType": "app",
|
||||
"productCode": "GFRS_M0035",
|
||||
"medical": "",
|
||||
"isCrossChannel": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user