mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-15 14:06:45 +08:00
[FIX]格式化
This commit is contained in:
@@ -1,63 +1,29 @@
|
||||
<template>
|
||||
<div class="calculate-premium-container pb50 pt10">
|
||||
<div class="bg-white ph10 pt10">
|
||||
<div class="flex justify-content-s align-items-c border-bottom
|
||||
|
||||
pb10">
|
||||
<div class="flex justify-content-s align-items-c border-bottom pb10">
|
||||
<span class="mr10">{{ saleInsuredPersonInfo.name }}</span>
|
||||
<span class="mr10">{{ saleInsuredPersonInfo.sex == 0 ? '男' : '
|
||||
|
||||
女' }}</span>
|
||||
<span class="mr10">{{ saleInsuredPersonInfo.sex == 0 ? '男' : '女' }}</span>
|
||||
<span class="mr10">{{ saleInsuredPersonInfo.age }}岁</span>
|
||||
<span class="mr10 flex1 van-ellipsis">{{
|
||||
|
||||
saleInsuredPersonInfo.occupationName }}</span>
|
||||
<span class="mr10 flex1 van-ellipsis">{{ saleInsuredPersonInfo.occupationName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="(item, index) in chooseProducts" :key="index"
|
||||
|
||||
class="ph10 bg-white">
|
||||
<div class="flex justify-content-s align-items-c border-bottom
|
||||
|
||||
pv10">
|
||||
<van-tag type="primary" v-if="item.isMainRisk == 0" class="mr5
|
||||
|
||||
green" plain>主险</van-tag>
|
||||
<van-tag type="primary" v-else class="mr5 green" plain>附加险
|
||||
|
||||
</van-tag>
|
||||
<div v-for="(item, index) in chooseProducts" :key="index" class="ph10 bg-white">
|
||||
<div class="flex justify-content-s align-items-c border-bottom pv10">
|
||||
<van-tag type="primary" v-if="item.isMainRisk == 0" class="mr5 green" plain>主险</van-tag>
|
||||
<van-tag type="primary" v-else class="mr5 green" plain>附加险</van-tag>
|
||||
<span class="ml5 center fs13 flex1">{{ item.riskName }}</span>
|
||||
<van-tag type="primary" v-if="item.isMainRisk == 0 &&
|
||||
|
||||
item.hasAddtionRisk" plain @click="selectAddtionRisk" class="green
|
||||
|
||||
mr8">附</van-tag>
|
||||
<van-icon name="search" size="20" v-if="item.documentDTOS &&
|
||||
|
||||
item.documentDTOS.length > 0" @click="seeDocument(index)" class="green
|
||||
|
||||
mr5" />
|
||||
<van-icon name="delete" size="22" @click="deleteRisk(index)"
|
||||
|
||||
class="green" />
|
||||
<van-tag type="primary" v-if="item.isMainRisk == 0 && item.hasAddtionRisk" plain @click="selectAddtionRisk" class="green mr8">附</van-tag>
|
||||
<van-icon name="search" size="20" v-if="item.documentDTOS && item.documentDTOS.length > 0" @click="seeDocument(index)" class="green mr5" />
|
||||
<van-icon name="delete" size="22" @click="deleteRisk(index)" class="green" />
|
||||
</div>
|
||||
<!-- 险种条件-->
|
||||
<div v-if="(item.isRemit == 1 && isTrial == '1') || (item.isRemit
|
||||
|
||||
== 1 && isTrial != '1' && item.isMainRisk == 1)">
|
||||
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst"
|
||||
|
||||
:key="riskFactorIndex">
|
||||
<div class="flex justify-content-s pv10 border-bottom" v-
|
||||
|
||||
if="riskFactor.type == 1">
|
||||
<div v-if="(item.isRemit == 1 && isTrial == '1') || (item.isRemit == 1 && isTrial != '1' && item.isMainRisk == 1)">
|
||||
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
|
||||
<div class="flex justify-content-s pv10 border-bottom" v-if="riskFactor.type == 1">
|
||||
<div class="flex align-items-c">
|
||||
<span v-if="riskFactor.suffix" class="fs14">{{
|
||||
|
||||
riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
|
||||
<span v-else class="fs14">{{ riskFactor.name }}
|
||||
|
||||
</span>
|
||||
<span v-if="riskFactor.suffix" class="fs14">{{ riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
|
||||
<span v-else class="fs14">{{ riskFactor.name }} </span>
|
||||
<!-- {{riskFactorIndex}} -->
|
||||
<!-- {{defalutAmt}} -->
|
||||
<van-stepper
|
||||
@@ -85,9 +51,7 @@ riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
|
||||
<div
|
||||
class="flex justify-content-s pv10 border-bottom"
|
||||
v-if="riskFactor.type == 0"
|
||||
:class="{ hidden: riskFactor.code == 'payEndYear' &&
|
||||
|
||||
item.isHidden }"
|
||||
:class="{ hidden: riskFactor.code == 'payEndYear' && item.isHidden }"
|
||||
>
|
||||
<van-field
|
||||
v-model="riskFactor.showContent"
|
||||
@@ -95,22 +59,14 @@ item.isHidden }"
|
||||
:label="riskFactor.name"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect(index, riskFactorIndex,
|
||||
|
||||
riskFactor.columns)"
|
||||
@click="toSelect(index, riskFactorIndex, riskFactor.columns)"
|
||||
/>
|
||||
</div>
|
||||
<div class="border-bottom" v-if="riskFactor.type == 3">
|
||||
<div class="pv12 border-bd">{{ riskFactor.name }}</div>
|
||||
<div class="duty">
|
||||
<div class="flex justify-content-s border-bd pv10 align-
|
||||
|
||||
items-c" v-for="(dutyItem, dutyItemIndex) in riskFactor.rules"
|
||||
|
||||
:key="dutyItemIndex">
|
||||
<span class="fs14 w100">{{ dutyItem.dutyName }}({{
|
||||
|
||||
dutyItem.suffix }})</span>
|
||||
<div class="flex justify-content-s border-bd pv10 align-items-c" v-for="(dutyItem, dutyItemIndex) in riskFactor.rules" :key="dutyItemIndex">
|
||||
<span class="fs14 w100">{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span>
|
||||
<div class="flex">
|
||||
<van-stepper
|
||||
v-model="dutyItem.defaultDutyAmt"
|
||||
@@ -123,9 +79,7 @@ dutyItem.suffix }})</span>
|
||||
@blur="blurStep"
|
||||
@change="
|
||||
dutyStepperChange(
|
||||
item.calFactorLst[riskFactorIndex].rules
|
||||
|
||||
[dutyItemIndex].defaultDutyAmt,
|
||||
item.calFactorLst[riskFactorIndex].rules[dutyItemIndex].defaultDutyAmt,
|
||||
index,
|
||||
riskFactorIndex,
|
||||
dutyItemIndex,
|
||||
@@ -141,9 +95,7 @@ dutyItem.suffix }})</span>
|
||||
v-model="dutyItem.necess"
|
||||
:disabled="dutyItem.defaultValue == '0'"
|
||||
shape="square"
|
||||
@change="changeChecked(index, riskFactorIndex,
|
||||
|
||||
dutyItemIndex)"
|
||||
@change="changeChecked(index, riskFactorIndex, dutyItemIndex)"
|
||||
></van-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
@@ -152,47 +104,27 @@ dutyItemIndex)"
|
||||
</div>
|
||||
</div>
|
||||
<!-- 为富娃娃两全保险(万能型)专写 -->
|
||||
<div v-if="item.isRemit == 1 && isTrial != '1' && item.isMainRisk
|
||||
|
||||
== 0">
|
||||
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst"
|
||||
|
||||
:key="riskFactorIndex">
|
||||
<div class="flex justify-content-s pv10 border-bottom" v-
|
||||
|
||||
if="riskFactor.type == 1">
|
||||
<div v-if="item.isRemit == 1 && isTrial != '1' && item.isMainRisk == 0">
|
||||
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
|
||||
<div class="flex justify-content-s pv10 border-bottom" v-if="riskFactor.type == 1">
|
||||
<div class="flex align-items-c">
|
||||
<span v-if="riskFactor.suffix" class="fs14">{{
|
||||
|
||||
riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
|
||||
<span v-else class="fs14">{{ riskFactor.name }}
|
||||
|
||||
</span>
|
||||
<span v-if="riskFactor.suffix" class="fs14">{{ riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
|
||||
<span v-else class="fs14">{{ riskFactor.name }} </span>
|
||||
<!-- {{riskFactorIndex}} -->
|
||||
<van-stepper
|
||||
v-model="defalutAmt"
|
||||
:min="item.productTrialYearDTOS[riskFactorIndex].minAmt
|
||||
|
||||
|| item.productTrialYearDTOS[riskFactorIndex].minPrem"
|
||||
:max="item.productTrialYearDTOS[riskFactorIndex].maxAmt
|
||||
|
||||
|| item.productTrialYearDTOS[riskFactorIndex].maxPrem"
|
||||
:min="item.productTrialYearDTOS[riskFactorIndex].minAmt || item.productTrialYearDTOS[riskFactorIndex].minPrem"
|
||||
:max="item.productTrialYearDTOS[riskFactorIndex].maxAmt || item.productTrialYearDTOS[riskFactorIndex].maxPrem"
|
||||
:show-plus="false"
|
||||
:show-minus="false"
|
||||
class="ml30"
|
||||
@change="
|
||||
stepperChange(
|
||||
item.productTrialYearDTOS
|
||||
|
||||
[riskFactorIndex].defaultValue,
|
||||
item.productTrialYearDTOS[riskFactorIndex].defaultValue,
|
||||
index,
|
||||
riskFactorIndex,
|
||||
item.productTrialYearDTOS[riskFactorIndex].minAmt
|
||||
|
||||
|| item.productTrialYearDTOS[riskFactorIndex].minPrem,
|
||||
item.productTrialYearDTOS[riskFactorIndex].maxAmt
|
||||
|
||||
|| item.productTrialYearDTOS[riskFactorIndex].maxPrem,
|
||||
item.productTrialYearDTOS[riskFactorIndex].minAmt || item.productTrialYearDTOS[riskFactorIndex].minPrem,
|
||||
item.productTrialYearDTOS[riskFactorIndex].maxAmt || item.productTrialYearDTOS[riskFactorIndex].maxPrem,
|
||||
item.productTrialYearDTOS[riskFactorIndex]
|
||||
)
|
||||
"
|
||||
@@ -204,9 +136,7 @@ riskFactor.name + '(' + riskFactor.suffix + ')' }}</span>
|
||||
<div
|
||||
class="flex justify-content-s pv10 border-bottom"
|
||||
v-if="riskFactor.type == 0"
|
||||
:class="{ hidden: riskFactor.code == 'payEndYear' &&
|
||||
|
||||
item.isHidden }"
|
||||
:class="{ hidden: riskFactor.code == 'payEndYear' && item.isHidden }"
|
||||
>
|
||||
<van-field
|
||||
v-model="riskFactor.showContent"
|
||||
@@ -214,22 +144,14 @@ item.isHidden }"
|
||||
:label="riskFactor.name"
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
@click="toSelect(index, riskFactorIndex,
|
||||
|
||||
riskFactor.columns)"
|
||||
@click="toSelect(index, riskFactorIndex, riskFactor.columns)"
|
||||
/>
|
||||
</div>
|
||||
<div class="border-bottom" v-if="riskFactor.type == 3">
|
||||
<div class="pv12 border-bd">{{ riskFactor.name }}</div>
|
||||
<div class="duty">
|
||||
<div class="flex justify-content-s border-bd pv10 align-
|
||||
|
||||
items-c" v-for="(dutyItem, dutyItemIndex) in riskFactor.rules"
|
||||
|
||||
:key="dutyItemIndex">
|
||||
<span class="fs14 w100">{{ dutyItem.dutyName }}({{
|
||||
|
||||
dutyItem.suffix }})</span>
|
||||
<div class="flex justify-content-s border-bd pv10 align-items-c" v-for="(dutyItem, dutyItemIndex) in riskFactor.rules" :key="dutyItemIndex">
|
||||
<span class="fs14 w100">{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span>
|
||||
<div class="flex">
|
||||
<van-stepper
|
||||
v-model="dutyItem.defaultDutyAmt"
|
||||
@@ -242,9 +164,7 @@ dutyItem.suffix }})</span>
|
||||
@blur="blurStep"
|
||||
@change="
|
||||
dutyStepperChange(
|
||||
item.calFactorLst[riskFactorIndex].rules
|
||||
|
||||
[dutyItemIndex].defaultDutyAmt,
|
||||
item.calFactorLst[riskFactorIndex].rules[dutyItemIndex].defaultDutyAmt,
|
||||
index,
|
||||
riskFactorIndex,
|
||||
dutyItemIndex,
|
||||
@@ -260,9 +180,7 @@ dutyItem.suffix }})</span>
|
||||
v-model="dutyItem.necess"
|
||||
:disabled="dutyItem.defaultValue == '0'"
|
||||
shape="square"
|
||||
@change="changeChecked(index, riskFactorIndex,
|
||||
|
||||
dutyItemIndex)"
|
||||
@change="changeChecked(index, riskFactorIndex, dutyItemIndex)"
|
||||
></van-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,79 +191,45 @@ dutyItemIndex)"
|
||||
|
||||
<!-- 豁免险条件 -->
|
||||
<div v-if="item.isRemit == 0">
|
||||
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst"
|
||||
|
||||
:key="riskFactorIndex">
|
||||
<div v-for="(riskFactor, riskFactorIndex) in item.calFactorLst" :key="riskFactorIndex">
|
||||
<div class="flex justify-content-s pv10 border-bottom">
|
||||
<div class="flex">
|
||||
<van-field v-if="riskFactor.type == 0" v-
|
||||
|
||||
model="riskFactor.showContent" readonly :label="riskFactor.name" />
|
||||
<van-field v-if="riskFactor.type == 1" v-
|
||||
|
||||
model="riskFactor.defaultValue" readonly :label="riskFactor.name + '('
|
||||
|
||||
+ riskFactor.suffix + ')'" />
|
||||
<van-field v-if="riskFactor.type == 0" v-model="riskFactor.showContent" readonly :label="riskFactor.name" />
|
||||
<van-field v-if="riskFactor.type == 1" v-model="riskFactor.defaultValue" readonly :label="riskFactor.name + '(' + riskFactor.suffix + ')'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 只有万能险且只有建议书才展示 -->
|
||||
<van-field class="pv10" v-if="item.hasPredictTransferPrem ===
|
||||
|
||||
'0'" v-model="item.predictTransferPrem" label="预计转入保费"
|
||||
|
||||
placeholder="请输入" />
|
||||
<div class="flex justify-content-s pv10 border-bottom" v-
|
||||
|
||||
if="isRelated && isFrom != 'proposal'">
|
||||
<van-field v-model="policyNo" clearable label="关联保单" name="
|
||||
|
||||
关联保单号" maxlength="20" placeholder="请输入保单号/投保单号" />
|
||||
<van-field class="pv10" v-if="item.hasPredictTransferPrem === '0'" v-model="item.predictTransferPrem" label="预计转入保费" placeholder="请输入" />
|
||||
<div class="flex justify-content-s pv10 border-bottom" v-if="isRelated && isFrom != 'proposal'">
|
||||
<van-field v-model="policyNo" clearable label="关联保单" name="关联保单号" maxlength="20" placeholder="请输入保单号/投保单号" />
|
||||
</div>
|
||||
<div class="flex justify-content-s pv10 border-bottom prem">
|
||||
<span
|
||||
style="font-weight:bold"
|
||||
v-if="(trialList.length > 0 && trialList[index].trialType ==
|
||||
|
||||
0) || (trialList.length > 0 && trialList[index].trialType == 2) ||
|
||||
|
||||
isTrial === '0'"
|
||||
v-if="(trialList.length > 0 && trialList[index].trialType == 0) || (trialList.length > 0 && trialList[index].trialType == 2) || isTrial === '0'"
|
||||
>首期保费(元):</span
|
||||
>
|
||||
<span style="font-weight:bold" v-else>保额(元):</span>
|
||||
<span class="fee red" v-if="trialList && trialList.length >
|
||||
|
||||
0">{{ trialList[index].prem.toFixed(2) | moneyFormat }}</span>
|
||||
<span class="fee red" v-if="isTrial === '0' && item.isMainRisk
|
||||
|
||||
== '1'">0.00</span>
|
||||
<span class="fee red" v-if="isTrial === '0' && item.isMainRisk
|
||||
|
||||
== '0'">{{ defalutAmt }}</span>
|
||||
<span class="fee red" v-if="trialList && trialList.length > 0">{{ trialList[index].prem.toFixed(2) | moneyFormat }}</span>
|
||||
<span class="fee red" v-if="isTrial === '0' && item.isMainRisk == '1'">0.00</span>
|
||||
<span class="fee red" v-if="isTrial === '0' && item.isMainRisk == '0'">{{ defalutAmt }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-btn bg-white">
|
||||
<van-button type="danger" size="large" @click="nextStep"
|
||||
|
||||
:disabled="nextStepFlag" v-no-more-click="1000">完成</van-button>
|
||||
<van-button type="danger" size="large" @click="nextStep" :disabled="nextStepFlag" v-no-more-click="1000">完成</van-button>
|
||||
</div>
|
||||
<van-action-sheet v-model="show" cancel-text="取消"
|
||||
|
||||
:actions="policyInfo" @select="openDocument" />
|
||||
<van-action-sheet v-model="show" cancel-text="取消" :actions="policyInfo" @select="openDocument" />
|
||||
|
||||
<!-- 字段选择 -->
|
||||
<van-popup v-model="popupShow" position="bottom">
|
||||
<van-picker show-toolbar :columns="columns" @confirm="onConfirm"
|
||||
|
||||
@cancel="onCancel" />
|
||||
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="onCancel" />
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field,
|
||||
|
||||
Checkbox } from 'vant'
|
||||
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox } from 'vant'
|
||||
import { trial } from '@/api/ebiz/common/common'
|
||||
import { saveOrUpdateOrderInfo } from '@/api/ebiz/sale/sale'
|
||||
import { saveProposal } from '@/api/ebiz/proposal/proposal.js'
|
||||
@@ -416,9 +300,7 @@ export default {
|
||||
}
|
||||
//获取被保人信息
|
||||
if (localStorage.saleInsuredPersonInfo) {
|
||||
this.saleInsuredPersonInfo = JSON.parse
|
||||
|
||||
(localStorage.saleInsuredPersonInfo)
|
||||
this.saleInsuredPersonInfo = JSON.parse(localStorage.saleInsuredPersonInfo)
|
||||
}
|
||||
//构建提交数据、渲染险种
|
||||
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
|
||||
@@ -432,9 +314,7 @@ export default {
|
||||
this.defalutAmt = i.displayAmount || 1
|
||||
console.log(i.displayAmount)
|
||||
console.log(i.defaultValue)
|
||||
this.mult = Number(i.displayAmount) / Number
|
||||
|
||||
(i.defaultValue)
|
||||
this.mult = Number(i.displayAmount) / Number(i.defaultValue)
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -446,9 +326,7 @@ export default {
|
||||
|
||||
// this.influenceAddRiskCodes
|
||||
|
||||
if (this.chooseProducts[0].influences && this.chooseProducts
|
||||
|
||||
[0].influences.length > 0) {
|
||||
if (this.chooseProducts[0].influences && this.chooseProducts[0].influences.length > 0) {
|
||||
this.influences = this.chooseProducts[0].influences
|
||||
this.chooseProducts[0].influences.forEach(item => {
|
||||
this.influenceAddRiskCodes.push(item.productCode)
|
||||
@@ -456,26 +334,18 @@ export default {
|
||||
}
|
||||
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
//初始化数据试算 isTrial是否调后端保费试算 /sale/ insure/trial 接
|
||||
|
||||
口标志,0-不调取
|
||||
if (localStorage.isTrial === '1') {
|
||||
//初始化数据试算 isTrial是否调后端保费试算 /sale/ insure/trial 接口标志,0-不调取
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
},
|
||||
// 责任保额份数变化
|
||||
dutyStepperChange(value, productIndex, calFactorIndex,
|
||||
|
||||
dutyItemIndex, isChecked, min, max) {
|
||||
let currentEle = this.chooseProducts[productIndex].calFactorLst
|
||||
|
||||
[calFactorIndex].rules[dutyItemIndex]
|
||||
dutyStepperChange(value, productIndex, calFactorIndex, dutyItemIndex, isChecked, min, max) {
|
||||
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]
|
||||
if (value < min || value > max) {
|
||||
this.$toast(localStorage.hint)
|
||||
} else {
|
||||
if ((Number(value) * 10000) % (Number(currentEle.limit) *
|
||||
|
||||
10000) != 0) {
|
||||
if ((Number(value) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
Dialog.alert({
|
||||
message: localStorage.hint
|
||||
}).then(() => {
|
||||
@@ -485,37 +355,23 @@ dutyItemIndex, isChecked, min, max) {
|
||||
// this.$toast(localStorage.hint)
|
||||
} else {
|
||||
// this.mainRiskInfluenceAddRisk()
|
||||
// currentEle['amt'] = Number(currentEle.defaultValue) *
|
||||
|
||||
Number(currentEle.moneyUnit)
|
||||
// currentEle['amt'] = Number(currentEle.defaultValue) * Number(currentEle.moneyUnit)
|
||||
// this.getTrial()
|
||||
if (isChecked) {
|
||||
;[this.productIndex, this.calFactorIndex] = [productIndex,
|
||||
|
||||
calFactorIndex]
|
||||
let currentEle = this.chooseProducts
|
||||
|
||||
[productIndex].calFactorLst[calFactorIndex].rules
|
||||
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
|
||||
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
|
||||
currentEle.forEach(item => {
|
||||
item.amt = Number(item.minDutyAmt) * Number
|
||||
|
||||
(item.moneyUnit)
|
||||
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
|
||||
})
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
if (localStorage.isTrial === '1') {
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
} else {
|
||||
;[this.productIndex, this.calFactorIndex] = [productIndex,
|
||||
|
||||
calFactorIndex]
|
||||
let currentEle = this.chooseProducts
|
||||
|
||||
[productIndex].calFactorLst[calFactorIndex].rules
|
||||
;[this.productIndex, this.calFactorIndex] = [productIndex, calFactorIndex]
|
||||
let currentEle = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules
|
||||
currentEle.forEach(item => {
|
||||
item.amt = Number(item.minDutyAmt) * Number
|
||||
|
||||
(item.moneyUnit)
|
||||
item.amt = Number(item.minDutyAmt) * Number(item.moneyUnit)
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -526,9 +382,7 @@ calFactorIndex]
|
||||
// },
|
||||
//弹框选择
|
||||
toSelect(index, index1, columns) {
|
||||
;[this.popupShow, this.productIndex, this.calFactorIndex] =
|
||||
|
||||
[true, index, index1]
|
||||
;[this.popupShow, this.productIndex, this.calFactorIndex] = [true, index, index1]
|
||||
this.columns = columns
|
||||
},
|
||||
//取消picker
|
||||
@@ -539,30 +393,22 @@ calFactorIndex]
|
||||
//确认选择字段
|
||||
onConfirm(value) {
|
||||
this.columns = []
|
||||
let currentFactor = this.chooseProducts
|
||||
|
||||
[this.productIndex].calFactorLst
|
||||
let currentFactor = this.chooseProducts[this.productIndex].calFactorLst
|
||||
let currentEle = currentFactor[this.calFactorIndex]
|
||||
console.log('value', value)
|
||||
console.log('currentFactor', currentFactor)
|
||||
console.log('currentEle', currentEle)
|
||||
if (currentEle.showContent != value.text) {
|
||||
//通用规则校验
|
||||
if (this.payExceedInsured(currentEle, currentFactor,
|
||||
|
||||
value.value)) {
|
||||
if (this.payExceedInsured(currentEle, currentFactor, value.value)) {
|
||||
this.popupShow = false
|
||||
return false
|
||||
}
|
||||
if (currentEle.code == 'payEndYear' &&
|
||||
|
||||
this.ageInfluencePayEndYear(value.value, currentEle)) {
|
||||
if (currentEle.code == 'payEndYear' && this.ageInfluencePayEndYear(value.value, currentEle)) {
|
||||
this.popupShow = false
|
||||
return false
|
||||
}
|
||||
if (currentEle.code == 'insuYear' && this.ageInfluenceInsuYear
|
||||
|
||||
(value.value, currentEle)) {
|
||||
if (currentEle.code == 'insuYear' && this.ageInfluenceInsuYear(value.value, currentEle)) {
|
||||
this.popupShow = false
|
||||
return false
|
||||
}
|
||||
@@ -575,7 +421,7 @@ this.ageInfluencePayEndYear(value.value, currentEle)) {
|
||||
}
|
||||
this.hiddenPayEndYear(currentEle)
|
||||
//特殊规则:设置豁免险
|
||||
if (localStorage.isTrial === '1') {
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
@@ -584,23 +430,17 @@ this.ageInfluencePayEndYear(value.value, currentEle)) {
|
||||
},
|
||||
// 交通责任险复选框变化
|
||||
changeChecked(productIndex, calFactorIndex, dutyItemIndex) {
|
||||
let isChecked = this.chooseProducts[productIndex].calFactorLst
|
||||
|
||||
[calFactorIndex].rules.some(item => {
|
||||
let isChecked = this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules.some(item => {
|
||||
return item.necess == true
|
||||
})
|
||||
if (!isChecked) {
|
||||
this.chooseProducts[productIndex].calFactorLst
|
||||
|
||||
[calFactorIndex].rules[dutyItemIndex]['necess'] = !this.chooseProducts
|
||||
|
||||
[productIndex].calFactorLst[
|
||||
this.chooseProducts[productIndex].calFactorLst[calFactorIndex].rules[dutyItemIndex]['necess'] = !this.chooseProducts[productIndex].calFactorLst[
|
||||
calFactorIndex
|
||||
].rules[dutyItemIndex]['necess']
|
||||
return false
|
||||
}
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
if (localStorage.isTrial === '1') {
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
},
|
||||
@@ -615,9 +455,7 @@ this.ageInfluencePayEndYear(value.value, currentEle)) {
|
||||
//通用规则1:交费方式为一次交情,无交费期限
|
||||
hiddenPayEndYear(currentEle) {
|
||||
if (currentEle.code == 'payIntv') {
|
||||
this.chooseProducts[this.productIndex]['isHidden'] =
|
||||
|
||||
currentEle.payIntv == '0' ? true : false
|
||||
this.chooseProducts[this.productIndex]['isHidden'] = currentEle.payIntv == '0' ? true : false
|
||||
}
|
||||
},
|
||||
//通用规则2:交费期限不能超过保险期间
|
||||
@@ -625,15 +463,11 @@ currentEle.payIntv == '0' ? true : false
|
||||
let payEndYearVal, insuYearVal
|
||||
if (currentEle.code == 'payEndYear') {
|
||||
payEndYearVal = Number(currentVale)
|
||||
insuYearVal = this.getPayEndYearOrInsuYear('insuYear',
|
||||
|
||||
currentFactor)
|
||||
insuYearVal = this.getPayEndYearOrInsuYear('insuYear', currentFactor)
|
||||
}
|
||||
if (currentEle.code == 'insuYear') {
|
||||
insuYearVal = Number(currentVale)
|
||||
payEndYearVal = this.getPayEndYearOrInsuYear('payEndYear',
|
||||
|
||||
currentFactor)
|
||||
payEndYearVal = this.getPayEndYearOrInsuYear('payEndYear', currentFactor)
|
||||
}
|
||||
if (payEndYearVal > insuYearVal) {
|
||||
this.$toast('交费期间不能超过保险期间')
|
||||
@@ -655,9 +489,7 @@ currentFactor)
|
||||
ageInfluencePayEndYear(value, currentEle) {
|
||||
let age = Number(this.saleInsuredPersonInfo.age)
|
||||
for (let i = 0; i < currentEle.rules.length; i++) {
|
||||
if (currentEle.rules[i].payEndYear == value && age >
|
||||
|
||||
currentEle.rules[i].maxAge) {
|
||||
if (currentEle.rules[i].payEndYear == value && age > currentEle.rules[i].maxAge) {
|
||||
this.$toast('被保人年龄不适合该交费期间!')
|
||||
return true
|
||||
}
|
||||
@@ -668,34 +500,24 @@ currentEle.rules[i].maxAge) {
|
||||
ageInfluenceInsuYear(value, currentEle) {
|
||||
let age = Number(this.saleInsuredPersonInfo.age)
|
||||
for (let i = 0; i < currentEle.rules.length; i++) {
|
||||
if (currentEle.rules[i].insuYear == value && age >
|
||||
|
||||
currentEle.rules[i].maxAge) {
|
||||
if (currentEle.rules[i].insuYear == value && age > currentEle.rules[i].maxAge) {
|
||||
this.$toast('被保人年龄不适合该保险期间!')
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
//特殊规则2、主险对附加险的影响,主要是保额之间的影响
|
||||
|
||||
mainAddRelation:0-小于,1-大于,2-等于,3-小于等于,4-大于等于
|
||||
//特殊规则2、主险对附加险的影响,主要是保额之间的影响 mainAddRelation:0-小于,1-大于,2-等于,3-小于等于,4-大于等于
|
||||
mainRiskInfluenceAddRisk() {
|
||||
if (this.productIndex == 0) {
|
||||
this.chooseProducts.forEach((item, index) => {
|
||||
if (this.influenceAddRiskCodes.includes(item.productCode)) {
|
||||
let influences = this.getInfluencesItem(item.productCode)
|
||||
let mainAddRelation = influences.amtInfluence
|
||||
|
||||
[0].mainAddRelation
|
||||
let mainAddRelation = influences.amtInfluence[0].mainAddRelation
|
||||
let amtTimes = influences.amtInfluence[0].amtTimes
|
||||
let mainRiskAmt = this.getMainRiskAmt()
|
||||
if (mainAddRelation == 3 && (amtTimes == 1 || amtTimes ==
|
||||
|
||||
5)) {
|
||||
this.setInputAddtionRiskMaxAmt(mainRiskAmt * amtTimes,
|
||||
|
||||
index)
|
||||
if (mainAddRelation == 3 && (amtTimes == 1 || amtTimes == 5)) {
|
||||
this.setInputAddtionRiskMaxAmt(mainRiskAmt * amtTimes, index)
|
||||
} else if (mainAddRelation == 3 && amtTimes == 0.2) {
|
||||
this.setAddtionRiskMaxAmt(mainRiskAmt * amtTimes, index)
|
||||
}
|
||||
@@ -717,9 +539,7 @@ index)
|
||||
})
|
||||
//主险减,附加险变化,取最小
|
||||
|
||||
let currentAmt = this.getAmtByPlanCode(item.columns,
|
||||
|
||||
item.planCode)
|
||||
let currentAmt = this.getAmtByPlanCode(item.columns, item.planCode)
|
||||
if (mainRiskAmt * 10000 < currentAmt) {
|
||||
let minVal = columnsValArr.min()
|
||||
item.columns.forEach(option => {
|
||||
@@ -778,9 +598,7 @@ item.planCode)
|
||||
let mainRiskInfo = this.getMainRiskInfo()
|
||||
console.log(mainRiskInfo)
|
||||
let mainRiskPayIntv = mainRiskInfo.payIntv.payIntv
|
||||
let mainRiskPayEndYearFlag =
|
||||
|
||||
mainRiskInfo.payEndYear.payEndYearFlag
|
||||
let mainRiskPayEndYearFlag = mainRiskInfo.payEndYear.payEndYearFlag
|
||||
if (mainRiskPayIntv == 0 || mainRiskPayEndYearFlag == 'A') {
|
||||
//删除已选或互斥险种
|
||||
for (let i = 0; i < this.chooseProducts.length; i++) {
|
||||
@@ -853,17 +671,11 @@ mainRiskInfo.payEndYear.payEndYearFlag
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
title: item.name,
|
||||
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' +
|
||||
|
||||
item.url //测试代码
|
||||
url: location.origin + '/pdfjs/web/viewer.html?file=' +
|
||||
|
||||
pdfUrl
|
||||
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + item.url //测试代码
|
||||
url: location.origin + '/pdfjs/web/viewer.html?file=' + pdfUrl
|
||||
}
|
||||
})
|
||||
// localStorage.documentInfo = JSON.stringify({ documentUrl:
|
||||
|
||||
item.url, documentType: item.type })
|
||||
// localStorage.documentInfo = JSON.stringify({ documentUrl: item.url, documentType: item.type })
|
||||
// this.$jump({
|
||||
// flag: 'h5',
|
||||
// extra: {
|
||||
@@ -903,10 +715,8 @@ item.url, documentType: item.type })
|
||||
this.chooseProducts.splice(index, 1)
|
||||
}
|
||||
|
||||
localStorage.chooseProducts = JSON.stringify
|
||||
|
||||
(this.chooseProducts)
|
||||
if (localStorage.isTrial === '1') {
|
||||
localStorage.chooseProducts = JSON.stringify(this.chooseProducts)
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
})
|
||||
@@ -944,47 +754,31 @@ item.url, documentType: item.type })
|
||||
if (factor.type == 0) {
|
||||
if (factor.hasFlag == '1') {
|
||||
trialInfo[factor.code] = factor[factor.code]
|
||||
trialInfo[factor.code + 'Flag'] = factor[factor.code +
|
||||
|
||||
'Flag']
|
||||
// trialInfo[factor.payEndYear] = factor
|
||||
|
||||
[factor.payEndYear]
|
||||
trialInfo[factor.code + 'Flag'] = factor[factor.code + 'Flag']
|
||||
// trialInfo[factor.payEndYear] = factor[factor.payEndYear]
|
||||
} else {
|
||||
trialInfo[factor.code] = factor[factor.code]
|
||||
}
|
||||
} else if (factor.type == 1) {
|
||||
if (factor.code == 'inputPrem') {
|
||||
trialInfo['prem'] = Number(this.defalutAmt) * Number
|
||||
|
||||
(factor.moneyUnit)
|
||||
trialInfo['prem'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
|
||||
} else {
|
||||
if (item.isRemit == 0) {
|
||||
trialInfo['amt'] = Number(factor.defaultValue) *
|
||||
|
||||
Number(factor.moneyUnit)
|
||||
trialInfo['amt'] = Number(factor.defaultValue) * Number(factor.moneyUnit)
|
||||
} else {
|
||||
trialInfo['amt'] = Number(this.defalutAmt) * Number
|
||||
|
||||
(factor.moneyUnit)
|
||||
trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
|
||||
}
|
||||
// trialInfo['amt'] = Number(this.defalutAmt) * Number
|
||||
|
||||
(factor.moneyUnit)
|
||||
// trialInfo['amt'] = Number(this.defalutAmt) * Number(factor.moneyUnit)
|
||||
}
|
||||
} else if (factor.type == 2) {
|
||||
trialInfo.jobLevel = this.saleInsuredPersonInfo
|
||||
|
||||
[factor.code]
|
||||
trialInfo.jobLevel = this.saleInsuredPersonInfo[factor.code]
|
||||
} else if (factor.type == 3) {
|
||||
let result = []
|
||||
factor.rules.forEach(dutyItem => {
|
||||
if (dutyItem.necess) {
|
||||
// trialInfo['amt'] = this.trialList[index].amt
|
||||
result.push({
|
||||
amt: Number(dutyItem.defaultDutyAmt) * Number
|
||||
|
||||
(dutyItem.moneyUnit),
|
||||
amt: Number(dutyItem.defaultDutyAmt) * Number(dutyItem.moneyUnit),
|
||||
dutyCode: dutyItem.duty,
|
||||
dutyName: dutyItem.dutyName
|
||||
})
|
||||
@@ -1000,9 +794,7 @@ Number(factor.moneyUnit)
|
||||
trialInfo['payEndYear'] = '1000'
|
||||
trialInfo['payEndYearFlag'] = 'Y'
|
||||
// 福宝宝和万能险传A
|
||||
if (item.mainRiskCode != 'GFRS_M0006' && item.mainRiskCode !=
|
||||
|
||||
'GFRS_M0003' && item.mainRiskCode != 'GFRS_M0013') {
|
||||
if (item.mainRiskCode != 'GFRS_M0006' && item.mainRiskCode != 'GFRS_M0003' && item.mainRiskCode != 'GFRS_M0013') {
|
||||
trialInfo['insuYearFlag'] = 'Y'
|
||||
}
|
||||
}
|
||||
@@ -1013,22 +805,16 @@ Number(factor.moneyUnit)
|
||||
//获取投被保生日、性别
|
||||
let birthday, sex
|
||||
if (item.isRemit == '0' && item.remitType == '0') {
|
||||
;[birthday, sex] = [this.saleInsuredInfo.birthday,
|
||||
|
||||
this.saleInsuredInfo.sex]
|
||||
;[birthday, sex] = [this.saleInsuredInfo.birthday, this.saleInsuredInfo.sex]
|
||||
} else {
|
||||
;[birthday, sex] = [this.saleInsuredPersonInfo.birthday,
|
||||
|
||||
this.saleInsuredPersonInfo.sex]
|
||||
;[birthday, sex] = [this.saleInsuredPersonInfo.birthday, this.saleInsuredPersonInfo.sex]
|
||||
}
|
||||
trialInfo = Object.assign(trialInfo, {
|
||||
birthday,
|
||||
sex,
|
||||
platformType: 'app',
|
||||
productCode: item.productCode,
|
||||
medical: JSON.parse(localStorage.getItem
|
||||
|
||||
('saleInsuredPersonInfo')).medical
|
||||
medical: JSON.parse(localStorage.getItem('saleInsuredPersonInfo')).medical
|
||||
})
|
||||
params.trialInfos.push(trialInfo)
|
||||
})
|
||||
@@ -1045,12 +831,8 @@ this.saleInsuredPersonInfo.sex]
|
||||
addRiskCodes.push(item.productCode)
|
||||
}
|
||||
})
|
||||
if (localStorage.oldAddRiskCodes && JSON.parse
|
||||
|
||||
(localStorage.oldAddRiskCodes)) {
|
||||
addRiskCodes = addRiskCodes.concat(JSON.parse
|
||||
|
||||
(localStorage.oldAddRiskCodes))
|
||||
if (localStorage.oldAddRiskCodes && JSON.parse(localStorage.oldAddRiskCodes)) {
|
||||
addRiskCodes = addRiskCodes.concat(JSON.parse(localStorage.oldAddRiskCodes))
|
||||
}
|
||||
//930折中方案,豁免险挂订单
|
||||
addRiskCodes = addRiskCodes.filter(riskCode => {
|
||||
@@ -1069,150 +851,94 @@ this.saleInsuredPersonInfo.sex]
|
||||
})
|
||||
},
|
||||
//保额份数变化
|
||||
stepperChange(defalutValue, productIndex, calFactorIndex, min, max,
|
||||
|
||||
riskFactor) {
|
||||
stepperChange(defalutValue, productIndex, calFactorIndex, min, max, riskFactor) {
|
||||
console.log(defalutValue, productIndex, calFactorIndex, min, max)
|
||||
console.log(this.saleInsuredPersonInfo.age)
|
||||
console.log(riskFactor)
|
||||
let currentEle =
|
||||
localStorage.isTrial !== '1' && this.chooseProducts
|
||||
|
||||
[productIndex].isMainRisk == '0'
|
||||
? this.chooseProducts[productIndex].productTrialYearDTOS
|
||||
|
||||
[calFactorIndex]
|
||||
: this.chooseProducts[productIndex].calFactorLst
|
||||
|
||||
[calFactorIndex]
|
||||
localStorage.isTrial !== '' && this.chooseProducts[productIndex].isMainRisk == '0'
|
||||
? this.chooseProducts[productIndex].productTrialYearDTOS[calFactorIndex]
|
||||
: this.chooseProducts[productIndex].calFactorLst[calFactorIndex]
|
||||
//改动原因:孝心保产品有对年龄的特殊要求
|
||||
//添加判断,是否是孝心保产品
|
||||
if (localStorage.trialList != '' && JSON.parse
|
||||
|
||||
(localStorage.trialList)[0].productCode == 'GFRS_M0014') {
|
||||
if (localStorage.trialList != '' && JSON.parse(localStorage.trialList)[0].productCode == 'GFRS_M0014') {
|
||||
//被保人年龄如果在50-65区间
|
||||
if (this.saleInsuredPersonInfo.age >= 50 &&
|
||||
|
||||
this.saleInsuredPersonInfo.age <= 65) {
|
||||
if (this.saleInsuredPersonInfo.age >= 50 && this.saleInsuredPersonInfo.age <= 65) {
|
||||
//使用rules规则里的第二条控制保额份数
|
||||
if (Number(this.defalutAmt) < Number(riskFactor.rules
|
||||
|
||||
[1].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules
|
||||
|
||||
[1].maxPrem)) {
|
||||
if (Number(this.defalutAmt) < Number(riskFactor.rules[1].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[1].maxPrem)) {
|
||||
this.$toast(localStorage.hint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number
|
||||
|
||||
(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules
|
||||
|
||||
[productIndex].displayAmount
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(localStorage.hint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number
|
||||
|
||||
(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '1') {
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
//被保人年龄如果在66-75之间
|
||||
} else if (this.saleInsuredPersonInfo.age >= 66 &&
|
||||
|
||||
this.saleInsuredPersonInfo.age <= 75) {
|
||||
} else if (this.saleInsuredPersonInfo.age >= 66 && this.saleInsuredPersonInfo.age <= 75) {
|
||||
//使用rules规则里的第一条控制保额份数
|
||||
if (Number(this.defalutAmt) < Number(riskFactor.rules
|
||||
|
||||
[0].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules
|
||||
|
||||
[0].maxPrem)) {
|
||||
if (Number(this.defalutAmt) < Number(riskFactor.rules[0].minPrem) || Number(this.defalutAmt) > Number(riskFactor.rules[0].maxPrem)) {
|
||||
this.$toast(localStorage.hint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number
|
||||
|
||||
(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules
|
||||
|
||||
[productIndex].displayAmount
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(localStorage.hint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number
|
||||
|
||||
(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '1') {
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//isTrial为0 ---暂时为富娃娃两全保险(万能型)专配 输入保费校验
|
||||
} else if (this.isTrial === '0' && this.chooseProducts
|
||||
|
||||
[productIndex].isMainRisk == '0') {
|
||||
if (Number(this.defalutAmt) < Number(min) || Number
|
||||
|
||||
(this.defalutAmt) > Number(max)) {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费
|
||||
|
||||
为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
} else if (this.isTrial === '0' && this.chooseProducts[productIndex].isMainRisk == '0') {
|
||||
if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) {
|
||||
this.$toast(`交费期间为${riskFactor.yearWay}年交时,最低保费为${Number(min) * Number(riskFactor.moneyUnit)}元`)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number
|
||||
|
||||
(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules
|
||||
|
||||
[productIndex].displayAmount
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(`超过最低保费部分金额需为1000元整数倍`)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number
|
||||
|
||||
(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '1') {
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
//其他产品按照原先的逻辑判断
|
||||
} else {
|
||||
if (Number(this.defalutAmt) < Number(min) || Number
|
||||
|
||||
(this.defalutAmt) > Number(max)) {
|
||||
if (Number(this.defalutAmt) < Number(min) || Number(this.defalutAmt) > Number(max)) {
|
||||
this.$toast(localStorage.hint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number
|
||||
|
||||
(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules
|
||||
|
||||
[productIndex].displayAmount
|
||||
if ((Number(this.defalutAmt) * 10000) % (Number(currentEle.limit) * 10000) != 0) {
|
||||
// this.defalutAmt = currentEle.rules[productIndex].displayAmount
|
||||
this.$toast(localStorage.hint)
|
||||
this.nextStepFlag = true
|
||||
} else {
|
||||
this.mainRiskInfluenceAddRisk()
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number
|
||||
|
||||
(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '1') {
|
||||
currentEle['amt'] = Number(this.defalutAmt) * Number(currentEle.moneyUnit)
|
||||
if (localStorage.isTrial === '') {
|
||||
this.getTrial()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// let currentEle = this.chooseProducts
|
||||
|
||||
[this.productIndex].calFactorLst[this.calFactorIndex]
|
||||
// let currentEle = this.chooseProducts[this.productIndex].calFactorLst[this.calFactorIndex]
|
||||
// currentEle.defaultValue = value
|
||||
console.log('进来几次')
|
||||
this.mult = Number(this.defalutAmt) / Number(defalutValue)
|
||||
@@ -1238,16 +964,12 @@ this.saleInsuredPersonInfo.age <= 75) {
|
||||
riskCode: item.productCode,
|
||||
mainRiskCode: mainRiskCode,
|
||||
prem: this.trialList[index] && this.trialList[index].prem,
|
||||
standPrem: this.trialList[index] && this.trialList
|
||||
|
||||
[index].standPrem,
|
||||
standPrem: this.trialList[index] && this.trialList[index].standPrem,
|
||||
predictTransferPrem: item.predictTransferPrem,
|
||||
thirdInsuraceNo: this.policyNo,
|
||||
mult: this.mult
|
||||
}
|
||||
if (item.hasPredictTransferPrem && item.hasPredictTransferPrem
|
||||
|
||||
=== '0') {
|
||||
if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') {
|
||||
//增加万能险 预计转入保费校验
|
||||
rollInResult = this.rollInCheck(item.predictTransferPrem)
|
||||
} else {
|
||||
@@ -1262,9 +984,7 @@ this.saleInsuredPersonInfo.age <= 75) {
|
||||
//保费算保额
|
||||
console.log('this.trialList', this.trialList[index].trialType)
|
||||
// debugger
|
||||
if (this.trialList[index].trialType == '1' || this.trialList
|
||||
|
||||
[index].trialType == '2') {
|
||||
if (this.trialList[index].trialType == '1' || this.trialList[index].trialType == '2') {
|
||||
// console.log('11111111111111111')
|
||||
// console.log(this.trialList[index].amt)
|
||||
riskItem['amt'] = this.trialList[index].amt
|
||||
@@ -1273,9 +993,7 @@ this.saleInsuredPersonInfo.age <= 75) {
|
||||
//万能型产品保费赋值给保额
|
||||
//增加判断是否是从建议书跳转过来了的
|
||||
if (localStorage.isFrom != 'proposal') {
|
||||
if (this.trialList[index].productCode == 'GFRS_M0003' ||
|
||||
|
||||
'GFRS_M0015') {
|
||||
if (this.trialList[index].productCode == 'GFRS_M0003' || 'GFRS_M0015') {
|
||||
// console.log('2222222222')
|
||||
riskItem['amt'] = this.trialList[index].prem
|
||||
}
|
||||
@@ -1296,9 +1014,7 @@ this.saleInsuredPersonInfo.age <= 75) {
|
||||
}
|
||||
// console.log('riskDTOLst', riskDTOLst)
|
||||
//建议书需要添加全部投保人信息,电投只需要投保人ID
|
||||
let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, {
|
||||
|
||||
riskDTOLst: riskDTOLst })
|
||||
let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst })
|
||||
let params = {
|
||||
orderType: 'RISK_ORDER',
|
||||
orderDTO: {
|
||||
@@ -1319,13 +1035,9 @@ riskDTOLst: riskDTOLst })
|
||||
|
||||
if (resultData.result == 0) {
|
||||
//建议书
|
||||
if (localStorage.isFrom == 'proposal' && resultData.content.id)
|
||||
|
||||
{
|
||||
if (localStorage.isFrom == 'proposal' && resultData.content.id) {
|
||||
this.saleInsuredPersonInfo.insuredId = resultData.content.id
|
||||
localStorage.saleInsuredPersonInfo = JSON.stringify
|
||||
|
||||
(this.saleInsuredPersonInfo)
|
||||
localStorage.saleInsuredPersonInfo = JSON.stringify(this.saleInsuredPersonInfo)
|
||||
}
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
|
||||
Reference in New Issue
Block a user