From 4ffc61bbe8dd6ec89965a8e2448725f514075b53 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 08 七月 2026 13:29:32 +0800
Subject: [PATCH] 银川 1.考勤管理页面开发、联调
---
src/views/hrm/attendance/exception/index.vue | 65 ++++++++++++++++++++++++++++++--
1 files changed, 60 insertions(+), 5 deletions(-)
diff --git a/src/views/hrm/attendance/exception/index.vue b/src/views/hrm/attendance/exception/index.vue
index ea9bbee..acd5d7a 100644
--- a/src/views/hrm/attendance/exception/index.vue
+++ b/src/views/hrm/attendance/exception/index.vue
@@ -2,12 +2,18 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { HrmAttendanceExceptionApi } from '#/api/hrm/attendance/exception';
+import { ref } from 'vue';
+
import { Page, useVbenModal } from '#/packages/effects/common-ui/src';
-import { message } from 'ant-design-vue';
+import { message, Modal, Select } from 'ant-design-vue';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
-import { getAttendanceExceptionPage, submitAttendanceException } from '#/api/hrm/attendance/exception';
+import {
+ getAttendanceExceptionApproveProcessList,
+ getAttendanceExceptionPage,
+ submitAttendanceException,
+} from '#/api/hrm/attendance/exception';
import { $t } from '#/locales';
import { useGridColumns, useGridFormSchema } from './data';
@@ -33,11 +39,37 @@
formModalApi.setData({ id: row.id, formType: 'detail' }).open();
}
+/** 鎻愪氦瀹℃壒寮圭獥 */
+const submitModalVisible = ref(false);
+const currentRow = ref<HrmAttendanceExceptionApi.AttendanceException>();
+const processList = ref<HrmAttendanceExceptionApi.ApproveProcess[]>([]);
+const selectedProcessKey = ref<string>();
+const submitLoading = ref(false);
+
/** 鎻愪氦鑰冨嫟寮傚父鐢宠 */
async function handleSubmit(row: HrmAttendanceExceptionApi.AttendanceException) {
- await submitAttendanceException(row.id!);
- message.success('鎻愪氦鎴愬姛');
- handleRefresh();
+ const res = await getAttendanceExceptionApproveProcessList();
+ processList.value = res;
+ currentRow.value = row;
+ selectedProcessKey.value = undefined;
+ submitModalVisible.value = true;
+}
+
+/** 纭鎻愪氦 */
+async function confirmSubmit() {
+ if (!selectedProcessKey.value) {
+ message.warning('璇烽�夋嫨瀹℃壒娴佺▼');
+ return;
+ }
+ submitLoading.value = true;
+ try {
+ await submitAttendanceException(currentRow.value!.id!, selectedProcessKey.value);
+ message.success('鎻愪氦瀹℃壒鎴愬姛');
+ submitModalVisible.value = false;
+ handleRefresh();
+ } finally {
+ submitLoading.value = false;
+ }
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -106,5 +138,28 @@
/>
</template>
</Grid>
+
+ <!-- 鎻愪氦瀹℃壒寮圭獥 -->
+ <Modal
+ v-model:open="submitModalVisible"
+ title="閫夋嫨瀹℃壒娴佺▼"
+ width="400px"
+ @ok="confirmSubmit"
+ :confirmLoading="submitLoading"
+ >
+ <Select
+ v-model:value="selectedProcessKey"
+ placeholder="璇烽�夋嫨瀹℃壒娴佺▼"
+ class="w-full"
+ >
+ <Select.Option
+ v-for="item in processList"
+ :key="item.key"
+ :value="item.key"
+ >
+ {{ item.name }}
+ </Select.Option>
+ </Select>
+ </Modal>
</Page>
</template>
\ No newline at end of file
--
Gitblit v1.9.3