diff --git a/src/views/ebiz/attendance/Attendance.vue b/src/views/ebiz/attendance/Attendance.vue index f88b81007..5c3eeb4dc 100644 --- a/src/views/ebiz/attendance/Attendance.vue +++ b/src/views/ebiz/attendance/Attendance.vue @@ -50,19 +50,19 @@
迟到
-
{{lateNum}}次,共{{lateTime}}分钟
+
{{lateNum}}次,共{{lateTime}}分钟
早退
-
{{earllyNum}}次,共{{earllyTime}}分钟
+
{{earllyNum}}次,共{{earllyTime}}分钟
缺卡
-
{{forgetNum}}次
+
{{forgetNum}}次
旷工
-
{{dontWork}}天
+
{{dontWork}}天
注:最终参训数据以次月公司下发的参训系统数据为准
diff --git a/src/views/ebiz/attendance/Monthly.vue b/src/views/ebiz/attendance/Monthly.vue index ad407f8ae..8ed0dd4bd 100644 --- a/src/views/ebiz/attendance/Monthly.vue +++ b/src/views/ebiz/attendance/Monthly.vue @@ -146,6 +146,7 @@ export default { date: String(this.time), } //日上班 + if (Date.parse(this.time) <= Date.parse(formatDate(new Date(), 'YY-MM-DD'))) { getDayDetail(date).then((res) => { console.log(res) if (res.result == 0) { @@ -173,6 +174,15 @@ export default { } } }) + }else{ + this.flagGo="2" + this.flagOff="3" + this.text1='未打卡' + this.count='0' + this.amount='0' + this.offWorkTime='' + this.goWorkTime='' + } }, dateConfirm(date) { this.time = utils.formatDate(date, 'YY-MM-DD') @@ -188,33 +198,43 @@ export default { let date1 = { date: this.time, } - getDayDetail(date1).then((res) => { - console.log(res) - if (res.result == 0) { - ;(this.workTime = res.content.workTime), - (this.workTimeOff = res.content.workTimeoff), - (this.count = res.content.count), - (this.amount = res.content.amount), - (this.flagGo = res.content.flagGo), - (this.flagOff = res.content.flagOff), - (this.goWorkTime = res.content.goWorkTime), - (this.offWorkTime = res.content.offWorkTime) - if (this.flagGo == '0' || this.flagOff == '0') { - this.goWorkTime = this.goWorkTime.split(' ')[1] - this.offWorkTime = this.offWorkTime.split(' ')[1] - this.text = '正常' + if (Date.parse(this.time) <= Date.parse(formatDate(new Date(), 'YY-MM-DD'))) { + getDayDetail(date1).then((res) => { + console.log(res) + if (res.result == 0) { + ;(this.workTime = res.content.workTime), + (this.workTimeOff = res.content.workTimeoff), + (this.count = res.content.count), + (this.amount = res.content.amount), + (this.flagGo = res.content.flagGo), + (this.flagOff = res.content.flagOff), + (this.goWorkTime = res.content.goWorkTime), + (this.offWorkTime = res.content.offWorkTime) + if (this.flagGo == '0' || this.flagOff == '0') { + this.goWorkTime = this.goWorkTime.split(' ')[1] + this.offWorkTime = this.offWorkTime.split(' ')[1] + this.text = '正常' + } + if (this.flagGo == '1') { + this.text1 = '缺勤' + } + if (this.flagGo == '2') { + this.text1 = '迟到' + } + if (this.flagOff == '3') { + this.text1 = '早退' + } } - if (this.flagGo == '1') { - this.text1 = '缺勤' - } - if (this.flagGo == '2') { - this.text1 = '迟到' - } - if (this.flagOff == '3') { - this.text1 = '早退' - } - } - }) + }) + }else{ + this.flagGo="2" + this.flagOff="3" + this.text1='未打卡' + this.count='0' + this.amount='0' + this.offWorkTime='' + this.goWorkTime='' + } }, //月历 getMonthDetail1() { @@ -237,7 +257,7 @@ export default { date1.push(workTime1) } } - obj1.date=date1 + obj1.date = date1 arr1.push(obj1) console.log(obj1) // this.mask=arr1 @@ -298,7 +318,7 @@ export default { .text { line-height: 18px; border-radius: 10px; - background: #FFA500; + background: #ffa500; color: white; } .text1 { diff --git a/src/views/ebiz/performance/Performance.vue b/src/views/ebiz/performance/Performance.vue index 0346cd2ed..f8e99650f 100644 --- a/src/views/ebiz/performance/Performance.vue +++ b/src/views/ebiz/performance/Performance.vue @@ -138,38 +138,6 @@ export default { } }, 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'); - // } - - - setTimeout(() => { // eslint-disable-next-line no-undef EWebBridge.webCallAppInJs('webview_right_button', { @@ -181,11 +149,8 @@ export default { ], }) }, 1000) - - - // this.performanceData() if (this.code == '') { - this.getPerformanceHeader1() + // this.getPerformanceHeader1() } if(this.mask=="1"){ this.getPerformanceDetailC() @@ -281,33 +246,31 @@ export default { (this.branchCode = res.branchCode), (this.deptCode = res.deptCode), (this.areaCode = res.areaCode) - if (this.agentGrade.slice(0, 2) == 'A2') { + if (this.agentGrade.slice(0, 2) == 'A1') { + this.mask1 = 1 + }else 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.mask1 = 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) - } - }) - }, + // //获取代理人下级头像 + // 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 + // } + // }) + // }, getHeader1() { console.log(1111) let code = { @@ -344,17 +307,7 @@ export default { }, 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('parmas1'); window.localStorage.removeItem('parmas2'); }, } diff --git a/src/views/ebiz/performance/PerformanceInfo.vue b/src/views/ebiz/performance/PerformanceInfo.vue index 8bdcff2c5..dc5af1627 100644 --- a/src/views/ebiz/performance/PerformanceInfo.vue +++ b/src/views/ebiz/performance/PerformanceInfo.vue @@ -41,7 +41,7 @@
-
团队长
+
团队长
{{item.agentName}}