Merge branch 'feature/GFRS-2215【待完成】重新投保' into dev

This commit is contained in:
proudlx
2021-04-20 13:29:25 +08:00
3 changed files with 158 additions and 104 deletions

View File

@@ -136,6 +136,7 @@
placeholder="请输入单位cm" placeholder="请输入单位cm"
v-validate="'required|onlyNumber|stature'" v-validate="'required|onlyNumber|stature'"
clearable clearable
:readonly="insuredPersonInfo.relationToAppnt == 1"
@blur="checkStature(insuredPersonInfo.stature)" @blur="checkStature(insuredPersonInfo.stature)"
maxlength="5" maxlength="5"
/> />
@@ -147,6 +148,7 @@
placeholder="请输入单位kg" placeholder="请输入单位kg"
v-validate="'required|onlyNumber|avoirdupois'" v-validate="'required|onlyNumber|avoirdupois'"
clearable clearable
:readonly="insuredPersonInfo.relationToAppnt == 1"
@blur="checkAvoirdupois(insuredPersonInfo.avoirdupois)" @blur="checkAvoirdupois(insuredPersonInfo.avoirdupois)"
/> />
<van-field <van-field
@@ -158,12 +160,13 @@
right-icon="arrow" right-icon="arrow"
placeholder="请选择" placeholder="请选择"
v-validate="'required'" v-validate="'required'"
@click="toSelect('8', '2')" @click="toSelect('8', '2', 'insuredDTOs')"
/> />
<van-field <van-field
v-model="insuredPersonInfo.averageAnnualIncome" v-model="insuredPersonInfo.averageAnnualIncome"
label="固定年收入(万元)" label="固定年收入(万元)"
name="固定年收入" name="固定年收入"
:readonly="insuredPersonInfo.relationToAppnt == 1"
required required
placeholder="请输入,单位万元" placeholder="请输入,单位万元"
v-validate="'required|onlyNumber'" v-validate="'required|onlyNumber'"
@@ -336,7 +339,7 @@ import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox' import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell' import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
import { commitReOrder, getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain' import { commitReOrder, getReAppntPolicy } from '@/api/ebiz/insureAgain/insureAgain'
import { getOrderDetail, insureAgain } from '@/api/ebiz/insureAgain/insureAgain' import { getOrderDetail } from '@/api/ebiz/sale/sale'
import DataDictionary from '@/assets/js/utils/data-dictionary' import DataDictionary from '@/assets/js/utils/data-dictionary'
import dataDic from '@/views/ebiz/preserve/js/data-dictionary.js' import dataDic from '@/views/ebiz/preserve/js/data-dictionary.js'
import SelectRadio from '@/components/ebiz/SelectRadio' import SelectRadio from '@/components/ebiz/SelectRadio'
@@ -361,6 +364,33 @@ export default {
SelectBankName SelectBankName
}, },
computed: {}, computed: {},
watch: {
'userInfo.marriageStatus'() {
if (this.insuredPersonInfo.relationToAppnt == 1) {
this.insuredPersonInfo.marriageStatus = this.userInfo.marriageStatus
}
},
'userInfo.stature'() {
if (this.insuredPersonInfo.relationToAppnt == 1) {
this.insuredPersonInfo.stature = this.userInfo.stature
}
},
'userInfo.avoirdupois'() {
if (this.insuredPersonInfo.relationToAppnt == 1) {
this.insuredPersonInfo.avoirdupois = this.userInfo.avoirdupois
}
},
'userInfo.salarySource'() {
if (this.insuredPersonInfo.relationToAppnt == 1) {
this.insuredPersonInfo.salarySource = this.userInfo.salarySource
}
},
'userInfo.averageAnnualIncome'() {
if (this.insuredPersonInfo.relationToAppnt == 1) {
this.insuredPersonInfo.averageAnnualIncome = this.userInfo.averageAnnualIncome
}
}
},
data() { data() {
return { return {
islistShow: false, islistShow: false,
@@ -370,17 +400,20 @@ export default {
insuredHomeName: '', //被投保人联系地址 insuredHomeName: '', //被投保人联系地址
bnfHomeName: [], //受益人联系地址 bnfHomeName: [], //受益人联系地址
isSpecialRead: false, isSpecialRead: false,
pickerType: '',
active: 0, active: 0,
areaList, areaList,
userInfo: { userInfo: {
averageAnnualIncome: '', averageAnnualIncome: '',
salarySource: '', salarySource: '',
stature: '', stature: '',
marriageStatus: '',
avoirdupois: '' avoirdupois: ''
}, //投保人信息 }, //投保人信息
insuredPersonInfo: { insuredPersonInfo: {
averageAnnualIncome: '', averageAnnualIncome: '',
salarySource: '', salarySource: '',
marriageStatus: '',
stature: '', stature: '',
avoirdupois: '' avoirdupois: ''
}, //被投保人信息 }, //被投保人信息
@@ -484,97 +517,109 @@ export default {
}) })
} }
}, },
async getReAppntPolicy() { getReAppntPolicy() {
if (!this.$route.query.salePageFlag) { if (!this.$route.query.salePageFlag) {
CacheUtils.setLocItem('active', this.active) CacheUtils.setLocItem('active', this.active)
} }
var res = JSON.parse(CacheUtils.getLocItem('orderDetailData')) getOrderDetail({
if (!res) { orderNo: CacheUtils.getLocItem('orderNo'),
console.log('==================orderDetailData不存在=========================') getOtherType: 'RID'
res = await getReAppntPolicy({ policyNo: CacheUtils.getLocItem('policyNo') }) }).then(async (res) => {
if (res.result == 0) { if (res.result == 1) {
CacheUtils.setLocItem('orderDetailData', JSON.stringify(res)) var res = JSON.parse(CacheUtils.getLocItem('orderDetailData'))
} else { if (!res) {
this.$toast(res.resultMessage) console.log('==================orderDetailData不存在=========================')
return false res = await getReAppntPolicy({ policyNo: CacheUtils.getLocItem('policyNo') })
} if (res.result == 0) {
} CacheUtils.setLocItem('orderDetailData', JSON.stringify(res))
//投保人信息返显 } else {
this.userInfo = res.orderDTO.appntDTO this.$toast(res.resultMessage)
let firstTierUserInfo = Number(this.userInfo.occupationCode.substr(0, 1)) - 1 return false
occupationList[firstTierUserInfo].subs.forEach((item) => {
item.subs.forEach((item) => {
if (item.code == this.userInfo.occupationCode) {
this.userInfo.occupationName = item.name
this.userInfo.lifeGrade = item.lifeGrade
return
}
})
})
this.setCustomerMarriage(res.orderDTO.appntDTO.marriage)
//是否长期
this.userInfo.effectiveDateType = res.orderDTO.appntDTO.effectiveDateType ? true : false
//有无社保
this.userInfo.medical = res.orderDTO.appntDTO.medical
this.$utils.intLocalStorage(res)
this.homeName = getAreaName([{ code: this.userInfo.homeProvince }, { code: this.userInfo.homeCity }, { code: this.userInfo.homeArea }])
// 被投保人信息
this.insuredPersonInfo = res.orderDTO.insuredDTOs[0]
let firstTier = Number(this.insuredPersonInfo.occupationCode.substr(0, 1)) - 1
occupationList[firstTier].subs.forEach((item) => {
item.subs.forEach((item) => {
if (item.code == this.insuredPersonInfo.occupationCode) {
this.insuredPersonInfo.occupationName = item.name
this.insuredPersonInfo.lifeGrade = item.lifeGrade
return
}
})
})
this.setInsuredCustomerMarriage(this.insuredPersonInfo.marriage)
if (this.insuredPersonInfo.homeProvince.length) {
this.insuredHomeName = getAreaName([
{ code: this.insuredPersonInfo.homeProvince },
{ code: this.insuredPersonInfo.homeCity },
{ code: this.insuredPersonInfo.homeArea }
])
}
//受益人信息
//bnfFlag 0-法定受益人 1-指定受益人
this.bnfPersonInfo = res.orderDTO.insuredDTOs[0]['bnfDTOs']
if (this.bnfPersonInfo[0]['bnfType'] === '1') {
this.bnftype = '1'
this.bnfPersonInfo.forEach((item, index) => {
this.bnfHomeName[index] = getAreaName([{ code: item.province }, { code: item.city }, { code: item.area }])
//设置婚姻文字显示
for (let status of DataDictionary.marriage) {
if (status.id == item.marriage) {
item.marriageStatus = status.text
} }
} }
let firstTierBnf = Number(item.occupationCode.substr(0, 1)) - 1 }
occupationList[firstTierBnf].subs.forEach((key) => { //投保人信息返显
key.subs.forEach((key) => { this.userInfo = res.orderDTO.appntDTO
if (key.code == item.occupationCode) { let firstTierUserInfo = Number(this.userInfo.occupationCode.substr(0, 1)) - 1
item.occupationName = key.name occupationList[firstTierUserInfo].subs.forEach((item) => {
item.lifeGrade = item.lifeGrade item.subs.forEach((item) => {
return if (item.code == this.userInfo.occupationCode) {
} this.userInfo.occupationName = item.name
}) this.userInfo.lifeGrade = item.lifeGrade
return
}
}) })
}) })
} else { this.setCustomerMarriage(res.orderDTO.appntDTO.marriage)
this.bnftype = '0' //是否长期
this.insuredPersonInfo['bnfDTOs'] = [] this.userInfo.effectiveDateType = res.orderDTO.appntDTO.effectiveDateType ? true : false
} //有无社保
// 账户信息 this.userInfo.medical = res.orderDTO.appntDTO.medical
this.accountPersonInfo = res.orderDTO.orderAccountDTO
this.accountPersonInfo.bankCode = this.accountPersonInfo.bankName this.$utils.intLocalStorage(res)
dataDic['edorBankType'].some((item) => { this.homeName = getAreaName([{ code: this.userInfo.homeProvince }, { code: this.userInfo.homeCity }, { code: this.userInfo.homeArea }])
if (item.id == this.accountPersonInfo.bankName) {
this.accountPersonInfo.bankName = item.text // 被投保人信息
this.insuredPersonInfo = res.orderDTO.insuredDTOs[0]
let firstTier = Number(this.insuredPersonInfo.occupationCode.substr(0, 1)) - 1
occupationList[firstTier].subs.forEach((item) => {
item.subs.forEach((item) => {
if (item.code == this.insuredPersonInfo.occupationCode) {
this.insuredPersonInfo.occupationName = item.name
this.insuredPersonInfo.lifeGrade = item.lifeGrade
return
}
})
})
this.setInsuredCustomerMarriage(this.insuredPersonInfo.marriage)
if (this.insuredPersonInfo.homeProvince.length) {
this.insuredHomeName = getAreaName([
{ code: this.insuredPersonInfo.homeProvince },
{ code: this.insuredPersonInfo.homeCity },
{ code: this.insuredPersonInfo.homeArea }
])
}
//受益人信息
//bnfFlag 0-法定受益人 1-指定受益人
this.bnfPersonInfo = res.orderDTO.insuredDTOs[0]['bnfDTOs']
if (this.bnfPersonInfo && this.bnfPersonInfo[0]['bnfType'] === '1') {
this.bnftype = '1'
this.bnfPersonInfo.forEach((item, index) => {
this.bnfHomeName[index] = getAreaName([{ code: item.province }, { code: item.city }, { code: item.area }])
//设置婚姻文字显示
for (let status of DataDictionary.marriage) {
if (status.id == item.marriage) {
item.marriageStatus = status.text
}
}
let firstTierBnf = Number(item.occupationCode.substr(0, 1)) - 1
occupationList[firstTierBnf].subs.forEach((key) => {
key.subs.forEach((key) => {
if (key.code == item.occupationCode) {
item.occupationName = key.name
item.lifeGrade = item.lifeGrade
return
}
})
})
})
} else {
this.bnftype = '0'
this.insuredPersonInfo['bnfDTOs'] = []
}
// 账户信息
this.accountPersonInfo = res.orderDTO.orderAccountDTO
this.accountPersonInfo.bankCode = this.accountPersonInfo.bankName
dataDic['edorBankType'].some((item) => {
if (item.id == this.accountPersonInfo.bankName) {
this.accountPersonInfo.bankName = item.text
}
})
if (this.accountPersonInfo.accBankProvince) {
let provinces = areaList.province_list
let cities = areaList.city_list
this.accountPersonInfo.areaStr = `${provinces[this.accountPersonInfo.accBankProvince]}-${cities[this.accountPersonInfo.accBankCity]}`
} }
}) })
// this.insuredPersonInfo.homeAddress = '汉字汉字汉字汉字123123' // this.insuredPersonInfo.homeAddress = '汉字汉字汉字汉字123123'
@@ -606,6 +651,7 @@ export default {
* @return {*} * @return {*}
*/ */
toSelect(pickerType, valueKey, userType, bnfIndex) { toSelect(pickerType, valueKey, userType, bnfIndex) {
if (this.insuredPersonInfo.relationToAppnt == 1 && userType == 'insuredDTOs') return
bnfIndex ? (this.bnfIndex = bnfIndex) : (this.bnfIndex = 0) bnfIndex ? (this.bnfIndex = bnfIndex) : (this.bnfIndex = 0)
;[this.popupShow, this.pickerType] = [true, pickerType] ;[this.popupShow, this.pickerType] = [true, pickerType]
if (valueKey) this.valueKey = valueKey if (valueKey) this.valueKey = valueKey
@@ -709,6 +755,9 @@ export default {
} else if (this.pickerType === '10') { } else if (this.pickerType === '10') {
if (this.userType === 'appntDTO') { if (this.userType === 'appntDTO') {
this.userInfo.marriageStatus = value.text this.userInfo.marriageStatus = value.text
if (this.insuredPersonInfo.relationToAppnt == 1) {
this.insuredPersonInfo.marriageStatus = this.userInfo.marriageStatus
}
} else if (this.userType === 'insuredDTOs') { } else if (this.userType === 'insuredDTOs') {
this.insuredPersonInfo.marriageStatus = value.text this.insuredPersonInfo.marriageStatus = value.text
} else if (this.userType === 'bnfDTOs') { } else if (this.userType === 'bnfDTOs') {
@@ -809,6 +858,9 @@ export default {
if (status.text === this.userInfo.marriageStatus) { if (status.text === this.userInfo.marriageStatus) {
this.userInfo.marriage = status.id this.userInfo.marriage = status.id
} }
if (status.text === this.insuredPersonInfo.marriageStatus) {
this.insuredPersonInfo.marriage = status.id
}
} }
this.save() this.save()
} else { } else {

View File

@@ -203,14 +203,16 @@ export default {
) { ) {
if (insuredPersionFinanceImpartDTO && insuredPersionFinanceImpartDTO.impartItemDTOS && this.relationToAppnt == '1') { if (insuredPersionFinanceImpartDTO && insuredPersionFinanceImpartDTO.impartItemDTOS && this.relationToAppnt == '1') {
this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType }) this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })
} else if (insuredFinanceImpartDTO && insuredFinanceImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredFinanceImpartDTO.impartItemDTOS, impartType: insuredFinanceImpartDTO.impartType })
} }
// else if (insuredFinanceImpartDTO && insuredFinanceImpartDTO.impartItemDTOS) {
// this.impartDTOS.push({ impartItemDTOS: insuredFinanceImpartDTO.impartItemDTOS, impartType: insuredFinanceImpartDTO.impartType })
// }
if (insuredPersionImpartDTO && insuredPersionImpartDTO.impartItemDTOS && this.relationToAppnt == '1') { if (insuredPersionImpartDTO && insuredPersionImpartDTO.impartItemDTOS && this.relationToAppnt == '1') {
this.impartDTOS.push({ impartItemDTOS: insuredPersionImpartDTO.impartItemDTOS, impartType: insuredPersionImpartDTO.impartType }) this.impartDTOS.push({ impartItemDTOS: insuredPersionImpartDTO.impartItemDTOS, impartType: insuredPersionImpartDTO.impartType })
} else if (insuredImpartDTO && insuredImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredImpartDTO.impartItemDTOS, impartType: insuredImpartDTO.impartType })
} }
// else if (insuredImpartDTO && insuredImpartDTO.impartItemDTOS) {
// this.impartDTOS.push({ impartItemDTOS: insuredImpartDTO.impartItemDTOS, impartType: insuredImpartDTO.impartType })
// }
if (this.relationToAppnt != '1') { if (this.relationToAppnt != '1') {
if (insuredPersionFinanceImpartDTO && insuredPersionFinanceImpartDTO.impartItemDTOS) { if (insuredPersionFinanceImpartDTO && insuredPersionFinanceImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType }) this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })

