【银保app】业绩查询接口对接

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2022-11-19 18:09:30 +08:00
parent 798348d50f
commit 1afcc099e1
9 changed files with 229 additions and 45 deletions

View File

@@ -65,3 +65,44 @@ export function YBpolicyDetail(data) {
data
})
}
export function getPremByAgentCode(data) {
return request({
url: getUrl('/data/performanceYB/getPremByAgentCode', 1,3),
method: 'post',
data
})
}
export function getIndexByAgentCode(data) {
return request({
url: getUrl('/data/performanceYB/getIndexByAgentCode', 1,3),
method: 'post',
data
})
}
export function getBankNetDataYB(data) {
return request({
url: getUrl('/data/performanceYB/getBankNetDataYB', 1,3),
method: 'post',
data
})
}
export function getChannelPerformanceYB(data) {
return request({
url: getUrl('/data/performanceYB/getChannelPerformanceYB', 1,3),
method: 'post',
data
})
}
export function getBankNetPerformanceYB(data) {
return request({
url: getUrl('/data/performanceYB/getBankNetPerformanceYB', 1,3),
method: 'post',
data
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -55,10 +55,14 @@
<div style="display:flex;">
<div class="otherContent_con_one">
<div>
<p class="otherContent_con_top_p">
<p v-if="qjrlFlag == 1" class="otherContent_con_top_p">
<span style="color:green;">达标</span>
<img class="otherContent_con_one_img" src="@/assets/YB_APP/images/40.png">
</p>
<p v-if="qjrlFlag == 0" class="otherContent_con_top_p">
<span style="color:#cf3d52;">未达标</span>
<img class="otherContent_con_one_img" src="@/assets/YB_APP/images/38.png">
</p>
<p class="otherContent_con_bottom_p">
<span>期交活动人力</span>
</p>
@@ -66,7 +70,11 @@
</div>
<div class="otherContent_con_two" style="margin-left:2%;">
<div>
<p class="otherContent_con_top_p">
<p v-if="ggrlFlag == 1" class="otherContent_con_top_p">
<span style="color:green;">达标</span>
<img class="otherContent_con_one_img" src="@/assets/YB_APP/images/40.png">
</p>
<p v-if="ggrlFlag == 0" class="otherContent_con_top_p">
<span style="color:#cf3d52;">未达标</span>
<img class="otherContent_con_one_img" src="@/assets/YB_APP/images/38.png">
</p>
@@ -78,7 +86,7 @@
<div class="otherContent_con_three" style="margin-left:2%;">
<div>
<p class="otherContent_con_top_p">
<span style="color:#e8bfa4;">连续6</span>
<span style="color:#e8bfa4;">连续{{gghymonth}}</span>
</p>
<p class="otherContent_con_bottom_p">
<span>桂冠会员</span>
@@ -104,7 +112,7 @@
<div class="channel_head_con_one">
<div>
<p class="channel_head_con_num">
<span class="channel_head_con_num_span">12</span>
<span class="channel_head_con_num_span">{{bankNetCount}}</span>
<span class="channel_head_con_num_span channel_head_con_num_span_unit"></span>
</p>
<p class="channel_head_con_mark">网点数量</p>
@@ -113,7 +121,7 @@
<div class="channel_head_con_two">
<div>
<p class="channel_head_con_num">
<span class="channel_head_con_num_span">90%</span>
<span class="channel_head_con_num_span">{{qjhdl}}%</span>
</p>
<p class="channel_head_con_mark">网点期交活动率</p>
</div>
@@ -126,22 +134,26 @@
<div :class="channelORnetworkType == 'channel'?'activeChannel':'unActiveChannel'" @click="changeChannelORnetworkType('channel')" >渠道业绩</div>
<div :class="channelORnetworkType == 'network'?'activeChannel':'unActiveChannel'" @click="changeChannelORnetworkType('network')">网点业绩</div>
</div>
<div class="channelORnetween_list_head_button_right">保费排序</div>
<div @click="changeSortType" class="channelORnetween_list_head_button_right" style="display:flex;align-items:center;">
<span style="margin-right:5px;">保费排序</span>
<img v-if="sortType == '1'" style="width:7px;height:14px;" src="@/assets/YB_APP/images/44.png">
<img v-if="sortType == '2'" style="width:7px;height:14px;" src="@/assets/YB_APP/images/45.png">
</div>
</div>
</div>
<div class="channelORnetween_list" >
<div v-for="(item,index) in echartsData" >
<div v-if="channelORnetworkData.length != 0" v-for="(item,index) in channelORnetworkData" >
<div class="channelORnetween_list_con">
<div class="channelORnetween_list_maincon">
<div class="channelORnetween_list_maincon_title">
<img class="channelORnetween_list_maincon_title_img" v-if="index == 0" src="@/assets/YB_APP/images/33.png">
<img class="channelORnetween_list_maincon_title_img" v-if="index != 0" src="@/assets/YB_APP/images/34.png">
<span class="channelORnetween_list_maincon_title_span">中国工商银行</span>
<img class="channelORnetween_list_maincon_title_img" :src="item.bankRoute">
<span class="channelORnetween_list_maincon_title_span">{{item.bankName}}</span>
</div>
<div class="channelORnetween_list_maincon_title_mark">
<span class="channelORnetween_list_maincon_title_mark_span">总保费</span>
<span class="channelORnetween_list_maincon_title_mark_money">200.0
<span class="channelORnetween_list_maincon_title_mark_money">
<span>{{item.sumprem}}</span>
<span class="markMoneyUnit">万元</span>
</span>
</div>
@@ -149,7 +161,7 @@
<div class="listInfoCon">
<div class="listInfoParts">
<p class="listInfoP">
<span class="listInfoP_spanOne">122.6</span>
<span class="listInfoP_spanOne">{{item.djprem}}</span>
<span class="listInfoP_spanTwo">万元</span>
</p>
<p class="listInfoMark">趸交保费</p>
@@ -157,7 +169,7 @@
</div>
<div class="listInfoParts">
<p class="listInfoP">
<span class="listInfoP_spanOne">66.5</span>
<span class="listInfoP_spanOne">{{item.ybqjprem}}</span>
<span class="listInfoP_spanTwo">万元</span>
</p>
<p class="listInfoMark">银保期交保费</p>
@@ -165,7 +177,7 @@
</div>
<div class="listInfoParts">
<p class="listInfoP">
<span class="listInfoP_spanOne">115.6</span>
<span class="listInfoP_spanOne">{{item.ctqjprem}}</span>
<span class="listInfoP_spanTwo">万元</span>
</p>
<p class="listInfoMark">传统期交保费</p>
@@ -173,6 +185,11 @@
</div>
</div>
</div>
<div v-if="channelORnetworkData.length == 0" style="display:flex;justify-content:center;align-items:center;height:400px;position:relative;">
<img style="width:60%" src="@/assets/YB_APP/images/43.png">
<span style="position:absolute;bottom:138px;left:calc(50% - 33px);">暂无业绩</span>
</div>
</div>
</div>
@@ -194,6 +211,8 @@
import { Button } from 'vant'
import utils from '@/assets/js/utils/date-utils'
import echarts from 'echarts'
import { getPremByAgentCode, getIndexByAgentCode, getBankNetDataYB, getChannelPerformanceYB, getBankNetPerformanceYB } from '@/api/YB_APP/index'
export default {
name: 'policyDetail',
components: {
@@ -201,8 +220,13 @@
},
data() {
return {
buttonType:'',
premType:'QJ',
qjrlFlag:'',
ggrlFlag:'',
gghymonth:'0',
bankNetCount:'0',
qjhdl:'0',
sortType:'1',
channelORnetworkType:'channel',
activeProductIndex:'',
calendarValue:'',
@@ -210,19 +234,12 @@
currentDate:new Date(),
minDate: new Date(2019, 1, 1),
maxDate: new Date(2030, 12, 31),
echartsData:[
{ value: 50, scale:'15.6%', name: '节节高',color:'#768dfe',thisId:'001',},
{ value: 30, scale:'9.3%', name: '鸿利两全' ,color:'#7784a2',thisId:'002',},
{ value: 50, scale:'15.6%', name: '福享年年' ,color:'#38cbcb',thisId:'003',},
{ value: 40, scale:'12.5%', name: '年年丰' ,color:'#a5e1fc',thisId:'004',},
{ value: 30, scale:'9.3%', name: '银销健' ,color:'#e8bfa4',thisId:'005',},
{ value: 70, scale:'21.8%', name: '银销个' ,color:'#fcd439',thisId:'006',},
{ value: 50, scale:'15.6%', name: '节节高B款' ,color:'#fc7d82',thisId:'007',},
],
echartsData:[],
channelORnetworkData:[],
incomeOption :{
color: ["#768dfe", "#7784a2", "#38cbcb", "#a5e1fc", "#e8bfa4",'#fcd439','#fc7d82'],
title: {
text: '200.0万元',
text: '',
subtext:'总保费',
x: "center",
y: "center",
@@ -288,34 +305,155 @@
labelLine: {
show: true
},
data: [
{ value: 50, scale:'15.6%', name: '节节高',color:'#768dfe',thisId:'001',},
{ value: 30, scale:'9.3%', name: '鸿利两全' ,color:'#7784a2',thisId:'002',},
{ value: 50, scale:'15.6%', name: '福享年年' ,color:'#38cbcb',thisId:'003',},
{ value: 40, scale:'12.5%', name: '年年丰' ,color:'#a5e1fc',thisId:'004',},
{ value: 30, scale:'9.3%', name: '银销健' ,color:'#e8bfa4',thisId:'005',},
{ value: 70, scale:'21.8%', name: '银销个' ,color:'#fcd439',thisId:'006',},
{ value: 50, scale:'15.6%', name: '节节高B款' ,color:'#fc7d82',thisId:'007',},
]
data: []
}
]
},
}
},
mounted(){
let yearNum = new Date().getFullYear()
let monthNum = new Date().getMonth()+1
this.calendarValue = yearNum+'-'+monthNum
this.incomeChart = echarts.init(this.$refs.incomeChart)
this.incomeChart.on('click',this.echartsClick)
this.incomeChart.setOption(this.incomeOption)
this.getPremByAgentCode()
this.getIndexByAgentCode()
},
methods:{
getPremByAgentCode(){
let params = {
"agentCode": "Y0000111",
currentMonth: this.calendarValue
}
getPremByAgentCode(params).then(res=>{
if(res.result == 0){
this.incomeOption.title.text = res.content.decimalAll + '万元'
if(res.content.premDTOList && res.content.premDTOList.length!=0){
this.echartsData = []
this.incomeOption.series[0].data = []
res.content.premDTOList.forEach(item=>{
this.echartsData.push({
value: item.allprem,
scale:item.percentage,
name: item.riskname,
thisId:item.riskcode
})
this.incomeOption.series[0].data.push({
value: item.allprem,
scale:item.percentage,
name: item.riskname,
thisId:item.riskcode
})
})
this.echartsData.forEach((item,index)=>{
item.color = this.incomeOption.color[index]
})
}else{
this.echartsData = []
this.incomeOption.series[0].data = []
}
this.incomeChart = echarts.init(this.$refs.incomeChart)
this.incomeChart.on('click',this.echartsClick)
this.incomeChart.setOption(this.incomeOption)
}else{
this.$toast(res.resultMessage)
}
})
},
getIndexByAgentCode(){
let params = {
"agentCode": "Y0000111",
currentMonth: this.calendarValue
}
getIndexByAgentCode(params).then(res=>{
if(res.result == 0){
this.qjrlFlag = res.content.qjrlFlag
this.ggrlFlag = res.content.ggrlFlag
this.gghymonth = res.content.gghymonth
if(!this.gghymonth){
this.gghymonth = 0
}
}else{
this.$toast(res.resultMessage)
}
})
},
getBankNetDataYB(){
let params = {
agentCode:"Y0000066",
currentMonth:this.calendarValue
}
getBankNetDataYB(params).then(res=>{
if(res.result == 0){
if(res.content.bankNetCount){this.bankNetCount = res.content.bankNetCount}
if(res.content.qjhdl){this.qjhdl = res.content.qjhdl}
}else{
this.$toast(res.resultMessage)
}
})
},
getChannelPerformanceYB(){
let params = {
agentCode:"Y0000064",
currentMonth:this.calendarValue,
}
if(this.sortType == 2){
params.isDesc = true
}else{
params.isAsc = true
}
getChannelPerformanceYB(params).then(res=>{
if(res.result == 0){
this.channelORnetworkData = []
if(res.content && res.content.length != 0){
this.channelORnetworkData = res.content
}
}else{
this.$toast(res.resultMessage)
}
})
},
getBankNetPerformanceYB(){
let params = {
agentCode:"Y0000064",
currentMonth:this.calendarValue
}
if(this.sortType == 2){
params.isDesc = true
}else{
params.isAsc = true
}
getBankNetPerformanceYB(params).then(res=>{
if(res.result == 0){
this.channelORnetworkData = []
if(res.content && res.content.length != 0){
this.channelORnetworkData = res.content
}
}else{
this.$toast(res.resultMessage)
}
})
},
changeSortType(){
if(this.sortType == 1){
this.sortType = 2
}else{
this.sortType = 1
}
if(this.channelORnetworkType == 'channel'){
this.getChannelPerformanceYB()
}else{
this.getBankNetPerformanceYB()
}
},
changeChannelORnetworkType(type){
if(this.channelORnetworkType != type){
this.channelORnetworkType = type
if(this.channelORnetworkType == 'channel'){
this.getChannelPerformanceYB()
}else{
this.getBankNetPerformanceYB()
}
}
},
parentsEvent(){
@@ -344,11 +482,15 @@
if(this.premType != type){
this.premType = type
if(this.premType == 'QJ'){
this.$nextTick(()=>{
this.incomeChart = echarts.init(this.$refs.incomeChart)
this.incomeChart.on('click',this.echartsClick)
this.incomeChart.setOption(this.incomeOption)
})
this.getPremByAgentCode()
this.getIndexByAgentCode()
}else{
this.getBankNetDataYB()
if(this.channelORnetworkType == 'channel'){
this.getChannelPerformanceYB()
}else{
this.getBankNetPerformanceYB()
}
}
}
},
@@ -600,10 +742,11 @@
display:flex;justify-content:space-between;align-items:center;
}
.channelORnetween_list_head_button_right{
color:#3749A9;background:#F7F7F7;padding:6px 10px;border-radius:20px;font-size:12px;font-weight:bold;
color:#3749A9;background:#F7F7F7;padding:6px 10px;border-radius:20px;font-size:12px;font-weight:bold;display:flex;justify-content:center;align-items:center;height:20px;
}
.channelORnetween_list{
width:calc(100% - 20px);margin:10px;
padding-bottom:10px;
}
.channelORnetween_list_con{
margin-bottom:15px;border:1px solid #eee;border-radius:8px;