|
|
@@ -76,9 +76,9 @@ export default {
|
|
|
},
|
|
|
columns: [
|
|
|
{ prop: 'bian_zhi_ren_', label: '申请人', tags: userOption, width: 100 },
|
|
|
- { prop: 'bian_zhi_shi_jian', label: '申请时间', dateFormat: 'yyyy-MM-dd HH:mm', sortable: 'custom', width: 140 },
|
|
|
+ { prop: 'bian_zhi_shi_jian', label: '申请时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', sortable: 'custom', width: 140 },
|
|
|
{ prop: 'shen_he_ren_', label: '审批人', tags: userOption, dataType: 'stringArray', separator: ',', width: 200 },
|
|
|
- { prop: 'shen_he_shi_jian_', label: '审批时间', dateFormat: 'yyyy-MM-dd HH:mm', sortable: 'custom', width: 140 },
|
|
|
+ { prop: 'shen_he_shi_jian_', label: '审批时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', sortable: 'custom', width: 140 },
|
|
|
{ prop: 'zhuang_tai_', label: '状态', width: 90 },
|
|
|
{ prop: 'bu_ka_ri_qi_', label: '补卡日期', dateFormat: 'yyyy-MM-dd', sortable: 'custom', width: 100 },
|
|
|
{ prop: 'bu_ka_shi_jian_', label: '补卡时间', dateFormat: 'HH:mm:ss', sortable: 'custom', width: 100 },
|
|
|
@@ -266,7 +266,22 @@ export default {
|
|
|
if (updateData.zhuangTai1 === '正常' && updateData.zhuangTai2 === '正常') {
|
|
|
updateData.kaoQinZhuangTa = '正常'
|
|
|
}
|
|
|
- updateData.chiDaoShiChang = null
|
|
|
+ updateData.daKaCiShu += 1
|
|
|
+ if (updateData.zhuangTai1 === '正常' && updateData.zhuangTai2 === '正常') {
|
|
|
+ // 打卡状态都正常后,迟到分钟清0
|
|
|
+ updateData.chiDaoShiChang = null
|
|
|
+ }
|
|
|
+ // 计算实际工作时长
|
|
|
+ if (updateData.daKaShiJian1 && updateData.daKaShiJian2) {
|
|
|
+ // 将时间字符串转换为Date对象
|
|
|
+ const date1 = new Date(updateData.daKaShiJian1.replace(/-/g, '/'))
|
|
|
+ const date2 = new Date(updateData.daKaShiJian2.replace(/-/g, '/'))
|
|
|
+ // 计算时间差(毫秒)
|
|
|
+ const diffInMs = date2 - date1
|
|
|
+ // 转换为分钟(四舍五入保留整数)
|
|
|
+ const diffInMinutes = Math.round(diffInMs / (1000 * 60))
|
|
|
+ updateData.gongZuoShiChan = diffInMinutes
|
|
|
+ }
|
|
|
saveAttendanceDetail(updateData)
|
|
|
})
|
|
|
},
|