重新投保产品信息接口返回编写,提交编写

This commit is contained in:
pangxingyue
2021-03-25 17:06:18 +08:00
parent 5b296768e8
commit 08e88a9bf9
2 changed files with 401 additions and 108 deletions

View File

@@ -688,7 +688,7 @@ export default {
let str = ''
let resultData = await commitReOrder(params)
if (resultData.result == 0) {
localStorage.setItem('orderNo', resultData.orderNo)
localStorage.setItem('newOrderNo', resultData.orderNo)
this.$jump({
flag: 'h5',
extra: {

View File

@@ -3,42 +3,69 @@
<ProgressBar :active.sync="active" />
<!-- 险种信息 -->
<p style="font-weight: bold;" class="bg-white p10 van-hairline--bottom">保险计划详情</p>
<InfoCell label="保险期间" value="asd" />
<InfoCell label="交费期间" />
<InfoCell label="交费频率" />
<DropdownBox :gutter="false">
<template #boxTitle>
<span style="font-weight: bold;">主险</span>
<span class="ml30">国富人寿附加住院医疗保险B款</span>
</template>
<InfoCell label="保险责任" />
<InfoCell label="保额(万元)" />
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
</InfoCell>
</DropdownBox>
<DropdownBox :gutter="false">
<template #boxTitle>
<van-checkbox v-model="remitRiskA" shape="square" checked-color="#ee0a24">
<span style="font-weight: bold;">附加险</span>
<span class="ml30">国富人寿附加住院医疗保险B款</span>
</van-checkbox>
</template>
<InfoCell label="保险责任" />
<InfoCell label="住院医疗保险金" />
<InfoCell label="住院津贴保险金" />
<InfoCell label="恶性肿瘤住院津贴保险金" />
<InfoCell label="免赔额" />
<InfoCell label="赔付比例" />
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
</InfoCell>
</DropdownBox>
<DropdownBox>
<div v-if="mainList.length>0" class="main">
<div v-for="(item,index) in mainList" :key="index">
<InfoCell label="保险期间">{{item.insuYear}}</InfoCell>
<InfoCell label="交费期间" v-if="item.payEndYear != '1000'">{{item.payEndYearFlag == 'Y' ? `${item.payEndYear}` :
`${item.payEndYear}`}}</InfoCell>
<InfoCell label="交费期间" v-if="item.payEndYear == '1000'">一次性交清</InfoCell>
<InfoCell label="交费频率">{{item.payIntvName}}</InfoCell>
<DropdownBox :gutter="false">
<template #boxTitle>
<span style="font-weight: bold;">主险</span>
<span class="ml30">国富人寿附加住院医疗保险B款</span>
</template>
<div v-for="(item2,index2) in item.dutyLst" :key="index2">
<InfoCell v-if="index2===0" label="保险责任">{{item2.dutyName}}</InfoCell>
<InfoCell v-else label="">{{item2.dutyName}}</InfoCell>
</div>
<InfoCell label="保额(万元)">{{item.amt}}</InfoCell>
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
{{item.prem}}
</InfoCell>
</DropdownBox>
</div>
</div>
<div v-if="additionalList.length>0" class="additional">
<van-checkbox-group v-model="checkboxResult">
<div v-for="(item, index) in additionalList" :key="index">
<DropdownBox :gutter="false">
<template #boxTitle>
<van-checkbox :name="item.riskCode" shape="square" checked-color="#ee0a24">
<span style="font-weight: bold;">附加险</span>
<span class="ml30">{{item.riskName}}</span>
</van-checkbox>
</template>
<InfoCell label="保险责任">保额</InfoCell>
<div v-for="(item2,index2) in item.dutyLst" :key="index2">
<InfoCell :label="item2.dutyName">{{item2.prem}}</InfoCell>
<!-- <InfoCell :label="住院津贴保险金"></InfoCell>
<InfoCell :label="恶性肿瘤住院津贴保险金"></InfoCell> -->
</div>
<InfoCell label="免赔额">{{item.getLimit}}</InfoCell>
<InfoCell label="赔付比例">{{item.getRate}}</InfoCell>
<InfoCell>
<template #cellLabel>
<span style="font-weight: bold;">保费()</span>
</template>
{{item.prem}}
</InfoCell>
</DropdownBox>
</div>
</van-checkbox-group>
<div style="text-align: center;" class="p10 bg-white">
<van-button size="small" round type="danger" @click="readSpecialPromise" :disabled="isRead">
{{ isRead ? '已阅读《特别约定》' : '点击这里阅读《特别约定》' }}
</van-button>
</div>
</div>
<!-- <DropdownBox>
<template #boxTitle>
<span style="font-weight: bold;">附加险</span>
<span class="ml30">国富人寿附加综合意外伤害保险</span>
@@ -54,14 +81,8 @@
<span style="font-weight: bold;">保费()</span>
</template>
</InfoCell>
<template #footer>
<div style="text-align: center;" class="p10 bg-white">
<van-button size="small" round type="danger" @click="readSpecialPromise" :disabled="isRead">
{{ isRead ? '已阅读《特别约定》' : '点击这里阅读《特别约定》' }}
</van-button>
</div>
</template>
</DropdownBox>
</DropdownBox> -->
<van-popup v-model="show" position="right" :style="style">
<ReadingAgreement :needTime="false">
@@ -88,8 +109,9 @@ import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import ReadingAgreement from '@/components/ebiz/insureAgain/ReadingAgreement'
import commitReOrder from '@/api/ebiz/insureAgain/insureAgain'
import { Checkbox, RadioGroup, Radio, Dialog } from 'vant'
import { commitReOrder, getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain'
import { Checkbox, RadioGroup, Radio, Dialog, CheckboxGroup } from 'vant'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default {
name: 'ProductInformation',
components: {
@@ -98,6 +120,7 @@ export default {
InfoCell,
ReadingAgreement,
[Checkbox.name]: Checkbox,
[CheckboxGroup.name]: CheckboxGroup,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio
},
@@ -108,76 +131,308 @@ export default {
remitRiskA: false,
style: { height: '100vh', width: '100vw' },
isRead: false,
active: 1
active: 1,
riskDTOLst: [],
mainList: [], //主险
additionalList: [], //附加险
checkboxResult: [],
insuredDTOs: [],
orderInfoDTO: []
}
},
created() {
this.getProductInfo()
this.getReAppntPolicy()
},
methods: {
getProductInfo() {
let a = `{
getReAppntPolicy() {
getReAppntPolicy({ policyNo: CacheUtils.getLocItem('policyNo') }).then(res => {
if (res.result == 0) {
let a = `{
"orderDTO": {
"appntDTO": {
"area": "",
"averageAnnualIncome": 10,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"effectiveDateType": "false",
"email": "310598205@qq.com",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳马上",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司"
},
"insuredDTOs": [
{
"insuredId": 18425,
"riskDTOLst": [
"area": "",
"averageAnnualIncome": 1000,
"avoirdupois": 60,
"birthday": "1983-03-12",
"certiexpiredate": "2035-03-31",
"companyArea": "",
"companyCity": "",
"effectiveDateType": "false",
"healthGrade": "1",
"homeAddress": "百苑小区101号",
"homeArea": "450103",
"homeCity": "450100",
"homeProvince": "450000",
"idNo": "452624198303120727",
"idType": "1",
"liabilitiesMoney": "0",
"lifeGrade": "1",
"marriage": "1",
"medical": "0",
"mobile": "13707711024",
"name": "艾琳咳咳",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"otherSalarySource": "",
"province": "",
"relationToMainInsured": "5",
"salarySource": "1",
"sex": "1",
"stature": 167,
"taxResidentId": "1",
"workcompany": "国富人寿保险股份有限公司",
"bnfDTOs": [
{
"amt": 1042,
"insuYear": 85,
"insuYearFlag": "A",
"intMult": 0,
"isMainRisk": "0",
"mainRiskCode": "GFRS_M0002",
"payEndYear": 3,
"payEndYearFlag": "Y",
"payIntv": 12,
"prem": 2000,
"riskCode": "GFRS_M0002",
"riskName": "国富人寿国富民鑫年金保险",
"riskType": "5",
"standPrem": 2000,
"thirdInsuraceNo": ""
"area": "450103",
"birthday": "1980-01-02",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0 1-是法定;0-不是法定",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "110101198001020219",
"idType": "1",
"lifeGrade": "2",
"marriage": "2",
"mobile": "13707711024",
"name": "爱来",
"nativeplace": "1",
"occupationCode": "2070202",
"occupationName": "保险推销员",
"province": "450000",
"relationToInsured": "3",
"sex": "0",
"village": "百苑小区101号",
"yearSalary": "23"
},
{
"amt": 50000,
"dutyLst": [
{
"amt": 50000,
"dutyCode": "410100",
"dutyName": "意外身故/伤残保险金",
"prem": 80
}
],
"getLimit": "0",
"getRate": "1",
"insuYear": 1,
"insuYearFlag": "Y",
"intMult": 0,
"isMainRisk": "1",
"mainRiskCode": "GFRS_M0002",
"payEndYear": 1000,
"payEndYearFlag": "Y",
"payIntv": 0,
"prem": 80,
"riskCode": "GFRS_A0005",
"riskName": "国富人寿附加综合意外伤害保险",
"riskType": "2",
"standPrem": 80,
"thirdInsuraceNo": ""
"area": "450103",
"birthday": "1983-03-12",
"bnfLot": 50,
"bnfOrder": 1,
"bnfType": "0 1-是法定;0-不是法定",
"certiexpiredate": "2035-03-31",
"city": "450100",
"effectiveDateType": "false",
"healthGrade": "1",
"idNo": "452624198303120727",
"idType": "1",
"lifeGrade": "1",
"marriage": "1",
"mobile": "13707711024",
"name": "艾琳马上来",
"nativeplace": "1",
"occupationCode": "4070103",
"occupationName": "经纪人(内勤)",
"province": "450000",
"relationToInsured": "4",
"sex": "1",
"village": "百苑小区101号",
"yearSalary": "32"
}
],
"sex": "1"
"impartDTO": {
"impartItemDTOS": [
{
"impartAnswer": "1",
"impartCode": "9",
"impartContent": "最近六个月内是否有下列身体不适症状①长期咳嗽咳痰、声音嘶哑、痰中带血、咯血②胸闷、胸痛、心慌、气喘、气短、呼吸困难③吐血、大便带血、黑便、反复腹痛、恶心、反酸、呕吐、腹泻④反复尿频、尿痛、血尿、腰痛、外生殖器溃疡⑤反复皮下出血、鼻腔出血、牙龈出血、发热、持续疲倦⑥晕倒、意识不清、视力下降、抽搐、反复头痛、头晕⑦半年内体重增加或减少5公斤以上⑧关节红肿、疼痛、活动受限。",
"IntroDuctions": ""
},
{
"impartAnswer": "1",
"impartCode": "12a",
"impartContent": "是否曾患有失明、视网膜出血或剥离、视神经炎、青光眼、白内障、眼底病变、视野缺失、屈光度1000度以上、聋哑、中耳炎、梅尼尔氏病或其他眼、耳、鼻、喉或口腔疾病",
"IntroDuctions": ""
}
]
},
"riskDTOLst": [
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "1113202",
"isMainRisk": "0",
"amt": 22640,
"dutyLst": [
{
"dutyName":"国富民惠医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"一般医疗保险金",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
},
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "11132021",
"isMainRisk": "1",
"amt": 22640,
"dutyLst": [
{
"dutyName":"住院医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"住院津贴保险金",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
},
{
"dutyName":"恶性肿瘤住院津贴保险金",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
},
{
"riskName": "国富人寿国富民惠医疗保险2020版",
"insuYear": 1,
"insuYearFlag": "Y",
"payIntv": 12,
"payEndYear": 1000,
"payEndYearFlag": "Y",
"prem": 10000,
"riskCode": "11132022",
"isMainRisk": "1",
"amt": 22640,
"dutyLst": [
{
"dutyName":"国富民惠医疗保险金",
"dutyCode":"320300",
"amt":1000000,
"prem":536,
"getLimit":"0",
"getRate":"0"
},
{
"dutyName":"",
"dutyCode":"",
"amt":100000,
"prem":536,
"getLimit":"",
"getRate":""
}
]
}
]
}
],
"orderAccountDTO": {
"accountName": "艾琳马上",
"bankName": "BOCOM",
"cardBookCode": "4354256325325678790"
},
"orderInfoDTO": {
"orderNo": "8186270000012119",
"supportBank": "0"
"contNo": "保单号",
"contState": "保单状态 1-承保;4-终止;0-投保中",
"cValiDate": "生效日期 String",
"orderStatus": "签收状态 0-未签收 1-已签收"
}
},
"orderType": "RE_RISK_ORDER"
}`;
console.log(JSON.parse(a))
}
}`
let res = JSON.parse(a)
this.insuredDTOs = res.orderDTO.insuredDTOs[0]
this.orderInfoDTO = res.orderDTO.orderInfoDTO
this.riskDTOLst = this.insuredDTOs.riskDTOLst
this.riskDTOLst.forEach((element, index) => {
if (element.isMainRisk === '0') {
switch (element.payIntv) {
case -1:
element.payIntvName = '不定期交'
break
case 0:
element.payIntvName = '一次交清'
break
case 1:
element.payIntvName = '月交'
break
case 3:
element.payIntvName = '季交'
break
case 6:
element.payIntvName = '半年交'
break
case 12:
element.payIntvName = '年交'
break
}
this.mainList.push(element)
} else {
this.additionalList.push(element)
}
})
// console.log(res, '=============this.riskDTOLst================')
// console.log(this.mainList, '=============this.mainList================')
console.log(this.additionalList, '=============this.additionalList================')
}
})
},
appCallBack(data) {
if (data.trigger == 'left_button_click') {
@@ -240,16 +495,44 @@ console.log(JSON.parse(a))
* @return {*}
*/
commitReOrder() {
let additionals = []
this.checkboxResult.forEach(res => {
this.additionalList.forEach(res2 => {
if (res2.riskCode === res) {
additionals.push(res2)
}
})
})
let riskDTOLst = [...this.mainList, ...additionals]
let data = {
'orderDTO': {
'insuredDTOs': '',
'orderInfoDTO': '',
},
'orderType': 'RE_RISK_ORDER'
orderDTO: {
insuredDTOs: [
{
insuredId: this.insuredDTOs.idNo,
sex: this.insuredDTOs.sex,
riskDTOLst: riskDTOLst
}
],
orderInfoDTO: {
orderNo: this.orderInfoDTO.contNo,
supportBank: '0'
}
},
orderType: 'RE_RISK_ORDER'
}
commitReOrder(data).then(res=>{
commitReOrder(data).then(res => {
if (res.result === '0') {
// localStorage.setItem('newOrderNo', resultData.orderNo)
console.log('/insureAgain/Notification')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/Notification`
},
routerInfo: {
path: `/insureAgain/Notification`
}
})
}
})
}
@@ -258,7 +541,7 @@ console.log(JSON.parse(a))
</script>
<style lang="scss" scoped>
.insure-again{
.insure-again {
padding-bottom: 11vw;
}
.btns {
@@ -267,4 +550,14 @@ console.log(JSON.parse(a))
flex: 1;
}
}
.additional {
/deep/ .van-field__control {
text-align: center;
}
}
.main {
/deep/ .van-field__control {
text-align: center;
}
}
</style>