Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
bai.jinyan
2021-06-04 17:45:01 +08:00
7 changed files with 71 additions and 9 deletions

View File

@@ -90,3 +90,12 @@ export function getCheckModelAgentInfo(data) {
data
})
}
// 校验当前用户权限
export function funcPermCheck(data) {
return request({
url: getUrl('/agent/funcPerm/check', 1),
method: 'post',
data
})
}

View File

@@ -9,7 +9,7 @@ export default [
name: 'Performance',
component: performance,
meta: {
title: '个业绩查询',
title: '个业绩查询',
index: 1
}
},

View File

@@ -449,6 +449,7 @@ export default {
// this.params.manageLv = '02'
this.orgs[1].code = ''
this.orgs[1].inCode = ''
this.orgLev = 0
}
this.orgs[2].code = ''
this.orgs[2].inCode = ''
@@ -484,11 +485,22 @@ export default {
// this.params.manageLv = '03'
this.orgs[2].code = ''
this.orgs[2].inCode = ''
this.orgLev = 1
//区经理,机构名称选择任意部和组,先部选全部,组再选择全部,页面展示为全部佣金/全部合格人力
if (this.orgs[1].name == '全部') {
this.orgLev = 0
} else if (this.orgs[2].name == '全部') {
this.orgLev = 1
}
}
this.orgs[3].name = '全部'
this.orgs[3].code = ''
this.orgs[3].inCode = ''
if (status != 'false') {
this.getPerformanceDetailC()
}
if (this.manageLv == '07' || this.manageLv == '08') {
this.OrgLv5s.splice(0)
if (data != '全部') {
// 查询五级机构--个人
const res = await getMisBranchComList({
@@ -497,7 +509,6 @@ export default {
inCode: this.orgs[2].inCode,
manageLv: '08'
})
this.OrgLv5s.splice(0)
this.OrgLv5s.push(...res.content)
}
}
@@ -519,6 +530,12 @@ export default {
// this.params.manageLv = '03'
this.orgs[3].code = ''
this.orgs[3].inCode = ''
//部经理,机构名称选择任意组和个人,先组选全部,个人再选择全部,页面展示为全部佣金/全部合格人力
if (this.orgs[2].name == '全部') {
this.orgLev = 1
} else if (this.orgs[3].name == '全部') {
this.orgLev = 2
}
}
this.getPerformanceDetailC()
},

View File

