mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-11 06:16:44 +08:00
日历插件
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
const performance = () => import('@/views/ebiz/performance/Performance')
|
const performance = () => import('@/views/ebiz/performance/Performance')
|
||||||
const attendanceInfo = () => import('@/views/ebiz/performance/AttendanceInfo')
|
const attendanceInfo = () => import('@/views/ebiz/performance/AttendanceInfo')
|
||||||
const PerformanceList = () => import('@/views/ebiz/performance/PerformanceList')
|
const PerformanceList = () => import('@/views/ebiz/performance/PerformanceList')
|
||||||
|
const PerformanceInfo = () => import('@/views/ebiz/performance/PerformanceInfo')
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@@ -29,5 +30,14 @@ export default [
|
|||||||
title: '业绩查询',
|
title: '业绩查询',
|
||||||
index: 3
|
index: 3
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/performance/PerformanceInfo',
|
||||||
|
name: 'PerformanceInfo',
|
||||||
|
component: PerformanceInfo,
|
||||||
|
meta: {
|
||||||
|
title: '业绩查询',
|
||||||
|
index: 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="CalendarDiv"></div>
|
<div class="CalendarDiv"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="calendar pt20"> -->
|
<div class="calendar">
|
||||||
<vue-hash-calendar
|
<vue-hash-calendar
|
||||||
:visible.sync="isShowCalendar"
|
:visible.sync="isShowCalendar"
|
||||||
@change="change"
|
@change="change"
|
||||||
@@ -18,8 +18,10 @@
|
|||||||
:disabledWeekView="disable"
|
:disabledWeekView="disable"
|
||||||
:defaultDatetime="date1"
|
:defaultDatetime="date1"
|
||||||
@touchend="touchend"
|
@touchend="touchend"
|
||||||
|
:model="inline"
|
||||||
|
class="hashCalendar"
|
||||||
></vue-hash-calendar>
|
></vue-hash-calendar>
|
||||||
<!-- </div> -->
|
</div>
|
||||||
<div class="footer" v-if="flagGo!=='4'">
|
<div class="footer" v-if="flagGo!=='4'">
|
||||||
<div class="fs12 c-gray-base h30 line-height">班次:正常 09:00-18:00</div>
|
<div class="fs12 c-gray-base h30 line-height">班次:正常 09:00-18:00</div>
|
||||||
<div class=" h40 flex align-items-c border-gb">
|
<div class=" h40 flex align-items-c border-gb">
|
||||||
@@ -71,6 +73,7 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
isShowCalendar: true,
|
isShowCalendar: true,
|
||||||
showTodayButton: false,
|
showTodayButton: false,
|
||||||
|
inline:'inline',
|
||||||
mask: [],
|
mask: [],
|
||||||
workTime:'',
|
workTime:'',
|
||||||
workTimeOff:'',
|
workTimeOff:'',
|
||||||
@@ -189,7 +192,7 @@ export default {
|
|||||||
let arr1=[]
|
let arr1=[]
|
||||||
let obj1={}
|
let obj1={}
|
||||||
let date1=[]
|
let date1=[]
|
||||||
obj1.color='orange'
|
obj1.color='#FFD700'
|
||||||
for(let i=0;i<res.content.rest.length;i++){
|
for(let i=0;i<res.content.rest.length;i++){
|
||||||
let workTime=res.content.rest[i].split(' ')
|
let workTime=res.content.rest[i].split(' ')
|
||||||
let workTime1=workTime[0]
|
let workTime1=workTime[0]
|
||||||
@@ -206,7 +209,7 @@ export default {
|
|||||||
let obj={}
|
let obj={}
|
||||||
let date=[]
|
let date=[]
|
||||||
let arr3=[]
|
let arr3=[]
|
||||||
obj.color='blue'
|
obj.color=' #00BFFF'
|
||||||
for(let t=0;t<res.content.normal.length;t++){
|
for(let t=0;t<res.content.normal.length;t++){
|
||||||
let workTime=res.content.normal[t].split(' ')
|
let workTime=res.content.normal[t].split(' ')
|
||||||
let workTime1=workTime[0]
|
let workTime1=workTime[0]
|
||||||
@@ -241,12 +244,14 @@ export default {
|
|||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
height:70px;
|
||||||
}
|
}
|
||||||
.calendar {
|
.calendar {
|
||||||
/* z-index: -1; */
|
/* z-index: -1; */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height:352px;
|
height:340px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
padding-top:0px !important;
|
||||||
}
|
}
|
||||||
.calendar_title[data-v-f3b38220] {
|
.calendar_title[data-v-f3b38220] {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -260,13 +265,20 @@ export default {
|
|||||||
.text{
|
.text{
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background:orange;
|
background:#FFD700;
|
||||||
color:white
|
color:white
|
||||||
}
|
}
|
||||||
.text1{
|
.text1{
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background:blue;
|
background: #00BFFF;
|
||||||
color:white
|
color:white
|
||||||
}
|
}
|
||||||
|
.hashCalendar{
|
||||||
|
height:340px !important;
|
||||||
|
z-index: 10 !important;
|
||||||
|
}
|
||||||
|
.calendar_title{
|
||||||
|
display:none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -147,17 +147,6 @@ export default {
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
// this.titleTime = dateFormat(this.currentDate, 'yyyy-MM')
|
// this.titleTime = dateFormat(this.currentDate, 'yyyy-MM')
|
||||||
},
|
},
|
||||||
month() {
|
|
||||||
this.$jump({
|
|
||||||
flag: 'h5',
|
|
||||||
extra: {
|
|
||||||
url: location.origin + `/#/attendance/Monthly/`,
|
|
||||||
},
|
|
||||||
routerInfo: {
|
|
||||||
path: `/attendance/Monthly`,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//跳转查看
|
//跳转查看
|
||||||
details(e) {
|
details(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
@@ -173,10 +162,10 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/performance/Performance`,
|
url: location.origin + `/#/performance/PerformanceInfo`,
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: `/performance/Performance`,
|
path: `/performance/PerformanceInfo`,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,25 +27,24 @@
|
|||||||
/>
|
/>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
</div>
|
</div>
|
||||||
<div class="c-gray-base fs13 ml25 mt10" v-if="mask=='1'">
|
<!-- <div class="c-gray-base fs13 ml25 mt10" v-if="mask=='1'">
|
||||||
所在机构:
|
所在机构:
|
||||||
<span v-if="buName!==undefined">{{buName}}></span>
|
<span v-if="buName!==undefined">{{buName}}></span>
|
||||||
<span class="red">{{Name}}</span>
|
<span class="red">{{Name}}</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="flex align-items-c h86 content1 bg-white mt10" v-if="mask=='1'">
|
<!-- <div class="flex align-items-c h86 content1 bg-white mt10" v-if="mask=='1'">
|
||||||
<div
|
<div
|
||||||
class="w40 h60 ml15 text-center relative"
|
class="w40 h60 ml15 text-center relative"
|
||||||
v-for="(item, index) in headerList"
|
v-for="(item, index) in headerList"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div @click="(InfoDetails(index))">
|
<div @click="(InfoDetails(index))">
|
||||||
<!-- <img v-if="item.agentHeadUrl!==null" class="h40 w40" :src="item.agentHeadUrl" alt /> -->
|
|
||||||
<img class="h40 w40" src="@/assets/images/u188.png" alt />
|
<img class="h40 w40" src="@/assets/images/u188.png" alt />
|
||||||
<div :class="[item.isShowImg?'active':'']"></div>
|
<div :class="[item.isShowImg?'active':'']"></div>
|
||||||
<div class="fs13">{{item.agentName}}</div>
|
<div class="fs13">{{item.agentName}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="mt20">
|
<div class="mt20">
|
||||||
<div class="h50 bg-white content mh-auto fs13 fw500">
|
<div class="h50 bg-white content mh-auto fs13 fw500">
|
||||||
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
|
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
|
||||||
@@ -91,7 +90,6 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="mask!=='1'"
|
|
||||||
class="h40 bg-red footer absolute bottom0 text-center fs14 fw500 white"
|
class="h40 bg-red footer absolute bottom0 text-center fs14 fw500 white"
|
||||||
@click="checkTeam(obj)"
|
@click="checkTeam(obj)"
|
||||||
>查看团队业绩</div>
|
>查看团队业绩</div>
|
||||||
@@ -141,36 +139,36 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
// console.log('=======' + this.$route.params.parmas)
|
// console.log('=======' + this.$route.params.parmas)
|
||||||
console.log("+++++++++++"+JSON.parse(window.localStorage.getItem('parmas')))
|
console.log("+++++++++++"+JSON.parse(window.localStorage.getItem('parmas')))
|
||||||
if (window.localStorage.getItem('parmas') !== null) {
|
// if (window.localStorage.getItem('parmas') !== null) {
|
||||||
this.mask = JSON.parse(window.localStorage.getItem('parmas')).mask
|
// this.mask = JSON.parse(window.localStorage.getItem('parmas')).mask
|
||||||
;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas')).date.slice(0, 7)),
|
// ;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas')).date.slice(0, 7)),
|
||||||
(this.dateTime = JSON.parse(window.localStorage.getItem('parmas')).date),
|
// (this.dateTime = JSON.parse(window.localStorage.getItem('parmas')).date),
|
||||||
(this.unitName = JSON.parse(window.localStorage.getItem('parmas')).unitName),
|
// (this.unitName = JSON.parse(window.localStorage.getItem('parmas')).unitName),
|
||||||
(this.Name = JSON.parse(window.localStorage.getItem('parmas')).Name),
|
// (this.Name = JSON.parse(window.localStorage.getItem('parmas')).Name),
|
||||||
(this.code = JSON.parse(window.localStorage.getItem('parmas')).code),
|
// (this.code = JSON.parse(window.localStorage.getItem('parmas')).code),
|
||||||
this.buName=JSON.parse(window.localStorage.getItem('parmas')).buName
|
// this.buName=JSON.parse(window.localStorage.getItem('parmas')).buName
|
||||||
}else if (window.localStorage.getItem('parmas2') !== null) {
|
// }else if (window.localStorage.getItem('parmas2') !== null) {
|
||||||
this.mask = JSON.parse(window.localStorage.getItem('parmas2')).mask
|
// this.mask = JSON.parse(window.localStorage.getItem('parmas2')).mask
|
||||||
;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas2')).date.slice(0, 7)),
|
// ;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas2')).date.slice(0, 7)),
|
||||||
(this.dateTime = JSON.parse(window.localStorage.getItem('parmas2')).date),
|
// (this.dateTime = JSON.parse(window.localStorage.getItem('parmas2')).date),
|
||||||
(this.unitName = JSON.parse(window.localStorage.getItem('parmas2')).unitName),
|
// (this.unitName = JSON.parse(window.localStorage.getItem('parmas2')).unitName),
|
||||||
(this.Name = JSON.parse(window.localStorage.getItem('parmas2')).Name),
|
// (this.Name = JSON.parse(window.localStorage.getItem('parmas2')).Name),
|
||||||
(this.code = JSON.parse(window.localStorage.getItem('parmas2')).code),
|
// (this.code = JSON.parse(window.localStorage.getItem('parmas2')).code),
|
||||||
this.buName=JSON.parse(window.localStorage.getItem('parmas2')).buName,
|
// this.buName=JSON.parse(window.localStorage.getItem('parmas2')).buName,
|
||||||
this.agentCode=JSON.parse(window.localStorage.getItem('parmas2')).agentCode
|
// this.agentCode=JSON.parse(window.localStorage.getItem('parmas2')).agentCode
|
||||||
}else if (window.localStorage.getItem('parmas1') !== null) {
|
// }else if (window.localStorage.getItem('parmas1') !== null) {
|
||||||
this.mask = JSON.parse(window.localStorage.getItem('parmas1')).mask
|
// this.mask = JSON.parse(window.localStorage.getItem('parmas1')).mask
|
||||||
;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas1')).date.slice(0, 7)),
|
// ;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas1')).date.slice(0, 7)),
|
||||||
(this.dateTime = JSON.parse(window.localStorage.getItem('parmas1')).date),
|
// (this.dateTime = JSON.parse(window.localStorage.getItem('parmas1')).date),
|
||||||
(this.unitName = JSON.parse(window.localStorage.getItem('parmas1')).unitName),
|
// (this.unitName = JSON.parse(window.localStorage.getItem('parmas1')).unitName),
|
||||||
(this.Name = JSON.parse(window.localStorage.getItem('parmas1')).Name),
|
// (this.Name = JSON.parse(window.localStorage.getItem('parmas1')).Name),
|
||||||
(this.code = JSON.parse(window.localStorage.getItem('parmas1')).code),
|
// (this.code = JSON.parse(window.localStorage.getItem('parmas1')).code),
|
||||||
this.buName=JSON.parse(window.localStorage.getItem('parmas1')).buName
|
// this.buName=JSON.parse(window.localStorage.getItem('parmas1')).buName
|
||||||
localStorage.removeItem('parmas1');
|
// window.localStorage.removeItem('parmas1');
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
if (this.mask !== '1') {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
EWebBridge.webCallAppInJs('webview_right_button', {
|
EWebBridge.webCallAppInJs('webview_right_button', {
|
||||||
@@ -183,7 +181,7 @@ export default {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
|
||||||
|
|
||||||
// this.performanceData()
|
// this.performanceData()
|
||||||
if (this.code == '') {
|
if (this.code == '') {
|
||||||
@@ -343,7 +341,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//点击头像
|
// 点击头像
|
||||||
InfoDetails(item) {
|
InfoDetails(item) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
for (let i = 0; i < this.headerList.length; i++) {
|
for (let i = 0; i < this.headerList.length; i++) {
|
||||||
@@ -368,7 +366,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
destroyed: function () {
|
destroyed: function () {
|
||||||
// console.log("我已经离开了!");
|
console.log("我已经离开了!");
|
||||||
let parmas1={}
|
let parmas1={}
|
||||||
parmas1.date=this.dateTime
|
parmas1.date=this.dateTime
|
||||||
parmas1.unitName=this.unitName
|
parmas1.unitName=this.unitName
|
||||||
@@ -377,10 +375,10 @@ export default {
|
|||||||
if(this.mask=="1"){
|
if(this.mask=="1"){
|
||||||
// localStorage.parmas1 = JSON.stringify(parmas1)
|
// localStorage.parmas1 = JSON.stringify(parmas1)
|
||||||
}else{
|
}else{
|
||||||
localStorage.removeItem('parmas1');
|
window.localStorage.removeItem('parmas1');
|
||||||
}
|
}
|
||||||
|
|
||||||
localStorage.removeItem('parmas2');
|
window.localStorage.removeItem('parmas2');
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
380
src/views/ebiz/performance/PerformanceInfo.vue
Normal file
380
src/views/ebiz/performance/PerformanceInfo.vue
Normal file
@@ -0,0 +1,380 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
class="border-gb mt20 header mh-auto van-cell:not(:last-child)::after h50 flex align-items-c"
|
||||||
|
>
|
||||||
|
<van-button
|
||||||
|
round
|
||||||
|
@click="goDetail(order)"
|
||||||
|
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" />
|
||||||
|
</div>
|
||||||
|
<van-popup v-model="dateShow" position="bottom">
|
||||||
|
<van-datetime-picker
|
||||||
|
v-model="currentDate"
|
||||||
|
type="year-month"
|
||||||
|
title="选择年月日"
|
||||||
|
:min-date="minDate"
|
||||||
|
:max-date="maxDate"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleEndDateConfirm"
|
||||||
|
/>
|
||||||
|
</van-popup>
|
||||||
|
</div>
|
||||||
|
<div class="c-gray-base fs13 ml25 mt10" v-if="mask=='1'">
|
||||||
|
所在机构:
|
||||||
|
<span v-if="buName!==undefined">{{buName}}></span>
|
||||||
|
<span class="red">{{Name}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex align-items-c h86 content1 bg-white mt10">
|
||||||
|
<div
|
||||||
|
class="w40 h60 ml15 text-center relative"
|
||||||
|
v-for="(item, index) in headerList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<div @click="(InfoDetails(index))">
|
||||||
|
<!-- <img v-if="item.agentHeadUrl!==null" class="h40 w40" :src="item.agentHeadUrl" alt /> -->
|
||||||
|
<img class="h40 w40" src="@/assets/images/u188.png" alt />
|
||||||
|
<div :class="[item.isShowImg?'active':'']"></div>
|
||||||
|
<div class="fs13">{{item.agentName}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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>个人承保标保(元)</div>
|
||||||
|
<div 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">{{cbjs}}</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>承保FYC(元)</div>
|
||||||
|
<div class="red">{{cfyc}}</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">{{zcbf}}</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>本月预收标保(元)</div>
|
||||||
|
<div class="red">{{ysbb}}</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>本月预收件数</div>
|
||||||
|
<div class="red">{{ysjs}}</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>
|
||||||
|
<div class="red">{{yfyc}}</div>
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getBaseAgentInfo, getPerformanceHeader, getPerformanceDetail, getHeader } from '@/api/ebiz/performance/performance'
|
||||||
|
import utils from '@/assets/js/utils/date-utils'
|
||||||
|
import { Popup, DatetimePicker } from 'vant'
|
||||||
|
export default {
|
||||||
|
name: 'performance',
|
||||||
|
components: {
|
||||||
|
[Popup.name]: Popup,
|
||||||
|
[DatetimePicker.name]: DatetimePicker,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentDate: new Date(),
|
||||||
|
dateShow: false,
|
||||||
|
minDate: new Date(2020, 0, 1),
|
||||||
|
maxDate: new Date(),
|
||||||
|
titleTime: '',
|
||||||
|
date1: {
|
||||||
|
date: '2020-07-01',
|
||||||
|
},
|
||||||
|
agentGrade: '',
|
||||||
|
isShow: true,
|
||||||
|
obj: {},
|
||||||
|
agentCode: '',
|
||||||
|
cbbb: '',
|
||||||
|
cbjs: '',
|
||||||
|
ysjs: '',
|
||||||
|
cfyc: '0.00',
|
||||||
|
zcbf: '0.00',
|
||||||
|
ysbb: '0.00',
|
||||||
|
yfyc: '0.00',
|
||||||
|
timeCode: '',
|
||||||
|
mask: '',
|
||||||
|
headerList: [],
|
||||||
|
unitName: '',
|
||||||
|
Name: '',
|
||||||
|
code: '',
|
||||||
|
isShowImg: true,
|
||||||
|
buName:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// console.log('=======' + this.$route.params.parmas)
|
||||||
|
console.log("+++++++++++"+JSON.parse(window.localStorage.getItem('parmas')))
|
||||||
|
if (window.localStorage.getItem('parmas') !== null) {
|
||||||
|
this.mask = JSON.parse(window.localStorage.getItem('parmas')).mask
|
||||||
|
;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas')).date.slice(0, 7)),
|
||||||
|
(this.dateTime = JSON.parse(window.localStorage.getItem('parmas')).date),
|
||||||
|
(this.unitName = JSON.parse(window.localStorage.getItem('parmas')).unitName),
|
||||||
|
(this.Name = JSON.parse(window.localStorage.getItem('parmas')).Name),
|
||||||
|
(this.code = JSON.parse(window.localStorage.getItem('parmas')).code),
|
||||||
|
this.buName=JSON.parse(window.localStorage.getItem('parmas')).buName
|
||||||
|
}else if (window.localStorage.getItem('parmas2') !== null) {
|
||||||
|
this.mask = JSON.parse(window.localStorage.getItem('parmas2')).mask
|
||||||
|
;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas2')).date.slice(0, 7)),
|
||||||
|
(this.dateTime = JSON.parse(window.localStorage.getItem('parmas2')).date),
|
||||||
|
(this.unitName = JSON.parse(window.localStorage.getItem('parmas2')).unitName),
|
||||||
|
(this.Name = JSON.parse(window.localStorage.getItem('parmas2')).Name),
|
||||||
|
(this.code = JSON.parse(window.localStorage.getItem('parmas2')).code),
|
||||||
|
this.buName=JSON.parse(window.localStorage.getItem('parmas2')).buName,
|
||||||
|
this.agentCode=JSON.parse(window.localStorage.getItem('parmas2')).agentCode
|
||||||
|
}else if (window.localStorage.getItem('parmas1') !== null) {
|
||||||
|
this.mask = JSON.parse(window.localStorage.getItem('parmas1')).mask
|
||||||
|
;(this.titleTime = JSON.parse(window.localStorage.getItem('parmas1')).date.slice(0, 7)),
|
||||||
|
(this.dateTime = JSON.parse(window.localStorage.getItem('parmas1')).date),
|
||||||
|
(this.unitName = JSON.parse(window.localStorage.getItem('parmas1')).unitName),
|
||||||
|
(this.Name = JSON.parse(window.localStorage.getItem('parmas1')).Name),
|
||||||
|
(this.code = JSON.parse(window.localStorage.getItem('parmas1')).code),
|
||||||
|
this.buName=JSON.parse(window.localStorage.getItem('parmas1')).buName
|
||||||
|
window.localStorage.removeItem('parmas1');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (this.mask !== '1') {
|
||||||
|
setTimeout(() => {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
EWebBridge.webCallAppInJs('webview_right_button', {
|
||||||
|
btns: [
|
||||||
|
{
|
||||||
|
title: '考勤记录',
|
||||||
|
titleColor: 'FF0000',
|
||||||
|
route: { flag: '', extra: {} },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
// this.performanceData()
|
||||||
|
if (this.code == '') {
|
||||||
|
this.getPerformanceHeader1()
|
||||||
|
}
|
||||||
|
if(this.mask=="1"){
|
||||||
|
this.getPerformanceDetailC()
|
||||||
|
}
|
||||||
|
this.formatDate1()
|
||||||
|
this.getBaseAgentInfo1()
|
||||||
|
if (this.code !== '') {
|
||||||
|
this.getHeader1()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
|
timePopup() {
|
||||||
|
this.dateShow = true
|
||||||
|
},
|
||||||
|
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.getPerformanceDetailC()
|
||||||
|
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 (window.localStorage.getItem('parmas2') !== null) {
|
||||||
|
this.titleTime = JSON.parse(window.localStorage.getItem('parmas2')).date.slice(0, 7),
|
||||||
|
this.timeCode = JSON.parse(window.localStorage.getItem('parmas2')).date
|
||||||
|
}
|
||||||
|
if(window.localStorage.getItem('parmas1') !== null){
|
||||||
|
this.titleTime = JSON.parse(window.localStorage.getItem('parmas2')).date.slice(0, 7),
|
||||||
|
this.timeCode = JSON.parse(window.localStorage.getItem('parmas2')).date
|
||||||
|
}
|
||||||
|
this.obj.date = this.timeCode
|
||||||
|
// console.log(this.titleTime)
|
||||||
|
},
|
||||||
|
//获取代理人关系
|
||||||
|
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) == 'A2') {
|
||||||
|
;(this.obj.unitName = this.unitName), (this.obj.code = this.branchCode)
|
||||||
|
} else if (this.agentGrade.slice(0, 2) == 'A3') {
|
||||||
|
;(this.obj.unitName = this.saleArea), (this.obj.code = this.deptCode)
|
||||||
|
} else if (this.agentGrade.slice(0, 2) == 'A4') {
|
||||||
|
}
|
||||||
|
if (this.agentGrade == 'A101') {
|
||||||
|
this.mask = 1
|
||||||
|
}
|
||||||
|
this.getPerformanceDetailC()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取代理人下级头像
|
||||||
|
getPerformanceHeader1() {
|
||||||
|
let date = {}
|
||||||
|
getPerformanceHeader(date).then((res) => {
|
||||||
|
console.log('==' + res)
|
||||||
|
if (res.result == 0) {
|
||||||
|
for (let i = 0; i < res.content.length; i++) {
|
||||||
|
res.content[i].isShowImg = true
|
||||||
|
}
|
||||||
|
this.headerList = res.content
|
||||||
|
console.log(this.headerList)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击头像
|
||||||
|
InfoDetails(item) {
|
||||||
|
console.log(item)
|
||||||
|
for (let i = 0; i < this.headerList.length; i++) {
|
||||||
|
this.headerList[i].isShowImg = true
|
||||||
|
}
|
||||||
|
this.headerList[item].isShowImg = false
|
||||||
|
|
||||||
|
let code = {
|
||||||
|
date: this.timeCode,
|
||||||
|
agentCode: this.headerList[item].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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
destroyed: function () {
|
||||||
|
console.log("我已经离开了!");
|
||||||
|
let parmas1={}
|
||||||
|
parmas1.date=this.dateTime
|
||||||
|
parmas1.unitName=this.unitName
|
||||||
|
parmas1.Name=this.Name
|
||||||
|
parmas1.code=this.code
|
||||||
|
if(this.mask=="1"){
|
||||||
|
// localStorage.parmas1 = JSON.stringify(parmas1)
|
||||||
|
}else{
|
||||||
|
window.localStorage.removeItem('parmas1');
|
||||||
|
}
|
||||||
|
|
||||||
|
window.localStorage.removeItem('parmas2');
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.header {
|
||||||
|
width: 92%;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
width: 86%;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
width: 100%;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
.content1 {
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
z-index: 100;
|
||||||
|
background: #ccc;
|
||||||
|
opacity: 0.5;
|
||||||
|
top: 0px;
|
||||||
|
border-radius: 20px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -183,10 +183,10 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/performance/Performance`,
|
url: location.origin + `/#/performance/PerformanceInfo`,
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: `/performance/Performance`,
|
path: `/performance/PerformanceInfo`,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
} else if (this.agentGrade.slice(0, 2) == 'A3') {
|
} else if (this.agentGrade.slice(0, 2) == 'A3') {
|
||||||
|
|||||||
Reference in New Issue
Block a user