优化: 重新入职部门可修改
This commit is contained in:
@@ -232,6 +232,7 @@ export async function rehireEmployee(orgId: string, userId: string, id: string,
|
|||||||
data: {
|
data: {
|
||||||
hireDate: newHireDate,
|
hireDate: newHireDate,
|
||||||
status: 'ACTIVE',
|
status: 'ACTIVE',
|
||||||
|
department: data.department || employee.department,
|
||||||
isPregnant: false,
|
isPregnant: false,
|
||||||
isInMedicalPeriod: false,
|
isInMedicalPeriod: false,
|
||||||
isWorkInjured: false,
|
isWorkInjured: false,
|
||||||
|
|||||||
@@ -809,6 +809,7 @@ function RehireModal({ employee, onClose, onSubmit, loading, error }: {
|
|||||||
})()
|
})()
|
||||||
const [form, setForm] = useState({
|
const [form, setForm] = useState({
|
||||||
hireDate: todayStr,
|
hireDate: todayStr,
|
||||||
|
department: employee.department || '',
|
||||||
contractType: 'FIXED' as 'FIXED' | 'UNFIXED' | 'UNSIGNED',
|
contractType: 'FIXED' as 'FIXED' | 'UNFIXED' | 'UNSIGNED',
|
||||||
signDate: '',
|
signDate: '',
|
||||||
startDate: todayStr,
|
startDate: todayStr,
|
||||||
@@ -908,6 +909,7 @@ function RehireModal({ employee, onClose, onSubmit, loading, error }: {
|
|||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
const data: any = {
|
const data: any = {
|
||||||
hireDate: new Date(form.hireDate).toISOString(),
|
hireDate: new Date(form.hireDate).toISOString(),
|
||||||
|
department: form.department,
|
||||||
}
|
}
|
||||||
if (form.contractType !== 'UNSIGNED' && form.startDate) {
|
if (form.contractType !== 'UNSIGNED' && form.startDate) {
|
||||||
data.contract = {
|
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 className="text-xs text-gray-600 py-1.5">{employee.name}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Label>部门</Label>
|
<Label>部门 *</Label>
|
||||||
<div className="text-xs text-gray-600 py-1.5">{employee.department}</div>
|
<Input value={form.department} onChange={(e) => setForm({ ...form, department: e.target.value })} placeholder="如:技术部" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user