mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 09:56:43 +08:00
Merge branch 'feature/GFRS-1237【0525】国富人寿桂企保重大疾病保险' into release/0528
# Conflicts: # src/api/ebiz/sale/sale.js # src/assets/js/utils/data-dictionary.js # src/views/ebiz/common/CalculatePremium.vue
This commit is contained in:
@@ -27,6 +27,15 @@ export function trial(data) {
|
||||
})
|
||||
}
|
||||
|
||||
//产品售卖权限校验
|
||||
export function productCheck(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/product/check', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//订单详情
|
||||
export function orderDetail(data) {
|
||||
return request({
|
||||
|
||||
@@ -222,3 +222,11 @@ export function revokeOrder(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取产品允许投保人单位列表
|
||||
export function getCompany(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/product/company', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -504,6 +504,7 @@ export default {
|
||||
}
|
||||
let age = utilsAge.getAge(appntDTO.birthday, new Date())
|
||||
localStorage.saleInsuredInfo = JSON.stringify({
|
||||
workcompany: appntDTO.workcompany,
|
||||
birthday: appntDTO.birthday,
|
||||
name: appntDTO.name,
|
||||
sex: appntDTO.sex,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export default {
|
||||
getAge: function (name, today) {
|
||||
getAge: function(name, today) {
|
||||
return this.getAgeByValue(name, today)
|
||||
},
|
||||
|
||||
getAgeByBirth: function (value, today) {
|
||||
getAgeByBirth: function(value, today) {
|
||||
return this.getAgeByValue(value, today)
|
||||
},
|
||||
getAgeByValue: function (value, today) {
|
||||
getAgeByValue: function(value, today) {
|
||||
var b = value.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/)
|
||||
if (b == null) {
|
||||
return null
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
/**
|
||||
* 取得两个日期的时间差
|
||||
*/
|
||||
getDateDiff: function (date1, date2) {
|
||||
getDateDiff: function(date1, date2) {
|
||||
var dt1, dt2
|
||||
if (date1 instanceof Date) {
|
||||
dt1 = date1
|
||||
@@ -45,13 +45,14 @@ export default {
|
||||
} else {
|
||||
dt2 = this.stringToDate(date2)
|
||||
}
|
||||
return (dt2.getTime() - dt1.getTime()) / (1000 * 3600 * 24) + 1
|
||||
return (dt2.getTime() - dt1.getTime()) / (1000 * 3600 * 24)
|
||||
// return (dt2.getTime() - dt1.getTime()) / (1000 * 3600 * 24) + 1
|
||||
},
|
||||
|
||||
/**
|
||||
* 字符串转日期
|
||||
*/
|
||||
stringToDate: function (string) {
|
||||
stringToDate: function(string) {
|
||||
return new Date(Date.parse(string.replace(/-/g, '/')))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,6 +949,11 @@ export default {
|
||||
shortName: '两全险',
|
||||
name: '国富人寿安行无忧两全保险',
|
||||
code: 'GFRS_M0023'
|
||||
},
|
||||
{
|
||||
shortName: '重疾险',
|
||||
name: '国富人寿桂企保重大疾病保险',
|
||||
code: 'GFRS_M0024'
|
||||
}
|
||||
],
|
||||
// 职级
|
||||
|
||||
@@ -63,13 +63,16 @@
|
||||
@click="toSelect(index, riskFactorIndex, riskFactor.columns)"
|
||||
/>
|
||||
</div>
|
||||
<!-- 桂企产品——GFRS_M0024——不显示责任保费及(万元),只显示责任名称及勾选框 -->
|
||||
<div class="border-bottom" v-if="riskFactor.type == 3">
|
||||
<div class="pv12 border-bd">{{ riskFactor.name }}</div>
|
||||
<div class="duty">
|
||||
<div class="flex justify-content-s border-bd pv10 align-items-c" v-for="(dutyItem, dutyItemIndex) in riskFactor.rules" :key="dutyItemIndex">
|
||||
<span class="fs14 w100">{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span>
|
||||
<span v-if="item.productCode != 'GFRS_M0024'" class="fs14 w100">{{ dutyItem.dutyName }}({{ dutyItem.suffix }})</span>
|
||||
<span v-else class="fs14 w100">{{ dutyItem.dutyName }}</span>
|
||||
<div class="flex relative">
|
||||
<van-stepper
|
||||
v-if="item.productCode != 'GFRS_M0024'"
|
||||
v-model="dutyItem.defaultDutyAmt"
|
||||
:min="dutyItem.minDutyAmt"
|
||||
:max="dutyItem.maxDutyAmt"
|
||||
@@ -1047,7 +1050,7 @@ export default {
|
||||
//2、豁免险跟主险联动,豁免险缴费期间和保险期间同主险的缴费期间
|
||||
let remitIndex = this.getRemitIndex()
|
||||
//if (!remitIndex) return
|
||||
for(let itemRemitIndex of remitIndex){
|
||||
for (let itemRemitIndex of remitIndex) {
|
||||
this.chooseProducts[itemRemitIndex].calFactorLst.forEach(item => {
|
||||
if (item.code == 'payIntv') {
|
||||
for (let key in mainRiskInfo.payIntv) {
|
||||
@@ -1294,7 +1297,6 @@ export default {
|
||||
medical: JSON.parse(localStorage.getItem('saleInsuredPersonInfo')).medical
|
||||
})
|
||||
params.trialInfos.push(trialInfo)
|
||||
|
||||
})
|
||||
this.trialInfos = params.trialInfos
|
||||
return params
|
||||
@@ -1512,6 +1514,11 @@ export default {
|
||||
riskItem['dutyLst'] = this.trialList[index].duty
|
||||
//930折中方案,责任险分档
|
||||
riskItem['amt'] = this.trialList[index].amt
|
||||
} else {
|
||||
//国富人寿桂企保重大疾病保险产品专写
|
||||
if (this.trialList[index].productCode == 'GFRS_M0024') {
|
||||
riskItem['dutyLst'] = this.trialInfos[index].duty
|
||||
}
|
||||
}
|
||||
//保费算保额
|
||||
console.log('this.trialList', this.trialList[index].trialType)
|
||||
@@ -1545,7 +1552,6 @@ export default {
|
||||
}
|
||||
|
||||
// console.log(riskItem)
|
||||
console.log(this.trialInfos[index])
|
||||
riskItem = Object.assign(riskItem, this.trialInfos[index])
|
||||
// console.log(riskItem)
|
||||
riskDTOLst.push(riskItem)
|
||||
@@ -1554,6 +1560,14 @@ export default {
|
||||
if (!rollInResult) {
|
||||
return
|
||||
}
|
||||
|
||||
//国富人寿桂企保重大疾病保险产品专写
|
||||
this.trialInfos.map((v, i) => {
|
||||
if (v.productCode == 'GFRS_M0024') {
|
||||
delete riskDTOLst[i].duty
|
||||
}
|
||||
})
|
||||
|
||||
// console.log('riskDTOLst', riskDTOLst)
|
||||
//建议书需要添加全部投保人信息,电投只需要投保人ID
|
||||
let insuredDTOItem = Object.assign(this.saleInsuredPersonInfo, { riskDTOLst: riskDTOLst })
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
<script>
|
||||
import { Cell, CellGroup, Tag, Radio, RadioGroup } from 'vant'
|
||||
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() {
|
||||
this.getMainRiskList()
|
||||
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.specilFlag == '1' && localStorage.isFrom == 'sale') {
|
||||
this.result = this.list.find(v => {
|
||||
return v.riskProductCode == 'GFRS_M0024'
|
||||
})
|
||||
}
|
||||
// ------------------------专为桂企写死--end---------------//
|
||||
|
||||
if (this.list.length == 0) {
|
||||
this.$dialog({ message: '暂无可选产品!' }).then(() => {
|
||||
@@ -81,6 +119,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//下一步
|
||||
nextStep() {
|
||||
console.log(this.result)
|
||||
@@ -110,13 +149,13 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if(resultData.productTrialInfoDTO.ruleExpression){
|
||||
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {};
|
||||
|
||||
if (resultData.productTrialInfoDTO.ruleExpression) {
|
||||
let ruleExpression = localStorage.ruleExpression ? JSON.parse(localStorage.ruleExpression) : {}
|
||||
ruleExpression[resultData.productCode] = resultData.productTrialInfoDTO.ruleExpression
|
||||
localStorage.ruleExpression = JSON.stringify(ruleExpression)
|
||||
}
|
||||
|
||||
|
||||
/********start 主险选择限制 start******/
|
||||
|
||||
if (riskRules.ageLimit(resultData, this)) {
|
||||
@@ -145,6 +184,18 @@ export default {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let flagPermission = await riskRules.getProductSellPermissionList(resultData.productCode, this)
|
||||
if (flagPermission && localStorage.isFrom != 'proposal') {
|
||||
//校验该代理人是否有该产品的售卖权限
|
||||
return this.$toast('抱歉,您没有该产品的销售权限!')
|
||||
}
|
||||
|
||||
let flagCompany = await riskRules.checkCompany(resultData.productCode, JSON.parse(localStorage.saleInsuredInfo).workcompany, this)
|
||||
if (flagCompany && localStorage.isFrom != 'proposal') {
|
||||
//校验该投保人的工作单位是否能够投保该产品
|
||||
return this.$toast('该投保人工作单位不能投保该产品')
|
||||
}
|
||||
/********end 主险选择限制 end******/
|
||||
|
||||
//保存附加险
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { productCheck } from '@/api/ebiz/common/common'
|
||||
import { getCompany } from '@/api/ebiz/sale/sale'
|
||||
|
||||
export default {
|
||||
//投、被保险人年龄对险种的限制
|
||||
ageLimit(resultData, vm, isApplicant) {
|
||||
@@ -10,8 +13,8 @@ export default {
|
||||
tips = '被保险人年龄不适合此款险种,请选择其他险种!'
|
||||
}
|
||||
let minAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.minAge
|
||||
let maxAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.maxAge;
|
||||
[age, minAge, maxAge] = [Number(age), Number(minAge), Number(maxAge)]
|
||||
let maxAge = resultData.productTrialInfoDTO.ageRange && resultData.productTrialInfoDTO.ageRange.maxAge
|
||||
;[age, minAge, maxAge] = [Number(age), Number(minAge), Number(maxAge)]
|
||||
if (age > maxAge || age < minAge) {
|
||||
vm.$toast(tips)
|
||||
return true
|
||||
@@ -69,5 +72,55 @@ export default {
|
||||
//获取投保人信息
|
||||
getSaleInsuredInfo() {
|
||||
return localStorage.saleInsuredInfo && JSON.parse(localStorage.saleInsuredInfo)
|
||||
},
|
||||
|
||||
//获取产品售卖权限列表
|
||||
getProductSellPermissionList(val, that) {
|
||||
let flag = true
|
||||
return new Promise((resolve, reject) => {
|
||||
productCheck({ productCodes: [val] }).then(
|
||||
res => {
|
||||
if (res.result == '0') {
|
||||
if (JSON.stringify(res.content) == '{}') {
|
||||
flag = false
|
||||
} else {
|
||||
//0-有权限 1-没权限
|
||||
flag = res.content[val] === '1' ? true : false
|
||||
}
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
}
|
||||
resolve(flag)
|
||||
},
|
||||
error => {
|
||||
reject(true)
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
//校验投保人工作单位是否有权限投保该产品
|
||||
checkCompany(val, workcompany, that) {
|
||||
let flag = true
|
||||
let columns = []
|
||||
return new Promise((resolve, reject) => {
|
||||
getCompany({ productCodes: [val] }).then(
|
||||
res => {
|
||||
if (res.result == 0) {
|
||||
columns = res.content
|
||||
if (columns.length == 0) {
|
||||
flag = false
|
||||
} else {
|
||||
flag = !columns.includes(workcompany)
|
||||
}
|
||||
} else {
|
||||
that.$toast(res.resultMessage)
|
||||
}
|
||||
resolve(flag)
|
||||
},
|
||||
error => {
|
||||
reject(true)
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<script>
|
||||
import { Tab, Tabs, List, Row, Col, Icon, Cell, Sticky } from 'vant'
|
||||
import { getProductInfo } from '@/api/ebiz/product/product.js'
|
||||
import riskRules from '../common/risk-rules.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
[Tab.name]: Tab,
|
||||
@@ -95,17 +97,30 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
goInsure() {
|
||||
async goInsure() {
|
||||
localStorage.orderNo = ''
|
||||
localStorage.chooseProductCodes = '' //置空所选险种
|
||||
let path = `/sale/insuredInfo`
|
||||
let flagPermission = true
|
||||
if (this.$route.params.productDetailCode == 'GFRSPRO_M0024') {
|
||||
flagPermission = await riskRules.getProductSellPermissionList('GFRS_M0024', this)
|
||||
let specilFlag = '1'
|
||||
path = `${path}?specilFlag=${specilFlag}`
|
||||
} else {
|
||||
flagPermission = false
|
||||
}
|
||||
if (flagPermission) {
|
||||
//校验该代理人是否有该产品的售卖权限
|
||||
return this.$toast('抱歉,您没有该产品的销售权限!')
|
||||
}
|
||||
// 跳转到投保建议
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/insuredInfo'
|
||||
url: location.origin + '/#' + path
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/sale/insuredInfo`
|
||||
path: path
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -134,7 +149,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.product-detail-container {
|
||||
/deep/.van-sticky{
|
||||
/deep/.van-sticky {
|
||||
background: #fff;
|
||||
}
|
||||
.product-detail-introduct-image {
|
||||
@@ -156,8 +171,8 @@ export default {
|
||||
border-color: transparent;
|
||||
}
|
||||
/deep/.van-button--default {
|
||||
background-color: #FEEFD8;
|
||||
color: #E9332E;
|
||||
background-color: #feefd8;
|
||||
color: #e9332e;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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',
|
||||
@@ -110,11 +111,26 @@ export default {
|
||||
},
|
||||
created() {
|
||||
// document.body.style.backgroundColor = '#F5F5F5'
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('webview_left_button', {
|
||||
intercept: '1' //是否拦截原生返回事件 1是 其他否
|
||||
})
|
||||
}, 100)
|
||||
window.appCallBack = this.appCallBack
|
||||
},
|
||||
mounted() {
|
||||
this.loadMore()
|
||||
},
|
||||
methods: {
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'left_button_click') {
|
||||
this.$jump({
|
||||
flag: 'home',
|
||||
extra: {}
|
||||
})
|
||||
}
|
||||
},
|
||||
//获取建议书列表
|
||||
getProposalList(tabType, pageInfo) {
|
||||
let status = '0' + tabType
|
||||
@@ -245,11 +261,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
|
||||
|
||||
@@ -300,7 +300,7 @@ import getAge from '@/assets/js/utils/age.js'
|
||||
import filters from '@/filters'
|
||||
import dataDictionary from '@/assets/js/utils/data-dictionary'
|
||||
import Layout from '../../app/layout/Layout' //使用数据字典中的险种类型
|
||||
|
||||
import riskRules from '../common/risk-rules.js'
|
||||
export default {
|
||||
data() {
|
||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||
@@ -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(() => {
|
||||
@@ -487,6 +496,7 @@ export default {
|
||||
//app回调
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'right_button_click') {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
@@ -498,8 +508,23 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
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'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
sharePeople() {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
@@ -601,11 +626,21 @@ export default {
|
||||
})
|
||||
},
|
||||
//转投保
|
||||
insure() {
|
||||
async insure() {
|
||||
let path = '/sale/insuredInfo?edit=1'
|
||||
if (this.mainRiskCodes) {
|
||||
if (this.mainRiskCodes.length != 1) {
|
||||
return Toast.fail('暂不支持组合产品转投保')
|
||||
}
|
||||
if (this.mainRiskCodes[0] == 'GFRS_M0024') {
|
||||
let specilFlag = '1'
|
||||
path = `${path}&specilFlag=${specilFlag}`
|
||||
let flagPermission = await riskRules.getProductSellPermissionList(this.mainRiskCodes[0], this)
|
||||
if (flagPermission) {
|
||||
//校验该代理人是否有该产品的售卖权限
|
||||
return Toast.fail('抱歉,您没有该产品的销售权限!')
|
||||
}
|
||||
}
|
||||
}
|
||||
let params = {
|
||||
proposalInfoDTO: {
|
||||
@@ -619,11 +654,11 @@ export default {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/insuredInfo?edit=1',
|
||||
url: location.origin + '/#' + path,
|
||||
backToFirst: '1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/insuredInfo?edit=1'
|
||||
path: path
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -250,6 +250,7 @@
|
||||
@click="toSelect('7')"
|
||||
/>
|
||||
<van-field
|
||||
v-if="specilFlag != '1'"
|
||||
v-model="userInfo.workcompany"
|
||||
required
|
||||
label="工作单位"
|
||||
@@ -259,6 +260,18 @@
|
||||
maxlength="50"
|
||||
clearable
|
||||
/>
|
||||
<van-field
|
||||
v-else
|
||||
:value="userInfo.workcompany"
|
||||
readonly
|
||||
label="工作单位"
|
||||
name="工作单位"
|
||||
required
|
||||
right-icon="arrow"
|
||||
placeholder="请选择"
|
||||
v-validate="'required'"
|
||||
@click="toSelect('9')"
|
||||
/>
|
||||
<!-- <van-field
|
||||
v-model="areaName"
|
||||
readonly
|
||||
@@ -360,7 +373,7 @@ import CustomerPicker from '@/components/ebiz/customer/CustomerPicker'
|
||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||
import areaList from '@/assets/js/utils/area'
|
||||
import areaLists from '@/assets/js/utils/areaNew'
|
||||
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||
import { saveOrUpdateOrderInfo, getAuthCode, getOrderDetail, getCompany } from '@/api/ebiz/sale/sale'
|
||||
import utilsAge from '@/assets/js/utils/age'
|
||||
import getAreaName from '@/assets/js/utils/get-area-name'
|
||||
import IdentityCardScan from '@/components/ebiz/sale/IdentityCardScan'
|
||||
@@ -390,6 +403,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
specilFlag: '', //特殊显示-为桂企产品专写 1-桂企 undefind-其他
|
||||
productCodes: [], //产品编码-用于“产品允许投保人单位列表获取”接口,作为请求参数
|
||||
isScan: false, //是否显示证件扫描组件
|
||||
sexRadio: [
|
||||
{
|
||||
@@ -493,6 +508,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.specilFlag = this.$route.query.specilFlag
|
||||
localStorage.removeItem('bankCardUrlPath')
|
||||
localStorage.removeItem('bankCard')
|
||||
localStorage.removeItem('bankCardUrlInsuredPath')
|
||||
@@ -501,6 +517,7 @@ export default {
|
||||
localStorage.removeItem('imgfrontInsuredPath')
|
||||
localStorage.removeItem('imgBackPath')
|
||||
localStorage.removeItem('imgBackInsuredPath')
|
||||
|
||||
// document.body.style.backgroundColor = '#F5F5F5'
|
||||
//如果是编辑/导航进来
|
||||
this.isElecCont = '0'
|
||||
@@ -535,6 +552,17 @@ 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) {
|
||||
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 {
|
||||
@@ -628,26 +656,78 @@ export default {
|
||||
//pickerType 1、国家地区 2、证件类型 3、文化程度 4、有无社保(弃用) 5、税收居民身份 6、婚姻状况 7、在职情况 8、收入来源
|
||||
;[this.popupShow, this.pickerType] = [true, pickerType]
|
||||
if (valueKey) this.valueKey = valueKey
|
||||
if (pickerType == '1') {
|
||||
this.columns = DataDictionary.nativeplace
|
||||
} else if (pickerType == '2') {
|
||||
this.columns = DataDictionary.insuredIdType
|
||||
} else if (pickerType == '3') {
|
||||
this.columns = DataDictionary.degree
|
||||
} else if (pickerType == '4') {
|
||||
this.columns = [
|
||||
{ id: 0, text: '有' },
|
||||
{ id: 1, text: '无' }
|
||||
]
|
||||
} else if (pickerType == '5') {
|
||||
this.columns = DataDictionary.taxIdentity
|
||||
} else if (pickerType == '6') {
|
||||
this.columns = DataDictionary.marriage
|
||||
} else if (pickerType == '7') {
|
||||
this.columns = DataDictionary.workCondition
|
||||
} else if (pickerType == '8') {
|
||||
this.columns = DataDictionary.salarySource
|
||||
|
||||
switch (pickerType) {
|
||||
case '1':
|
||||
this.columns = DataDictionary.nativeplace
|
||||
break
|
||||
case '2':
|
||||
this.columns = DataDictionary.insuredIdType
|
||||
break
|
||||
case '3':
|
||||
this.columns = DataDictionary.degree
|
||||
break
|
||||
case '4':
|
||||
this.columns = [
|
||||
{ id: 0, text: '有' },
|
||||
{ id: 1, text: '无' }
|
||||
]
|
||||
break
|
||||
case '5':
|
||||
this.columns = DataDictionary.taxIdentity
|
||||
break
|
||||
case '6':
|
||||
this.columns = DataDictionary.marriage
|
||||
break
|
||||
case '7':
|
||||
this.columns = DataDictionary.workCondition
|
||||
break
|
||||
case '8':
|
||||
this.columns = DataDictionary.salarySource
|
||||
break
|
||||
case '9':
|
||||
this.productCodes.length = 0
|
||||
this.productCodes.push('GFRS_M0024')
|
||||
getCompany({ productCodes: this.productCodes }).then(res => {
|
||||
if (res.result == 0) {
|
||||
this.columns = res.content
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
break
|
||||
}
|
||||
|
||||
// if (pickerType == '1') {
|
||||
// this.columns = DataDictionary.nativeplace
|
||||
// } else if (pickerType == '2') {
|
||||
// this.columns = DataDictionary.insuredIdType
|
||||
// } else if (pickerType == '3') {
|
||||
// this.columns = DataDictionary.degree
|
||||
// } else if (pickerType == '4') {
|
||||
// this.columns = [
|
||||
// { id: 0, text: '有' },
|
||||
// { id: 1, text: '无' }
|
||||
// ]
|
||||
// } else if (pickerType == '5') {
|
||||
// this.columns = DataDictionary.taxIdentity
|
||||
// } else if (pickerType == '6') {
|
||||
// this.columns = DataDictionary.marriage
|
||||
// } else if (pickerType == '7') {
|
||||
// this.columns = DataDictionary.workCondition
|
||||
// } else if (pickerType == '8') {
|
||||
// this.columns = DataDictionary.salarySource
|
||||
// } else if (pickerType == '9') {
|
||||
// this.productCodes.length = 0
|
||||
// this.productCodes.push('GFRS_M0024')
|
||||
// getCompany({ productCodes: this.productCodes }).then(res => {
|
||||
// if (res.result == 0) {
|
||||
// this.columns = res.content
|
||||
// } else {
|
||||
// this.$toast(res.resultMessage)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
//确认选择字段
|
||||
onConfirm(value) {
|
||||
@@ -675,6 +755,8 @@ export default {
|
||||
this.userInfo.jobStatus = value.id
|
||||
} else if (this.pickerType == '8') {
|
||||
this.userInfo.salarySource = value.id
|
||||
} else if (this.pickerType == '9') {
|
||||
this.userInfo.workcompany = value
|
||||
}
|
||||
},
|
||||
//证件起始截止日期
|
||||
@@ -777,7 +859,6 @@ export default {
|
||||
hiddenRight: '1'
|
||||
}
|
||||
})
|
||||
// console.log(data)
|
||||
let { customerName, customerSex } = data
|
||||
this.userInfo.name = customerName //用户名
|
||||
this.userInfo.sex = String(customerSex) //性别
|
||||
@@ -804,7 +885,7 @@ export default {
|
||||
this.userInfo.medical = data.socialSecurity //有无社保
|
||||
this.userInfo.taxResidentId = data.residentStatus //税收居民身份
|
||||
this.userInfo.averageAnnualIncome = data.averageYearlyIncome //平均年收入
|
||||
this.userInfo.workcompany = data.workUnits //工作单位
|
||||
this.userInfo.workcompany = this.specilFlag == '1' ? '' : data.workUnits //工作单位
|
||||
this.userInfo.jobStatus = data.jobStatus //工作情况
|
||||
this.userInfo.marriage = data.marryStatus //婚姻状况
|
||||
this.userInfo.familyAnnualIncome = data.familyAnnualIncome //家庭年收入
|
||||
@@ -1116,6 +1197,11 @@ export default {
|
||||
}
|
||||
let str = ''
|
||||
params.orderDTO.appntDTO = this.userInfo
|
||||
//------------------------专为桂企写死--begin---------------//
|
||||
if (this.specilFlag == '1') {
|
||||
params.orderDTO.orderInfoDTO.productCode = 'GFRS_M0024'
|
||||
}
|
||||
// ------------------------专为桂企写死--end---------------//
|
||||
let resultData = await saveOrUpdateOrderInfo(params)
|
||||
if (resultData.result == 0) {
|
||||
//deleteFlag 0-该页面修改了信息且修改的信息影响到后面流程,后台进行了删除数据的操作
|
||||
|
||||
Reference in New Issue
Block a user