Commit 09f85335 by 无尘

fix: 修改素材

parent 346d27ed
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-10-21 14:27:29
* @LastEditors : 无尘
* @LastEditTime : 2019-12-26 14:45:28
* @LastEditTime : 2019-12-26 17:03:47
-->
<!--
......@@ -424,8 +424,8 @@ export default {
const diff = parseInt(item.startTime.split(':')[0]) - 8;
//
if (diff > 0 && (await that.compareDate(rangeStart, item.endTime))) {
// 09:00-18:00 09:00 -8 = 01:00 <18:00
rangeStart = await that.hmMinuxhm(item.endTime, '00:01'); // 上班时间 - 8 ,如果比下班时间还小,就把下班时间作为可打卡开始的最小时间
// 09:00-18:00 09:00 -8 = 01:00 < 18:00 可是不能用下面计算
// rangeStart = await that.hmMinuxhm(item.endTime, '00:01'); // 上班时间 - 8 ,如果比下班时间还小,就把下班时间作为可打卡开始的最小时间
}
if ((await that.compareDate(item.startTime, item.endTime)) && diff < 0 && (await that.compareDate(rangeStart, item.endTime))) {
// 01:00-23:00 01:00 -8 = 13:00 < 23:00
......@@ -438,12 +438,13 @@ export default {
rangeStart = await that.hmPlushm(item.endTime, '00:01');
}
// 上班 < 下班, 上班-8 >0 && 差小于 下班
if (!(await that.compareDate(item.startTime, item.endTime)) && diff > 0 && ((await that.compareDate(rangeStart, item.endTime)) || String(rangeStart) == String(item.endTime))) {
if (!(await that.compareDate(item.startTime, item.endTime)) && diff >= 0 && ((await that.compareDate(rangeStart, item.endTime)) || String(rangeStart) == String(item.endTime))) {
// 09:00-01:00 09:00-8 = 01:00 = 01:00(特殊)
// 09:00-05:00 09:00-8 = 01:00 < 05:00
// 08:00-07:00 08:00-8 = 00:00 < 07:00
rangeStart = await that.hmPlushm(item.endTime, '00:01');
}
// 比较开始于结束,如果开始大于结束,分段计算
// 比较开始于结束,如果开始大于结束,分段计算;
if (!(await that.compareDate(rangeStart, rangeEnd))) {
arr.push([rangeStart + ':00', '23:59:00'].join('-'));
arr.push(['00:00:00', rangeEnd + ':00'].join('-'));
......@@ -854,14 +855,18 @@ export default {
showMsg.showmsg('请填写休息时间', 'warning');
return false;
}
that.formData.relaxStartDate = that.formData.relaxFlag ? that.formData.relaxStartDate : '';
that.formData.relaxEndDate = that.formData.relaxFlag ? that.formData.relaxEndDate : '';
if (that.formData.allowLateFlag && !that.formData.allowLateDate) {
showMsg.showmsg('请填写允许迟到时间', 'warning');
return false;
}
that.formData.allowLateDate = that.formData.allowLateFlag ? that.formData.allowLateDate : '';
if (that.formData.moreLateFlag && !that.formData.moreLateDate) {
showMsg.showmsg('请填写严重迟到时间', 'warning');
return false;
}
that.formData.moreLateDate = that.formData.moreLateFlag ? that.formData.moreLateDate : '';
if (that.formData.allowLateFlag && that.formData.moreLateFlag && that.formData.allowLateDate >= that.formData.moreLateDate) {
showMsg.showmsg('严重迟到时间必须大于迟到允许时间', 'warning');
return false;
......@@ -870,6 +875,7 @@ export default {
showMsg.showmsg('请填写旷工迟到时间', 'warning');
return false;
}
that.formData.mostLateDate = that.formData.mostLateFlag ? that.formData.mostLateDate : '';
if (that.formData.moreLateFlag && that.formData.mostLateFlag && that.formData.moreLateDate >= that.formData.mostLateDate) {
showMsg.showmsg('旷工迟到时间必须大于严重迟到时间', 'warning');
return false;
......@@ -891,6 +897,7 @@ export default {
showMsg.showmsg('晚走晚到后面的规则时间必须大于前面的时间', 'warning');
return false;
}
that.formData.lateRuleJson = that.formData.lateRule ? that.formData.lateRuleJson : [];
if (!that.formData.clockType) {
that.formData.classessTimesJson.forEach(ele => {
const arrA = ele.forbidStartBeginTime[0].split('-');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment