From 2af66bb5090434a077f8b5b6b01e2ac4248d1cdd Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 05 十一月 2026 20:29:07 +0800
Subject: [PATCH] fix(hrm): 考勤异常申请字段与异常类型修正
---
src/views/hrm/attendance/exception/data.ts | 37 +++++++++++++++++++++++++------------
1 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/src/views/hrm/attendance/exception/data.ts b/src/views/hrm/attendance/exception/data.ts
index 6c6784d..ca0a0e5 100644
--- a/src/views/hrm/attendance/exception/data.ts
+++ b/src/views/hrm/attendance/exception/data.ts
@@ -8,6 +8,18 @@
/** 琛ㄥ崟绫诲瀷 */
export type FormType = 'create' | 'detail';
+/** 鑰冨嫟寮傚父绫诲瀷锛屼笌鍚庣 HrmAttendanceExceptionTypeEnum 淇濇寔涓�鑷� */
+const EXCEPTION_TYPE_OPTIONS = [
+ { label: '琛ュ崱', value: 1 },
+ { label: '鍔犵彮', value: 2 },
+ { label: '鍑哄樊', value: 3 },
+];
+
+/** 鑰冨嫟寮傚父绫诲瀷鍚嶇О */
+export function formatExceptionType(value?: number) {
+ return EXCEPTION_TYPE_OPTIONS.find((item) => item.value === value)?.label ?? '-';
+}
+
/** 鏂板鑰冨嫟寮傚父鐢宠鐨勮〃鍗� */
export function useFormSchema(formType: FormType): VbenFormSchema[] {
return [
@@ -20,28 +32,23 @@
},
},
{
- fieldName: 'date',
- label: '鑰冨嫟鏃ユ湡',
+ fieldName: 'exceptionDate',
+ label: '寮傚父鏃ユ湡',
component: 'DatePicker',
componentProps: {
- placeholder: '璇烽�夋嫨鑰冨嫟鏃ユ湡',
+ placeholder: '璇烽�夋嫨寮傚父鏃ユ湡',
valueFormat: 'YYYY-MM-DD',
style: { width: '100%' },
},
rules: 'required',
},
{
- fieldName: 'exceptionType',
+ fieldName: 'type',
label: '寮傚父绫诲瀷',
component: 'Select',
componentProps: {
placeholder: '璇烽�夋嫨寮傚父绫诲瀷',
- options: [
- { label: '婕忔墦鍗�', value: 1 },
- { label: '杩熷埌', value: 2 },
- { label: '鏃╅��', value: 3 },
- { label: '鍏朵粬', value: 4 },
- ],
+ options: EXCEPTION_TYPE_OPTIONS,
},
rules: 'selectRequired',
},
@@ -113,8 +120,14 @@
return [
{ field: 'userName', title: '鐢宠浜�', minWidth: 100 },
{ field: 'deptName', title: '閮ㄩ棬', minWidth: 120 },
- { field: 'date', title: '鑰冨嫟鏃ユ湡', width: 110 },
- { field: 'exceptionTypeName', title: '寮傚父绫诲瀷', width: 100 },
+ { field: 'exceptionDate', title: '寮傚父鏃ユ湡', width: 110 },
+ {
+ field: 'type',
+ title: '寮傚父绫诲瀷',
+ width: 100,
+ formatter: ({ cellValue }: { cellValue: number }) =>
+ formatExceptionType(cellValue),
+ },
{ field: 'reason', title: '寮傚父鍘熷洜', minWidth: 200 },
{
field: 'status',
--
Gitblit v1.9.3