|
@@ -23,7 +23,7 @@
|
|
|
<div class="c_calendar">
|
|
|
<Calendar ref="calendarRef" @selectDay="selectDay" @selectInfo="selectInfo"></Calendar>
|
|
|
</div>
|
|
|
- <div class="c_tip" v-if="info.iswd">当日班次:{{'固定上下班'}} 班次 {{'08:30-17:30'}}</div>
|
|
|
+ <div class="c_tip" v-if="info.iswd">当日班次:{{'固定上下班'}} 班次 {{workingTime||'08:30'}}-{{offWorkTime||'17:30'}}</div>
|
|
|
<div class="c_tip" v-else>当日班次:休息</div>
|
|
|
<div class="c_tip">出勤统计:打卡{{info.clockTimes||0}}次,工时{{info.workHours||0}}小时</div>
|
|
|
<div class="c_time" v-if="info&&info.status==1">
|
|
@@ -64,6 +64,8 @@
|
|
|
components:{ Calendar,Tabbar },
|
|
|
data(){
|
|
|
return {
|
|
|
+ workingTime:'',
|
|
|
+ offWorkTime:'',
|
|
|
currentDay:'',
|
|
|
currentTime:'',
|
|
|
clockDays:'',
|
|
@@ -87,11 +89,19 @@
|
|
|
this.getUserMonthClock(new Date().getFullYear(),new Date().getMonth()+1);
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.getRules();
|
|
|
let d = new Date();
|
|
|
this.minDate = new Date(d.getFullYear()-1,d.getMonth()+1,d.getDate()).getTime();
|
|
|
this.maxDate = new Date().getTime();
|
|
|
},
|
|
|
methods:{
|
|
|
+ getRules(){
|
|
|
+ this.$api.get('/wms/outsourced/attendance/rule').then(res=>{
|
|
|
+ if(res.data.code!==0) return this.$showToast(res.data.msg)
|
|
|
+ this.workingTime = res.data.data.workingTime.slice(0,5);
|
|
|
+ this.offWorkTime = res.data.data.offWorkTime.slice(0,5);
|
|
|
+ })
|
|
|
+ },
|
|
|
getUserMonthClock(year,month){
|
|
|
this.$api.get('/wms/outsourced/attendance/listByUserId',{
|
|
|
outUserId:this.userInfo.id,
|