From efdfd1f7aaee0395d55bd0b018be96104cb9f74b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 29 十月 2026 13:11:01 +0800
Subject: [PATCH] 修复请假时长输入精度

---
 src/views/hrm/leave/data.ts |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/views/hrm/leave/data.ts b/src/views/hrm/leave/data.ts
index c6d5154..cc4c09b 100644
--- a/src/views/hrm/leave/data.ts
+++ b/src/views/hrm/leave/data.ts
@@ -2,8 +2,12 @@
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { HrmLeaveApi } from '#/api/hrm/leave';
 
+import { markRaw } from 'vue';
+
 import { DICT_TYPE } from '#/packages/constants/src';
 import { getDictOptions } from '#/packages/effects/hooks/src';
+
+import { UserSelect } from '#/views/system/user/components';
 
 /** 琛ㄥ崟绫诲瀷 */
 export type FormType = 'create' | 'detail' | 'update';
@@ -18,6 +22,15 @@
         triggerFields: [''],
         show: () => false,
       },
+    },
+    {
+      fieldName: 'userId',
+      label: '鐢宠浜�',
+      component: markRaw(UserSelect),
+      componentProps: {
+        placeholder: '璇烽�夋嫨鐢宠浜�',
+      },
+      rules: 'selectRequired',
     },
     {
       fieldName: 'leaveType',
@@ -59,13 +72,13 @@
       component: 'InputNumber',
       componentProps: {
         placeholder: '璇疯緭鍏ヨ鍋囨椂闀�',
-        min: 0.5,
+        min: 0.01,
         precision: 2,
-        step: 0.5,
+        step: 0.01,
         style: { width: '100%' },
       },
       rules: 'required',
-      suffix: '澶�',
+      suffix: '澶╋紙鏀寔灏忔暟锛�',
     },
     {
       fieldName: 'reason',
@@ -134,7 +147,7 @@
 export function useGridColumns(): VxeTableGridOptions<HrmLeaveApi.Leave>['columns'] {
   return [
     { field: 'id', title: '鐢宠缂栧彿', width: 80 },
-    { field: 'employeeName', title: '鐢宠浜�', minWidth: 100 },
+    { field: 'userName', title: '鐢宠浜�', minWidth: 100 },
     { field: 'deptName', title: '閮ㄩ棬', minWidth: 120 },
     {
       field: 'leaveType',
@@ -171,4 +184,4 @@
       },
     },
   ];
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3