个人业绩查询提测

This commit is contained in:
liyuetong
2021-06-02 17:28:49 +08:00
parent b3efdb64b0
commit b26c0cbdf5
2 changed files with 542 additions and 247 deletions

View File

@@ -20,7 +20,8 @@ export function getBaseAgentInfo(data) {
//获取信息
export function getPerformanceDetail(data) {
return request({
url: getUrl(`/agent/Performance/getPerformanceDetail`, 1),
url: getUrl(`/data/performance/getPerformanceDetail`, 1),
// url: getUrl(`/agent/Performance/getPerformanceDetail`, 1),
method: 'post',
data
})
@@ -48,4 +49,22 @@ export function getBaseAgentInfo(data) {
method: 'post',
data
})
}
}
//获取当前人机构
export function getBranchByUser(data) {
return request({
url: getUrl(`/data/branch/getBranchByUser`, 1),
method: 'post',
data
})
}
// 获取MIS全部机构 (分级)接口--因内勤多加一级,所以用这个接口
export function getMisBranchComList(data) {
return request({
url: getUrl('/data/performance/getMisBranchComList', 1),
method: 'post',
data
})
}

View File

@@ -2,7 +2,7 @@
<div v-cloak>
<div style="justify-content: space-between" class="border-gb mt20 header mh-auto van-cell:not(:last-child)::after h50 flex align-items-c">
<div style="flex-shrink: 0" class="flex align-items-c">
<van-button round @click="goDetail(order)" size="small" class="ml15" type="danger" v-no-more-click="1000">当月</van-button>
<van-button round @click="seceltCurrentMonth()" size="small" class="ml15" type="danger" v-no-more-click="1000">当月</van-button>
<div @click="timePopup" class="fs12 red ml15">
{{ titleTime }}
<img src="@/assets/images/u79.png" alt class="absolute mt2 ml5" />
@@ -33,19 +33,37 @@
</div>
</div>
<!-- 机构筛选 -->
<div class="classification">
<div class="classification" v-if="manageLv != '09'">
<span>机构名称: </span>
<span @click="toSelect('2')">
<span v-if="manageLv == '06'">
<span>{{ orgs[0].name }}</span>
<van-icon name="arrow" />
</span>
<span v-else-if="manageLv == '04' || manageLv == '05'" @click="isOrgLv2ConditionShow = true">
<span>{{ orgs[0].name }}</span>
<van-icon name="arrow-down" />
</span>
<template>
<span @click="toSelect('3')">
<span v-if="manageLv == '07'">
<span>{{ orgs[1].name }}</span>
<van-icon name="arrow" />
</span>
<span v-else-if="manageLv == '04' || manageLv == '05' || manageLv == '06'" @click="isOrgLv3ConditionShow = true">
<span>{{ orgs[1].name }}</span>
<van-icon name="arrow-down" />
</span>
<span @click="toSelect('4')">
<span v-if="manageLv == '08'">
<span>{{ orgs[2].name }}</span>
<van-icon name="arrow" />
</span>
<span v-else-if="manageLv == '04' || manageLv == '05' || manageLv == '06' || manageLv == '07'" @click="isOrgLv4ConditionShow = true">
<span>{{ orgs[2].name }}</span>
<van-icon name="arrow-down" />
</span>
<!-- 个人 -->
<span v-if="manageLv == '07' || manageLv == '08'" @click="isOrgLv5ConditionShow = true">
<span>{{ orgs[3].name }}</span>
<van-icon name="arrow-down" />
</span>
</template>
@@ -71,13 +89,13 @@
<div class="mt20">
<div class="h50 bg-white content mh-auto fs13 fw500">
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>{{orgs[orgLev].name}}佣金</div>
<div>{{ orgs[orgLev].name }}佣金</div>
<div class="red">{{ cbbb }}</div>
</div>
</div>
<div class="h50 bg-white content mh-auto fs13 fw500 mt5">
<div class="h50 bg-white content mh-auto fs13 fw500 mt5" v-if="manageLv != '09' && orgLev != '3'">
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>{{orgs[orgLev].name}}合格人力</div>
<div>{{ orgs[orgLev].name }}合格人力</div>
<div class="red">{{ cbjs }}</div>
</div>
</div>
@@ -93,21 +111,23 @@
<div class="red">{{zcbf}}</div>
</div>
</div>-->
<div v-if="isShow">
<!-- <div v-if="isShow"> -->
<div>
<div class="h50 bg-white content mh-auto fs13 fw500 mt5">
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收标保</div>
<div class="red">{{ ysbb }}</div>
<div>本月{{ filterStatusName }}标保</div>
<div v-if="filterStatus == 1" class="red">{{ ysbb }}</div>
<div v-else-if="filterStatus == 2" class="red">{{ cbbb }}</div>
</div>
</div>
<div class="h50 bg-white content mh-auto fs13 fw500 mt5">
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收件数</div>
<div class="red">{{ ysjs }}</div>
<div>本月{{ filterStatusName }}件数</div>
<div v-if="filterStatus == 1" class="red">{{ ysjs }}</div>
<div v-else-if="filterStatus == 2" class="red">{{ cbjs }}</div>
</div>
</div>
</div>
<!-- <div class="h50 bg-white content mh-auto fs13 fw500 mt5" v-if="isShow">
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收FYC</div>
@@ -115,13 +135,33 @@
</div>
</div>-->
</div>
<div>
<!-- <div>
<div class="h40 bg-red absolute bottom0 footer text-center fs13 fw500 white" v-if="mask1" @click="checkTeam(obj)">
{{ footerText }}
</div>
</div>
<!-- 字段选择 -->
<van-popup v-model="popupShow" position="bottom"><van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" /></van-popup>
</div> -->
<!--预收\承保 -->
<van-popup v-model="popupShow" position="bottom">
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
</van-popup>
<!-- 二级机构筛选栏 -->
<van-popup v-model="isOrgLv2ConditionShow" position="bottom" :style="{ height: '40vh' }">
<van-picker show-toolbar :columns="province" @confirm="onOrgLv2ConditionConfirm" @cancel="isOrgLv2ConditionShow = false" />
</van-popup>
<!-- 三级机构筛选栏 -->
<van-popup v-model="isOrgLv3ConditionShow" position="bottom" :style="{ height: '40vh' }">
<van-picker show-toolbar :columns="city" @confirm="onOrgLv3ConditionConfirm" @cancel="isOrgLv3ConditionShow = false" />
</van-popup>
<!-- 四级机构筛选栏 -->
<van-popup v-model="isOrgLv4ConditionShow" position="bottom" :style="{ height: '40vh' }">
<van-picker show-toolbar :columns="area" @confirm="onOrgLv4ConditionConfirm" @cancel="isOrgLv4ConditionShow = false" />
</van-popup>
<!-- 五级机构筛选--个人 -->
<van-popup v-model="isOrgLv5ConditionShow" position="bottom" :style="{ height: '40vh' }">
<van-picker show-toolbar :columns="personal" @confirm="onOrgLv5ConditionConfirm" @cancel="isOrgLv5ConditionShow = false" />
</van-popup>
<!-- 筛选年月日 -->
<van-popup v-model="dateShow" position="bottom">
<van-datetime-picker
@@ -137,62 +177,119 @@
</div>
</template>
<script>
import { getBaseAgentInfo, getPerformanceHeader, getPerformanceDetail, getHeader } from '@/api/ebiz/performance/performance'
import { getBaseAgentInfo, getPerformanceDetail, getBranchByUser, getMisBranchComList } from '@/api/ebiz/performance/performance'
import utils from '@/assets/js/utils/date-utils'
import { Popup, DatetimePicker, Button } from 'vant'
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
import { getOrgList } from '@/api/ebiz/branchOffice/branchOffice'
let statuss = [
{
id: 1,
text: '预收状态',
text: '预收状态'
},
{
id: 2,
text: '承保状态',
},
text: '承保状态'
}
]
export default {
name: 'performance',
components: {
[Popup.name]: Popup,
[DatetimePicker.name]: DatetimePicker,
FieldDatePicter,
FieldDatePicter
},
computed: {
province() {
const name = []
this.OrgLv2s.forEach(item => {
name.push(item.name)
})
return name
},
city() {
const city = ['全部']
this.OrgLv3s.forEach(item => {
if (item.upBranchCode === this.orgs[0].code) {
city.push(item.name)
}
})
return city
},
area() {
const area = ['全部']
this.OrgLv4s.forEach(item => {
if (item.upBranchCode === this.orgs[1].code) {
area.push(item.name)
}
})
return area
},
personal() {
const personal = ['全部']
this.OrgLv5s.forEach(item => {
// if (item.upBranchCode === this.orgs[2].code) {
personal.push(item.name)
// }
})
return personal
}
},
data() {
return {
popupShow: false,//字段选择框
columns: [],//字段选择list
pickType: '',//toSelect选择值
filterStatus: 1,//保单状态 1为预收状态 2 承保状态
orgLev:0,//当前选择的机构等级
orgs: [//机构分级
manageLv: 1, //当前人机构等级
popupShow: false, //字段选择
// 二级机构筛选是否显示--区
isOrgLv2ConditionShow: false,
// 三级机构筛选是否显示--部
isOrgLv3ConditionShow: false,
// 四级机构筛选是否显示--组
isOrgLv4ConditionShow: false,
// 四级机构筛选是否显示--个人
isOrgLv5ConditionShow: false,
OrgLv2s: [],
OrgLv3s: [],
OrgLv4s: [],
OrgLv5s: [],
columns: [], //字段选择list
pickType: '', //toSelect选择值 todo
filterStatus: 1, //保单状态 1为预收状态 2 承保状态
filterStatusName: '预收', //保单状态name值
orgLev: 0, //当前选择的机构等级
orgs: [
//机构分级
{
name: '全部',
code: '',
inCode: ''
},
{
name: '全部',
code: '',
inCode: ''
},
{
name: '全部',
code: '',
inCode: ''
},
{
name: '全部',
code: '',
inCode: ''
}
],
orgsColumns: [],
currentDate: new Date(),
dateShow: false,
minDate: new Date(2020, 0, 1),
maxDate: new Date(),
titleTime: '',
date1: {
date: '2020-07-01',
date: '2020-07-01'
},
agentGrade: '',
isShow: true,
obj: {},
agentCode: '',
// agentGrade: '',
// isShow: true,
// obj: {},
// agentCode: '',
cbbb: '',
cbjs: '',
ysjs: '',
@@ -200,156 +297,329 @@ export default {
zcbf: '0.00',
ysbb: '',
yfyc: '0.00',
timeCode: '',
mask: '',
headerList: [],
unitName: '',
Name: '',
code: '',
isShowImg: true,
buName: '',
mask1: false,
footerText: '',
timeCode: ''
// mask: '',
// headerList: [],
// unitName: '',
// Name: '',
// code: '',
// isShowImg: true,
// buName: '',
// mask1: false,
// footerText: ''
}
},
filters: {
filterStatusMethod(val) {
let str = ''
statuss.filter((item) => {
statuss.filter(item => {
if (val == item.id) {
str = item.text
}
})
return str
},
}
},
created() {
if (this.mask == '1') {
this.getPerformanceDetailC()
}
this.formatDate1()
this.getBaseAgentInfo1()
if (this.code !== '') {
this.getHeader1()
}
getOrgList({
bussinessType: 'normal',
manageCode: '',
manageLv: '',
}).then((res) => {
// this.orgsColumns.push(...res.content)
this.orgs[0] = res.content[0]
})
// this.getBaseAgentInfo1()
// if (this.code !== '') {
// this.getHeader1()
// }
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', {
btns: [
{
title: '考勤记录',
title_color: 'FF0000',
},
],
title_color: 'FF0000'
}
]
})
}, 1000)
},
mounted() {
window.appCallBack = this.appCallBack
this.initData()
},
methods: {
async initData() {
//获取当前人机构等级
let resData = await getBranchByUser({})
if (resData.result != '0') return this.$toast(resData.resultMessage)
this.manageLv = resData.content.level
// 1、如果内勤四级和五级查看出单详情选择机构名称时可以选择内勤所辖区可能存在一个或者多个
// 2、如果外勤组长及以上查看出单详情选择机构名称时区只有一个。
//内勤level 04,05时 服务机构 外勤level 06,07,08时 区
if (this.manageLv == '04' || this.manageLv == '05') {
const res = await getMisBranchComList({
bussinessType: 'normal',
manageCode: resData.content.code,
manageLv: resData.content.level
})
if (res.result === '0') {
this.OrgLv2s.push(...res.content)
this.orgs[0].name = this.OrgLv2s[0].name
this.orgs[0].code = this.OrgLv2s[0].code
this.orgs[0].inCode = this.OrgLv2s[0].inCode
this.orgLev = 0
this.onOrgLv2ConditionConfirm(this.orgs[0].name, 'false')
} else {
this.$toast(res.resultMessage)
}
} else if (this.manageLv == '06') {
// 区
this.orgs[0].name = resData.content.name
this.orgs[0].code = resData.content.code
this.orgs[0].inCode = resData.content.inCode
this.orgLev = 0
this.onOrgLv2ConditionConfirm(this.orgs[0].name, 'false')
} else if (this.manageLv == '07') {
//部
this.orgs[0].name = resData.content.distName
this.orgs[0].code = resData.content.distCode
this.orgs[1].name = resData.content.name
this.orgs[1].code = resData.content.code
this.orgs[1].inCode = resData.content.inCode
this.orgLev = 1
this.onOrgLv3ConditionConfirm(this.orgs[1].name, 'false')
} else if (this.manageLv == '08') {
//组
this.orgs[0].name = resData.content.distName
this.orgs[0].code = resData.content.distCode
this.orgs[1].name = resData.content.depName
this.orgs[1].code = resData.content.depCode
this.orgs[2].name = resData.content.name
this.orgs[2].code = resData.content.code
this.orgs[2].inCode = resData.content.inCode
this.orgLev = 2
this.onOrgLv4ConditionConfirm(this.orgs[2].name, 'false')
} else if (this.manageLv == '09') {
this.orgs[3].name = resData.content.name
this.orgs[3].code = resData.content.code
this.orgs[3].inCode = resData.content.code
this.orgLev = 3
}
this.getPerformanceDetailC()
},
// 筛选二级机构-区
async onOrgLv2ConditionConfirm(data, status) {
this.isOrgLv2ConditionShow = false
let OrgLv2 = this.OrgLv2s.find(item => item.name === data)
if (OrgLv2) {
this.orgs[0].code = OrgLv2.code
this.orgs[0].inCode = OrgLv2.inCode
this.orgLev = 0
// this.params.manageCode = this.OrgLv2Code
// this.params.manageLv = '02'
}
this.orgs[0].name = data
this.orgs[1].name = '全部'
this.orgs[1].code = ''
this.orgs[1].inCode = ''
this.orgs[2].name = '全部'
this.orgs[2].code = ''
this.orgs[2].inCode = ''
if (status != 'false') {
this.getPerformanceDetailC()
}
// 查询三级机构
const res = await getMisBranchComList({
bussinessType: 'normal',
manageCode: this.orgs[0].code,
manageLv: '06'
})
this.OrgLv3s.splice(0)
this.OrgLv3s.push(...res.content)
console.log(this.OrgLv3s, 'OrgLv3s')
},
// 筛选三级机构-部
async onOrgLv3ConditionConfirm(data, status) {
this.isOrgLv3ConditionShow = false
this.orgs[1].name = data
let OrgLv3 = this.OrgLv3s.find(item => item.name === data)
if (OrgLv3) {
this.orgs[1].code = OrgLv3.code
this.orgs[1].inCode = OrgLv3.inCode
this.orgLev = 1
// this.params.manageCode = this.OrgLv3Code
// this.params.manageLv = '03'
}
if (data === '全部') {
// this.params.manageCode = this.OrgLv2Code
// this.params.manageLv = '02'
this.orgs[1].code = ''
this.orgs[1].inCode = ''
}
this.orgs[2].code = ''
this.orgs[2].inCode = ''
this.orgs[2].name = '全部'
if (status != 'false') {
this.getPerformanceDetailC()
}
// 查询四级机构
const res = await getMisBranchComList({
bussinessType: 'normal',
manageCode: this.orgs[1].code,
manageLv: '07'
})
this.OrgLv4s.splice(0)
this.OrgLv4s.push(...res.content)
},
// 筛选四级机构-组
async onOrgLv4ConditionConfirm(data, status) {
this.isOrgLv4ConditionShow = false
this.orgs[2].name = data
let area = this.OrgLv4s.find(item => item.name === data)
if (area) {
this.orgs[2].code = area.code
this.orgs[2].inCode = area.inCode
this.orgLev = 2
// this.params.manageCode = this.OrgLv4Code
// this.params.manageLv = '04'
}
if (data === '全部') {
// this.params.manageCode = this.OrgLv3Code
// this.params.manageLv = '03'
this.orgs[2].code = ''
this.orgs[2].inCode = ''
}
if (status != 'false') {
this.getPerformanceDetailC()
}
if (this.manageLv == '07' || this.manageLv == '08') {
// 查询五级机构--个人
const res = await getMisBranchComList({
bussinessType: 'normal',
manageCode: this.orgs[2].code,
inCode: this.orgs[2].inCode,
manageLv: '08'
})
this.OrgLv5s.splice(0)
this.OrgLv5s.push(...res.content)
}
},
// 筛选五级机构-个人
async onOrgLv5ConditionConfirm(data) {
this.isOrgLv5ConditionShow = false
this.orgs[3].name = data
let personal = this.OrgLv5s.find(item => item.name === data)
if (personal) {
this.orgs[3].code = personal.code
this.orgs[3].inCode = personal.inCode
this.orgLev = 3
// this.params.manageCode = this.OrgLv4Code
// this.params.manageLv = '04'
}
if (data === '全部') {
// this.params.manageCode = this.OrgLv3Code
// this.params.manageLv = '03'
this.orgs[3].code = ''
this.orgs[3].inCode = ''
}
this.getPerformanceDetailC()
},
//选择当月时间
seceltCurrentMonth() {
this.titleTime = utils.formatDate(new Date(), 'yyyy-MM')
// this.timeCode = utils.formatDate(this.currentDate, 'yyyy-MM-dd')
this.timeCode = this.timeCode = this.titleTime + '-01'
this.getPerformanceDetailC()
},
//下面蒙层机构名称点击确认
onConfirm(value) {
switch (this.pickType) {
case '1':
this.filterStatus = value.id
this.filterStatusName = value.id == '1' ? '预收' : '承保'
break
case '2':
this.orgLev = 0;
this.orgs[0].code = value.id
this.orgs[0].name = value.text
this.orgs[1].code = ''
this.orgs[1].name = '全部'
this.orgs[2].code = ''
this.orgs[2].name = '全部'
break
case '3':
this.orgLev = 1;
this.orgs[1].code = value.id
this.orgs[1].name = value.text
this.orgs[2].code = ''
this.orgs[2].name = '全部'
break
case '4':
this.orgLev = 2;
this.orgs[2].code = value.id
this.orgs[2].name = value.text
break
// case '2':
// this.orgLev = 0
// this.orgs[0].code = value.id
// this.orgs[0].name = value.text
// this.orgs[1].code = ''
// this.orgs[1].name = '全部'
// this.orgs[2].code = ''
// this.orgs[2].name = '全部'
// break
// case '3':
// this.orgLev = 1
// this.orgs[1].code = value.id
// this.orgs[1].name = value.text
// this.orgs[2].code = ''
// this.orgs[2].name = '全部'
// break
// case '4':
// this.orgLev = 2
// this.orgs[2].code = value.id
// this.orgs[2].name = value.text
// break
}
this.popupShow = false
},
//机构名称--点击时渲染下面蒙层的枚举值
async toSelect(pickType) {
let res = {};
this.columns = [];
console.log(pickType)
this.columns = []
switch (pickType) {
case '1':
this.columns = statuss
break
case '2':
res = await getOrgList({
bussinessType: 'normal',
manageCode: '',
manageLv: '',
})
if (res.result == 0) {
res.content.forEach((item) => {
console.log(item)
this.columns.push({
id: item.code,
text: item.name,
})
})
// this.columns = this.orgsColumns
} else {
return this.$toast(res.resultMessage)
}
break
case '3':
if (!this.orgs[0].code) return this.$toast('请先选择上一级机构')
res = await getOrgList({
bussinessType: 'normal',
manageCode: this.orgs[0].code,
manageLv: '02',
})
if (res.result == 0) {
res.content.forEach((item) => {
console.log(item)
this.columns.push({
id: item.code,
text: item.name,
})
})
} else {
return this.$toast(res.resultMessage)
}
break
case '4':
if (!this.orgs[1].code) return this.$toast('请先选择上一级机构')
res = await getOrgList({
bussinessType: 'normal',
manageCode: this.orgs[1].code,
manageLv: '03',
})
if (res.result == 0) {
res.content.forEach((item) => {
console.log(item)
this.columns.push({
id: item.code,
text: item.name,
})
})
} else {
return this.$toast(res.resultMessage)
}
break
// case '2':
// res = await getMisBranchComList({
// bussinessType: 'normal',
// manageCode: '',
// manageLv: ''
// })
// if (res.result == 0) {
// res.content.forEach(item => {
// console.log(item)
// this.columns.push({
// id: item.code,
// text: item.name
// })
// })
// } else {
// return this.$toast(res.resultMessage)
// }
// break
// case '3':
// if (!this.orgs[0].code) return this.$toast('请先选择上一级机构')
// res = await getMisBranchComList({
// bussinessType: 'normal',
// manageCode: this.orgs[0].code,
// manageLv: '02'
// })
// if (res.result == 0) {
// res.content.forEach(item => {
// console.log(item)
// this.columns.push({
// id: item.code,
// text: item.name
// })
// })
// } else {
// return this.$toast(res.resultMessage)
// }
// break
// case '4':
// if (!this.orgs[1].code) return this.$toast('请先选择上一级机构')
// res = await getMisBranchComList({
// bussinessType: 'normal',
// manageCode: this.orgs[1].code,
// manageLv: '03'
// })
// if (res.result == 0) {
// res.content.forEach(item => {
// console.log(item)
// this.columns.push({
// id: item.code,
// text: item.name
// })
// })
// } else {
// return this.$toast(res.resultMessage)
// }
// break
}
;[this.pickType, this.popupShow] = [pickType, true]
},
@@ -358,16 +628,16 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/attendance/Attendance`,
url: location.origin + `/#/attendance/Attendance`
},
routerInfo: {
path: `/attendance/Attendance`,
},
path: `/attendance/Attendance`
}
})
}
if (data.trigger == 'left_button_click') {
this.$jump({
flag: 'home',
flag: 'home'
})
}
},
@@ -377,78 +647,85 @@ export default {
handleCancel() {
this.dateShow = false
},
//开始时间
//点击筛选年月日--点击确认
handleEndDateConfirm(e) {
this.dateShow = false
this.titleTime = utils.formatDate(e, 'yyyy-MM')
this.timeCode = utils.formatDate(e, 'yyyy-MM-dd')
this.obj.date = this.timeCode
// this.timeCode = utils.formatDate(e, 'yyyy-MM-dd')
this.timeCode = this.timeCode = this.titleTime + '-01'
// this.obj.date = this.timeCode
this.getPerformanceDetailC()
if (String(this.titleTime) === String(utils.formatDate(new Date(), 'yyyy-MM'))) {
this.isShow = true
} else {
this.isShow = false
}
// if (String(this.titleTime) === String(utils.formatDate(new Date(), 'yyyy-MM'))) {
// this.isShow = true
// } else {
// this.isShow = false
// }
},
formatDate1() {
// console.log(utils.formatDate("2020-1-1"))
// 已和需求兴雨确认了,入口只有一个
if (this.$route.params.parmas !== undefined) {
;(this.titleTime = JSON.parse(this.$route.params.parmas).date.slice(0, 7)), (this.timeCode = JSON.parse(this.$route.params.parmas).date)
} else {
this.titleTime = utils.formatDate(this.currentDate, 'yyyy-MM')
this.timeCode = utils.formatDate(this.currentDate, 'yyyy-MM-dd')
// this.timeCode = utils.formatDate(this.currentDate, 'yyyy-MM-dd')
this.timeCode = this.titleTime + '-01'
}
this.obj.date = this.timeCode
// console.log(this.titleTime)
// this.obj.date = this.timeCode
},
checkTeam(obj) {
console.log(obj)
localStorage.obj = JSON.stringify(this.obj)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/performance/PerformanceList`,
},
routerInfo: {
path: `/performance/PerformanceList`,
},
})
},
//获取代理人关系
getBaseAgentInfo1() {
let date = {}
getBaseAgentInfo(date).then((res) => {
console.log(res)
//个人业绩查询列表接口
getPerformanceDetailC() {
//个人查询 都拿code字段 区部组 拿incode字段
let data = {
date: this.timeCode,
areaCode: this.orgs[0].inCode,
deptCode: this.orgs[1].inCode,
groupCode: this.orgs[2].inCode,
agentCode: this.orgs[3].code
}
getPerformanceDetail(data).then(res => {
if (res.result == 0) {
;(this.agentGrade = res.agentGrade), (this.unitName = res.unitName), (this.saleArea = res.saleArea)
if (window.localStorage.getItem('parmas2') == null) {
this.agentCode = res.jobNo
} else {
this.agentCode = JSON.parse(window.localStorage.getItem('parmas2')).agentCode
}
;(this.obj.agentGrade = this.agentGrade),
(this.obj.agentCode = this.agentCode),
(this.branchCode = res.branchCode),
(this.deptCode = res.deptCode),
(this.areaCode = res.areaCode)
if (this.agentGrade.slice(0, 2) == 'A1') {
this.mask1 = false
this.footerText = ''
} else if (this.agentGrade.slice(0, 2) == 'A2') {
this.mask1 = true
this.footerText = '查看团队业绩'
;(this.obj.unitName = this.unitName), (this.obj.code = this.branchCode)
} else if (this.agentGrade.slice(0, 2) == 'A3') {
this.mask1 = true
this.footerText = '查看团队业绩'
;(this.obj.unitName = this.saleArea), (this.obj.code = this.deptCode)
} else if (this.agentGrade.slice(0, 2) == 'A4') {
}
this.getPerformanceDetailC()
;(this.cbbb = res.content.list[0].cbbb),
(this.cbjs = res.content.list[0].cbjs),
(this.ysjs = res.content.list[0].ysjs),
(this.ysbb = res.content.list[0].ysbb)
}
})
},
}
//获取代理人关系
// getBaseAgentInfo1() {
// let date = {}
// getBaseAgentInfo(date).then(res => {
// console.log(res)
// if (res.result == 0) {
// ;(this.agentGrade = res.agentGrade), (this.unitName = res.unitName), (this.saleArea = res.saleArea)
// if (window.localStorage.getItem('parmas2') == null) {
// this.agentCode = res.jobNo
// } else {
// this.agentCode = JSON.parse(window.localStorage.getItem('parmas2')).agentCode
// }
// ;(this.obj.agentGrade = this.agentGrade),
// (this.obj.agentCode = this.agentCode),
// (this.branchCode = res.branchCode),
// (this.deptCode = res.deptCode),
// (this.areaCode = res.areaCode)
// if (this.agentGrade.slice(0, 2) == 'A1') {
// this.mask1 = false
// this.footerText = ''
// } else if (this.agentGrade.slice(0, 2) == 'A2') {
// this.mask1 = true
// this.footerText = '查看团队业绩'
// ;(this.obj.unitName = this.unitName), (this.obj.code = this.branchCode)
// } else if (this.agentGrade.slice(0, 2) == 'A3') {
// this.mask1 = true
// this.footerText = '查看团队业绩'
// ;(this.obj.unitName = this.saleArea), (this.obj.code = this.deptCode)
// } else if (this.agentGrade.slice(0, 2) == 'A4') {
// }
// this.getPerformanceDetailC()
// }
// })
// },
// //获取代理人下级头像
// getPerformanceHeader1() {
// let date = {}
@@ -462,47 +739,42 @@ export default {
// }
// })
// },
getHeader1() {
console.log(1111)
let code = {
agentgroup: this.code,
}
getHeader(code).then((res) => {
console.log(res)
if (res.result == 0) {
for (let i = 0; i < res.content.length; i++) {
res.content[i].isShowImg = true
res.content[0].isShowImg = false
}
this.headerList = res.content
}
})
},
//获取代理人相关信息
getPerformanceDetailC() {
// console.log(this.agentCode)
let code = {
date: this.timeCode,
agentCode: this.agentCode,
}
getPerformanceDetail(code).then((res) => {
console.log(res)
if (res.result == 0) {
;(this.cbbb = res.content.list[0].cbbb),
(this.cbjs = res.content.list[0].cbjs),
(this.ysjs = res.content.list[0].ysjs),
(this.ysbb = res.content.list[0].ysbb),
(this.agentCode = res.content.list[0].code)
}
})
},
// getHeader1() {
// console.log(1111)
// let code = {
// agentgroup: this.code
// }
// getHeader(code).then(res => {
// console.log(res)
// if (res.result == 0) {
// for (let i = 0; i < res.content.length; i++) {
// res.content[i].isShowImg = true
// res.content[0].isShowImg = false
// }
// this.headerList = res.content
// }
// })
// },
// checkTeam(obj) {
// console.log(obj)
// localStorage.obj = JSON.stringify(this.obj)
// this.$jump({
// flag: 'h5',
// extra: {
// url: location.origin + `/#/performance/PerformanceList`
// },
// routerInfo: {
// path: `/performance/PerformanceList`
// }
// })
// },
},
destroyed: function () {
destroyed: function() {
console.log('我已经离开了!')
window.localStorage.removeItem('parmas1')
window.localStorage.removeItem('parmas2')
window.localStorage.removeItem('obj1')
},
}
}
</script>
<style lang="scss" scoped>
@@ -510,6 +782,10 @@ export default {
margin-left: 30px;
border-radius: 10px;
overflow: hidden;
/deep/.van-cell {
font-size: 12px;
padding: 1.66667vw 3.26667vw;
}
}
.classification {
font-size: 14px;
@@ -562,4 +838,4 @@ export default {
border-radius: 20px;
position: absolute;
}
</style>
</style>