提交回执修改

This commit is contained in:
shishengjie
2019-10-11 15:14:00 +08:00
parent 4c22202547
commit af1298dcee
2 changed files with 87 additions and 177 deletions

View File

@@ -750,5 +750,37 @@ export default {
id: 4, id: 4,
text: '其它' text: '其它'
} }
],
sex: [
{
text: '男',
id: '0'
},
{
text: '女',
id: '1'
}
],
//受益人类型
bnfType: [
{
id: '0',
text: '法定受益人'
},
{
id: '1',
text: '指定受益人'
}
],
//订单状态
orderStatus: [
{
id: '0',
text: '未签收'
},
{
id: '1',
text: '已签收'
}
] ]
} }

View File

@@ -7,7 +7,7 @@
<van-cell title="保单号" :value="OrderInfoDTO.contNo" /> <van-cell title="保单号" :value="OrderInfoDTO.contNo" />
<van-cell title="生效日期" :value="OrderInfoDTO.cvaliDate" /> <van-cell title="生效日期" :value="OrderInfoDTO.cvaliDate" />
<van-cell title="保单状态" :value="OrderInfoDTO.contState" /> <van-cell title="保单状态" :value="OrderInfoDTO.contState" />
<!-- <van-cell title="签收状态" :value="OrderInfoDTO.orderStatus" /> --> <van-cell title="签收状态" :value="OrderInfoDTO.orderStatusText" />
<van-cell v-if="OrderInfoDTO.receiptDate != null && OrderInfoDTO.receiptDate != ''" title="签收日期" :value="OrderInfoDTO.receiptDate" /> <van-cell v-if="OrderInfoDTO.receiptDate != null && OrderInfoDTO.receiptDate != ''" title="签收日期" :value="OrderInfoDTO.receiptDate" />
</van-cell-group> </van-cell-group>
</van-collapse-item> </van-collapse-item>
@@ -16,8 +16,8 @@
<van-collapse-item title="投保人信息" name="2" class="detail-title pb10"> <van-collapse-item title="投保人信息" name="2" class="detail-title pb10">
<van-cell-group> <van-cell-group>
<van-cell title="投保人" :value="appntDTO.name" /> <van-cell title="投保人" :value="appntDTO.name" />
<van-cell title="性别" :value="appntDTO.sex" /> <van-cell title="性别" :value="appntDTO.sexText" />
<van-cell title="证件类型" :value="appntDTO.idType" /> <van-cell title="证件类型" :value="appntDTO.idTypeText" />
<van-cell title="证件号码" :value="appntDTO.idNo" /> <van-cell title="证件号码" :value="appntDTO.idNo" />
<van-cell title="联系电话" :value="appntDTO.mobile" /> <van-cell title="联系电话" :value="appntDTO.mobile" />
</van-cell-group> </van-cell-group>
@@ -29,8 +29,8 @@
<van-cell-group> <van-cell-group>
<!-- <van-cell title="是投保人的" :value="item.relationToAppnt" /> --> <!-- <van-cell title="是投保人的" :value="item.relationToAppnt" /> -->
<van-cell title="姓名" :value="item.name" /> <van-cell title="姓名" :value="item.name" />
<van-cell title="性别" :value="item.sex" /> <van-cell title="性别" :value="item.sexText" />
<van-cell title="证件类型" :value="item.idType" /> <van-cell title="证件类型" :value="item.idTypeText" />
<van-cell title="证件号码" :value="item.idNo" /> <van-cell title="证件号码" :value="item.idNo" />
<van-cell title="联系电话" :value="item.mobile" /> <van-cell title="联系电话" :value="item.mobile" />
</van-cell-group> </van-cell-group>
@@ -39,13 +39,13 @@
<!-- 受益人信息 --> <!-- 受益人信息 -->
<van-collapse-item title="受益人信息" :name="i + 81"> <van-collapse-item title="受益人信息" :name="i + 81">
<van-cell-group> <van-cell-group>
<van-cell title="受益人" :value="itm.bnfType" /> <van-cell title="受益人" :value="itm.bnfTypeText" />
<div v-if="itm.bnfType == '指定受益人'"> <div v-if="itm.bnfType == '1'">
<van-cell title="姓名" :value="itm.name" /> <van-cell title="姓名" :value="itm.name" />
<van-cell title="性别" :value="itm.sex" /> <van-cell title="性别" :value="itm.sexText" />
<van-cell title="是被保人的" :value="itm.relationToInsured" /> <van-cell title="是被保人的" :value="itm.relationText" />
<van-cell title="受益比例" :value="`${itm.bnfLot}%`" v-if="itm.bnfLot != null" /> <van-cell title="受益比例" :value="`${itm.bnfLot}%`" v-if="itm.bnfLot != null" />
<van-cell title="证件类型" :value="itm.idType" /> <van-cell title="证件类型" :value="itm.idTypeText" />
<van-cell title="证件号码" :value="itm.idNo" /> <van-cell title="证件号码" :value="itm.idNo" />
</div> </div>
</van-cell-group> </van-cell-group>
@@ -77,10 +77,8 @@
</div> </div>
</van-collapse> </van-collapse>
<!-- 2019-09-27 版上线不含回执签收 marked by panglizong on 2019-09-26 --> <!-- 2019-09-27 版上线不含回执签收 marked by panglizong on 2019-09-26 -->
<div class="bottom-btn bg-white" style="display: none"> <div class="bottom-btn bg-white">
<van-button type="danger" size="large" @click="next" :disabled="OrderInfoDTO.orderStatus == '已签收' ? true : false" v-no-more-click="1000" <van-button type="danger" size="large" @click="next" v-if="OrderInfoDTO.orderStatus == '0'" v-no-more-click="1000">回执签收</van-button>
>回执签收</van-button
>
</div> </div>
</div> </div>
</template> </template>
@@ -88,9 +86,8 @@
<script> <script>
import { Collapse, CollapseItem, Cell, CellGroup, Button } from 'vant' import { Collapse, CollapseItem, Cell, CellGroup, Button } from 'vant'
import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve' import { getPolicyDetail, getReceiptSign } from '@/api/ebiz/serve/serve'
import { idType } from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级 import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典进行页面展示
import { formatAllRisk } from '@/assets/js/utils/formatRiskList' import { formatAllRisk } from '@/assets/js/utils/formatRiskList'
console.log(idType)
export default { export default {
data() { data() {
return { return {
@@ -126,195 +123,68 @@ export default {
let that = this let that = this
let data = { let data = {
policyNo: window.localStorage.getItem('policyNo') policyNo: window.localStorage.getItem('policyNo')
// policyNo: '900080000000745'
} }
getPolicyDetail(data).then(res => { getPolicyDetail(data).then(res => {
console.log(res)
if (res.result == '0') { if (res.result == '0') {
let appntDTO = res.content.appntDTO let appntDTO = res.content.appntDTO
let orderInfoDTO = res.content.orderInfoDTO let orderInfoDTO = res.content.orderInfoDTO
// 保单信息 // 保单信息
if (orderInfoDTO.orderStatus == '0') { if (orderInfoDTO.orderStatus == '0') {
orderInfoDTO.orderStatus = '未签收' orderInfoDTO.orderStatusText = '未签收'
} else if (orderInfoDTO.orderStatus == '1') {
orderInfoDTO.orderStatusText = '已签收'
} else { } else {
orderInfoDTO.orderStatus = '已签收' orderInfoDTO.orderStatusText = ''
}
if (orderInfoDTO.contState == '0') {
orderInfoDTO.contState = '无效'
} else if (orderInfoDTO.contState == '1') {
orderInfoDTO.contState = '有效'
} }
that.OrderInfoDTO = orderInfoDTO that.OrderInfoDTO = orderInfoDTO
// 投保人信息 // 投保人信息
if (appntDTO.sex == '0') { this.filterData(dataDictionary.sex, 'sex', appntDTO)
appntDTO.sex = '男' this.filterData(dataDictionary.idType, 'idType', appntDTO)
} else if (appntDTO.sex == '1') {
appntDTO.sex = '女'
} else {
appntDTO.sex = '不详'
}
switch (appntDTO.idType) {
case '1':
appntDTO.idType = '身份证'
break
case '2':
appntDTO.idType = '户口本'
break
case '3':
appntDTO.idType = '出生证明'
break
case '4':
appntDTO.idType = '护照'
break
case '5':
appntDTO.idType = '港澳居民通行证'
break
case '6':
appntDTO.idType = '台湾居民通行证'
break
case '7':
appntDTO.idType = '其他'
break
}
that.appntDTO = appntDTO that.appntDTO = appntDTO
res.content.insuredDTOs.map(item => { // 被保人信息
item.riskDTOLst.map(it => { res.content.insuredDTOs.map(insured => {
Number(it.payIntv) insured.riskDTOLst.map(risk => {
switch (it.payIntv) { Number(risk.payIntv)
switch (risk.payIntv) {
case -1: case -1:
it.payIntv = '不定期交' risk.payIntv = '不定期交'
break break
case 0: case 0:
it.payIntv = '一次交清' risk.payIntv = '一次交清'
break break
case 1: case 1:
it.payIntv = '月交' risk.payIntv = '月交'
break break
case 3: case 3:
it.payIntv = '季交' risk.payIntv = '季交'
break break
case 6: case 6:
it.payIntv = '半年交' risk.payIntv = '半年交'
break break
case 12: case 12:
it.payIntv = '年交' risk.payIntv = '年交'
break break
} }
if (it.insuYear == '70') { if (risk.insuYear == '70') {
it.insuYear = '至70周岁' risk.insuYear = '至70周岁'
} else if (it.insuYear == '75') { } else if (risk.insuYear == '75') {
it.insuYear = '至75周岁' risk.insuYear = '至75周岁'
} else if (it.insuYear == '80') { } else if (risk.insuYear == '80') {
it.insuYear = '至80周岁' risk.insuYear = '至80周岁'
} else if (it.insuYear == '106') { } else if (risk.insuYear == '106') {
it.insuYear = '终身' risk.insuYear = '终身'
} else { } else {
it.insuYear = `${it.insuYear}` risk.insuYear = `${risk.insuYear}`
} }
}) })
}) this.filterData(dataDictionary.sex, 'sex', insured)
// 被保人信息 this.filterData(dataDictionary.idType, 'idType', insured)
res.content.insuredDTOs.map(item => { this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
if (item.sex == '0') { insured.bnfDTOs.map(bnf => {
item.sex = '男' this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
} else if (item.sex == '1') { this.filterData(dataDictionary.sex, 'sex', bnf)
item.sex = '女' this.filterData(dataDictionary.idType, 'idType', bnf)
} else { this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
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
}
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
}
item.bnfDTOs.map(it => {
if (it.bnfType == '1') {
it.bnfType = '指定受益人'
} else if (it.bnfType == '0') {
it.bnfType = '法定受益人'
}
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
}
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
}
}) })
}) })
@@ -325,6 +195,14 @@ export default {
} }
}) })
}, },
//根据数据字典 将后端返回的数据渲染到页面中
filterData(dictionary, key, pageData) {
dictionary.forEach(item => {
if (pageData[key] == item.id) {
pageData[key + 'Text'] = item.text //渲染页面使用的字段
}
})
},
// 回执签收 // 回执签收
next() { next() {
this.$toast.loading({ this.$toast.loading({