签到bug修复

This commit is contained in:
2025-01-02 13:42:09 +08:00
parent 4a77a525bc
commit 324b01042f
4 changed files with 82 additions and 29 deletions

View File

@@ -441,8 +441,10 @@ export default {
const attendanceIndex = user.attendances.findIndex(
(i) => i.attendanceDay === dayIndex
);
if (attendanceIndex > -1) {
const attendance = user.attendances[attendanceIndex];
// 如果存在签到记录,使用对应项目的颜色
return {
backgroundColor: attendance.color || '#fdf6e4',
@@ -477,6 +479,7 @@ export default {
projectId: 0,
userId: this.selectUser.userId,
attendanceDay: this.selectIndex,
selectTime:this.queryParams.selectTime
}
addOaAttendance(this.form).then(res => {
this.getList()
@@ -487,6 +490,7 @@ export default {
this.form = {
projectId: 0,
attendanceDay: this.selectIndex,
selectTime:this.queryParams.selectTime
}
// 集体赋予状态
addBatchOaAttendance(this.form).then(res => {
@@ -501,6 +505,7 @@ export default {
projectId: 1,
userId: this.selectUser.userId,
attendanceDay: this.selectIndex,
selectTime:this.queryParams.selectTime
}
addOaAttendance(this.form).then(res => {
this.getList()
@@ -511,6 +516,7 @@ export default {
this.form = {
projectId: 1,
attendanceDay: this.selectIndex,
selectTime:this.queryParams.selectTime
}
// 集体赋予状态
addBatchOaAttendance(this.form).then(res => {
@@ -604,7 +610,6 @@ export default {
this.$message({message: '请选择工作时长', type: 'warning'})
return;
}
let time = this.timeFlag === 0 ? this.form.dayLength : this.form.hour
if (!this.selectAll) {
@@ -613,7 +618,8 @@ export default {
userId: this.selectUser.userId,
attendanceDay: this.selectIndex,
dayLength: this.timeFlag === 0 ? this.form.dayLength : undefined,
hour: this.timeFlag === 1 ? this.form.hour : undefined
hour: this.timeFlag === 1 ? this.form.hour : undefined,
selectTime:this.queryParams.selectTime
}
addOaAttendance(this.form).then(res => {
this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
@@ -625,7 +631,8 @@ export default {
projectId: project.projectId,
attendanceDay: this.selectIndex,
dayLength: this.timeFlag === 0 ? this.form.dayLength : undefined,
hour: this.timeFlag === 1 ? this.form.hour : undefined
hour: this.timeFlag === 1 ? this.form.hour : undefined,
selectTime:this.queryParams.selectTime
}
// 集体赋予状态
addBatchOaAttendance(this.form).then(res => {