mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-21 18:16:43 +08:00
业绩查询逻辑处理
This commit is contained in:
@@ -22,7 +22,7 @@ export default [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/performance/AttendanceInfo',
|
||||
path: '/performance/AttendanceInfo/:parmas',
|
||||
name: 'AttendanceInfo',
|
||||
component: attendanceInfo,
|
||||
meta: {
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="absolute right30 red">{{dontWork}}天</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fs13 red mt10 ml15">注:本出勤率只统计工作日出勤情况</div>
|
||||
<div class="fs13 red mt10 ml15">注:最终参训数据以次月公司下发的参训系统数据为准</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -92,12 +92,14 @@ export default {
|
||||
earllyNum: 0,
|
||||
earllyTime: 0,
|
||||
forgetNum: 0,
|
||||
dontWork: 20,
|
||||
titleTime: ''
|
||||
dontWork: 0,
|
||||
titleTime: '',
|
||||
timeCode:''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.attendance1(), this.formatDate1()
|
||||
this.formatDate1()
|
||||
this.attendance1()
|
||||
},
|
||||
methods: {
|
||||
timePopup() {
|
||||
@@ -111,6 +113,8 @@ export default {
|
||||
this.dateShow = false
|
||||
console.log(e)
|
||||
this.titleTime = utils.formatDate(e, 'yyyy-MM')
|
||||
this.timeCode=utils.formatDate(e, 'yyyy-MM-dd')
|
||||
this.attendance1()
|
||||
},
|
||||
month() {
|
||||
this.$jump({
|
||||
@@ -124,9 +128,8 @@ export default {
|
||||
})
|
||||
},
|
||||
attendance1() {
|
||||
//测试数据
|
||||
let date1 = {
|
||||
date: '2020-07-01'
|
||||
date: this.timeCode
|
||||
}
|
||||
attendance(date1).then(res => {
|
||||
console.log(res)
|
||||
@@ -146,6 +149,7 @@ export default {
|
||||
formatDate1() {
|
||||
// console.log(utils.formatDate("2020-1-1"))
|
||||
this.titleTime = utils.formatDate(this.currentDate, 'yyyy-MM')
|
||||
this.timeCode = utils.formatDate(this.currentDate, 'yyyy-MM-dd')
|
||||
console.log(this.titleTime)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="flex h70 align-items-c border-gb">
|
||||
<img src="@/assets/images/u1203.png" alt class="h40 w40 ml15" />
|
||||
<span class="ml10 fs14">王昭君</span>
|
||||
<div class="absolute right20 flex">{{time}} 星期{{week}}</div>
|
||||
<div class="absolute right20 flex fs13">{{time}} 星期{{week}}</div>
|
||||
<div class="CalendarDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
v-no-more-click="1000"
|
||||
>当月</van-button>
|
||||
<div @click="timePopup" class="fs12 red ml15">
|
||||
2019-05
|
||||
{{titleTime}}
|
||||
<img src="@/assets/images/u79.png" alt class="absolute mt2 ml5" />
|
||||
</div>
|
||||
<van-popup v-model="dateShow" position="bottom">
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="c-gray-base fs13 ml25 mt10">
|
||||
所在机构:
|
||||
<span>大直辖一</span>
|
||||
<span class="red">{{unitName}}</span>
|
||||
</div>
|
||||
<div class="crew-list-container ml15">
|
||||
<van-sticky>
|
||||
@@ -112,6 +112,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { Popup, DatetimePicker, Sticky } from 'vant'
|
||||
import { getBranchInfos } from '@/api/ebiz/performance/performance'
|
||||
export default {
|
||||
name: 'attendance',
|
||||
components: {
|
||||
@@ -125,10 +126,17 @@ export default {
|
||||
dateShow: false,
|
||||
minDate: new Date(2019,1),
|
||||
maxDate: new Date(),
|
||||
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 0]
|
||||
data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 0],
|
||||
titleTime:''
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
console.log('=======' + this.$route.params.parmas)
|
||||
this.unitName=JSON.parse(this.$route.params.parmas).unitName
|
||||
this.titleTime=JSON.parse(this.$route.params.parmas).date.slice(0,7)
|
||||
this.dateTime=JSON.parse(this.$route.params.parmas).date,
|
||||
this.getBranchInfos1()
|
||||
},
|
||||
methods: {
|
||||
timePopup() {
|
||||
this.dateShow = true
|
||||
@@ -152,6 +160,11 @@ export default {
|
||||
path: `/attendance/Monthly`
|
||||
}
|
||||
})
|
||||
},
|
||||
getBranchInfos1(){
|
||||
getBranchInfos().then(res=>{
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,43 +29,15 @@
|
||||
</div>
|
||||
<div class="c-gray-base fs13 ml25 mt10" v-if="mask=='1'">
|
||||
所在机构:
|
||||
<span>大直辖一</span>
|
||||
<span class="red">{{unitName}}</span>
|
||||
</div>
|
||||
<div class="flex align-items-c h86 content1 bg-white mt10" v-if="mask=='1'">
|
||||
<div class="w40 h60 ml15 text-center" v-for="item in headerList">
|
||||
<div @click="(InfoDetails(item.agentCode))">
|
||||
<img v-if="item.agentHeadUrl!==null" class="h40 w40" :src="item.agentHeadUrl" alt />
|
||||
<img v-if="item.agentHeadUrl == null" class="h40 w40" src="@/assets/images/u188.png" alt />
|
||||
<div class="fs13">{{item.agentName}}</div>
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
<div class="fs13">掌声及</div>
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
<div class="fs13">掌声</div>
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
<div class="fs13">掌声</div>
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
<div class="fs13">掌声</div>
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
<div class="fs13">掌声及</div>
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
<div class="fs13">掌声及</div>
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
</div>
|
||||
<div class="w40 h60 ml15 text-center">
|
||||
<img class="w40 h40" src="@/assets/images/u188.png" alt />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt20">
|
||||
@@ -81,38 +53,37 @@
|
||||
<div class="red">{{cbjs}}</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">
|
||||
<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>-->
|
||||
<!-- <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>-->
|
||||
<!-- <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>-->
|
||||
<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="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>
|
||||
<div class="mt10 mh-auto content fs12 red">注:统计截至时间:2020-01-12 16:30</div>
|
||||
<div
|
||||
v-if="mask!=='1'"
|
||||
class="h40 bg-red footer absolute bottom0 text-center fs14 fw500 white"
|
||||
@@ -121,7 +92,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getBaseAgentInfo,getPerformanceHeader,getPerformanceDetail } from '@/api/ebiz/performance/performance'
|
||||
import { getBaseAgentInfo, getPerformanceHeader, getPerformanceDetail } from '@/api/ebiz/performance/performance'
|
||||
import utils from '@/assets/js/utils/date-utils'
|
||||
import { Popup, DatetimePicker } from 'vant'
|
||||
export default {
|
||||
@@ -142,26 +113,28 @@ export default {
|
||||
},
|
||||
agentGrade: '',
|
||||
isShow: true,
|
||||
obj:{},
|
||||
agentCode:'',
|
||||
cbbb:'',
|
||||
cbjs:'',
|
||||
ysjs:'',
|
||||
cfyc:'0.00',
|
||||
zcbf:'0.00',
|
||||
ysbb:'0.00',
|
||||
yfyc:'0.00',
|
||||
timeCode:'',
|
||||
mask:'',
|
||||
headerList:[]
|
||||
obj: {},
|
||||
agentCode: '',
|
||||
cbbb: '',
|
||||
cbjs: '',
|
||||
ysjs: '',
|
||||
cfyc: '0.00',
|
||||
zcbf: '0.00',
|
||||
ysbb: '0.00',
|
||||
yfyc: '0.00',
|
||||
timeCode: '',
|
||||
mask: '',
|
||||
headerList: [],
|
||||
unitName: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// console.log('=======' + this.$route.params.parmas)
|
||||
if(this.$route.params.parmas!==undefined){
|
||||
if (this.$route.params.parmas !== undefined) {
|
||||
this.mask = JSON.parse(this.$route.params.parmas).mask
|
||||
this.titleTime=JSON.parse(this.$route.params.parmas).date.slice(0,7),
|
||||
this.dateTime=JSON.parse(this.$route.params.parmas).date
|
||||
;(this.titleTime = JSON.parse(this.$route.params.parmas).date.slice(0, 7)),
|
||||
(this.dateTime = JSON.parse(this.$route.params.parmas).date),
|
||||
(this.unitName = JSON.parse(this.$route.params.parmas).unitName)
|
||||
}
|
||||
|
||||
if (this.mask !== '1') {
|
||||
@@ -215,8 +188,8 @@ export default {
|
||||
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.obj.date = this.timeCode
|
||||
this.getPerformanceDetailC()
|
||||
if (this.titleTime !== utils.formatDate(this.currentDate, 'yyyy-MM')) {
|
||||
this.isShow = false
|
||||
@@ -226,14 +199,13 @@ export default {
|
||||
},
|
||||
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{
|
||||
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.obj.date=this.timeCode
|
||||
this.obj.date = this.timeCode
|
||||
// console.log(this.titleTime)
|
||||
},
|
||||
checkTeam(obj) {
|
||||
@@ -251,14 +223,21 @@ export default {
|
||||
//获取代理人关系
|
||||
getBaseAgentInfo1() {
|
||||
let date = {}
|
||||
getBaseAgentInfo(date).then(res => {
|
||||
// console.log(res)
|
||||
getBaseAgentInfo(date).then((res) => {
|
||||
console.log(res)
|
||||
if (res.result == 0) {
|
||||
this.agentGrade = res.agentGrade,
|
||||
this.unitName=res.unitName,
|
||||
this.agentCode=res.jobNo,
|
||||
this.obj.agentGrade=this.agentGrade,
|
||||
this.obj.agentCode=this.agentCode
|
||||
;(this.agentGrade = res.agentGrade),
|
||||
(this.unitName = res.unitName),
|
||||
(this.saleArea = res.saleArea),
|
||||
(this.agentCode = res.jobNo),
|
||||
(this.obj.agentGrade = this.agentGrade),
|
||||
(this.obj.agentCode = this.agentCode)
|
||||
if (this.agentGrade.slice(0, 2) == 'A2') {
|
||||
this.obj.unitName = this.unitName
|
||||
} else if (this.agentGrade.slice(0, 2) == 'A3') {
|
||||
this.obj.unitName = this.saleArea
|
||||
} else if (this.agentGrade.slice(0, 2) == 'A4') {
|
||||
}
|
||||
if (this.agentGrade == 'A101') {
|
||||
this.mask = 1
|
||||
}
|
||||
@@ -267,32 +246,49 @@ export default {
|
||||
})
|
||||
},
|
||||
//获取代理人下级头像
|
||||
getPerformanceHeader1(){
|
||||
getPerformanceHeader1() {
|
||||
let date = {}
|
||||
getPerformanceHeader(date).then(res=>{
|
||||
getPerformanceHeader(date).then((res) => {
|
||||
console.log(res)
|
||||
if(res.result==0){
|
||||
this.headerList=res.content
|
||||
if (res.result == 0) {
|
||||
this.headerList = res.content
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取代理人相关信息
|
||||
getPerformanceDetailC(){
|
||||
getPerformanceDetailC() {
|
||||
// console.log(this.agentCode)
|
||||
let code = {
|
||||
date: this.timeCode,
|
||||
agentCode:this.agentCode
|
||||
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.agentCode=res.content.list[0].code
|
||||
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.agentCode = res.content.list[0].code)
|
||||
}
|
||||
})
|
||||
},
|
||||
//点击头像
|
||||
InfoDetails(item) {
|
||||
// console.log(item)
|
||||
let code = {
|
||||
date: this.timeCode,
|
||||
agentCode: item,
|
||||
}
|
||||
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.agentCode = res.content.list[0].code)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</van-popup>
|
||||
<div class="absolute right30 fs13 red" @click="checkDetails(parmas)">查看明细>></div>
|
||||
</div>
|
||||
<div class="c-gray-base fs13 ml25 mt10">所在机构:张伟组</div>
|
||||
<div class="c-gray-base fs13 ml25 mt10">所在机构:{{unitName}}</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">
|
||||
@@ -42,36 +42,36 @@
|
||||
<div class="red">{{cbjs}}</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">
|
||||
<div class="pl10 pr10 pt15 flex justify-content-s align-items-c">
|
||||
<div>{{teamName}}承保FYC(元)</div>
|
||||
<div class="red">{{cfyc}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h50 bg-white content mh-auto fs13 fw500 mt5">
|
||||
</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>{{teamName}}综合开拓承保保费(元)</div>
|
||||
<div class="red">{{zcbf}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h50 bg-white content mh-auto fs13 fw500 mt5" v-if="isShow">
|
||||
</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> -->
|
||||
<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="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>
|
||||
<div class="mt10 mh-auto content fs12 red">注:统计截至时间:2020-01-12 16:30</div>
|
||||
</div>
|
||||
@@ -105,7 +105,8 @@ export default {
|
||||
ysbb:'0.00',
|
||||
yfyc:'0.00',
|
||||
teamName:'',
|
||||
parmas:{}
|
||||
parmas:{},
|
||||
unitName:''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -116,7 +117,9 @@ export default {
|
||||
this.titleTime=JSON.parse(this.$route.params.obj).date.slice(0,7),
|
||||
this.dateTime=JSON.parse(this.$route.params.obj).date
|
||||
this.parmas.date=JSON.parse(this.$route.params.obj).date
|
||||
this.unitName=JSON.parse(this.$route.params.obj).unitName
|
||||
this.parmas.mask=this.mask
|
||||
this.parmas.unitName=JSON.parse(this.$route.params.obj).unitName
|
||||
console.log(typeof(this.titleTime))
|
||||
console.log(this.agentGrade.slice(0,2))
|
||||
if(this.agentGrade.slice(0,2)=='A2'){
|
||||
@@ -137,6 +140,7 @@ export default {
|
||||
btns: [
|
||||
{
|
||||
title: '考勤记录',
|
||||
titleColor:'red',
|
||||
route: { flag: '', extra: {} },
|
||||
},
|
||||
],
|
||||
@@ -180,7 +184,7 @@ export default {
|
||||
console.log(this.dateTime)
|
||||
},
|
||||
checkDetails(parmas) {
|
||||
if (this.code === 'A201') {
|
||||
if (this.agentGrade.slice(0, 2) == 'A2') {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
@@ -190,14 +194,14 @@ export default {
|
||||
path: `/performance/Performance/${JSON.stringify(parmas)}`,
|
||||
},
|
||||
})
|
||||
} else if (this.code === 'A301') {
|
||||
} else if (this.agentGrade.slice(0, 2) == 'A3') {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/performance/AttendanceInfo`,
|
||||
url: location.origin + `/#/performance/AttendanceInfo/${JSON.stringify(parmas)}`,
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/performance/AttendanceInfo`,
|
||||
path: `/performance/AttendanceInfo/${JSON.stringify(parmas)}`,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user