@@ -31,6 +31,7 @@
<script>
import { Tab, Tabs, List, Row, Col, Icon, Cell, Sticky } from 'vant'
import { getProductInfo } from '@/api/ebiz/product/product.js'
import { funcPermCheck } from '@/api/ebiz/common/common'
import riskRules from '../common/risk-rules.js'
export default {
@@ -46,6 +47,7 @@ export default {
},
data() {
return {
isCheck: null, //查看是否有权限
active: 2,
docuList: [], // 产品资料文件
introductImages: [] // 产品特色图片
@@ -57,6 +59,9 @@ export default {
let code = this.$route.params.productDetailCode
console.log(code)
this.getProductDetail(code)
funcPermCheck({}).then(res => {
this.isCheck = res.result
})
},
methods: {
goDocu(url, type, name) {
@@ -98,6 +103,10 @@ export default {
})
},
async goInsure() {
if (this.isCheck == '1') {
//校验该代理人是否有该产品的售卖权限
return this.$toast('您暂无使用权限!如有问题咨询,请联系个险业务部。')
}
localStorage.orderNo = ''
localStorage.chooseProductCodes = '' //置空所选险种
let path = `/sale/insuredInfo`
@@ -106,7 +115,7 @@ export default {
flagPermission = await riskRules.getProductSellPermissionList('GFRS_M0040', this)
let specilFlag = '1'
path = `${path}?specilFlag=${specilFlag}`
} else if(this.$route.params.productDetailCode == 'GFRSPRO_M0044'){
} else if (this.$route.params.productDetailCode == 'GFRSPRO_M0044') {
flagPermission = await riskRules.getProductSellPermissionList('GFRS_M0044', this)
let specilFlag = '1'
path = `${path}?specilFlag=${specilFlag}`

View File

@@ -79,13 +79,13 @@
<van-button type="danger" @click="addProposal" class="bottom-btn fs16">点我新增</van-button>
<check-agent @checModelSuccessMethod="initThisPage" />
</div>
</template>
<script>
import { Tabs, Tab, Tag, Dialog, List, Sticky, Toast } from 'vant'
import { getList, toInsurance, deleteProposal } from '@/api/ebiz/proposal/proposal.js'
import { funcPermCheck } from '@/api/ebiz/common/common'
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
import riskRules from '../common/risk-rules.js'
import CheckAgent from '@/components/common/CheckAgent'
@@ -103,6 +103,7 @@ export default {
data() {
return {
isCheck: null, //查看是否有权限
active: 1,
proposalList: [],
finishedText: '没有更多了',
@@ -117,6 +118,9 @@ export default {
created() {
this.$CacheUtils.removeLocItem('orderNo')
this.$CacheUtils.removeLocItem('canMoveOn')
funcPermCheck({}).then(res => {
this.isCheck = res.result
})
},
mounted() {},
methods: {
@@ -273,6 +277,10 @@ export default {
},
//转投保
async toInsurance(item) {
if (this.isCheck == '1') {
//校验该代理人是否有该产品的售卖权限
return this.$toast('您暂无使用权限!如有问题咨询,请联系个险业务部。')
}
if (item.insuredDTOs[0].mainRisk.length === 2) {
let prodCodes = item.insuredDTOs[0].riskDTOLst
let prd26 = prodCodes.some(item => {
@@ -286,10 +294,10 @@ export default {
return Toast.fail('暂不支持组合产品转投保')
}
}
let permissionRiskCode ;
let permissionRiskCode
let flag = item.insuredDTOs[0].riskDTOLst.some(v => {
permissionRiskCode = v.riskCode;
return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040'|| v.riskCode == 'GFRS_M0044'
permissionRiskCode = v.riskCode
return v.riskCode == 'GFRS_M0024' || v.riskCode == 'GFRS_M0040' || v.riskCode == 'GFRS_M0044'
})
if (flag && (await riskRules.getProductSellPermissionList(permissionRiskCode, this))) {
return this.$toast('抱歉,您没有该产品的销售权限!')

View File

@@ -292,6 +292,7 @@ import {
} from 'vant'
import SelectRadio from '@/components/ebiz/SelectRadio'
import { getDemo, toInsurance, getDemoByProposalNo, share, getSharingToken } from '@/api/ebiz/proposal/proposal.js'
import { funcPermCheck } from '@/api/ebiz/common/common'
import { haveTap, getTapIndex, relevanceByInsure } from './js/exhibitionMethod.js'
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
import { weixinShare } from '@/assets/js/utils/wxShare.js'
@@ -303,6 +304,7 @@ export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
isCheck: null, //查看是否有权限
isWeixin,
showShareType: '00',
popupShow: false,
@@ -394,6 +396,10 @@ export default {
}, 1000)
window['appCallBack'] = this.appCallBack*/
this.init()
//校验当前用户权限
funcPermCheck({}).then(res => {
this.isCheck = res.result
})
},
created() {},
beforeRouteLeave(to, from, next) {
@@ -642,6 +648,10 @@ export default {
},
//转投保
async insure() {
if (this.isCheck == '1') {
//校验该代理人是否有该产品的售卖权限
return this.$toast('您暂无使用权限!如有问题咨询,请联系个险业务部。')
}
let path = '/sale/insuredInfo?edit=1'
if (this.mainRiskCodes) {
if (this.mainRiskCodes.length === 2) {
@@ -656,7 +666,7 @@ export default {
return Toast.fail('暂不支持组合产品转投保')
}
}
if (this.mainRiskCodes[0] == 'GFRS_M0024' || this.mainRiskCodes[0] == 'GFRS_M0040'|| this.mainRiskCodes[0] == 'GFRS_M0044') {
if (this.mainRiskCodes[0] == 'GFRS_M0024' || this.mainRiskCodes[0] == 'GFRS_M0040' || this.mainRiskCodes[0] == 'GFRS_M0044') {
let specilFlag = '1'
path = `${path}&specilFlag=${specilFlag}`
let flagPermission = await riskRules.getProductSellPermissionList(this.mainRiskCodes[0], this)

View File

@@ -1,5 +1,9 @@
<template>
<div class="sale-list-container pb50">
<div class="sale-list-container pb50 text-center" v-if="isCheck == 1">
<p class="f10 gray mt60">您暂无使用权限</p>
<p class="f10 gray mt5">如有问题咨询请联系个险业务部</p>
</div>
<div class="sale-list-container pb50" v-else-if="isCheck == 0">
<van-search placeholder="请输入投保人姓名" v-model="searchName" @change="searchList" @keyup.enter="searchList" />
<van-sticky>
<van-tabs :line-width="45" v-model="active" @change="tabChange" sticky>
@@ -170,6 +174,7 @@
<script>
import { Search, Tabs, Tab, List, Tag, Sticky, Toast, Dialog, Field } from 'vant'
import { orderList, deleteOrderInfo, getAuthCode, revokeOrder } from '@/api/ebiz/sale/sale'
import { funcPermCheck } from '@/api/ebiz/common/common'
import { formatRiskList } from '@/assets/js/utils/formatRiskList.js'
import dataDictionary from '@/assets/js/utils/data-dictionary' //根据数据字典找到用户等级
import CheckAgent from '@/components/common/CheckAgent'
@@ -189,6 +194,7 @@ export default {
},
data() {
return {
isCheck: null, //查看是否有权限
showFlag: true,
searchName: '',
active: 'uncommit', //uncommit 表示未提交 commit表示已提交
@@ -231,6 +237,9 @@ export default {
})
}, 100)
window.appCallBack = this.appCallBack
funcPermCheck({}).then(res => {
this.isCheck = res.result
})
},
methods: {
beforeClose(action, done) {