Merge branch 'feature/GFRS-232【待确定】业绩查询' into dev

This commit is contained in:
huichao
2020-07-28 16:59:11 +08:00
4 changed files with 71 additions and 98 deletions

View File

@@ -50,19 +50,19 @@
</div> </div>
<div class="flex h50 border-gb ml15 align-items-c fwb"> <div class="flex h50 border-gb ml15 align-items-c fwb">
<div>迟到</div> <div>迟到</div>
<div class="absolute right30 c-gray-base">{{lateNum}},{{lateTime}}分钟</div> <div class="absolute right30 " :class="Number(lateNum)>0?'red':'c-gray-base'">{{lateNum}},{{lateTime}}分钟</div>
</div> </div>
<div class="flex h50 border-gb ml15 align-items-c fwb"> <div class="flex h50 border-gb ml15 align-items-c fwb">
<div>早退</div> <div>早退</div>
<div class="absolute right30 red">{{earllyNum}}{{earllyTime}}分钟</div> <div class="absolute right30" :class="Number(earllyNum)>0?'red':'c-gray-base'">{{earllyNum}}{{earllyTime}}分钟</div>
</div> </div>
<div class="flex h50 border-gb ml15 align-items-c fwb"> <div class="flex h50 border-gb ml15 align-items-c fwb">
<div>缺卡</div> <div>缺卡</div>
<div class="absolute right30 red">{{forgetNum}}</div> <div class="absolute right30 " :class="Number(forgetNum)>0?'red':'c-gray-base'">{{forgetNum}}</div>
</div> </div>
<div class="flex h50 ml15 align-items-c fwb"> <div class="flex h50 ml15 align-items-c fwb">
<div>旷工</div> <div>旷工</div>
<div class="absolute right30 red">{{dontWork}}</div> <div class="absolute right30 " :class="Number(dontWork)>0?'red':'c-gray-base'">{{dontWork}}</div>
</div> </div>
</div> </div>
<div class="fs13 red mt10 ml15">最终参训数据以次月公司下发的参训系统数据为准</div> <div class="fs13 red mt10 ml15">最终参训数据以次月公司下发的参训系统数据为准</div>

View File

