| | |
| | | <script lang="ts" setup> |
| | | import { automaticApproval } from '#/store/audit-policy'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { HrmAttendanceExceptionApi } from '#/api/hrm/attendance/exception'; |
| | | |
| | |
| | | |
| | | /** 提交考勤异常申请 */ |
| | | async function handleSubmit(row: HrmAttendanceExceptionApi.AttendanceException) { |
| | | const res = await getAttendanceExceptionApproveProcessList(); |
| | | const res = automaticApproval.value ? [] : await getAttendanceExceptionApproveProcessList(); |
| | | processList.value = res; |
| | | currentRow.value = row; |
| | | selectedProcessKey.value = undefined; |
| | | if (automaticApproval.value) { |
| | | selectedProcessKey.value = 'hrm_attendance_exception'; |
| | | await confirmSubmit(); |
| | | return; |
| | | } |
| | | submitModalVisible.value = true; |
| | | } |
| | | |
| | |
| | | submitLoading.value = true; |
| | | try { |
| | | await submitAttendanceException(currentRow.value!.id!, selectedProcessKey.value); |
| | | message.success('提交审批成功'); |
| | | message.success(automaticApproval.value ? '已提交生效' : '提交审批成功'); |
| | | submitModalVisible.value = false; |
| | | handleRefresh(); |
| | | } finally { |