View File

@@ -1166,21 +1166,21 @@ export default {
res.orderDTO.productDTO.special.content !== '' res.orderDTO.productDTO.special.content !== ''
) { ) {
let content = res.orderDTO.productDTO.special.content // let content = res.orderDTO.productDTO.special.content
try { // try {
const config = JSON.parse(content) // const config = JSON.parse(content)
config.message = '&emsp;&emsp;' + config.message // config.message = '&emsp;&emsp;' + config.message
config.message = config.message.split('\\n').join('\n&emsp;&emsp;') // config.message = config.message.split('\\n').join('\n&emsp;&emsp;')
Dialog(config) // Dialog(config)
} catch (error) { // } catch (error) {
const message = '&emsp;&emsp;' + content // const message = '&emsp;&emsp;' + content
Dialog({ // Dialog({
message: message.split('\\n').join('\n&emsp;&emsp;'), // message: message.split('\\n').join('\n&emsp;&emsp;'),
confirmButtonText: '本人已阅读并同意上述特别约定内容', // confirmButtonText: '本人已阅读并同意上述特别约定内容',
messageAlign: 'left' // messageAlign: 'left'
}) // })
} // }
} }
localStorage.setItem('lastOrderNo', data.orderNo) localStorage.setItem('lastOrderNo', data.orderNo)
localStorage.setItem('AppntidType', res.orderDTO.appntDTO.idType) localStorage.setItem('AppntidType', res.orderDTO.appntDTO.idType)