From 573c4975560e16b43651d07afdcd93732708e103 Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期六, 24 十月 2026 12:56:31 +0800
Subject: [PATCH] feat(hrm): 调岗申请表单新增「调岗人」选择,选中后自动带出原部门/原岗位

---
 src/views/hrm/transfer/data.ts |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/views/hrm/transfer/data.ts b/src/views/hrm/transfer/data.ts
index e6f2411..c4e4c31 100644
--- a/src/views/hrm/transfer/data.ts
+++ b/src/views/hrm/transfer/data.ts
@@ -7,6 +7,7 @@
 
 import { getDeptList } from '#/api/system/dept';
 import { getSimplePostList } from '#/api/system/post';
+import { getEmployeeSimpleList } from '#/api/hrm/employee';
 import { handleTree } from '#/packages/utils/src';
 
 /** 琛ㄥ崟绫诲瀷 */
@@ -40,12 +41,29 @@
       },
     },
     {
+      fieldName: 'userId',
+      label: '璋冨矖浜�',
+      component: 'ApiSelect',
+      componentProps: {
+        api: getEmployeeSimpleList,
+        labelField: 'name',
+        valueField: 'id',
+        showSearch: true,
+        filterOption: (input: string, option: any) =>
+          `${option?.label ?? ''}`.toLowerCase().includes(input.toLowerCase()),
+        allowClear: true,
+        placeholder: '璇烽�夋嫨瑕佽皟宀楃殑鍛樺伐锛堥�夋嫨鍚庤嚜鍔ㄥ甫鍑哄師閮ㄩ棬/鍘熷矖浣嶏級',
+      },
+      rules: 'selectRequired',
+      formItemClass: 'col-span-2',
+    },
+    {
       fieldName: 'currentDeptName',
       label: '鍘熼儴闂�',
       component: 'Input',
       componentProps: {
         disabled: true,
-        placeholder: '鑷姩鑾峰彇',
+        placeholder: '閫夋嫨璋冨矖浜哄悗鑷姩甯﹀嚭',
       },
     },
     {
@@ -54,7 +72,7 @@
       component: 'Input',
       componentProps: {
         disabled: true,
-        placeholder: '鑷姩鑾峰彇',
+        placeholder: '閫夋嫨璋冨矖浜哄悗鑷姩甯﹀嚭',
       },
     },
     {
@@ -175,7 +193,7 @@
 export function useGridColumns(): VxeTableGridOptions<HrmTransferApi.Transfer>['columns'] {
   return [
     { field: 'id', title: '鐢宠缂栧彿', width: 80 },
-    { field: 'employeeName', title: '鐢宠浜�', minWidth: 100 },
+    { field: 'userName', title: '璋冨矖浜�', minWidth: 100 },
     { field: 'currentDeptName', title: '鍘熼儴闂�', minWidth: 120 },
     { field: 'currentPostName', title: '鍘熷矖浣�', minWidth: 120 },
     { field: 'targetDeptName', title: '鐩爣閮ㄩ棬', minWidth: 120 },

--
Gitblit v1.9.3