[FIX]【桂企】pdf建议书分享title数据字典更新;建议书预览页面左上角【返回】按钮改为×;从产品中心桂企入口进入投保-主险选择页默认选中桂企

This commit is contained in:
yuweiqi
2020-05-23 20:30:07 +08:00
parent 26b5810d49
commit 8b92ffd12f
5 changed files with 100 additions and 11 deletions

View File

@@ -944,6 +944,11 @@ export default {
shortName: '重疾险',
name: '国富人寿爱易保重大疾病保险',
code: 'GFRS_M0021'
},
{
shortName: '重疾险',
name: '国富人寿桂企保重大疾病保险',
code: 'GFRS_M0024'
}
],
// 职级

View File

@@ -19,7 +19,9 @@
</template>
<script>
import { Cell, CellGroup, Tag, Radio, RadioGroup } from 'vant'
import { mainRiskList, calculatePremium, productCheck } from '@/api/ebiz/common/common'
import { mainRiskList, calculatePremium } from '@/api/ebiz/common/common'
import { getOrderDetail } from '@/api/ebiz/sale/sale'
import riskRules from './risk-rules'
export default {
name: 'mainRiskList',
@@ -32,14 +34,43 @@ export default {
},
data() {
return {
specilFlag: '0',
flag: true,
list: [],
result: '',
delList: [],
radioVal: ''
}
},
mounted() {
async mounted() {
if (localStorage.isFrom == 'sale') {
return new Promise((resolve, reject) => {
getOrderDetail({ orderNo: localStorage.orderNo }).then(
res => {
if (res.result == 0) {
//------------------------专为桂企写死--begin---------------//
if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) {
this.flag = this.specilFlag = res.orderDTO.insuredDTOs[0].riskDTOLst.some(v => {
return v.riskCode == 'GFRS_M0024'
})
if (this.flag) {
this.specilFlag = '1'
}
} else if (res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0024') {
this.specilFlag = '1'
}
// ------------------------专为桂企写死--end---------------//
}
resolve(this.getMainRiskList())
},
error => {
reject(this.getMainRiskList())
}
)
})
} else {
this.getMainRiskList()
}
},
methods: {
//获取主险列表
@@ -64,6 +95,13 @@ export default {
}
}
this.list = resultData.mainRiskDTOS
//------------------------专为桂企写死--begin---------------//
if (this.list.length > 0 && this.flag && localStorage.isFrom == 'sale') {
this.result = this.list.find(v => {
return v.riskProductCode == 'GFRS_M0024'
})
}
// ------------------------专为桂企写死--end---------------//
if (this.list.length == 0) {
this.$dialog({ message: '暂无可选产品!' }).then(() => {

View File

@@ -84,6 +84,7 @@
import { Tabs, Tab, Tag, Dialog, List, Sticky, Toast } from 'vant'
import { getList, toInsurance, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
import riskRules from '../common/risk-rules.js'
export default {
name: 'proposalList',
@@ -245,11 +246,17 @@ export default {
})
},
//转投保
toInsurance(item) {
console.log(item.insuredDTOs[0].mainRisk.length)
if(item.insuredDTOs[0].mainRisk.length == '2') {
async toInsurance(item) {
if (item.insuredDTOs[0].mainRisk.length == '2') {
return Toast.fail('暂不支持组合产品转投保')
}
let flag = item.insuredDTOs[0].riskDTOLst.some(v => {
return v.riskCode == 'GFRS_M0024'
})
if (flag && (await riskRules.getProductSellPermissionList('GFRS_M0024', this))) {
return this.$toast('抱歉,您没有该产品的销售权限!')
}
let params = {
proposalInfoDTO: {
proposalNo: item.orderInfoDTO.orderNo

View File

@@ -363,6 +363,15 @@ export default {
}
},
mounted() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
localStorage.setItem('pdfShareCode', '')
document.body.style.backgroundColor = '#fff'
/*setTimeout(() => {
@@ -384,6 +393,22 @@ export default {
next()
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
this.$jump({
flag: 'h5',
extra: {
title: '建议书列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/proposal/list`
},
routerInfo: {
path: `/proposal/list`,
type: '1'
}
})
}
},
initDutyColor(code) {
if (code) {
return code.replace(new RegExp('<span>', 'g'), '<span style="color: #3a81f6;font-weight: 600;">')

View File

@@ -551,6 +551,18 @@ export default {
]) //获取家庭地址
this.census = getAreaName([{ code: res.orderDTO.appntDTO.householdProvince }, { code: res.orderDTO.appntDTO.householdCity }]) //获取户籍
}
//------------------------专为桂企写死--begin---------------//
if (res.orderDTO.insuredDTOs[0] && res.orderDTO.insuredDTOs[0].riskDTOLst) {
console.log('------------')
this.specilFlag = res.orderDTO.insuredDTOs[0].riskDTOLst.some(v => {
return v.riskCode == 'GFRS_M0024'
})
? '1'
: '0'
} else if (res.orderDTO.orderInfoDTO.productCode == 'GFRS_M0024') {
this.specilFlag = '1'
}
// ------------------------专为桂企写死--end---------------//
}
})
} else {
@@ -1185,8 +1197,10 @@ export default {
}
}
let str = ''
let specilFlag = this.$route.query.specilFlag === '1' ? 'specilFlag=1&' : ''
params.orderDTO.appntDTO = this.userInfo
if (this.specilFlag == '1') {
params.orderDTO.orderInfoDTO.productCode = 'GFRS_M0024'
}
let resultData = await saveOrUpdateOrderInfo(params)
if (resultData.result == 0) {
//deleteFlag 0-该页面修改了信息且修改的信息影响到后面流程,后台进行了删除数据的操作
@@ -1217,10 +1231,10 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/sale/insuredPerson?${specilFlag}${str}`
url: location.origin + `/#/sale/insuredPerson?${str}`
},
routerInfo: {
path: `/sale/insuredPerson?${specilFlag}${str}`
path: `/sale/insuredPerson?${str}`
}
})
})
@@ -1228,10 +1242,10 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/sale/insuredPerson?${specilFlag}${str}`
url: location.origin + `/#/sale/insuredPerson?${str}`
},
routerInfo: {
path: `/sale/insuredPerson?${specilFlag}${str}`
path: `/sale/insuredPerson?${str}`
}
})
}