业绩查询逻辑处理

This commit is contained in:
huichao
2020-07-24 18:27:16 +08:00
parent 68571f0ec3
commit bb177051d6
6 changed files with 137 additions and 120 deletions

View File

@@ -22,7 +22,7 @@ export default [
} }
}, },
{ {
path: '/performance/AttendanceInfo', path: '/performance/AttendanceInfo/:parmas',
name: 'AttendanceInfo', name: 'AttendanceInfo',
component: attendanceInfo, component: attendanceInfo,
meta: { meta: {

View File

@@ -65,7 +65,7 @@
<div class="absolute right30 red">{{dontWork}}</div> <div class="absolute right30 red">{{dontWork}}</div>
</div> </div>
</div> </div>
<div class="fs13 red mt10 ml15">本出勤率只统计工作日出勤情况</div> <div class="fs13 red mt10 ml15">最终参训数据以次月公司下发的参训系统数据为准</div>
</div> </div>
</template> </template>
<script> <script>
@@ -92,12 +92,14 @@ export default {
earllyNum: 0, earllyNum: 0,
earllyTime: 0, earllyTime: 0,
forgetNum: 0, forgetNum: 0,
dontWork: 20, dontWork: 0,
titleTime: '' titleTime: '',
timeCode:''
} }
}, },
created() { created() {
this.attendance1(), this.formatDate1() this.formatDate1()
this.attendance1()
}, },
methods: { methods: {
timePopup() { timePopup() {
@@ -111,6 +113,8 @@ export default {
this.dateShow = false this.dateShow = false
console.log(e) console.log(e)
this.titleTime = utils.formatDate(e, 'yyyy-MM') this.titleTime = utils.formatDate(e, 'yyyy-MM')
this.timeCode=utils.formatDate(e, 'yyyy-MM-dd')
this.attendance1()
}, },
month() { month() {
this.$jump({ this.$jump({
@@ -124,9 +128,8 @@ export default {
}) })
}, },
attendance1() { attendance1() {
//测试数据
let date1 = { let date1 = {
date: '2020-07-01' date: this.timeCode
} }
attendance(date1).then(res => { attendance(date1).then(res => {
console.log(res) console.log(res)
@@ -146,6 +149,7 @@ export default {
formatDate1() { formatDate1() {
// console.log(utils.formatDate("2020-1-1")) // console.log(utils.formatDate("2020-1-1"))
this.titleTime = utils.formatDate(this.currentDate, 'yyyy-MM') this.titleTime = utils.formatDate(this.currentDate, 'yyyy-MM')
this.timeCode = utils.formatDate(this.currentDate, 'yyyy-MM-dd')
console.log(this.titleTime) console.log(this.titleTime)
} }
} }

View File

@@ -4,7 +4,7 @@
<div class="flex h70 align-items-c border-gb"> <div class="flex h70 align-items-c border-gb">
<img src="@/assets/images/u1203.png" alt class="h40 w40 ml15" /> <img src="@/assets/images/u1203.png" alt class="h40 w40 ml15" />
<span class="ml10 fs14">王昭君</span> <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 class="CalendarDiv"></div>
</div> </div>
</div> </div>

View File

@@ -10,7 +10,7 @@
v-no-more-click="1000" v-no-more-click="1000"
>当月</van-button> >当月</van-button>
<div @click="timePopup" class="fs12 red ml15"> <div @click="timePopup" class="fs12 red ml15">
2019-05 {{titleTime}}
<img src="@/assets/images/u79.png" alt class="absolute mt2 ml5" /> <img src="@/assets/images/u79.png" alt class="absolute mt2 ml5" />
</div> </div>
<van-popup v-model="dateShow" position="bottom"> <van-popup v-model="dateShow" position="bottom">
@@ -27,7 +27,7 @@
</div> </div>
<div class="c-gray-base fs13 ml25 mt10"> <div class="c-gray-base fs13 ml25 mt10">
所在机构 所在机构
<span>大直辖一</span> <span class="red">{{unitName}}</span>
</div> </div>
<div class="crew-list-container ml15"> <div class="crew-list-container ml15">
<van-sticky> <van-sticky>
@@ -112,6 +112,7 @@
</template> </template>
<script> <script>
import { Popup, DatetimePicker, Sticky } from 'vant' import { Popup, DatetimePicker, Sticky } from 'vant'
import { getBranchInfos } from '@/api/ebiz/performance/performance'
export default { export default {
name: 'attendance', name: 'attendance',
components: { components: {
@@ -125,10 +126,17 @@ export default {
dateShow: false, dateShow: false,
minDate: new Date(2019,1), minDate: new Date(2019,1),
maxDate: new Date(), 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: { methods: {
timePopup() { timePopup() {
this.dateShow = true this.dateShow = true
@@ -152,6 +160,11 @@ export default {
path: `/attendance/Monthly` path: `/attendance/Monthly`
} }
}) })
},
getBranchInfos1(){
getBranchInfos().then(res=>{
console.log(res)
})
} }
} }
} }

View File

@@ -29,43 +29,15 @@
</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>大直辖一</span> <span class="red">{{unitName}}</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 class="w40 h60 ml15 text-center" v-for="item in headerList"> <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="item.agentHeadUrl" alt />
<img v-if="item.agentHeadUrl == null" class="h40 w40" src="@/assets/images/u188.png" alt /> <img v-if="item.agentHeadUrl == null" class="h40 w40" src="@/assets/images/u188.png" alt />
<div class="fs13">{{item.agentName}}</div> <div class="fs13">{{item.agentName}}</div>
</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> </div>
<div class="mt20"> <div class="mt20">
@@ -81,38 +53,37 @@
<div class="red">{{cbjs}}</div> <div class="red">{{cbjs}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>承保FYC</div> <div>承保FYC</div>
<div class="red">{{cfyc}}</div> <div class="red">{{cfyc}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>综合开拓承保保费</div> <div>综合开拓承保保费</div>
<div class="red">{{zcbf}}</div> <div class="red">{{zcbf}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收标保</div> <div>本月预收标保</div>
<div class="red">{{ysbb}}</div> <div class="red">{{ysbb}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收件数</div> <div>本月预收件数</div>
<div class="red">{{ysjs}}</div> <div class="red">{{ysjs}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收FYC</div> <div>本月预收FYC</div>
<div class="red">{{yfyc}}</div> <div class="red">{{yfyc}}</div>
</div> </div>
</div>-->
</div> </div>
</div>
<div class="mt10 mh-auto content fs12 red">统计截至时间2020-01-12 1630</div>
<div <div
v-if="mask!=='1'" 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"
@@ -153,15 +124,17 @@ export default {
yfyc: '0.00', yfyc: '0.00',
timeCode: '', timeCode: '',
mask: '', mask: '',
headerList:[] headerList: [],
unitName: '',
} }
}, },
created() { created() {
// console.log('=======' + this.$route.params.parmas) // 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.mask = JSON.parse(this.$route.params.parmas).mask
this.titleTime=JSON.parse(this.$route.params.parmas).date.slice(0,7), ;(this.titleTime = JSON.parse(this.$route.params.parmas).date.slice(0, 7)),
this.dateTime=JSON.parse(this.$route.params.parmas).date (this.dateTime = JSON.parse(this.$route.params.parmas).date),
(this.unitName = JSON.parse(this.$route.params.parmas).unitName)
} }
if (this.mask !== '1') { if (this.mask !== '1') {
@@ -227,8 +200,7 @@ export default {
formatDate1() { formatDate1() {
// console.log(utils.formatDate("2020-1-1")) // console.log(utils.formatDate("2020-1-1"))
if (this.$route.params.parmas !== undefined) { if (this.$route.params.parmas !== undefined) {
this.titleTime=JSON.parse(this.$route.params.parmas).date.slice(0,7), ;(this.titleTime = JSON.parse(this.$route.params.parmas).date.slice(0, 7)), (this.timeCode = JSON.parse(this.$route.params.parmas).date)
this.timeCode=JSON.parse(this.$route.params.parmas).date
} else { } else {
this.titleTime = utils.formatDate(this.currentDate, 'yyyy-MM') 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')
@@ -251,14 +223,21 @@ export default {
//获取代理人关系 //获取代理人关系
getBaseAgentInfo1() { getBaseAgentInfo1() {
let date = {} let date = {}
getBaseAgentInfo(date).then(res => { getBaseAgentInfo(date).then((res) => {
// console.log(res) console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.agentGrade = res.agentGrade, ;(this.agentGrade = res.agentGrade),
this.unitName=res.unitName, (this.unitName = res.unitName),
this.agentCode=res.jobNo, (this.saleArea = res.saleArea),
this.obj.agentGrade=this.agentGrade, (this.agentCode = res.jobNo),
this.obj.agentCode=this.agentCode (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') { if (this.agentGrade == 'A101') {
this.mask = 1 this.mask = 1
} }
@@ -269,7 +248,7 @@ export default {
//获取代理人下级头像 //获取代理人下级头像
getPerformanceHeader1() { getPerformanceHeader1() {
let date = {} let date = {}
getPerformanceHeader(date).then(res=>{ getPerformanceHeader(date).then((res) => {
console.log(res) console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.headerList = res.content this.headerList = res.content
@@ -281,18 +260,35 @@ export default {
// console.log(this.agentCode) // console.log(this.agentCode)
let code = { let code = {
date: this.timeCode, date: this.timeCode,
agentCode:this.agentCode agentCode: this.agentCode,
} }
getPerformanceDetail(code).then((res) => { getPerformanceDetail(code).then((res) => {
// console.log(res) // console.log(res)
if (res.result == 0) { if (res.result == 0) {
this.cbbb=res.content.list[0].cbbb, ;(this.cbbb = res.content.list[0].cbbb),
this.cbjs=res.content.list[0].cbjs, (this.cbjs = res.content.list[0].cbjs),
this.ysjs=res.content.list[0].ysjs, (this.ysjs = res.content.list[0].ysjs),
this.agentCode=res.content.list[0].code (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> </script>

View File

@@ -28,7 +28,7 @@
</van-popup> </van-popup>
<div class="absolute right30 fs13 red" @click="checkDetails(parmas)">查看明细>></div> <div class="absolute right30 fs13 red" @click="checkDetails(parmas)">查看明细>></div>
</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="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">
@@ -42,36 +42,36 @@
<div class="red">{{cbjs}}</div> <div class="red">{{cbjs}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>{{teamName}}承保FYC</div> <div>{{teamName}}承保FYC</div>
<div class="red">{{cfyc}}</div> <div class="red">{{cfyc}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>{{teamName}}综合开拓承保保费</div> <div>{{teamName}}综合开拓承保保费</div>
<div class="red">{{zcbf}}</div> <div class="red">{{zcbf}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收标保</div> <div>本月预收标保</div>
<div class="red">{{ysbb}}</div> <div class="red">{{ysbb}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收件数</div> <div>本月预收件数</div>
<div class="red">{{ysjs}}</div> <div class="red">{{ysjs}}</div>
</div> </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 class="pl10 pr10 pt15 flex justify-content-s align-items-c">
<div>本月预收FYC</div> <div>本月预收FYC</div>
<div class="red">{{yfyc}}</div> <div class="red">{{yfyc}}</div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="mt10 mh-auto content fs12 red">统计截至时间2020-01-12 1630</div> <div class="mt10 mh-auto content fs12 red">统计截至时间2020-01-12 1630</div>
</div> </div>
@@ -105,7 +105,8 @@ export default {
ysbb:'0.00', ysbb:'0.00',
yfyc:'0.00', yfyc:'0.00',
teamName:'', teamName:'',
parmas:{} parmas:{},
unitName:''
} }
}, },
created() { created() {
@@ -116,7 +117,9 @@ export default {
this.titleTime=JSON.parse(this.$route.params.obj).date.slice(0,7), this.titleTime=JSON.parse(this.$route.params.obj).date.slice(0,7),
this.dateTime=JSON.parse(this.$route.params.obj).date this.dateTime=JSON.parse(this.$route.params.obj).date
this.parmas.date=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.mask=this.mask
this.parmas.unitName=JSON.parse(this.$route.params.obj).unitName
console.log(typeof(this.titleTime)) console.log(typeof(this.titleTime))
console.log(this.agentGrade.slice(0,2)) console.log(this.agentGrade.slice(0,2))
if(this.agentGrade.slice(0,2)=='A2'){ if(this.agentGrade.slice(0,2)=='A2'){
@@ -137,6 +140,7 @@ export default {
btns: [ btns: [
{ {
title: '考勤记录', title: '考勤记录',
titleColor:'red',
route: { flag: '', extra: {} }, route: { flag: '', extra: {} },
}, },
], ],
@@ -180,7 +184,7 @@ export default {
console.log(this.dateTime) console.log(this.dateTime)
}, },
checkDetails(parmas) { checkDetails(parmas) {
if (this.code === 'A201') { if (this.agentGrade.slice(0, 2) == 'A2') {
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
@@ -190,14 +194,14 @@ export default {
path: `/performance/Performance/${JSON.stringify(parmas)}`, path: `/performance/Performance/${JSON.stringify(parmas)}`,
}, },
}) })
} else if (this.code === 'A301') { } else if (this.agentGrade.slice(0, 2) == 'A3') {
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
url: location.origin + `/#/performance/AttendanceInfo`, url: location.origin + `/#/performance/AttendanceInfo/${JSON.stringify(parmas)}`,
}, },
routerInfo: { routerInfo: {
path: `/performance/AttendanceInfo`, path: `/performance/AttendanceInfo/${JSON.stringify(parmas)}`,
}, },
}) })
} }