回执签收分享参数问题更改

This commit is contained in:
皮伟
2019-11-15 14:37:17 +08:00
parent 1ac73b43fa
commit bd0701fda3

View File

@@ -116,9 +116,11 @@ export default {
] ]
}) })
}, 1000) }, 1000)
window['appCallBack'] = this.appCallBack
// 获取保单详情 // 获取保单详情
this.getPolicyDetail() this.getPolicyDetail().then(() => {
window['appCallBack'] = this.appCallBack
})
}, },
components: { components: {
[Collapse.name]: Collapse, [Collapse.name]: Collapse,
@@ -134,80 +136,83 @@ export default {
let data = { let data = {
policyNo: window.localStorage.getItem('policyNo') policyNo: window.localStorage.getItem('policyNo')
} }
getPolicyDetail(data).then(res => { return new Promise((resolve, reject) => {
if (res.result == '0') { getPolicyDetail(data).then(res => {
let appntDTO = res.content.appntDTO if (res.result == '0') {
let orderInfoDTO = res.content.orderInfoDTO let appntDTO = res.content.appntDTO
// 保单信息 let orderInfoDTO = res.content.orderInfoDTO
if (orderInfoDTO.orderStatus == '0') { // 保单信息
orderInfoDTO.orderStatusText = '未签收' if (orderInfoDTO.orderStatus == '0') {
} else if (orderInfoDTO.orderStatus == '1') { orderInfoDTO.orderStatusText = '未签收'
orderInfoDTO.orderStatusText = '已签收' } else if (orderInfoDTO.orderStatus == '1') {
} else { orderInfoDTO.orderStatusText = '已签收'
orderInfoDTO.orderStatusText = '' } else {
} orderInfoDTO.orderStatusText = ''
that.OrderInfoDTO = orderInfoDTO }
// 投保人信息 that.OrderInfoDTO = orderInfoDTO
this.filterData(dataDictionary.sex, 'sex', appntDTO) // 投保人信息
this.filterData(dataDictionary.idType, 'idType', appntDTO) this.filterData(dataDictionary.sex, 'sex', appntDTO)
that.appntDTO = appntDTO this.filterData(dataDictionary.idType, 'idType', appntDTO)
window.localStorage.setItem('saleInsuredInfo', JSON.stringify(appntDTO)) that.appntDTO = appntDTO
// 被保人信息 window.localStorage.setItem('saleInsuredInfo', JSON.stringify(appntDTO))
res.content.insuredDTOs.map(insured => { // 被保人信息
insured.riskDTOLst.map(risk => { res.content.insuredDTOs.map(insured => {
Number(risk.payIntv) insured.riskDTOLst.map(risk => {
switch (risk.payIntv) { Number(risk.payIntv)
case -1: switch (risk.payIntv) {
risk.payIntv = '不定期交' case -1:
break risk.payIntv = '不定期交'
case 0: break
risk.payIntv = '一次交清' case 0:
break risk.payIntv = '一次交清'
case 1: break
risk.payIntv = '月交' case 1:
break risk.payIntv = '月交'
case 3: break
risk.payIntv = '季交' case 3:
break risk.payIntv = '季交'
case 6: break
risk.payIntv = '半年交' case 6:
break risk.payIntv = '半年交'
case 12: break
risk.payIntv = '年交' case 12:
break risk.payIntv = '年交'
} break
if (risk.insuYear == '70') { }
risk.insuYear = '70周岁' if (risk.insuYear == '70') {
} else if (risk.insuYear == '75') { risk.insuYear = '至70周岁'
risk.insuYear = '75周岁' } else if (risk.insuYear == '75') {
} else if (risk.insuYear == '80') { risk.insuYear = '至75周岁'
risk.insuYear = '80周岁' } else if (risk.insuYear == '80') {
} else if (risk.insuYear == '106') { risk.insuYear = '至80周岁'
risk.insuYear = '终身' } else if (risk.insuYear == '106') {
} else { risk.insuYear = '终身'
risk.insuYear = `${risk.insuYear}` } else {
} risk.insuYear = `${risk.insuYear}`
}
})
this.filterData(dataDictionary.sex, 'sex', insured)
this.filterData(dataDictionary.idType, 'idType', insured)
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
insured.bnfDTOs.map(bnf => {
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
this.filterData(dataDictionary.sex, 'sex', bnf)
this.filterData(dataDictionary.idType, 'idType', bnf)
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
})
}) })
this.filterData(dataDictionary.sex, 'sex', insured)
this.filterData(dataDictionary.idType, 'idType', insured)
this.filterData(dataDictionary.relationToAppnt, 'relation', insured)
insured.bnfDTOs.map(bnf => {
this.filterData(dataDictionary.bnfType, 'bnfType', bnf)
this.filterData(dataDictionary.sex, 'sex', bnf)
this.filterData(dataDictionary.idType, 'idType', bnf)
this.filterData(dataDictionary.relationToAppnt, 'relation', bnf)
})
})
that.insuredDTOs = res.content.insuredDTOs that.insuredDTOs = res.content.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)
} }
})
}) })
}, },
appCallBack(data) { appCallBack(data) {
if (data.trigger == 'right_button_click') { if (data.trigger == 'right_button_click') {
console.log(localStorage.saleInsuredInfo)
EWebBridge.webCallAppInJs('bridge', { EWebBridge.webCallAppInJs('bridge', {
flag: 'share', flag: 'share',
extra: { extra: {