From 5b1953176f4bf257d9a43bc0dfa1ddc49ccda33b Mon Sep 17 00:00:00 2001 From: freedakgmail Date: Thu, 23 Jul 2026 18:36:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96:=20=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=85=A5=E8=81=8C=E9=83=A8=E9=97=A8=E5=8F=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/services/contract.service.ts | 1 + frontend/src/pages/Roster.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/services/contract.service.ts b/backend/src/services/contract.service.ts index de7f813..d0e7702 100644 --- a/backend/src/services/contract.service.ts +++ b/backend/src/services/contract.service.ts @@ -232,6 +232,7 @@ export async function rehireEmployee(orgId: string, userId: string, id: string, data: { hireDate: newHireDate, status: 'ACTIVE', + department: data.department || employee.department, isPregnant: false, isInMedicalPeriod: false, isWorkInjured: false, diff --git a/frontend/src/pages/Roster.tsx b/frontend/src/pages/Roster.tsx index 93dcc40..9b8df84 100644 --- a/frontend/src/pages/Roster.tsx +++ b/frontend/src/pages/Roster.tsx @@ -809,6 +809,7 @@ function RehireModal({ employee, onClose, onSubmit, loading, error }: { })() const [form, setForm] = useState({ hireDate: todayStr, + department: employee.department || '', contractType: 'FIXED' as 'FIXED' | 'UNFIXED' | 'UNSIGNED', signDate: '', startDate: todayStr, @@ -908,6 +909,7 @@ function RehireModal({ employee, onClose, onSubmit, loading, error }: { const handleSubmit = () => { const data: any = { hireDate: new Date(form.hireDate).toISOString(), + department: form.department, } if (form.contractType !== 'UNSIGNED' && form.startDate) { data.contract = { @@ -939,8 +941,8 @@ function RehireModal({ employee, onClose, onSubmit, loading, error }: {
{employee.name}
- -
{employee.department}
+ + setForm({ ...form, department: e.target.value })} placeholder="如:技术部" />