fix
parent
e34a331c9d
commit
70bee2fe2c
|
|
@ -220,12 +220,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
try {
|
try {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
if (!values.reportFileUrl?.length) {
|
|
||||||
form.setFields([
|
|
||||||
{ name: "reportFileUrl", errors: ["请上传离职通知报告"] },
|
|
||||||
]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
values.applyTime =
|
values.applyTime =
|
||||||
values.applyTime?.format?.("YYYY-MM-DD HH:mm:ss") || values.applyTime;
|
values.applyTime?.format?.("YYYY-MM-DD HH:mm:ss") || values.applyTime;
|
||||||
|
|
@ -233,7 +228,11 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
values.expectedResignDate =
|
values.expectedResignDate =
|
||||||
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
|
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
|
||||||
values.expectedResignDate;
|
values.expectedResignDate;
|
||||||
values.reportFileUrl = values.reportFileUrl?.map?.((f) => f.url).filter(Boolean).join(",") || undefined;
|
values.reportFileUrl =
|
||||||
|
values.reportFileUrl
|
||||||
|
?.map?.((f) => f.url)
|
||||||
|
.filter(Boolean)
|
||||||
|
.join(",") || undefined;
|
||||||
const res = await requestAdd(values);
|
const res = await requestAdd(values);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
|
|
@ -289,15 +288,16 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
label="离职原因"
|
label="离职原因"
|
||||||
rules={[{ required: true, message: "请输入离职原因" }]}
|
rules={[{ required: true, message: "请输入离职原因" }]}
|
||||||
>
|
>
|
||||||
<Input.TextArea rows={3} placeholder="请输入离职原因" />
|
<Input.TextArea rows={3} placeholder="请输入离职原因" maxLength={300} showCount />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="remark" label="备注">
|
<Form.Item name="remark" label="备注">
|
||||||
<Input.TextArea rows={2} placeholder="请输入备注" />
|
<Input.TextArea rows={2} placeholder="请输入备注" maxLength={200} showCount />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<AttachmentUpload
|
<AttachmentUpload
|
||||||
name="reportFileUrl"
|
name="reportFileUrl"
|
||||||
label="离职通知报告"
|
label="离职通知报告"
|
||||||
extra={'最多上传1个PDF文件'}
|
rules={[{ required: true, message: "请上传离职通知报告" }]}
|
||||||
|
extra={"最多上传1个PDF文件"}
|
||||||
maxCount={1}
|
maxCount={1}
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
/>
|
/>
|
||||||
|
|
@ -354,13 +354,22 @@ function ViewModal({ open, currentId, requestDetail, onCancel }) {
|
||||||
<Descriptions.Item label="备注">{info.remark}</Descriptions.Item>
|
<Descriptions.Item label="备注">{info.remark}</Descriptions.Item>
|
||||||
<Descriptions.Item label="离职通知报告">
|
<Descriptions.Item label="离职通知报告">
|
||||||
{info.reportFileUrl ? (
|
{info.reportFileUrl ? (
|
||||||
<a href={info.reportFileUrl} target="_blank" rel="noopener noreferrer">
|
<a
|
||||||
|
href={info.reportFileUrl}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
查看文件
|
查看文件
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : (
|
||||||
"-"
|
"-"
|
||||||
)}
|
)}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
{info.rejectReason && (
|
||||||
|
<Descriptions.Item label="退回原因">
|
||||||
|
<span style={{ color: "red" }}>{info.rejectReason}</span>
|
||||||
|
</Descriptions.Item>
|
||||||
|
)}
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,10 @@ function FilingFormPage(props) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setDetail((prev) => ({ ...prev, materials: getFilingMaterialTemplate(mode) }));
|
setDetail((prev) => ({
|
||||||
|
...prev,
|
||||||
|
materials: getFilingMaterialTemplate(mode),
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
@ -141,7 +144,7 @@ function FilingFormPage(props) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const currentDetail = collectCurrentDetail();
|
const currentDetail = collectCurrentDetail();
|
||||||
if(!currentDetail?.commitment.legalRepSignatureUrl){
|
if (!currentDetail?.commitment.legalRepSignatureUrl) {
|
||||||
message.warning("法定代表人尚未签字");
|
message.warning("法定代表人尚未签字");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -221,10 +224,9 @@ function FilingFormPage(props) {
|
||||||
message.success("已推送签字");
|
message.success("已推送签字");
|
||||||
} else {
|
} else {
|
||||||
message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
|
message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
|
||||||
if(!config.isSaveDraft){
|
if (!config.isSaveDraft) {
|
||||||
props.history.goBack();
|
props.history.goBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -359,7 +361,10 @@ function FilingFormPage(props) {
|
||||||
label: "2. 管理人员基本情况汇总表",
|
label: "2. 管理人员基本情况汇总表",
|
||||||
children: (
|
children: (
|
||||||
<PersonnelStep
|
<PersonnelStep
|
||||||
personnelList={(detail?.personnelList || []).filter((item) => item.technicalDirectorFlag || item.processControlLeaderFlag)}
|
personnelList={(detail?.personnelList || []).filter(
|
||||||
|
(item) =>
|
||||||
|
item.technicalDirectorFlag || item.processControlLeaderFlag,
|
||||||
|
)}
|
||||||
disabled={readOnly}
|
disabled={readOnly}
|
||||||
onAdd={handlePersonnelAdd}
|
onAdd={handlePersonnelAdd}
|
||||||
key="managementPersonnel"
|
key="managementPersonnel"
|
||||||
|
|
@ -373,7 +378,10 @@ function FilingFormPage(props) {
|
||||||
label: "3. 专职安全评价师基本情况汇总表",
|
label: "3. 专职安全评价师基本情况汇总表",
|
||||||
children: (
|
children: (
|
||||||
<PersonnelStep
|
<PersonnelStep
|
||||||
personnelList={(detail?.personnelList || []).filter((item) => !item.technicalDirectorFlag && !item.processControlLeaderFlag)}
|
personnelList={(detail?.personnelList || []).filter(
|
||||||
|
(item) =>
|
||||||
|
!item.technicalDirectorFlag && !item.processControlLeaderFlag,
|
||||||
|
)}
|
||||||
disabled={readOnly}
|
disabled={readOnly}
|
||||||
onAdd={handlePersonnelAdd}
|
onAdd={handlePersonnelAdd}
|
||||||
key="personnel"
|
key="personnel"
|
||||||
|
|
@ -421,8 +429,6 @@ function FilingFormPage(props) {
|
||||||
),
|
),
|
||||||
forceRender: true,
|
forceRender: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const stepIndex = STEP_ITEMS.findIndex((item) => item.key === activeStep);
|
const stepIndex = STEP_ITEMS.findIndex((item) => item.key === activeStep);
|
||||||
|
|
@ -444,15 +450,8 @@ function FilingFormPage(props) {
|
||||||
</Button>
|
</Button>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
>
|
footer={
|
||||||
<Spin spinning={submitting}>
|
<Space>
|
||||||
<Tabs activeKey={activeStep} items={STEP_ITEMS} onChange={goToStep} />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
style={{
|
|
||||||
marginTop: "12px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{stepIndex > 0 && (
|
{stepIndex > 0 && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -480,6 +479,10 @@ function FilingFormPage(props) {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Spin spinning={submitting}>
|
||||||
|
<Tabs activeKey={activeStep} items={STEP_ITEMS} onChange={goToStep} />
|
||||||
</Spin>
|
</Spin>
|
||||||
<PrerequisiteVerifyModal
|
<PrerequisiteVerifyModal
|
||||||
open={verifyOpen}
|
open={verifyOpen}
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,12 @@ export default function FilingListTable({
|
||||||
{
|
{
|
||||||
title: "审核结果",
|
title: "审核结果",
|
||||||
dataIndex: "reviewResult",
|
dataIndex: "reviewResult",
|
||||||
width: 100,
|
width: 150,
|
||||||
render: (v) => REVIEW_RESULT_MAP[v] || v || "-",
|
render: (v) => REVIEW_RESULT_MAP[v] || v || "-",
|
||||||
},
|
},
|
||||||
{ title: "审核专家", dataIndex: "filingExpertName", width: 120 },
|
mode !== 'change' && { title: "审核专家", dataIndex: "filingExpertName", width: 120 },
|
||||||
{ title: "综合审核意见", dataIndex: "reviewOpinion", ellipsis: true },
|
{ title: "综合审核意见", dataIndex: "reviewOpinion", ellipsis: true },
|
||||||
];
|
].filter(Boolean);
|
||||||
|
|
||||||
const handleShowReview = async (record) => {
|
const handleShowReview = async (record) => {
|
||||||
setReviewModalOpen(true);
|
setReviewModalOpen(true);
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,9 @@ const StaffPickerModal = (props) => {
|
||||||
delete next[key];
|
delete next[key];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 添加/更新当前页勾选的行
|
// 添加/更新当前页勾选的行(跨页时 rows 中可能存在 undefined 占位,需过滤)
|
||||||
rows.forEach((row) => {
|
rows.forEach((row) => {
|
||||||
next[row.id] = row;
|
if (row?.id) next[row.id] = row;
|
||||||
});
|
});
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue