From fa6c14c60ac71f403e330a0af4ea8809b6e82481 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 26 Feb 2023 00:23:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monthAttendanceManage/monthAttendanceManage.js | 13 +++++++++++-- .../staffAttendanceManage.html | 2 +- .../staffAttendanceManage/staffAttendanceManage.js | 13 ++++++++++++- public/vcCore/vcFramework.js | 6 +++--- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/public/pages/property/monthAttendanceManage/monthAttendanceManage.js b/public/pages/property/monthAttendanceManage/monthAttendanceManage.js index d6f7399a4..4d7949689 100755 --- a/public/pages/property/monthAttendanceManage/monthAttendanceManage.js +++ b/public/pages/property/monthAttendanceManage/monthAttendanceManage.js @@ -139,14 +139,23 @@ }, _getDayDetail:function(detail,day){ + + let _date = new Date(); + let _taskYear = $that.monthAttendanceManageInfo.conditions.taskYear; + let _taskMonth = $that.monthAttendanceManageInfo.conditions.taskMonth; + if(_taskYear == _date.getFullYear() && _taskMonth == (_date.getMonth()+1) && day > _date.getDate()){ + return "未到时间"; + } + + if(!detail.hasOwnProperty(day)){ - return "休息"; + return "无需考勤"; } let _details = detail[day]; if(!_details){ - return "休息"; + return "无需考勤"; } let _value = ""; diff --git a/public/pages/property/staffAttendanceManage/staffAttendanceManage.html b/public/pages/property/staffAttendanceManage/staffAttendanceManage.html index 0bcf63a51..7b07de829 100644 --- a/public/pages/property/staffAttendanceManage/staffAttendanceManage.html +++ b/public/pages/property/staffAttendanceManage/staffAttendanceManage.html @@ -25,7 +25,7 @@
{{staffAttendanceManageInfo.curYear}}-{{staffAttendanceManageInfo.curMonth}}-{{index}}
-
休息
+
{{item.rest}}
{{item.specCd=='1001'?'上班':'下班'}}: {{vc.timeFormat(item.checkTime)}} diff --git a/public/pages/property/staffAttendanceManage/staffAttendanceManage.js b/public/pages/property/staffAttendanceManage/staffAttendanceManage.js index 6ec19116f..5b1cfd32d 100644 --- a/public/pages/property/staffAttendanceManage/staffAttendanceManage.js +++ b/public/pages/property/staffAttendanceManage/staffAttendanceManage.js @@ -92,8 +92,19 @@ _getAttendanceDetail: function (_day) { let _attendance = $that._getDayAttendance(_day); if (!_attendance) { + + let _date = new Date(); + let _taskYear = $that.staffAttendanceManageInfo.curYear + let _taskMonth = $that.staffAttendanceManageInfo.curMonth; + if(_taskYear == _date.getFullYear() && parseInt(_taskMonth) == (_date.getMonth()+1) && _day > _date.getDate()){ + return [{ + rest:'未到时间', + }];; + } + + return [{ - rest:'休息', + rest:'无需考勤', }]; } return _attendance.attendanceClassesTaskDetails; diff --git a/public/vcCore/vcFramework.js b/public/vcCore/vcFramework.js index 06c27da50..5bff41212 100755 --- a/public/vcCore/vcFramework.js +++ b/public/vcCore/vcFramework.js @@ -1922,7 +1922,7 @@ let _date = new Date(); let y = _date.getFullYear(); let m = _date.getMonth(); - return daysInMonth(y,m); + return vcFramework.daysInMonth(y,m); } vcFramework.daysInMonth = function(year, month) { @@ -1953,7 +1953,7 @@ } else { nextM = m + _month } - let daysInNextMonth = daysInMonth(nextY, nextM); + let daysInNextMonth = vcFramework.daysInMonth(nextY, nextM); let day = _date.getDate(); if (day > daysInNextMonth) { day = daysInNextMonth; @@ -1973,7 +1973,7 @@ } else { nextM = m + _month } - let daysInNextMonth = daysInMonth(nextY, nextM); + let daysInNextMonth = vcFramework.daysInMonth(nextY, nextM); let day = _date.getDate(); if (day > daysInNextMonth) { day = daysInNextMonth;