mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 06:26:44 +08:00
【关于开设金掌桂内勤权限的需求申请】--外勤普通代理人:区长、部长、组长--桂冠排名
This commit is contained in:
@@ -149,6 +149,15 @@ export function queryLaureMemberList(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 会员名单--桂冠排名
|
||||
export function queryAllLaureList(data) {
|
||||
return request({
|
||||
url: getUrl('/agent/laure/queryAllLaureList', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前登录人机构信息
|
||||
export function getBranchByUser(data) {
|
||||
return request({
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="sale-list-container box">
|
||||
<img class="backImg" src="@/assets/images/laurelClub/background.png" alt="" />
|
||||
<!-- 内勤 1 外勤 0(区部组) -->
|
||||
<div class="fs12 bntTab" v-if="branchType == '0'">
|
||||
<!-- <div class="fs12 bntTab" v-if="branchType == '0'">
|
||||
<span :class="[active == 'GGrade' ? 'tabLeft mr2' : 'unTabLeft mr2']" @click="tabChange('GGrade')">{{ prevDate }}月桂冠名单</span>
|
||||
<span :class="[active == 'SGrade' ? 'tabMiddle mr2' : 'unTabMiddle mr2']" @click="tabChange('SGrade')">{{ prevDate }}月双冠名单</span>
|
||||
<span :class="[active == 'Team' ? 'tabRight' : 'unTabRight']" @click="tabChange('Team')">我的团队</span>
|
||||
@@ -10,44 +10,88 @@
|
||||
<div class="fs12 bntTab" v-else-if="branchType == '1'">
|
||||
<span :class="[active == 'GGrade' ? 'tabLeft mr2' : 'unTabLeft mr2']" @click="tabChange('GGrade')">{{ prevDate }}月桂冠名单</span>
|
||||
<span :class="[active == 'SGrade' ? 'tabRight mr2' : 'unTabRight mr2']" @click="tabChange('SGrade')">{{ prevDate }}月双冠名单</span>
|
||||
</div> -->
|
||||
<div class="fs12 bntTab" v-if="manageLv == '09' || manageLv == null">
|
||||
<span class="tab">{{ prevDate }}月桂冠排名</span>
|
||||
</div>
|
||||
<div class="fs12 bntTab" v-else-if="manageLv == '04' || manageLv == '05'">
|
||||
<span class="tab">{{ prevDate }}月团队数据</span>
|
||||
</div>
|
||||
<div class="fs12 bntTab" v-else-if="manageLv == '06' || manageLv == '07' || manageLv == '08'">
|
||||
<span :class="[active == 'GGrade' ? 'tabLeft mr2' : 'unTabLeft mr2']" @click="tabChange('GGrade')">{{ prevDate }}月桂冠排名</span>
|
||||
<span :class="[active == 'Team' ? 'tabRight mr2' : 'unTabRight mr2']" @click="tabChange('Team')">{{ prevDate }}月团队数据</span>
|
||||
</div>
|
||||
<div class="fs12 mt20 mr20 bntCheck" v-if="active == 'Team'">
|
||||
<span :class="[plainStatus == 'GGrade' ? 'checkedLeft mr2' : 'unCheckedLeft mr2']" @click="approvalRecordSwitch('GGrade')">桂冠</span>
|
||||
<span :class="[plainStatus == 'SGrade' ? 'checkedRight' : 'unCheckedRight']" @click="approvalRecordSwitch('SGrade')">双冠</span>
|
||||
</div>
|
||||
<div class="section" v-if="isSuccess">
|
||||
<div class="section pb15" v-if="isSuccess">
|
||||
<div v-if="list.length > 0">
|
||||
<div>
|
||||
<div class="pv15 pr15 pl15 mt15">
|
||||
<van-collapse v-model="activeNames" :border="false" @change="collapseChange">
|
||||
<van-collapse-item :class="[item.status == '0' ? 'mb20' : 'mb45']" :name="index" v-for="(item, index) in list" :key="index" :border="false">
|
||||
<template #title>
|
||||
<!-- 会员等级 01-正式会员 02-铜牌会员 03-银牌会员 04-金牌会员 05-白金会员 06-终身会员 -->
|
||||
<img v-if="item.level == '01'" class="iconGrade" src="@/assets/images/laurelClub/grade01.png" alt="" />
|
||||
<img v-else-if="item.level == '02'" class="iconGrade" src="@/assets/images/laurelClub/grade02.png" alt="" />
|
||||
<img v-else-if="item.level == '03'" class="iconGrade" src="@/assets/images/laurelClub/grade03.png" alt="" />
|
||||
<img v-else-if="item.level == '04'" class="iconGrade" src="@/assets/images/laurelClub/grade04.png" alt="" />
|
||||
<img v-else-if="item.level == '05'" class="iconGrade" src="@/assets/images/laurelClub/grade05.png" alt="" />
|
||||
<img v-else-if="item.level == '06'" class="iconGrade" src="@/assets/images/laurelClub/grade06.png" alt="" />
|
||||
<span class="ml20 mr10 fwb w80 inline-b v-middle" style="word-break: break-all">{{ item.level | statusFormat }}</span>
|
||||
<span class="ml100 fwb">{{ item.count }}人</span>
|
||||
</template>
|
||||
<div class="pb10 pt10 border-tb" v-for="(item01, index01) in item.queryLaureMemberList" :key="index01">
|
||||
<img class="iconGrade mr30" :src="item01.agentHeadImgUrl" alt="" />
|
||||
<div class="w100 inline-b v-middle">
|
||||
{{ item01.managerComName }}<br />
|
||||
{{ item01.name }}
|
||||
</div>
|
||||
<span class="fs14 c-gray-dark ml80">{{ item01.crownLevel }}冠</span>
|
||||
<div class="pv15 pr15 pl15 mt15" v-if="active == 'Team'">
|
||||
<van-collapse v-model="activeNames" :border="false" @change="collapseChange">
|
||||
<van-collapse-item :class="[item.status == '0' ? 'mb20' : 'mb45']" :name="index" v-for="(item, index) in list" :key="index" :border="false">
|
||||
<template #title>
|
||||
<!-- 会员等级 01-正式会员 02-铜牌会员 03-银牌会员 04-金牌会员 05-白金会员 06-终身会员 -->
|
||||
<img v-if="item.level == '01'" class="iconGrade" src="@/assets/images/laurelClub/grade01.png" alt="" />
|
||||
<img v-else-if="item.level == '02'" class="iconGrade" src="@/assets/images/laurelClub/grade02.png" alt="" />
|
||||
<img v-else-if="item.level == '03'" class="iconGrade" src="@/assets/images/laurelClub/grade03.png" alt="" />
|
||||
<img v-else-if="item.level == '04'" class="iconGrade" src="@/assets/images/laurelClub/grade04.png" alt="" />
|
||||
<img v-else-if="item.level == '05'" class="iconGrade" src="@/assets/images/laurelClub/grade05.png" alt="" />
|
||||
<img v-else-if="item.level == '06'" class="iconGrade" src="@/assets/images/laurelClub/grade06.png" alt="" />
|
||||
<span class="ml20 mr10 fwb w80 inline-b v-middle" style="word-break: break-all">{{ item.level | statusFormat }}</span>
|
||||
<span class="ml100 fwb">{{ item.count }}人</span>
|
||||
</template>
|
||||
<div class="pb10 pt10 border-tb" v-for="(item01, index01) in item.queryLaureMemberList" :key="index01">
|
||||
<img class="iconGrade mr30" :src="item01.agentHeadImgUrl" alt="" />
|
||||
<div class="w100 inline-b v-middle">
|
||||
{{ item01.managerComName }}<br />
|
||||
{{ item01.name }}
|
||||
</div>
|
||||
<div v-if="item.status == '1'" @click="putAwayFunc(index)" class="m-bottom white">
|
||||
收起<img class="w20 h20" src="@/assets/images/laurelClub/putAway.png" alt="" />
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</div>
|
||||
<span class="fs14 c-gray-dark ml80">{{ item01.crownLevel }}冠</span>
|
||||
</div>
|
||||
<div v-if="item.status == '1'" @click="putAwayFunc(index)" class="m-bottom white">
|
||||
收起<img class="w20 h20" src="@/assets/images/laurelClub/putAway.png" alt="" />
|
||||
</div>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-laurel pv15 pr15 pl15 ml15 mr15 mt15" v-if="active == 'GGrade'">
|
||||
<div class="fwb">
|
||||
<div class="ui-group">
|
||||
<span>全系统目前最高桂冠冠级</span>
|
||||
<span>{{laureList.maxGGradeLevel}} 冠</span>
|
||||
</div>
|
||||
<div class="ui-group">
|
||||
<span>我当前桂冠冠级</span>
|
||||
<span>{{laureList.selfGGradeLevel}} 冠</span>
|
||||
</div>
|
||||
<div class="ui-group">
|
||||
<span>当前桂冠冠级排名</span>
|
||||
<span>第 {{laureList.selfGGradeRank}} 名</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-divider />
|
||||
<div class="fwb mb10">
|
||||
全系统桂冠情况
|
||||
</div>
|
||||
<div class="ui-group" v-for="(item, index) in laureList.ggradeList" :key="index">
|
||||
<span v-if="item.level == '03'">银牌会员</span>
|
||||
<span v-if="item.level == '02'">铜牌会员</span>
|
||||
<span v-if="item.level == '01'">正式会员</span>
|
||||
<span class="fwb">{{item.count}} 人</span>
|
||||
</div>
|
||||
<van-divider />
|
||||
<div class="fwb mb10">
|
||||
全系统双冠情况
|
||||
</div>
|
||||
<div class="ui-group" v-for="(item, index) in laureList.ggradeList" :key="index">
|
||||
<span v-if="item.level == '03'">银牌会员</span>
|
||||
<span v-if="item.level == '02'">铜牌会员</span>
|
||||
<span v-if="item.level == '01'">正式会员</span>
|
||||
<span class="fwb">{{item.count}} 人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="text-center bg-white m20 borderYellow p20">
|
||||
<img class="w300 inline-b" src="@/assets/images/laurelClub/pic_page-non.png" />
|
||||
@@ -62,13 +106,14 @@
|
||||
|
||||
|
||||
<script>
|
||||
import { Tab, Tabs, Collapse, CollapseItem, Checkbox, CheckboxGroup, Dialog, Popup } from 'vant'
|
||||
import { Divider,Tab, Tabs, Collapse, CollapseItem, Checkbox, CheckboxGroup, Dialog, Popup } from 'vant'
|
||||
// import { getAgentInfo } from '@/api/ebiz/my/my'
|
||||
import { queryLaureList, queryLaureMemberList, getBranchByUser } from '@/api/ebiz/laurelClub/laurelClub'
|
||||
import { queryLaureList, queryLaureMemberList, getBranchByUser,queryAllLaureList } from '@/api/ebiz/laurelClub/laurelClub'
|
||||
|
||||
export default {
|
||||
name: 'list',
|
||||
components: {
|
||||
[Divider.name]: Divider,
|
||||
[Tab.name]: Tab,
|
||||
[Tabs.name]: Tabs,
|
||||
[Collapse.name]: Collapse,
|
||||
@@ -81,8 +126,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
prevDate: '', //上月月份
|
||||
branchType: null, // 1内勤 0外勤
|
||||
show: false, //弹框是否显示
|
||||
// branchType: null, // 1内勤 0外勤
|
||||
show: false, //弹框是否 显示
|
||||
active: 'GGrade', // GGrade(桂冠) SGrade(双冠) Team(团队)
|
||||
list: [], //接口数据
|
||||
isSuccess: false, //有无数据显示
|
||||
@@ -114,20 +159,36 @@ export default {
|
||||
const res = await getBranchByUser({})
|
||||
if (res.result == 0) {
|
||||
// 机构等级(06-区 07-部 08-组 只有这三个显示'我的团队' )
|
||||
let level = res.content.level
|
||||
if (level == '06') {
|
||||
// 外勤:区长、部长、组长--桂冠排名和团队数据
|
||||
// 外勤普通代理人:区长、部长、组长--桂冠排名
|
||||
// 内勤四级、五级:团队数据
|
||||
this.manageLv = res.content.level
|
||||
if (this.manageLv == '06') {
|
||||
this.qubranchattr = res.content.code
|
||||
} else if (level == '07') {
|
||||
this.getLaureList()
|
||||
} else if (this.manageLv == '07') {
|
||||
this.bubranchattr = res.content.code
|
||||
} else if (level == '08') {
|
||||
this.getLaureList()
|
||||
} else if (this.manageLv == '08') {
|
||||
this.zubranchattr = res.content.code
|
||||
this.getLaureList()
|
||||
} else if (this.manageLv == '04' || this.manageLv == '05') {
|
||||
this.manageCom = res.content.code
|
||||
this.active = 'Team'
|
||||
this.getList()
|
||||
} else if (this.manageLv == '09' || this.manageLv == null) {
|
||||
this.manageCom = res.content.code
|
||||
this.active = 'GGrade'
|
||||
this.getLaureList()
|
||||
}
|
||||
if (level == '06' || level == '07' || level == '08') {
|
||||
this.branchType = 0
|
||||
} else {
|
||||
this.branchType = 1
|
||||
}
|
||||
this.getList()
|
||||
console.log(this.manageLv,'this.manageLv')
|
||||
console.log(this.active,'this.active')
|
||||
// if (this.manageLv == '06' || this.manageLv == '07' || this.manageLv == '08') {
|
||||
// this.branchType = 0
|
||||
// } else {
|
||||
// this.branchType = 1
|
||||
// }
|
||||
// this.getList()
|
||||
}
|
||||
},
|
||||
//获取当前人是否内外勤接口
|
||||
@@ -177,20 +238,13 @@ export default {
|
||||
})
|
||||
|
||||
let data = {
|
||||
type: '',
|
||||
type: this.plainStatus,
|
||||
monthStr: item.monthStr,
|
||||
level: item.level,
|
||||
qubranchattr: '',
|
||||
bubranchattr: '',
|
||||
zubranchattr: ''
|
||||
}
|
||||
if (this.active == 'Team') {
|
||||
data.type = this.plainStatus
|
||||
data.qubranchattr = this.qubranchattr
|
||||
data.bubranchattr = this.bubranchattr
|
||||
data.zubranchattr = this.zubranchattr
|
||||
} else {
|
||||
data.type = this.active
|
||||
manageCom: this.manageCom,
|
||||
qubranchattr: this.qubranchattr,
|
||||
bubranchattr: this.bubranchattr,
|
||||
zubranchattr: this.zubranchattr,
|
||||
}
|
||||
let content = []
|
||||
const res = await queryLaureMemberList(data)
|
||||
@@ -249,31 +303,54 @@ export default {
|
||||
let that = this
|
||||
if (this.active != active) {
|
||||
this.active = active
|
||||
this.getList()
|
||||
if (this.active == 'Team') {
|
||||
this.getList()
|
||||
}else{
|
||||
this.getLaureList()
|
||||
}
|
||||
//切换tab时,需要重置右上角的按钮状态--全部展开
|
||||
that.activeNames = []
|
||||
}
|
||||
},
|
||||
//初始化列表
|
||||
//初始化桂冠排名列表
|
||||
async getLaureList() {
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let data = {
|
||||
monthStr:'202109'
|
||||
}
|
||||
let res = await queryAllLaureList(data)
|
||||
this.$toast.clear()
|
||||
if (res.result == '0') {
|
||||
this.isSuccess = true
|
||||
this.laureList = res.content
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
//初始化团队列表数据
|
||||
async getList() {
|
||||
let that = this
|
||||
that.total = 0
|
||||
let data = {
|
||||
type: '',
|
||||
qubranchattr: '',
|
||||
bubranchattr: '',
|
||||
zubranchattr: ''
|
||||
type: this.plainStatus,
|
||||
qubranchattr: this.qubranchattr,
|
||||
bubranchattr: this.bubranchattr,
|
||||
zubranchattr: this.zubranchattr,
|
||||
manageCom: this.manageCom,
|
||||
monthStr:'202109'
|
||||
}
|
||||
that.activeNames = []
|
||||
//我的团队--切换GGrade(桂冠) SGrade(双冠)
|
||||
if (this.active == 'Team') {
|
||||
data.type = this.plainStatus
|
||||
data.qubranchattr = this.qubranchattr
|
||||
data.bubranchattr = this.bubranchattr
|
||||
data.zubranchattr = this.zubranchattr
|
||||
} else {
|
||||
data.type = this.active
|
||||
}
|
||||
// if (this.active == 'Team') {
|
||||
// data.type = this.plainStatus
|
||||
// } else {
|
||||
// data.type = this.active
|
||||
// }
|
||||
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
@@ -351,6 +428,17 @@ export default {
|
||||
.bntTab {
|
||||
margin-top: -25px;
|
||||
text-align: center;
|
||||
.tab {
|
||||
background-color: #fff;
|
||||
color: #333333;
|
||||
border: 1px solid rgba(222, 144, 34, 1);
|
||||
border-radius: 10px;
|
||||
width: 114px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
.unTabLeft {
|
||||
background: linear-gradient(135deg, #30339a 0%, #181935 100%);
|
||||
color: #ffcb6b;
|
||||
@@ -531,4 +619,17 @@ export default {
|
||||
top: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-laurel{
|
||||
border: 0.53333vw solid #de9022;
|
||||
border-radius: 2.66667vw;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
.ui-group{
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user