This commit is contained in:
yanran200730
2022-05-30 16:59:55 +08:00
parent 4cdbb1959f
commit 9965c96598
2 changed files with 14 additions and 2 deletions

View File

@@ -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('请选择固定打卡点')
}