yusm hai 5 días
pai
achega
83377cbac9

+ 6 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java

@@ -36,7 +36,6 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
-import java.time.format.TextStyle;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -2740,7 +2739,9 @@ public class UserCorpwxTimeController {
             for (int i = 1; i <= daysInMonth; i++) {
                 LocalDate date = monthStart.withDayOfMonth(i);
                 dateList.add(String.valueOf(i));
-                weekList.add(date.getDayOfWeek().getDisplayName(TextStyle.SHORT, Locale.CHINESE).replace("星期", ""));
+                int dow = date.getDayOfWeek().getValue(); // 1=Mon...7=Sun
+                String[] cnDays = {"一", "二", "三", "四", "五", "六", "日"};
+                weekList.add(cnDays[dow - 1]);
             }
             result.put("dateList", dateList);
             result.put("weekList", weekList);
@@ -3076,7 +3077,9 @@ public class UserCorpwxTimeController {
             for (int i = 1; i <= daysInMonth; i++) {
                 LocalDate date = monthStart.withDayOfMonth(i);
                 dateList.add(String.valueOf(i));
-                weekList.add(date.getDayOfWeek().getDisplayName(TextStyle.SHORT, Locale.CHINESE).replace("星期", ""));
+                int dow = date.getDayOfWeek().getValue(); // 1=Mon...7=Sun
+                String[] cnDays = {"一", "二", "三", "四", "五", "六", "日"};
+                weekList.add(cnDays[dow - 1]);
             }
             result.put("dateList", dateList);
             result.put("weekList", weekList);

+ 9 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -6438,7 +6438,7 @@
                 </el-table-column>
                 <el-table-column
                   v-for="(date, index) in fictitiousAttendanceDateList"
-                  :key="date"
+                  :key="(monthPersonnel || '') + '_' + date"
                   :label="date"
                   align="center"
                   min-width="40"
@@ -6606,7 +6606,7 @@
                   </el-table-column>
                   <el-table-column
                     v-for="(date, index) in employeeCorpTimeDateList"
-                    :key="date"
+                    :key="(monthPersonnel || '') + '_' + date"
                     :label="date"
                     align="center"
                     width="40"
@@ -12788,6 +12788,8 @@ export default {
     // 获取员工假勤表
     getEmployeeHoliday() {
       this.fictitiousAttendanceLoading = true;
+      this.fictitiousAttendanceDateList = [];
+      this.fictitiousAttendanceWeekList = [];
       const month =
         this.monthPersonnel || this.dayjs(new Date()).format("YYYY-MM");
       const daysInMonth = this.dayjs(month + "-01").daysInMonth();
@@ -12852,6 +12854,8 @@ export default {
     // 获取员工考勤表
     getEmployeeCorpTime() {
       this.employeeCorpTimeLoading = true;
+      this.employeeCorpTimeDateList = [];
+      this.employeeCorpTimeWeekList = [];
       const month =
         this.monthPersonnel || this.dayjs(new Date()).format("YYYY-MM");
       this.postData(`/user-corpwx-time/getUserCorpwvTimeList`, {
@@ -12889,9 +12893,9 @@ export default {
 
     getEmployeeCorpTimeCellStyle(index, row) {
       const date = this.employeeCorpTimeDateList[index];
-      const fullDate = `${this.dayjs(new Date()).format("YYYY-MM")}-${String(
-        date,
-      ).padStart(2, "0")}`;
+      const fullDate = `${
+        this.monthPersonnel || this.dayjs(new Date()).format("YYYY-MM")
+      }-${String(date).padStart(2, "0")}`;
       const isRestDay = this.employeeCorpTimeRestDayList.includes(fullDate);
       return {
         display: "flex",