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,10 +517,15 @@ 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)
} }
getOrderDetail({
orderNo: CacheUtils.getLocItem('orderNo'),
getOtherType: 'RID'
}).then(async (res) => {
if (res.result == 1) {
var res = JSON.parse(CacheUtils.getLocItem('orderDetailData')) var res = JSON.parse(CacheUtils.getLocItem('orderDetailData'))
if (!res) { if (!res) {
console.log('==================orderDetailData不存在=========================') console.log('==================orderDetailData不存在=========================')
@@ -499,6 +537,7 @@ export default {
return false return false
} }
} }
}
//投保人信息返显 //投保人信息返显
this.userInfo = res.orderDTO.appntDTO this.userInfo = res.orderDTO.appntDTO
let firstTierUserInfo = Number(this.userInfo.occupationCode.substr(0, 1)) - 1 let firstTierUserInfo = Number(this.userInfo.occupationCode.substr(0, 1)) - 1
@@ -544,7 +583,7 @@ export default {
//受益人信息 //受益人信息
//bnfFlag 0-法定受益人 1-指定受益人 //bnfFlag 0-法定受益人 1-指定受益人
this.bnfPersonInfo = res.orderDTO.insuredDTOs[0]['bnfDTOs'] this.bnfPersonInfo = res.orderDTO.insuredDTOs[0]['bnfDTOs']
if (this.bnfPersonInfo[0]['bnfType'] === '1') { if (this.bnfPersonInfo && this.bnfPersonInfo[0]['bnfType'] === '1') {
this.bnftype = '1' this.bnftype = '1'
this.bnfPersonInfo.forEach((item, index) => { this.bnfPersonInfo.forEach((item, index) => {
this.bnfHomeName[index] = getAreaName([{ code: item.province }, { code: item.city }, { code: item.area }]) this.bnfHomeName[index] = getAreaName([{ code: item.province }, { code: item.city }, { code: item.area }])
@@ -577,6 +616,12 @@ export default {
this.accountPersonInfo.bankName = item.text 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)