优化: 重新入职部门可修改

This commit is contained in:
freedakgmail
2026-07-23 18:36:12 +08:00
parent eb58bc4b09
commit 5b1953176f
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -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,
+4 -2
View File
@@ -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 }: {
<div className="text-xs text-gray-600 py-1.5">{employee.name}</div>
</div>
<div>
<Label></Label>
<div className="text-xs text-gray-600 py-1.5">{employee.department}</div>
<Label> *</Label>
<Input value={form.department} onChange={(e) => setForm({ ...form, department: e.target.value })} placeholder="如:技术部" />
</div>
</div>
<div>