| | |
| | | userName?: string; |
| | | deptId?: number; |
| | | deptName?: string; |
| | | phone?: string; |
| | | date?: string; |
| | | clockInTime?: string; |
| | | clockOutTime?: string; |
| | |
| | | return [ |
| | | { field: 'userName', title: '员工姓名', minWidth: 100 }, |
| | | { field: 'deptName', title: '部门', minWidth: 120 }, |
| | | { field: 'phone', title: '手机号', width: 130 }, |
| | | { field: 'date', title: '考勤日期', width: 110 }, |
| | | { field: 'clockInTime', title: '上班打卡时间', width: 160 }, |
| | | { |
| | |
| | | } |
| | | modalApi.lock(); |
| | | try { |
| | | await importAttendanceRecord(fileList.value[0] as File, updateSupport.value); |
| | | const res: string = await importAttendanceRecord( |
| | | fileList.value[0] as File, |
| | | updateSupport.value, |
| | | ); |
| | | await modalApi.close(); |
| | | emit('success'); |
| | | message.success('导入成功'); |
| | | // 后端返回导入结果(含失败原因,例如“以下员工不存在...;需补充手机号...”) |
| | | if (res && res.length > 0) { |
| | | message[res.includes('未') || res.includes('不完整') ? 'warning' : 'success'](res); |
| | | } else { |
| | | message.success('导入成功'); |
| | | } |
| | | } finally { |
| | | modalApi.unlock(); |
| | | } |