| | |
| | | <script lang="ts" setup> |
| | | import { automaticApproval } from '#/store/audit-policy'; |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { HrmLeaveApi } from '#/api/hrm/leave'; |
| | | |
| | |
| | | |
| | | /** 提交请假申请(先选择审批流程) */ |
| | | async function handleSubmit(row: HrmLeaveApi.Leave) { |
| | | processList.value = await getLeaveApproveProcessDefinitionList(); |
| | | processList.value = automaticApproval.value ? [] : await getLeaveApproveProcessDefinitionList(); |
| | | currentRow.value = row; |
| | | selectedProcessKey.value = undefined; |
| | | if (automaticApproval.value) { |
| | | selectedProcessKey.value = 'hrm_leave'; |
| | | await confirmSubmit(); |
| | | return; |
| | | } |
| | | submitModalVisible.value = true; |
| | | } |
| | | |