dev-tmp1
tangjie 2026-08-17 13:43:46 +08:00
parent e34a331c9d
commit 70bee2fe2c
4 changed files with 46 additions and 34 deletions

View File

@ -220,12 +220,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
const handleSubmit = async () => {
try {
const values = await form.validateFields();
if (!values.reportFileUrl?.length) {
form.setFields([
{ name: "reportFileUrl", errors: ["请上传离职通知报告"] },
]);
return;
}
setSubmitting(true);
values.applyTime =
values.applyTime?.format?.("YYYY-MM-DD HH:mm:ss") || values.applyTime;
@ -233,13 +228,17 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
values.expectedResignDate =
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
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);
if (res?.success !== false) {
message.success("提交成功");
handleCancel();
onSuccess();
}
}
} catch {
// validation error
} finally {
@ -289,15 +288,16 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
label="离职原因"
rules={[{ required: true, message: "请输入离职原因" }]}
>
<Input.TextArea rows={3} placeholder="请输入离职原因" />
<Input.TextArea rows={3} placeholder="请输入离职原因" maxLength={300} showCount />
</Form.Item>
<Form.Item name="remark" label="备注">
<Input.TextArea rows={2} placeholder="请输入备注" />
<Input.TextArea rows={2} placeholder="请输入备注" maxLength={200} showCount />
</Form.Item>
<AttachmentUpload
name="reportFileUrl"
label="离职通知报告"
extra={'最多上传1个PDF文件'}
rules={[{ required: true, message: "请上传离职通知报告" }]}
extra={"最多上传1个PDF文件"}
maxCount={1}
accept=".pdf"
/>
@ -354,13 +354,22 @@ function ViewModal({ open, currentId, requestDetail, onCancel }) {
<Descriptions.Item label="备注">{info.remark}</Descriptions.Item>
<Descriptions.Item label="离职通知报告">
{info.reportFileUrl ? (
<a href={info.reportFileUrl} target="_blank" rel="noopener noreferrer">
<a
href={info.reportFileUrl}
target="_blank"
rel="noopener noreferrer"
>
查看文件
</a>
) : (
"-"
)}
</Descriptions.Item>
{info.rejectReason && (
<Descriptions.Item label="退回原因">
<span style={{ color: "red" }}>{info.rejectReason}</span>
</Descriptions.Item>
)}
</Descriptions>
</Modal>
);

View File

@ -89,7 +89,10 @@ function FilingFormPage(props) {
});
});
} else {
setDetail((prev) => ({ ...prev, materials: getFilingMaterialTemplate(mode) }));
setDetail((prev) => ({
...prev,
materials: getFilingMaterialTemplate(mode),
}));
}
}, []);
@ -141,7 +144,7 @@ function FilingFormPage(props) {
return;
}
const currentDetail = collectCurrentDetail();
if(!currentDetail?.commitment.legalRepSignatureUrl){
if (!currentDetail?.commitment.legalRepSignatureUrl) {
message.warning("法定代表人尚未签字");
return;
}
@ -221,10 +224,9 @@ function FilingFormPage(props) {
message.success("已推送签字");
} else {
message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
if(!config.isSaveDraft){
if (!config.isSaveDraft) {
props.history.goBack();
}
}
}
}
@ -359,7 +361,10 @@ function FilingFormPage(props) {
label: "2. 管理人员基本情况汇总表",
children: (
<PersonnelStep
personnelList={(detail?.personnelList || []).filter((item) => item.technicalDirectorFlag || item.processControlLeaderFlag)}
personnelList={(detail?.personnelList || []).filter(
(item) =>
item.technicalDirectorFlag || item.processControlLeaderFlag,
)}
disabled={readOnly}
onAdd={handlePersonnelAdd}
key="managementPersonnel"
@ -373,7 +378,10 @@ function FilingFormPage(props) {
label: "3. 专职安全评价师基本情况汇总表",
children: (
<PersonnelStep
personnelList={(detail?.personnelList || []).filter((item) => !item.technicalDirectorFlag && !item.processControlLeaderFlag)}
personnelList={(detail?.personnelList || []).filter(
(item) =>
!item.technicalDirectorFlag && !item.processControlLeaderFlag,
)}
disabled={readOnly}
onAdd={handlePersonnelAdd}
key="personnel"
@ -421,8 +429,6 @@ function FilingFormPage(props) {
),
forceRender: true,
},
];
const stepIndex = STEP_ITEMS.findIndex((item) => item.key === activeStep);
@ -444,15 +450,8 @@ function FilingFormPage(props) {
</Button>
) : null
}
>
<Spin spinning={submitting}>
<Tabs activeKey={activeStep} items={STEP_ITEMS} onChange={goToStep} />
<Space
style={{
marginTop: "12px",
}}
>
footer={
<Space>
{stepIndex > 0 && (
<Button
onClick={() => {
@ -480,6 +479,10 @@ function FilingFormPage(props) {
</>
)}
</Space>
}
>
<Spin spinning={submitting}>
<Tabs activeKey={activeStep} items={STEP_ITEMS} onChange={goToStep} />
</Spin>
<PrerequisiteVerifyModal
open={verifyOpen}

View File

@ -57,12 +57,12 @@ export default function FilingListTable({
{
title: "审核结果",
dataIndex: "reviewResult",
width: 100,
width: 150,
render: (v) => REVIEW_RESULT_MAP[v] || v || "-",
},
{ title: "审核专家", dataIndex: "filingExpertName", width: 120 },
mode !== 'change' && { title: "审核专家", dataIndex: "filingExpertName", width: 120 },
{ title: "综合审核意见", dataIndex: "reviewOpinion", ellipsis: true },
];
].filter(Boolean);
const handleShowReview = async (record) => {
setReviewModalOpen(true);

View File

@ -75,9 +75,9 @@ const StaffPickerModal = (props) => {
delete next[key];
}
});
// 添加/更新当前页勾选的行
// 添加/更新当前页勾选的行(跨页时 rows 中可能存在 undefined 占位,需过滤)
rows.forEach((row) => {
next[row.id] = row;
if (row?.id) next[row.id] = row;
});
return next;
});