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"
v-validate="'required|onlyNumber|stature'"
clearable
:readonly="insuredPersonInfo.relationToAppnt == 1"
@blur="checkStature(insuredPersonInfo.stature)"
maxlength="5"
/>
@@ -147,6 +148,7 @@
placeholder="请输入单位kg"
v-validate="'required|onlyNumber|avoirdupois'"
clearable
:readonly="insuredPersonInfo.relationToAppnt == 1"
@blur="checkAvoirdupois(insuredPersonInfo.avoirdupois)"
/>
<van-field
@@ -158,12 +160,13 @@
right-icon="arrow"
placeholder="请选择"
v-validate="'required'"
@click="toSelect('8', '2')"
@click="toSelect('8', '2', 'insuredDTOs')"
/>
<van-field
v-model="insuredPersonInfo.averageAnnualIncome"
label="固定年收入(万元)"
name="固定年收入"
:readonly="insuredPersonInfo.relationToAppnt == 1"
required
placeholder="请输入,单位万元"
v-validate="'required|onlyNumber'"
@@ -336,7 +339,7 @@ import ProgressBar from '@/components/ebiz/insureAgain/ProgressBar'
import DropdownBox from '@/components/ebiz/insureAgain/DropdownBox'
import InfoCell from '@/components/ebiz/insureAgain/InfoCell'
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 dataDic from '@/views/ebiz/preserve/js/data-dictionary.js'
import SelectRadio from '@/components/ebiz/SelectRadio'
@@ -361,6 +364,33 @@ export default {
SelectBankName
},
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() {
return {
islistShow: false,
@@ -370,17 +400,20 @@ export default {
insuredHomeName: '', //被投保人联系地址
bnfHomeName: [], //受益人联系地址
isSpecialRead: false,
pickerType: '',
active: 0,
areaList,
userInfo: {
averageAnnualIncome: '',
salarySource: '',
stature: '',
marriageStatus: '',
avoirdupois: ''
}, //投保人信息
insuredPersonInfo: {
averageAnnualIncome: '',
salarySource: '',
marriageStatus: '',
stature: '',
avoirdupois: ''
}, //被投保人信息
@@ -484,10 +517,15 @@ export default {
})
}
},
async getReAppntPolicy() {
getReAppntPolicy() {
if (!this.$route.query.salePageFlag) {
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'))
if (!res) {
console.log('==================orderDetailData不存在=========================')
@@ -499,6 +537,7 @@ export default {
return false
}
}
}
//投保人信息返显
this.userInfo = res.orderDTO.appntDTO
let firstTierUserInfo = Number(this.userInfo.occupationCode.substr(0, 1)) - 1
@@ -544,7 +583,7 @@ export default {
//受益人信息
//bnfFlag 0-法定受益人 1-指定受益人
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.bnfPersonInfo.forEach((item, index) => {
this.bnfHomeName[index] = getAreaName([{ code: item.province }, { code: item.city }, { code: item.area }])
@@ -577,6 +616,12 @@ export default {
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'
},
@@ -606,6 +651,7 @@ export default {
* @return {*}
*/
toSelect(pickerType, valueKey, userType, bnfIndex) {
if (this.insuredPersonInfo.relationToAppnt == 1 && userType == 'insuredDTOs') return
bnfIndex ? (this.bnfIndex = bnfIndex) : (this.bnfIndex = 0)
;[this.popupShow, this.pickerType] = [true, pickerType]
if (valueKey) this.valueKey = valueKey
@@ -709,6 +755,9 @@ export default {
} else if (this.pickerType === '10') {
if (this.userType === 'appntDTO') {
this.userInfo.marriageStatus = value.text
if (this.insuredPersonInfo.relationToAppnt == 1) {
this.insuredPersonInfo.marriageStatus = this.userInfo.marriageStatus
}
} else if (this.userType === 'insuredDTOs') {
this.insuredPersonInfo.marriageStatus = value.text
} else if (this.userType === 'bnfDTOs') {
@@ -809,6 +858,9 @@ export default {
if (status.text === this.userInfo.marriageStatus) {
this.userInfo.marriage = status.id
}
if (status.text === this.insuredPersonInfo.marriageStatus) {
this.insuredPersonInfo.marriage = status.id
}
}
this.save()
} else {

View File

@@ -203,14 +203,16 @@ export default {
) {
if (insuredPersionFinanceImpartDTO && insuredPersionFinanceImpartDTO.impartItemDTOS && this.relationToAppnt == '1') {
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') {
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 (insuredPersionFinanceImpartDTO && insuredPersionFinanceImpartDTO.impartItemDTOS) {
this.impartDTOS.push({ impartItemDTOS: insuredPersionFinanceImpartDTO.impartItemDTOS, impartType: insuredPersionFinanceImpartDTO.impartType })

View File

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