From 611dd8268e40caa4d97e8954b85b5adaaef99afa Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 26 十月 2026 17:45:58 +0800
Subject: [PATCH] feat(hrm): 考勤规则支持地图定位打卡

---
 src/views/hrm/employee/data.ts |  133 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 129 insertions(+), 4 deletions(-)

diff --git a/src/views/hrm/employee/data.ts b/src/views/hrm/employee/data.ts
index b9e0233..bcc7fb6 100644
--- a/src/views/hrm/employee/data.ts
+++ b/src/views/hrm/employee/data.ts
@@ -10,6 +10,7 @@
 import { Button } from 'ant-design-vue';
 
 import { z } from '#/adapter/form';
+import { getSalaryStructureList } from '#/api/hrm/salary/structure';
 import { getDeptList } from '#/api/system/dept';
 import { getSimplePostList } from '#/api/system/post';
 import { getSimpleRoleList } from '#/api/system/role';
@@ -94,14 +95,15 @@
       rules: 'selectRequired',
     },
     {
-      fieldName: 'postId',
+      fieldName: 'postIds',
       label: '宀椾綅',
       component: 'ApiSelect',
       componentProps: {
         api: getSimplePostList,
         labelField: 'name',
         valueField: 'id',
-        placeholder: '璇烽�夋嫨宀椾綅',
+        mode: 'multiple',
+        placeholder: '璇烽�夋嫨宀椾綅锛堝彲澶氶�夛級',
       },
       rules: 'selectRequired',
     },
@@ -151,6 +153,18 @@
       rules: z.number().default(1),
     },
     {
+      fieldName: 'employeeCategory',
+      label: '鍛樺伐绫诲埆',
+      component: 'RadioGroup',
+      componentProps: {
+        buttonStyle: 'solid',
+        optionType: 'button',
+        options: getDictOptions(DICT_TYPE.HRM_EMPLOYEE_CATEGORY, 'number'),
+      },
+      rules: z.number().default(1),
+      help: '鏅�氬憳宸ユ寜宀椾綅鍔犵彮鏃惰柂锛涙妧宸ュ姞鐝寜 1:1锛涚鐞嗕笉璁″姞鐝伐璧�',
+    },
+    {
       fieldName: 'birthday',
       label: '鍑虹敓鏃ユ湡',
       component: 'DatePicker',
@@ -177,6 +191,49 @@
       },
     },
     {
+      fieldName: 'nation',
+      label: '姘戞棌',
+      component: 'Input',
+      componentProps: {
+        placeholder: '璇疯緭鍏ユ皯鏃�',
+      },
+    },
+    {
+      fieldName: 'marriageStatus',
+      label: '濠氬Щ鐘舵��',
+      component: 'Input',
+      componentProps: {
+        placeholder: '璇疯緭鍏ュ濮荤姸鎬�',
+      },
+    },
+    {
+      fieldName: 'age',
+      label: '骞撮緞',
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '璇疯緭鍏ュ勾榫�',
+        min: 0,
+        max: 150,
+        style: { width: '100%' },
+      },
+    },
+    {
+      fieldName: 'education',
+      label: '瀛﹀巻',
+      component: 'Input',
+      componentProps: {
+        placeholder: '璇疯緭鍏ュ鍘�',
+      },
+    },
+    {
+      fieldName: 'politicalStatus',
+      label: '鏀挎不闈㈣矊',
+      component: 'Input',
+      componentProps: {
+        placeholder: '璇疯緭鍏ユ斂娌婚潰璨�',
+      },
+    },
+    {
       fieldName: 'annualLeaveBalance',
       label: '骞村亣浣欓',
       component: 'InputNumber',
@@ -199,11 +256,46 @@
       },
     },
     {
+      fieldName: 'salaryStructureId',
+      label: '钖叕缁撴瀯',
+      component: 'ApiSelect',
+      componentProps: {
+        api: () => getSalaryStructureList({ status: 0 }),
+        labelField: 'name',
+        valueField: 'id',
+        allowClear: true,
+        placeholder: '璇烽�夋嫨钖叕缁撴瀯',
+      },
+      help: '鍐冲畾宸ヤ綔鏃ュ姞鐝�嶇巼锛涙湭閫夋嫨鏃朵娇鐢ㄧ郴缁熼粯璁� 1.5 鍊�',
+    },
+    {
       fieldName: 'baseSalary',
       label: '鍩烘湰宸ヨ祫',
       component: 'InputNumber',
       componentProps: {
         placeholder: '璇疯緭鍏ュ熀鏈伐璧�',
+        min: 0,
+        precision: 2,
+        style: { width: '100%' },
+      },
+    },
+    {
+      fieldName: 'postSalary',
+      label: '宀椾綅宸ヨ祫',
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '璇疯緭鍏ュ矖浣嶅伐璧�',
+        min: 0,
+        precision: 2,
+        style: { width: '100%' },
+      },
+    },
+    {
+      fieldName: 'senioritySalary',
+      label: '宸ラ緞宸ヨ祫',
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '璇疯緭鍏ュ伐榫勫伐璧�',
         min: 0,
         precision: 2,
         style: { width: '100%' },
@@ -233,6 +325,18 @@
       componentProps: {
         placeholder: '璇疯緭鍏ュ眳浣忓湴鍧�',
       },
+    },
+    {
+      fieldName: 'blobIds',
+      label: '闄勪欢',
+      component: 'FileUpload',
+      componentProps: {
+        valueKey: 'id',
+        maxNumber: 10,
+        multiple: true,
+        help: '鍙笂浼犺韩浠借瘉銆佸鍘嗚瘉涔︺�佷綋妫�鎶ュ憡绛夎祫鏂欎綔涓虹暀妗�',
+      },
+      formItemClass: 'col-span-2',
     },
   ];
 }