@@ -146,6 +146,7 @@ export default {
date: String(this.time), date: String(this.time),
} }
//日上班 //日上班
if (Date.parse(this.time) <= Date.parse(formatDate(new Date(), 'YY-MM-DD'))) {
getDayDetail(date).then((res) => { getDayDetail(date).then((res) => {
console.log(res) console.log(res)
if (res.result == 0) { 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) { dateConfirm(date) {
this.time = utils.formatDate(date, 'YY-MM-DD') this.time = utils.formatDate(date, 'YY-MM-DD')
@@ -188,33 +198,43 @@ export default {
let date1 = { let date1 = {
date: this.time, date: this.time,
} }
getDayDetail(date1).then((res) => { if (Date.parse(this.time) <= Date.parse(formatDate(new Date(), 'YY-MM-DD'))) {
console.log(res) getDayDetail(date1).then((res) => {
if (res.result == 0) { console.log(res)
;(this.workTime = res.content.workTime), if (res.result == 0) {
(this.workTimeOff = res.content.workTimeoff), ;(this.workTime = res.content.workTime),
(this.count = res.content.count), (this.workTimeOff = res.content.workTimeoff),
(this.amount = res.content.amount), (this.count = res.content.count),
(this.flagGo = res.content.flagGo), (this.amount = res.content.amount),
(this.flagOff = res.content.flagOff), (this.flagGo = res.content.flagGo),
(this.goWorkTime = res.content.goWorkTime), (this.flagOff = res.content.flagOff),
(this.offWorkTime = res.content.offWorkTime) (this.goWorkTime = res.content.goWorkTime),
if (this.flagGo == '0' || this.flagOff == '0') { (this.offWorkTime = res.content.offWorkTime)
this.goWorkTime = this.goWorkTime.split(' ')[1] if (this.flagGo == '0' || this.flagOff == '0') {
this.offWorkTime = this.offWorkTime.split(' ')[1] this.goWorkTime = this.goWorkTime.split(' ')[1]
this.text = '正常' 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 = '缺勤' }else{
} this.flagGo="2"
if (this.flagGo == '2') { this.flagOff="3"
this.text1 = '迟到' this.text1='未打卡'
} this.count='0'
if (this.flagOff == '3') { this.amount='0'
this.text1 = '早退' this.offWorkTime=''
} this.goWorkTime=''
} }
})
}, },
//月历 //月历
getMonthDetail1() { getMonthDetail1() {
@@ -237,7 +257,7 @@ export default {
date1.push(workTime1) date1.push(workTime1)
} }
} }
obj1.date=date1 obj1.date = date1
arr1.push(obj1) arr1.push(obj1)
console.log(obj1) console.log(obj1)
// this.mask=arr1 // this.mask=arr1
@@ -298,7 +318,7 @@ export default {
.text { .text {
line-height: 18px; line-height: 18px;
border-radius: 10px; border-radius: 10px;
background: #FFA500; background: #ffa500;
color: white; color: white;
} }
.text1 { .text1 {

View File

@@ -138,38 +138,6 @@ export default {
} }
}, },
created() { 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(() => { setTimeout(() => {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_right_button', { EWebBridge.webCallAppInJs('webview_right_button', {
@@ -181,11 +149,8 @@ export default {
], ],
}) })
}, 1000) }, 1000)
// this.performanceData()
if (this.code == '') { if (this.code == '') {
this.getPerformanceHeader1() // this.getPerformanceHeader1()
} }
if(this.mask=="1"){ if(this.mask=="1"){
this.getPerformanceDetailC() this.getPerformanceDetailC()
@@ -281,33 +246,31 @@ export default {
(this.branchCode = res.branchCode), (this.branchCode = res.branchCode),
(this.deptCode = res.deptCode), (this.deptCode = res.deptCode),
(this.areaCode = res.areaCode) (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) ;(this.obj.unitName = this.unitName), (this.obj.code = this.branchCode)
} else if (this.agentGrade.slice(0, 2) == 'A3') { } else if (this.agentGrade.slice(0, 2) == 'A3') {
;(this.obj.unitName = this.saleArea), (this.obj.code = this.deptCode) ;(this.obj.unitName = this.saleArea), (this.obj.code = this.deptCode)
} else if (this.agentGrade.slice(0, 2) == 'A4') { } else if (this.agentGrade.slice(0, 2) == 'A4') {
} }
if (this.agentGrade == 'A101') {
this.mask1 = 1
}
this.getPerformanceDetailC() this.getPerformanceDetailC()
} }
}) })
}, },
//获取代理人下级头像 // //获取代理人下级头像
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) {
for (let i = 0; i < res.content.length; i++) { // for (let i = 0; i < res.content.length; i++) {
res.content[i].isShowImg = true // res.content[i].isShowImg = true
} // }
this.headerList = res.content // this.headerList = res.content
console.log(this.headerList) // }
} // })
}) // },
},
getHeader1() { getHeader1() {
console.log(1111) console.log(1111)
let code = { let code = {
@@ -344,17 +307,7 @@ export default {
}, },
destroyed: function () { destroyed: function () {
console.log("我已经离开了!"); console.log("我已经离开了!");
let parmas1={} window.localStorage.removeItem('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'); window.localStorage.removeItem('parmas2');
}, },
} }

View File

@@ -41,7 +41,7 @@
<div @click="(InfoDetails(index))"> <div @click="(InfoDetails(index))">
<!-- <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 class="h40 w40" src="@/assets/images/u188.png" alt /> <img class="h40 w40" src="@/assets/images/u188.png" alt />
<div class="absolute fs12 white captain" v-if="String(item.agentName)==String(Name).split('组')[0]">团队长</div> <div class="absolute fs12 white captain" v-if="String(item.agentName)==String(Name).split('组')[0] ||String(item.agentName)==String(unitName).split('组')[0]">团队长</div>
<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>