From 173855b299e89930b5ea2ff9a9295fde9d0f55b5 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 07 十一月 2026 08:51:43 +0800
Subject: [PATCH] feat: 同步质检、生产、销售、财务与人事前端功能
---
src/views/hrm/salary/employee-social-security/data.ts | 34 ++++++++++++++--------------------
1 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/src/views/hrm/salary/employee-social-security/data.ts b/src/views/hrm/salary/employee-social-security/data.ts
index 085a4b8..29dac37 100644
--- a/src/views/hrm/salary/employee-social-security/data.ts
+++ b/src/views/hrm/salary/employee-social-security/data.ts
@@ -3,14 +3,13 @@
import type { HrmEmployeeSocialSecurityApi } from '#/api/hrm/salary/employee-social-security';
import { getDeptList } from '#/api/system/dept';
-import { getEmployeeSimpleList } from '#/api/hrm/employee';
import { getSocialSecuritySchemeList } from '#/api/hrm/salary/social-security-scheme';
import { handleTree } from '#/packages/utils/src';
/** 琛ㄥ崟绫诲瀷 */
export type FormType = 'create' | 'update';
-/** 鏂板/淇敼鍛樺伐绀句繚鍏Н閲戞。妗堢殑琛ㄥ崟 */
+/** 鏂板/淇敼閮ㄩ棬绀句繚鍏Н閲戞。妗堢殑琛ㄥ崟 */
export function useFormSchema(): VbenFormSchema[] {
return [
{
@@ -22,17 +21,22 @@
},
},
{
- fieldName: 'userId',
- label: '鍛樺伐',
- component: 'ApiSelect',
+ fieldName: 'deptId',
+ label: '閮ㄩ棬',
+ component: 'ApiTreeSelect',
componentProps: {
- api: getEmployeeSimpleList,
+ api: async () => {
+ const data = await getDeptList();
+ return handleTree(data);
+ },
labelField: 'name',
valueField: 'id',
+ childrenField: 'children',
showSearch: true,
- filterOption: (input: string, option: any) =>
- option.label?.toLowerCase().includes(input.toLowerCase()),
- placeholder: '璇烽�夋嫨鍛樺伐',
+ allowClear: true,
+ treeDefaultExpandAll: true,
+ placeholder: '璇烽�夋嫨閮ㄩ棬',
+ style: { width: '100%' },
},
rules: 'selectRequired',
formItemClass: 'col-span-2',
@@ -119,15 +123,6 @@
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
- fieldName: 'userName',
- label: '鍛樺伐濮撳悕',
- component: 'Input',
- componentProps: {
- allowClear: true,
- placeholder: '璇疯緭鍏ュ憳宸ュ鍚�',
- },
- },
- {
fieldName: 'deptId',
label: '閮ㄩ棬',
component: 'ApiTreeSelect',
@@ -150,8 +145,7 @@
/** 鍒楄〃鐨勫瓧娈� */
export function useGridColumns(): VxeTableGridOptions<HrmEmployeeSocialSecurityApi.EmployeeSocialSecurity>['columns'] {
return [
- { field: 'userName', title: '鍛樺伐濮撳悕', minWidth: 100 },
- { field: 'deptName', title: '閮ㄩ棬', minWidth: 120 },
+ { field: 'deptName', title: '閮ㄩ棬', minWidth: 160 },
{ field: 'schemeName', title: '绀句繚鏂规', minWidth: 180 },
{ field: 'socialSecurityBase', title: '绀句繚鍩烘暟', width: 100, formatter: 'formatAmount2' },
{ field: 'housingFundBase', title: '鍏Н閲戝熀鏁�', width: 100, formatter: 'formatAmount2' },
--
Gitblit v1.9.3