mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 05:46:44 +08:00
【建议书优化需求】建议书拷贝功能
This commit is contained in:
@@ -559,14 +559,14 @@ export default {
|
||||
)
|
||||
|
||||
if (insuredDTO) {
|
||||
let insuredPersonAge = utilsAge.getAge(insuredDTO.birthday, new Date())
|
||||
let insuredPersonAge = insuredDTO.birthday?utilsAge.getAge(insuredDTO.birthday, new Date()):insuredDTO.insuredAge
|
||||
CacheUtils.setLocItem('saleInsuredPersonInfo',
|
||||
JSON.stringify({
|
||||
birthday: insuredDTO.birthday,
|
||||
name: insuredDTO.name,
|
||||
sex: insuredDTO.sex,
|
||||
idType: insuredDTO.idType,
|
||||
age: insuredPersonAge,
|
||||
insuredAge: insuredPersonAge,
|
||||
// marriage: insuredDTO.marriage,
|
||||
relationToAppnt: insuredDTO.relationToAppnt,
|
||||
medical: insuredDTO.medical,
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
import { Tag, Icon, Dialog, ActionSheet, Popup, Picker, Stepper, Field, Checkbox, RadioGroup, Radio } from 'vant'
|
||||
import { trial } from '@/api/ebiz/common/common'
|
||||
import { saveOrUpdateOrderInfo, getOrderDetail,orderTrial } from '@/api/ebiz/sale/sale'
|
||||
import { saveProposal,saveOrUpdateTrialRecordInfo } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { saveProposal,saveOrUpdateTrialRecordInfo,getTrialRecordInfo } from '@/api/ebiz/proposal/proposal.js'
|
||||
import { getAgentInfo } from '@/api/ebiz/my/my.js'
|
||||
|
||||
//险种GFRS_M0016的责任的验证规则
|
||||
@@ -627,7 +627,19 @@ export default {
|
||||
this.cvalidateFlag = this.activeType && this.isFrom != 'proposal'
|
||||
|
||||
//构建提交数据、渲染险种
|
||||
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
|
||||
if(this.$route.query.insuanceId){
|
||||
// 获取试算记录详情
|
||||
getTrialRecordInfo({
|
||||
serialNo:this.$CacheUtils.getLocItem('proposalNo'),
|
||||
mainRiskId:this.$route.query.insuanceId
|
||||
}).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.chooseProducts = JSON.parse(res.content.trialJsonStr)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.chooseProducts = JSON.parse(localStorage.chooseProducts)
|
||||
}
|
||||
this.chooseProducts.forEach((item, index) => {
|
||||
if (item.isCrossChannel == '1') {
|
||||
this.isCrossChannel = item.isCrossChannel
|
||||
@@ -2758,12 +2770,38 @@ export default {
|
||||
}
|
||||
})
|
||||
}else if (localStorage.isFrom == 'proposal'){
|
||||
let proposalOrderNo = this.$CacheUtils.getLocItem('proposalNo') || ''
|
||||
let url = `/common/selectedProduct?proposalOrderNo=${proposalOrderNo}`
|
||||
if (resultData.content.id) {
|
||||
this.saleInsuredPersonInfo.insuredId = resultData.content.id;
|
||||
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(this.saleInsuredPersonInfo))
|
||||
}
|
||||
//试算记录保存更新--编辑
|
||||
this.saveOrUpdateTrialRecordInfoFunc(resultData.content.riskDTO)
|
||||
}else if (isFrom == 'orderTrial' && localStorage.isFrom == 'sale') {
|
||||
this.$toast.clear()
|
||||
this.trialResultsShow = true
|
||||
this.verifyResultList = resultData.content.data.verifyResultList
|
||||
}
|
||||
} else {
|
||||
this.$toast(resultData.resultMessage)
|
||||
}
|
||||
},
|
||||
//试算记录保存更新--编辑功能
|
||||
saveOrUpdateTrialRecordInfoFunc(riskDTO){
|
||||
let insuanceId
|
||||
riskDTO.forEach(item => {
|
||||
if (item.isMainRisk == '0') {
|
||||
insuanceId = item.insuanceId
|
||||
}
|
||||
})
|
||||
let data ={
|
||||
serialNo:this.$CacheUtils.getLocItem('proposalNo'),
|
||||
mainRiskId:insuanceId+'',
|
||||
trialJsonStr:localStorage.chooseProducts
|
||||
}
|
||||
saveOrUpdateTrialRecordInfo(data).then(res => {
|
||||
if (res.result == '0') {
|
||||
let proposalOrderNo = this.$CacheUtils.getLocItem('proposalNo') || ''
|
||||
let url = `/common/selectedProduct?proposalOrderNo=${proposalOrderNo}`
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
@@ -2776,25 +2814,8 @@ export default {
|
||||
path: url
|
||||
}
|
||||
})
|
||||
//试算记录保存更新--编辑
|
||||
this.saveOrUpdateTrialRecordInfoFunc()
|
||||
}else if (isFrom == 'orderTrial' && localStorage.isFrom == 'sale') {
|
||||
this.$toast.clear()
|
||||
this.trialResultsShow = true
|
||||
this.verifyResultList = resultData.content.data.verifyResultList
|
||||
}
|
||||
} else {
|
||||
this.$toast(resultData.resultMessage)
|
||||
}
|
||||
},
|
||||
//试算记录保存更新--编辑功能
|
||||
saveOrUpdateTrialRecordInfoFunc(){
|
||||
// let data ={
|
||||
// }
|
||||
// saveOrUpdateTrialRecordInfo(JSON.parse(localStorage.chooseProducts)).then(res => {
|
||||
// // if (res.result == '0') {
|
||||
// // }
|
||||
// })
|
||||
})
|
||||
},
|
||||
rollInCheck(value) {
|
||||
let regExp = /^[1-9]+[0-9]*$/
|
||||
|
||||
@@ -498,7 +498,8 @@ export default {
|
||||
if (productTrialInfoDTO[item.code] != null) {
|
||||
productTrialInfoDTO[item.code].forEach(factor => {
|
||||
// item = Object.assign(item, factor)
|
||||
if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age <= Number(factor.maxAge)){
|
||||
if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).insuredAge <= Number(factor.maxAge)){
|
||||
// if(JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age >= Number(factor.minAge) && JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).age <= Number(factor.maxAge)){
|
||||
item = Object.assign(item, factor)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
|
||||
<div class="text-right pv5">
|
||||
<van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index)" class="mr5" type="danger">编辑</van-button>
|
||||
<van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index,item.insuanceId)" class="mr5" type="danger">编辑</van-button>
|
||||
<van-button size="small" round @click="deteleInsure(index)" plain type="danger">删除</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -387,16 +387,16 @@ export default {
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
editInsure(index){
|
||||
editInsure(index,insuanceId){
|
||||
let isProposal = localStorage.isFrom == 'proposal' ? true : false
|
||||
if (isProposal) {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/common/calculatePremium?orderNo='+this.$CacheUtils.getLocItem('proposalNo')+'&insuanceId='+this.chooseProducts[index].insuanceId
|
||||
url: location.origin + '/#/common/calculatePremium?orderNo='+this.$CacheUtils.getLocItem('proposalNo')+'&insuanceId='+insuanceId
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/common/calculatePremium?orderNo='+this.$CacheUtils.getLocItem('proposalNo')+'&insuanceId='+this.chooseProducts[index].insuanceId
|
||||
path: '/common/calculatePremium?orderNo='+this.$CacheUtils.getLocItem('proposalNo')+'&insuanceId='+insuanceId
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -595,7 +595,7 @@ export default {
|
||||
showTipForDoubleRecord() {
|
||||
//判断投保人年龄是否大于等于60岁
|
||||
let showFlag = false
|
||||
let age = utilsAge.getAge(this.appntDTO.birthday, new Date())
|
||||
let age = this.appntDTO.birthday?utilsAge.getAge(this.appntDTO.birthday, new Date()):this.appntDTO.age
|
||||
if (age >= 60) {
|
||||
this.chooseProducts.map(item => {
|
||||
if (item.insuYearFlag == 'A' || (item.insuYearFlag == 'Y' && item.insuYear != '1')) {
|
||||
|
||||
@@ -49,9 +49,9 @@ export default {
|
||||
tips = '投保人年龄不适合此款险种,请选择其他险种!'
|
||||
} else {
|
||||
if(riskProductCode == 'GFRS_M0061'){
|
||||
age = utilsAge.getAge29(this.getSaleInsuredPersonInfo().birthday, new Date())
|
||||
age = this.getSaleInsuredPersonInfo().birthday?utilsAge.getAge29(this.getSaleInsuredPersonInfo().birthday, new Date()):this.getSaleInsuredPersonInfo().insuredAge
|
||||
}else{
|
||||
age = utilsAge.getAgeByValue(this.getSaleInsuredPersonInfo().birthday, new Date())
|
||||
age = this.getSaleInsuredPersonInfo().birthday?utilsAge.getAgeByValue(this.getSaleInsuredPersonInfo().birthday, new Date()):this.getSaleInsuredPersonInfo().insuredAge
|
||||
}
|
||||
tips = '被保险人年龄不适合此款险种,请选择其他险种!'
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ export default {
|
||||
//编辑被保险人
|
||||
edit(item) {
|
||||
item.birthday = item.birthdayLabel
|
||||
item.age = item.insuredAge
|
||||
// item.age = item.insuredAge
|
||||
this.$CacheUtils.setLocItem('saleInsuredPersonInfo', JSON.stringify(item)) //存储被保险人信息
|
||||
localStorage.isFrom = 'proposal'
|
||||
let url = `/common/selectedProduct?proposalEdit=1&proposalOrderNo=${item.orderNo}`
|
||||
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
//如果是投被同人 就将投保人信息存入被保险人信息
|
||||
this.disabled = true
|
||||
this.insured = Object.assign(this.insured, JSON.parse(this.$CacheUtils.getLocItem('proposalAppnt')))
|
||||
this.insured.insuredAge = getAge.getAge(this.insured.birthday, new Date())
|
||||
this.insured.insuredAge = this.insured.birthday?getAge.getAge(this.insured.birthday, new Date()):this.insured.age
|
||||
this.insured.medical = localStorage.orderNoSocialSecurity === '1' ? '1' : '0'
|
||||
// 建议书投保人/被保人姓名不必填, 填写姓名时展示姓名(落库),不填写姓名时展示性别+年龄,如:男30岁(不落库)
|
||||
if(!this.insured.name){
|
||||
|
||||
@@ -698,7 +698,7 @@ export default {
|
||||
this.pageShowInfo.insuredDTOs = res.content.orderDTO.insuredDTOs
|
||||
this.pageShowInfo.showInsuredDTO = this.pageShowInfo.insuredDTOs[0]
|
||||
//投保人年龄
|
||||
this.pageShowInfo.appntDTO.age = getAge.getAge(this.pageShowInfo.appntDTO.birthdayLabel, new Date())
|
||||
// this.pageShowInfo.appntDTO.age = getAge.getAge(this.pageShowInfo.appntDTO.birthdayLabel, new Date())
|
||||
let { insuredLabelResult, insuredResult, insuredInfoResult } = res.content.calculusResDTO
|
||||
orderDTO.insuredDTOs.forEach(v => {
|
||||
//根据数据字典 获取当前值
|
||||
|
||||
Reference in New Issue
Block a user