|
@@ -1122,10 +1122,11 @@ export function buildComponent(name, column, preview, vm) {
|
|
|
|
|
|
|
|
const hasStart = !!rawStart
|
|
const hasStart = !!rawStart
|
|
|
const hasEnd = !!rawEnd
|
|
const hasEnd = !!rawEnd
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 迟到判断(仅当有上班打卡时)
|
|
// 迟到判断(仅当有上班打卡时)
|
|
|
let isLate = false
|
|
let isLate = false
|
|
|
- if (hasStart) {
|
|
|
|
|
|
|
+ if (hasStart && (ext.zhuangTai1 !== '正常')) {
|
|
|
const startDateTime = new Date(rawStart)
|
|
const startDateTime = new Date(rawStart)
|
|
|
const banStart = new Date(ext.banCiKaiShi)
|
|
const banStart = new Date(ext.banCiKaiShi)
|
|
|
isLate = startDateTime > banStart
|
|
isLate = startDateTime > banStart
|
|
@@ -1133,14 +1134,14 @@ export function buildComponent(name, column, preview, vm) {
|
|
|
|
|
|
|
|
// 早退判断(仅当有下班打卡时)
|
|
// 早退判断(仅当有下班打卡时)
|
|
|
let isEarlyLeave = false
|
|
let isEarlyLeave = false
|
|
|
- if (hasEnd) {
|
|
|
|
|
|
|
+ if (hasEnd && (ext.zhuangTai2 !== '正常')) {
|
|
|
const endDateTime = new Date(rawEnd)
|
|
const endDateTime = new Date(rawEnd)
|
|
|
const banEnd = new Date(ext.banCiJieShu)
|
|
const banEnd = new Date(ext.banCiJieShu)
|
|
|
isEarlyLeave = endDateTime < banEnd
|
|
isEarlyLeave = endDateTime < banEnd
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 最终是否完全正常:有两次打卡 && 不迟到 && 不早退
|
|
|
|
|
- const isAllNormal = hasStart && hasEnd && !isLate && !isEarlyLeave
|
|
|
|
|
|
|
+ // 最终是否完全正常:有两次打卡 && 不迟到 && 不早退 && 两次打卡状态都为正常
|
|
|
|
|
+ const isAllNormal = hasStart && hasEnd && !isLate && !isEarlyLeave && ext.zhuangTai1 == '正常' && ext.zhuangTai2 == '正常'
|
|
|
|
|
|
|
|
// 小方块颜色与状态图标
|
|
// 小方块颜色与状态图标
|
|
|
const dotColor = isAllNormal ? '#67C23A' : '#F56C6C'
|
|
const dotColor = isAllNormal ? '#67C23A' : '#F56C6C'
|