投保人待提交详情数据提交

This commit is contained in:
pangxingyue
2021-03-23 13:31:01 +08:00
parent be4dd52db4
commit c623703bdf
3 changed files with 391 additions and 228 deletions

View File

@@ -1,7 +1,7 @@
/* /*
* @Author: PangXingYue * @Author: PangXingYue
* @Date: 2021-03-04 10:38:24 * @Date: 2021-03-04 10:38:24
* @LastEditTime: 2021-03-22 11:01:02 * @LastEditTime: 2021-03-23 11:07:24
* @LastEditors: PangXingYue * @LastEditors: PangXingYue
* @Description: * @Description:
* @FilePath: \ebiz-h5\src\api\ebiz\insureAgain\insureAgain.js * @FilePath: \ebiz-h5\src\api\ebiz\insureAgain\insureAgain.js
@@ -17,10 +17,10 @@ export function getPolicyListAgent(data) {
}) })
} }
// 获取订单详情 // 获取订单详情(待提交)
export function getOrderDetail(data) { export function getReAppntPolicy(data) {
return request({ return request({
url: getUrl('/sale/order/orderDetail', 1), url: getUrl('/sale/policy/getReAppntPolicy', 1),
method: 'post', method: 'post',
data data
}) })

View File

@@ -22,18 +22,20 @@
</p> </p>
<p class="name"> <p class="name">
<van-tag plain color="#999999">状态</van-tag> <van-tag plain color="#999999">状态</van-tag>
<span class="ml5 span">{{ order.orderStatus }}</span> <span class="ml5 span" v-if="order.orderStatus === '0'">投保中</span>
<span class="ml5 span" v-else-if="order.orderStatus === '1'">承包</span>
<span class="ml5 span" v-else-if="order.orderStatus === '4'">终止</span>
</p> </p>
</div> </div>
<template #btns> <template #btns>
<div v-if="active === 'uncommit'"> <div v-if="active === 'uncommit'">
<van-button size="small" round type="danger" @click="uncommitInsureDetail(order)" plain>查看详情</van-button> <van-button size="small" round type="danger" @click="uncommitInsureDetail(order)" plain>查看详情</van-button>
<van-button v-if="order.newOrderStatus === '19'" class="ml10" size="small" round type="danger" @click="buyAgain(order)">待支付</van-button> <van-button class="ml10" size="small" round type="danger" @click="insureAgain(order)">重新投保</van-button>
<van-button v-else class="ml10" size="small" round type="danger" @click="insureAgain(order)">重新投保</van-button>
</div> </div>
<div v-if="active === 'commit'"> <div v-if="active === 'commit'">
<van-button class="ml10" size="small" round type="danger" @click="commitInsureDetail(order)">查看投保单</van-button> <van-button class="ml10" size="small" round type="danger" @click="commitInsureDetail(order)">查看投保单</van-button>
<van-button v-if="order.newOrderStatus === '19'" class="ml10" size="small" round type="danger" @click="buyAgain(order)">待支付</van-button>
</div> </div>
</template> </template>
</Order> </Order>
@@ -104,14 +106,26 @@ export default {
computed:{ computed:{
NewItems() { NewItems() {
var NewItems = [] var NewItems = []
let item1 = ['1','4','0'];
let item2 = ['19','38','39','40'];
let item3 = ['1','2','3'];
let item4 = ['0','1','2','3','4'];
this.policyListDTOList.map(item => { this.policyListDTOList.map(item => {
if (item.riskName.search(this.searchName) != -1 || item.policyNo.search(this.searchName) != -1 || item.appntName.search(this.searchName) != -1) { if (item.riskName.search(this.searchName) != -1 || item.policyNo.search(this.searchName) != -1 || item.appntName.search(this.searchName) != -1) {
// if (this.active === 'uncommit' && item.reInsuranceFlag === '3' && item.reInsuranceState === '0') { item.policyNo = '23424333333331';
// NewItems.push(item) item.orderStatus = item1[Math.floor(Math.random()*item1.length)];
// } else if(this.active === 'commit' && item.reInsuranceFlag === '3' && (item.reInsuranceState === '1' || item.reInsuranceState === '2' || item.reInsuranceState === '3')){ item.newOrderNo = '32422222222222234';
// NewItems.push(item) item.newOrderStatus = item2[Math.floor(Math.random()*item2.length)];
// } item.reInsuranceFlag = '3';
NewItems.push(item) item.reInsuranceState = item4[Math.floor(Math.random()*item4.length)];
if (this.active === 'uncommit' && item.reInsuranceFlag === '3' && item.reInsuranceState === '0') {
NewItems.push(item)
} else if(this.active === 'commit' && item.reInsuranceFlag === '3' && (item.reInsuranceState === '1' || item.reInsuranceState === '2' || item.reInsuranceState === '3')){
NewItems.push(item)
}
// NewItems.push(item)
} }
}) })
console.log(NewItems, '======================NewItems===================') console.log(NewItems, '======================NewItems===================')
@@ -173,7 +187,7 @@ export default {
this.isAgreementShow = true this.isAgreementShow = true
}, },
uncommitInsureDetail(order) { uncommitInsureDetail(order) {
CacheUtils.setLocItem('orderNo', '') CacheUtils.setLocItem('policyNo', order.policyNo)
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {

View File

@@ -2,7 +2,7 @@
<div> <div>
<DropdownBox> <DropdownBox>
<template #boxTitle> <template #boxTitle>
<span>投保人信息</span> <span>保单信息</span>
</template> </template>
<InfoCell label="保单号">{{OrderInfoDTO.orderNo}}</InfoCell> <InfoCell label="保单号">{{OrderInfoDTO.orderNo}}</InfoCell>
<InfoCell label="生效日期">{{OrderInfoDTO.appntDateLabel}}</InfoCell> <InfoCell label="生效日期">{{OrderInfoDTO.appntDateLabel}}</InfoCell>
@@ -59,14 +59,15 @@
<span>险种类型</span> <span>险种类型</span>
</template> </template>
<div v-for="it in list" :key="it.riskName" class="pb10"> <div v-for="it in list" :key="it.riskName" class="pb10">
<InfoCell label="险种名称">{{it.riskName}}</InfoCell> <InfoCell label="险种名称">{{it.riskName}}</InfoCell>
<InfoCell label="保险期间">{{it.insuYear}}</InfoCell> <InfoCell label="保险期间">{{it.insuYear}}</InfoCell>
<InfoCell label="交费期间" v-if="it.payEndYear !== '1000'">{{it.payEndYearFlag == 'Y' ? `${it.payEndYear}` : `${it.payEndYear}`}}</InfoCell> <InfoCell label="交费期间" v-if="it.payEndYear !== '1000'">{{it.payEndYearFlag == 'Y' ? `${it.payEndYear}` :
<InfoCell label="交费期间" v-if="it.payEndYear === '1000'">一次性交清</InfoCell> `${it.payEndYear}`}}</InfoCell>
<InfoCell label="险种保额(元)" v-if="it.riskCode == 'GFRS_M0015' || it.riskCode == 'GFRS_M0017' || it.riskCode == 'GFRS_M0003'">--</InfoCell> <InfoCell label="交费期间" v-if="it.payEndYear === '1000'">一次性交清</InfoCell>
<InfoCell label="险种保额(元)" v-else>{{it.amt | moneyFormat}}</InfoCell> <InfoCell label="险种保额(元)" v-if="it.riskCode == 'GFRS_M0015' || it.riskCode == 'GFRS_M0017' || it.riskCode == 'GFRS_M0003'">--</InfoCell>
<InfoCell label="险种保(元)">{{it.riskName}}</InfoCell> <InfoCell label="险种保(元)" v-else>{{it.amt | moneyFormat}}</InfoCell>
</div> <InfoCell label="险种保费(元)">{{it.riskName}}</InfoCell>
</div>
</DropdownBox> </DropdownBox>
</div> </div>
</template> </template>
@@ -76,9 +77,10 @@ import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox' import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import dataDictionary from '@/assets/js/utils/data-dictionary' import dataDictionary from '@/assets/js/utils/data-dictionary'
import { Collapse, CollapseItem, Cell, CellGroup, Button } from 'vant' import { Collapse, CollapseItem, Cell, CellGroup, Button } from 'vant'
import { getDetail } from '@/api/ebiz/sale/sale' import { getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain'
import { formatAllRisk } from '@/assets/js/utils/formatRiskList' import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
import { getQuestionList } from '@/api/ebiz/questions' // import { getQuestionList } from '@/api/ebiz/questions'
import CacheUtils from '@/assets/js/utils/cacheUtils'
export default { export default {
components: { components: {
DropdownBox, DropdownBox,
@@ -112,242 +114,389 @@ export default {
} }
}, },
created() { created() {
this.getInsureAgainDetail() let policyNo = CacheUtils.getLocItem('policyNo')
this.getReAppntPolicy(123)
}, },
methods: { methods: {
// 获取保单详情 // 获取保单详情
async getInsureAgainDetail() { async getReAppntPolicy(policyNo) {
let data = { let data = {
orderNo: '8186270000012069', policyNo: policyNo
desensitizType: 0
} }
let params = {
type: 3, // getReAppntPolicy(data).then(res => {
pageInfo: { var res = `{
pageNum: 1, "orderDTO": {
pageSize: 10 "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": "国富人寿保险股份有限公司"
}, },
prtNo: '8186270000012069' "insuredDTOs": [
} {
try { "area": "",
let results = await Promise.all([getDetail(data), getQuestionList(params)]) "averageAnnualIncome": 1000,
// 保单详情响应数据 "avoirdupois": 60,
let res = results[0] "birthday": "1983-03-12",
// // 问题件状态响应数据 "certiexpiredate": "2035-03-31",
let problemResult = results[1] "companyArea": "",
if (res.result == '0') { "companyCity": "",
if (res.orderDTO.orderInfoDTO.bnfFlag == '1') { "effectiveDateType": "false",
res.orderDTO.orderInfoDTO.bnfFlag = '指定受益人' "healthGrade": "1",
} else if (res.orderDTO.orderInfoDTO.bnfFlag == '0') { "homeAddress": "百苑小区101号",
res.orderDTO.orderInfoDTO.bnfFlag = '法定受益人' "homeArea": "450103",
} "homeCity": "450100",
this.OrderInfoDTO = res.orderDTO.orderInfoDTO "homeProvince": "450000",
this.appntDTO = res.orderDTO.appntDTO "idNo": "452624198303120727",
this.reason = res.orderDTO.reason "idType": "1",
"liabilitiesMoney": "0",
// 投保人信息 "lifeGrade": "1",
if (res.orderDTO.appntDTO.sex == '0') { "marriage": "1",
res.orderDTO.appntDTO.sex = '男' "medical": "0",
} else if (res.orderDTO.appntDTO.sex == '1') { "mobile": "13707711024",
res.orderDTO.appntDTO.sex = '女' "name": "艾琳咳咳",
} "nativeplace": "1",
switch (res.orderDTO.appntDTO.idType) { "occupationCode": "4070103",
case '1': "occupationName": "经纪人(内勤)",
res.orderDTO.appntDTO.idType = '居民身份证' "otherSalarySource": "",
break "province": "",
case '2': "relationToMainInsured": "5",
res.orderDTO.appntDTO.idType = '户口本' "salarySource": "1",
break "sex": "1",
case '3': "stature": 167,
res.orderDTO.appntDTO.idType = '出生证' "taxResidentId": "1",
break "workcompany": "国富人寿保险股份有限公司",
case '4': "bnfDTOs": [
res.orderDTO.appntDTO.idType = '外国人护照' {
break "area": "450103",
case '5': "birthday": "1980-01-02",
res.orderDTO.appntDTO.idType = '港澳居民来往内地通行证' "bnfLot": 50,
break "bnfOrder": 1,
case '6': "bnfType": "0",
res.orderDTO.appntDTO.idType = '台湾居民来往大陆通行证' "certiexpiredate": "2035-03-31",
break "city": "450100",
// case '7': "effectiveDateType": "false",
// res.orderDTO.appntDTO.idType = '其他' "healthGrade": "1",
// break "idNo": "110101198001020219",
case '8': "idType": "1",
res.orderDTO.appntDTO.idType = '外国人永久居留身份证' "lifeGrade": "2",
break "marriage": "2",
case '9': "mobile": "13707711024",
res.orderDTO.appntDTO.idType = '港澳台居民居住证' "name": "爱来",
break "nativeplace": "1",
} "occupationCode": "2070202",
this.appntDTO = res.orderDTO.appntDTO "occupationName": "保险推销员",
res.orderDTO.insuredDTOs.map(item => { "province": "450000",
item.riskDTOLst.map(it => { "relationToInsured": "3",
if (it.insuYearFlag == 'Y') { "sex": "0",
it.insuYear = `${it.insuYear}` "village": "百苑小区101号",
} else { "yearSalary": "23"
if (it.insuYearFlag == 'A' && it.insuYear == '106') { },
it.insuYear = '终身' {
} else { "area": "450103",
it.insuYear = `${it.insuYear}周岁的保单周年日` "birthday": "1983-03-12",
} "bnfLot": 50,
} "bnfOrder": 1,
"bnfType": "0",
Number(it.payIntv) "certiexpiredate": "2035-03-31",
switch (it.payIntv) { "city": "450100",
case 0: "effectiveDateType": "false",
it.payIntv = '一次性交清' "healthGrade": "1",
break "idNo": "452624198303120727",
case 1: "idType": "1",
it.payIntv = '月交' "lifeGrade": "1",
break "marriage": "1",
case 12: "mobile": "13707711024",
it.payIntv = '年交' "name": "艾琳马上来",
break "nativeplace": "1",
} "occupationCode": "4070103",
}) "occupationName": "经纪人(内勤)",
}) "province": "450000",
// 被保险人信息 "relationToInsured": "4",
res.orderDTO.insuredDTOs.map(item => { "sex": "1",
if (item.sex == '0') { "village": "百苑小区101号",
item.sex = '男' "yearSalary": "32"
} else if (item.sex == '1') { }
item.sex = '女' ],
} else { "impartDTO": {
item.sex = '不详' "impartItemDTOS": [
{
"impartAnswer": "1",
"impartCode": "9",
"impartContent": "最近六个月内是否有下列身体不适症状?",
"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":""
}
]
}
]
} }
switch (item.idType) { ],
"orderAccountDTO": {
"accountName": "艾琳马上",
"bankName": "BOCOM",
"cardBookCode": "4354256325325678790"
}
},
"result": "0"
}`;
res = JSON.parse(res);
if (res.result == '0') {
console.log(res, '11111111111111111111111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
// if (res.orderDTO.orderInfoDTO.bnfFlag == '1') {
// res.orderDTO.orderInfoDTO.bnfFlag = '指定受益人'
// } else if (res.orderDTO.orderInfoDTO.bnfFlag == '0') {
// res.orderDTO.orderInfoDTO.bnfFlag = '法定受益人'
// }
this.OrderInfoDTO = res.orderDTO.orderInfoDTO
this.appntDTO = res.orderDTO.appntDTO
this.reason = res.orderDTO.reason
// 投保人信息
if (res.orderDTO.appntDTO.sex == '0') {
res.orderDTO.appntDTO.sex = '男'
} else if (res.orderDTO.appntDTO.sex == '1') {
res.orderDTO.appntDTO.sex = '女'
}
switch (res.orderDTO.appntDTO.idType) {
case '1': case '1':
item.idType = '居民身份证' res.orderDTO.appntDTO.idType = '居民身份证'
break break
case '2': case '2':
item.idType = '户口本' res.orderDTO.appntDTO.idType = '户口本'
break break
case '3': case '3':
item.idType = '出生证' res.orderDTO.appntDTO.idType = '出生证'
break break
case '4': case '4':
item.idType = '外国人护照' res.orderDTO.appntDTO.idType = '外国人护照'
break break
case '5': case '5':
item.idType = '港澳居民来往内地通行证' res.orderDTO.appntDTO.idType = '港澳居民来往内地通行证'
break break
case '6': case '6':
item.idType = '台湾居民来往大陆通行证' res.orderDTO.appntDTO.idType = '台湾居民来往大陆通行证'
break break
// case '7': // case '7':
// item.idType = '其他' // res.orderDTO.appntDTO.idType = '其他'
// break // break
case '8': case '8':
item.idType = '外国人永久居留身份证' res.orderDTO.appntDTO.idType = '外国人永久居留身份证'
break break
case '9': case '9':
item.idType = '港澳台居民居住证' res.orderDTO.appntDTO.idType = '港澳台居民居住证'
break break
} }
switch (item.relationToAppnt) { this.appntDTO = res.orderDTO.appntDTO
case '1': res.orderDTO.insuredDTOs.map(item => {
item.relationToAppnt = '本人' item.riskDTOLst.map(it => {
break if (it.insuYearFlag == 'Y') {
case '2': it.insuYear = `${it.insuYear}`
item.relationToAppnt = '配偶'
break
case '3':
item.relationToAppnt = '父母'
break
case '4':
item.relationToAppnt = '子女'
break
case '5':
item.relationToAppnt = '其他'
break
}
if (res.orderDTO.orderInfoDTO.bnfFlag == '指定受益人') {
item.bnfDTOs.map(it => {
if (it.sex == '0') {
it.sex = '男'
} else if (it.sex == '1') {
it.sex = '女'
} else { } else {
it.sex = '不详' if (it.insuYearFlag == 'A' && it.insuYear == '106') {
it.insuYear = '终身'
} else {
it.insuYear = `${it.insuYear}周岁的保单周年日`
}
} }
switch (it.idType) {
case '1': Number(it.payIntv)
it.idType = '居民身份证' switch (it.payIntv) {
case 0:
it.payIntv = '一次性交清'
break break
case '2': case 1:
it.idType = '户口本' it.payIntv = '月交'
break break
case '3': case 12:
it.idType = '出生证' it.payIntv = '年交'
break
case '4':
it.idType = '外国人护照'
break
case '5':
it.idType = '港澳居民来往内地通行证'
break
case '6':
it.idType = '台湾居民来往大陆通行证'
break
// case '7':
// it.idType = '其他'
// break
case '8':
it.idType = '外国人永久居留身份证'
break
case '9':
it.idType = '港澳台居民居住证'
break
}
switch (it.relationToInsured) {
case '1':
it.relationToInsured = '本人'
break
case '2':
it.relationToInsured = '配偶'
break
case '3':
it.relationToInsured = '父母'
break
case '4':
it.relationToInsured = '子女'
break
case '5':
it.relationToInsured = '其他'
break break
} }
}) })
} })
}) // 被保险人信息
res.orderDTO.insuredDTOs.map(item => {
if (item.sex == '0') {
item.sex = '男'
} else if (item.sex == '1') {
item.sex = '女'
} else {
item.sex = '不详'
}
switch (item.idType) {
case '1':
item.idType = '居民身份证'
break
case '2':
item.idType = '户口本'
break
case '3':
item.idType = '出生证'
break
case '4':
item.idType = '外国人护照'
break
case '5':
item.idType = '港澳居民来往内地通行证'
break
case '6':
item.idType = '台湾居民来往大陆通行证'
break
// case '7':
// item.idType = '其他'
// break
case '8':
item.idType = '外国人永久居留身份证'
break
case '9':
item.idType = '港澳台居民居住证'
break
}
switch (item.relationToAppnt) {
case '1':
item.relationToAppnt = '本人'
break
case '2':
item.relationToAppnt = '配偶'
break
case '3':
item.relationToAppnt = '父母'
break
case '4':
item.relationToAppnt = '子女'
break
case '5':
item.relationToAppnt = '其他'
break
}
// if (res.orderDTO.orderInfoDTO.bnfFlag == '指定受益人') {
// item.bnfDTOs.map(it => {
// if (it.sex == '0') {
// it.sex = '男'
// } else if (it.sex == '1') {
// it.sex = '女'
// } else {
// it.sex = '不详'
// }
// switch (it.idType) {
// case '1':
// it.idType = '居民身份证'
// break
// case '2':
// it.idType = '户口本'
// break
// case '3':
// it.idType = '出生证'
// break
// case '4':
// it.idType = '外国人护照'
// break
// case '5':
// it.idType = '港澳居民来往内地通行证'
// break
// case '6':
// it.idType = '台湾居民来往大陆通行证'
// break
// // case '7':
// // it.idType = '其他'
// // break
// case '8':
// it.idType = '外国人永久居留身份证'
// break
// case '9':
// it.idType = '港澳台居民居住证'
// break
// }
// switch (it.relationToInsured) {
// case '1':
// it.relationToInsured = '本人'
// break
// case '2':
// it.relationToInsured = '配偶'
// break
// case '3':
// it.relationToInsured = '父母'
// break
// case '4':
// it.relationToInsured = '子女'
// break
// case '5':
// it.relationToInsured = '其他'
// break
// }
// })
// }
})
this.insuredDTOs = res.orderDTO.insuredDTOs this.insuredDTOs = res.orderDTO.insuredDTOs
// 格式化 // 格式化
this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst) this.list = formatAllRisk(this.insuredDTOs[0].riskDTOLst)
} else { // } else {
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
}
// 问题件状态显示
if (problemResult.result === '0') {
if (problemResult.content && problemResult.content.list) {
this.problemList.splice(0)
let lists = problemResult.content.list
for (let list of lists) {
let state = this.mapOrderState(list.status)
this.problemList.push({
comment: list.statusComment,
state
})
}
} }
} else { // })
this.$toast(problemResult.resultMessage)
}
} catch (error) {
console.log(error)
this.$toast('网络异常')
}
} }
} }
} }