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