liu
2 天以前 e47bc9e53ed3d64016c1e0db67d280e63b367e07
导入模板下载 导入 计算迟到加班早退
已修改3个文件
14 ■■■■ 文件已修改
src/api/hrm/attendance/record/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/attendance/record/data.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/attendance/record/modules/import-form.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/hrm/attendance/record/index.ts
@@ -10,6 +10,7 @@
    userName?: string;
    deptId?: number;
    deptName?: string;
    phone?: string;
    date?: string;
    clockInTime?: string;
    clockOutTime?: string;
src/views/hrm/attendance/record/data.ts
@@ -75,6 +75,7 @@
  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 },
    {
src/views/hrm/attendance/record/modules/import-form.vue
@@ -23,10 +23,18 @@
    }
    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();
    }