@@ -285,6 +389,16 @@
         placeholder: '璇烽�夋嫨鍛樺伐鐘舵��',
       },
     },
+    {
+      fieldName: 'employeeCategory',
+      label: '鍛樺伐绫诲埆',
+      component: 'Select',
+      componentProps: {
+        allowClear: true,
+        options: getDictOptions(DICT_TYPE.HRM_EMPLOYEE_CATEGORY, 'number'),
+        placeholder: '璇烽�夋嫨鍛樺伐绫诲埆',
+      },
+    },
   ];
 }
 
@@ -310,13 +424,24 @@
     },
     { field: 'phone', title: '鎵嬫満鍙风爜', minWidth: 120 },
     { field: 'deptName', title: '閮ㄩ棬', minWidth: 120 },
-    { field: 'postName', title: '宀椾綅', minWidth: 120 },
+    { field: 'postNames', title: '宀椾綅', minWidth: 120 },
+    { field: 'nation', title: '姘戞棌', width: 90 },
+    { field: 'age', title: '骞撮緞', width: 70 },
+    { field: 'education', title: '瀛﹀巻', width: 90 },
     {
       field: 'employeeStatus',
       title: '鍛樺伐鐘舵��',
       width: 100,
       slots: {
         default: 'employeeStatus',
+      },
+    },
+    {
+      field: 'employeeCategory',
+      title: '鍛樺伐绫诲埆',
+      width: 100,
+      slots: {
+        default: 'employeeCategory',
       },
     },
     { field: 'hireDate', title: '鍏ヨ亴鏃ユ湡', width: 110 },
@@ -371,7 +496,7 @@
     { field: 'employeeNo', title: '鍛樺伐缂栧彿', minWidth: 120 },
     { field: 'name', title: '鍛樺伐濮撳悕', minWidth: 100 },
     { field: 'deptName', title: '閮ㄩ棬', minWidth: 120 },
-    { field: 'postName', title: '宀椾綅', minWidth: 120 },
+    { field: 'postNames', title: '宀椾綅', minWidth: 120 },
     { field: 'phone', title: '鎵嬫満鍙风爜', minWidth: 120 },
   ];
 }

--
Gitblit v1.9.3