From e60fdd9bd9e1ffe8e8311f67604f92e109707db2 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 06 十一月 2026 16:01:26 +0800
Subject: [PATCH] fix(hrm): 调岗提交前选择审批流程并传 processDefinitionKey

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

diff --git a/src/views/hrm/transfer/data.ts b/src/views/hrm/transfer/data.ts
index e6f2411..6d0c23a 100644
--- a/src/views/hrm/transfer/data.ts
+++ b/src/views/hrm/transfer/data.ts
@@ -1,6 +1,9 @@
 import type { VbenFormSchema } from '#/adapter/form';
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { HrmTransferApi } from '#/api/hrm/transfer';
+import type { SystemUserApi } from '#/api/system/user';
+
+import { markRaw } from 'vue';
 
 import { DICT_TYPE } from '#/packages/constants/src';
 import { getDictOptions } from '#/packages/effects/hooks/src';
@@ -8,12 +11,16 @@
 import { getDeptList } from '#/api/system/dept';
 import { getSimplePostList } from '#/api/system/post';
 import { handleTree } from '#/packages/utils/src';
+import { UserSelect } from '#/views/system/user/components';
 
 /** 琛ㄥ崟绫诲瀷 */
 export type FormType = 'create' | 'detail' | 'update';
 
 /** 鏂板/淇敼璋冨矖鐢宠鐨勮〃鍗� */
-export function useFormSchema(formType: FormType): VbenFormSchema[] {
+export function useFormSchema(
+  formType: FormType,
+  onUserChange?: (user?: SystemUserApi.User) => void,
+): VbenFormSchema[] {
   return [
     {
       fieldName: 'id',
@@ -22,6 +29,16 @@
         triggerFields: [''],
         show: () => false,
       },
+    },
+    {
+      fieldName: 'userId',
+      label: '璋冨矖浜哄憳',
+      component: markRaw(UserSelect),
+      componentProps: {
+        placeholder: '璇烽�夋嫨璋冨矖浜哄憳',
+        onChange: onUserChange,
+      },
+      rules: 'selectRequired',
     },
     {
       fieldName: 'currentDeptId',
@@ -175,7 +192,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