From 9965c96598426db18caed51d92aaa2967f57b3ff Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 30 May 2022 16:59:55 +0800 Subject: [PATCH] bug --- src/saas/AppCountryAlbum/Attendance.vue | 2 +- src/saas/AppCountryAlbum/AttendanceFiexdTime.vue | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/saas/AppCountryAlbum/Attendance.vue b/src/saas/AppCountryAlbum/Attendance.vue index c57465dc..b4704caf 100644 --- a/src/saas/AppCountryAlbum/Attendance.vue +++ b/src/saas/AppCountryAlbum/Attendance.vue @@ -22,7 +22,7 @@ 已出勤 {{ attendanceCount.hasIn || 0 }} 未出勤 {{ attendanceCount.hasOut || 0 }} -
考勤设置
+
考勤设置
diff --git a/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue b/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue index 06353a78..0034d068 100644 --- a/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue +++ b/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue @@ -206,14 +206,22 @@ return this.$u.toast('请选择下班打卡时间') } + if (this.$dayjs('2020-06-01 ' + this.form.workOutTime).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.workInTime).valueOf()) { + return this.$u.toast('下班时间不能早于上班时间') + } + if (this.form.openRestTime === '1') { if (!this.form.restTimeBegin) { - return this.$u.toast('请选择休息时间') + return this.$u.toast('请选择休息开始时间') } if (!this.form.restTimeEnd) { return this.$u.toast('请选择休息结束时间') } + + if (this.$dayjs('2020-06-01 ' + this.form.restTimeEnd).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.restTimeBegin).valueOf()) { + return this.$u.toast('休息结束时间不能早于休息开始时间') + } } if (!this.form.workInFrom) { @@ -224,6 +232,10 @@ return this.$u.toast('请选择下班打卡最晚时间') } + if (this.$dayjs('2020-06-01 ' + this.form.workOutEnd).valueOf() <= this.$dayjs('2020-06-01 ' + this.form.workInFrom).valueOf()) { + return this.$u.toast('下班打卡最晚时间不能早于上班打卡最早时间') + } + if (this.form.openWorkPoint === '1' && !this.address.address) { return this.$u.toast('请选择固定打卡点') }