云
6 天以前 ec8ff4f6259404460a0b4437e29a40986c2c4b9d
src/views/hrm/overtime/index.vue
@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { automaticApproval } from '#/store/audit-policy';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { HrmOvertimeApi } from '#/api/hrm/overtime';
@@ -64,9 +65,14 @@
const submitLoading = ref(false);
async function handleSubmit(row: HrmOvertimeApi.Overtime) {
  processList.value = await getOvertimeApproveProcessDefinitionList();
  processList.value = automaticApproval.value ? [] : await getOvertimeApproveProcessDefinitionList();
  currentRow.value = row;
  selectedProcessKey.value = undefined;
  if (automaticApproval.value) {
    selectedProcessKey.value = 'hrm_overtime';
    await confirmSubmit();
    return;
  }
  submitModalVisible.value = true;
}
@@ -78,7 +84,7 @@
  submitLoading.value = true;
  try {
    await submitOvertime(currentRow.value!.id!, selectedProcessKey.value);
    message.success('已提交至协同办公审批');
    message.success(automaticApproval.value ? '已提交生效' : '已提交至协同办公审批');
    submitModalVisible.value = false;
    handleRefresh();
  } finally {