2026-06-30 17:32:29 +08:00
|
|
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
2026-07-01 11:55:19 +08:00
|
|
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
2026-06-30 17:32:29 +08:00
|
|
|
import { Button, Form, message, Modal, Space, Spin, Tabs } from "antd";
|
2026-07-01 11:55:19 +08:00
|
|
|
import { useCallback, useEffect, useRef, useState } from "react";
|
2026-06-30 17:32:29 +08:00
|
|
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
2026-07-07 18:07:59 +08:00
|
|
|
import { fetchQualFilingDetail, fetchQualChangeDetail, fromFilingPersonnelAddCmd } from "~/api/qualFiling";
|
2026-06-30 17:32:29 +08:00
|
|
|
import { NS_QUAL_FILING } from "~/enumerate/namespace";
|
2026-07-02 11:00:31 +08:00
|
|
|
import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions";
|
|
|
|
|
import { FILING_MATERIAL_TEMPLATE } from "../filingMaterialTemplate";
|
|
|
|
|
import { clearLocalDraft, saveLocalDraft } from "../filingLocalDraft";
|
2026-06-30 17:32:29 +08:00
|
|
|
import {
|
|
|
|
|
fetchOrgPersonnelOptions,
|
|
|
|
|
mapEquipRowToFilingEquipment,
|
|
|
|
|
mapStaffRowToFilingPersonnel,
|
|
|
|
|
mergeDetailFromForms,
|
|
|
|
|
persistFilingToBackend,
|
|
|
|
|
} from "../filingPersist";
|
|
|
|
|
import { verifyFilingPrerequisites } from "../filingVerify";
|
|
|
|
|
import { resolveUploadFileId } from "~/utils/mockUpload";
|
2026-07-01 11:55:19 +08:00
|
|
|
import { goFilingList } from "../filingPaths";
|
2026-06-30 17:32:29 +08:00
|
|
|
import BasicInfoStep from "./components/BasicInfoStep";
|
|
|
|
|
import CommitmentStep from "./components/CommitmentStep";
|
|
|
|
|
import EquipmentStep from "./components/EquipmentStep";
|
|
|
|
|
import MaterialStep from "./components/MaterialStep";
|
|
|
|
|
import PersonnelStep from "./components/PersonnelStep";
|
|
|
|
|
import PrerequisiteVerifyModal from "./components/PrerequisiteVerifyModal";
|
|
|
|
|
|
2026-07-02 11:00:31 +08:00
|
|
|
const router = tools.router;
|
|
|
|
|
|
2026-06-30 17:32:29 +08:00
|
|
|
const MODE_TITLE = {
|
|
|
|
|
[FILING_FORM_MODE.APPLICATION]: "资质备案申请",
|
|
|
|
|
[FILING_FORM_MODE.FILED]: "资质备案填报",
|
|
|
|
|
[FILING_FORM_MODE.CHANGE]: "修改备案信息",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function FilingFormPage(props) {
|
2026-07-02 11:00:31 +08:00
|
|
|
const query = router.query;
|
2026-06-30 17:32:29 +08:00
|
|
|
const mode = query.mode;
|
2026-07-01 11:55:19 +08:00
|
|
|
const [loading, setLoading] = useState(false);
|
2026-06-30 17:32:29 +08:00
|
|
|
const [submitting, setSubmitting] = useState(false);
|
|
|
|
|
const [activeStep, setActiveStep] = useState("basic");
|
|
|
|
|
const [detail, setDetail] = useState(null);
|
|
|
|
|
const [personnelOptions, setPersonnelOptions] = useState([]);
|
|
|
|
|
const [verifyOpen, setVerifyOpen] = useState(false);
|
|
|
|
|
const [verifyResult, setVerifyResult] = useState(null);
|
|
|
|
|
const [basicForm] = Form.useForm();
|
|
|
|
|
const [commitmentForm] = Form.useForm();
|
|
|
|
|
|
|
|
|
|
const detailRef = useRef(null);
|
2026-07-02 11:00:31 +08:00
|
|
|
const readOnly = query.readOnly;
|
|
|
|
|
|
2026-07-01 11:55:19 +08:00
|
|
|
const saveActionHint =
|
|
|
|
|
mode === FILING_FORM_MODE.FILED
|
|
|
|
|
? "请点击提交后保存"
|
|
|
|
|
: "请点击暂存或提交后保存";
|
2026-06-30 17:32:29 +08:00
|
|
|
|
|
|
|
|
const loadPersonnelOptions = useCallback(async () => {
|
|
|
|
|
if (personnelOptions.length) {
|
|
|
|
|
return personnelOptions;
|
|
|
|
|
}
|
|
|
|
|
const options = await fetchOrgPersonnelOptions().catch(() => []);
|
2026-07-02 15:01:19 +08:00
|
|
|
|
2026-06-30 17:32:29 +08:00
|
|
|
setPersonnelOptions(options);
|
|
|
|
|
return options;
|
|
|
|
|
}, [personnelOptions.length]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
detailRef.current = detail;
|
|
|
|
|
}, [detail]);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
loadPersonnelOptions();
|
2026-07-02 11:00:31 +08:00
|
|
|
if (query.id) {
|
2026-07-03 14:47:36 +08:00
|
|
|
let aciotn = () => {};
|
2026-07-07 14:32:37 +08:00
|
|
|
|
2026-07-03 14:47:36 +08:00
|
|
|
if (mode === FILING_FORM_MODE.CHANGE) {
|
|
|
|
|
aciotn = fetchQualChangeDetail;
|
|
|
|
|
} else {
|
|
|
|
|
aciotn = fetchQualFilingDetail;
|
|
|
|
|
}
|
|
|
|
|
aciotn(query.id).then((res) => {
|
2026-07-02 11:00:31 +08:00
|
|
|
setDetail((prev) => ({ ...prev, ...(res?.data || {}) }));
|
|
|
|
|
console.log(res?.data, "res.data");
|
2026-07-01 17:57:42 +08:00
|
|
|
basicForm.setFieldsValue(res?.data || {});
|
2026-07-02 13:50:07 +08:00
|
|
|
commitmentForm.setFieldsValue(res?.data?.commitment || {});
|
2026-07-01 15:29:53 +08:00
|
|
|
});
|
2026-07-02 11:00:31 +08:00
|
|
|
} else {
|
2026-07-01 17:57:42 +08:00
|
|
|
setDetail((prev) => ({ ...prev, materials: FILING_MATERIAL_TEMPLATE }));
|
2026-07-01 15:29:53 +08:00
|
|
|
}
|
2026-07-01 15:07:58 +08:00
|
|
|
}, []);
|
2026-06-30 17:32:29 +08:00
|
|
|
|
|
|
|
|
const collectCurrentDetail = useCallback(() => {
|
|
|
|
|
const current = detailRef.current || detail;
|
|
|
|
|
return mergeDetailFromForms(current, {
|
|
|
|
|
basicValues: basicForm.getFieldsValue(true),
|
|
|
|
|
commitmentValues: commitmentForm.getFieldsValue(true),
|
|
|
|
|
});
|
|
|
|
|
}, [basicForm, commitmentForm, detail]);
|
|
|
|
|
|
2026-07-07 18:07:59 +08:00
|
|
|
const syncCommitmentFromBasic = useCallback(() => {
|
|
|
|
|
const filingUnitName =
|
|
|
|
|
basicForm.getFieldValue("filingUnitName") || detail?.filingUnitName || "";
|
|
|
|
|
const legalRepName = commitmentForm.getFieldValue("legalRepName") || "";
|
|
|
|
|
commitmentForm.setFieldsValue({ filingUnitName, legalRepName });
|
|
|
|
|
}, [basicForm, commitmentForm, detail?.filingUnitName]);
|
|
|
|
|
|
|
|
|
|
const goToStep = useCallback(
|
|
|
|
|
(key) => {
|
|
|
|
|
if (key === "commitment") {
|
|
|
|
|
syncCommitmentFromBasic();
|
|
|
|
|
}
|
|
|
|
|
setActiveStep(key);
|
|
|
|
|
},
|
|
|
|
|
[syncCommitmentFromBasic],
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const handleSaveDraft = async () => {
|
|
|
|
|
if (readOnly) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
setSubmitting(true);
|
|
|
|
|
try {
|
|
|
|
|
const currentDetail = collectCurrentDetail();
|
|
|
|
|
await persistFilingToBackend(props, currentDetail, mode);
|
|
|
|
|
message.success("暂存成功");
|
|
|
|
|
props.history.goBack();
|
|
|
|
|
} catch (err) {
|
|
|
|
|
message.error(err?.message || "暂存失败");
|
|
|
|
|
} finally {
|
|
|
|
|
setSubmitting(false);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
if (activeStep === "commitment") {
|
|
|
|
|
syncCommitmentFromBasic();
|
|
|
|
|
}
|
|
|
|
|
}, [activeStep, syncCommitmentFromBasic]);
|
|
|
|
|
|
2026-07-02 13:50:07 +08:00
|
|
|
const handleSubmitRequest = async () => {
|
2026-06-30 17:32:29 +08:00
|
|
|
if (readOnly) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
try {
|
2026-07-02 13:50:07 +08:00
|
|
|
await basicForm.validateFields();
|
2026-07-01 11:55:19 +08:00
|
|
|
} catch (err) {
|
2026-07-02 13:50:07 +08:00
|
|
|
setActiveStep("basic");
|
|
|
|
|
return;
|
2026-06-30 17:32:29 +08:00
|
|
|
}
|
2026-07-02 13:50:07 +08:00
|
|
|
try {
|
|
|
|
|
await commitmentForm.validateFields();
|
|
|
|
|
} catch (err) {
|
|
|
|
|
setActiveStep("commitment");
|
2026-06-30 17:32:29 +08:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const currentDetail = collectCurrentDetail();
|
2026-07-02 13:50:07 +08:00
|
|
|
if (!currentDetail?.personnelList?.length) {
|
|
|
|
|
message.warning("请至少添加一位备案人员");
|
|
|
|
|
setActiveStep("personnel");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!currentDetail?.equipmentList?.length) {
|
|
|
|
|
message.warning("请至少添加一条装备清单");
|
|
|
|
|
setActiveStep("equipment");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2026-06-30 17:32:29 +08:00
|
|
|
const result = verifyFilingPrerequisites(currentDetail);
|
|
|
|
|
setVerifyResult(result);
|
|
|
|
|
setVerifyOpen(true);
|
|
|
|
|
};
|
|
|
|
|
|
2026-07-02 13:50:07 +08:00
|
|
|
const handleVerifyConfirm = async (config) => {
|
2026-06-30 17:32:29 +08:00
|
|
|
if (!verifyResult?.passed) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
setSubmitting(true);
|
2026-07-01 17:57:42 +08:00
|
|
|
|
2026-07-02 11:00:31 +08:00
|
|
|
const currentDetail = collectCurrentDetail();
|
2026-07-07 14:32:37 +08:00
|
|
|
const word = mode === "change" ? "Change" : "";
|
2026-07-02 11:00:31 +08:00
|
|
|
const body = {
|
2026-07-06 16:49:57 +08:00
|
|
|
[`qualFiling${word}AddCmd`]: {
|
2026-07-02 13:50:07 +08:00
|
|
|
...currentDetail,
|
|
|
|
|
filingStatusCode: config.isSaveDraft ? 5 : 2,
|
2026-07-06 16:49:57 +08:00
|
|
|
applyTypeCode: mode === "application" ? 1 : 3,
|
2026-07-02 13:50:07 +08:00
|
|
|
},
|
2026-07-02 11:00:31 +08:00
|
|
|
};
|
2026-07-07 14:32:37 +08:00
|
|
|
|
2026-07-06 16:49:57 +08:00
|
|
|
const params = body[`qualFiling${word}AddCmd`];
|
2026-07-02 11:00:31 +08:00
|
|
|
if (params.materials) {
|
2026-07-06 16:49:57 +08:00
|
|
|
body[`qualFilingMaterial${word}AddCmds`] = params.materials;
|
2026-07-02 11:00:31 +08:00
|
|
|
delete params.materials;
|
|
|
|
|
}
|
|
|
|
|
if (params.personnelList) {
|
2026-07-07 18:07:59 +08:00
|
|
|
body[`qualFilingPersonnel${word}AddCmds`] = params.personnelList.map(fromFilingPersonnelAddCmd);
|
2026-07-02 11:00:31 +08:00
|
|
|
delete params.personnelList;
|
|
|
|
|
}
|
|
|
|
|
if (params.equipmentList) {
|
2026-07-06 16:49:57 +08:00
|
|
|
body[`qualFilingEquipment${word}AddCmds`] = params.equipmentList;
|
2026-07-02 11:00:31 +08:00
|
|
|
delete params.equipmentList;
|
|
|
|
|
}
|
|
|
|
|
if (params.commitment) {
|
2026-07-06 16:49:57 +08:00
|
|
|
body[`qualFilingCommitment${word}AddCmd`] = params.commitment;
|
2026-07-02 11:00:31 +08:00
|
|
|
delete params.commitment;
|
|
|
|
|
}
|
2026-07-07 14:32:37 +08:00
|
|
|
|
|
|
|
|
let action = props.submitQualFiling;
|
2026-07-03 14:47:36 +08:00
|
|
|
if (mode === FILING_FORM_MODE.CHANGE) {
|
2026-07-07 14:32:37 +08:00
|
|
|
action = props.submitQualFilingChange;
|
2026-07-02 11:00:31 +08:00
|
|
|
}
|
2026-07-03 14:47:36 +08:00
|
|
|
const result = await action(body);
|
2026-06-30 17:32:29 +08:00
|
|
|
|
2026-07-02 11:00:31 +08:00
|
|
|
if (result?.success) {
|
2026-06-30 17:32:29 +08:00
|
|
|
setVerifyOpen(false);
|
2026-07-02 15:01:19 +08:00
|
|
|
message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
|
2026-07-03 15:24:20 +08:00
|
|
|
props.history.goBack();
|
2026-07-07 14:32:37 +08:00
|
|
|
}
|
2026-07-02 11:00:31 +08:00
|
|
|
setSubmitting(false);
|
2026-06-30 17:32:29 +08:00
|
|
|
};
|
|
|
|
|
|
2026-07-03 14:47:36 +08:00
|
|
|
const handleMaterialUpload = (record, { url, ext }) => {
|
|
|
|
|
const attachmentUrl = url;
|
2026-07-01 17:57:42 +08:00
|
|
|
setDetail((prev) => ({
|
2026-06-30 17:32:29 +08:00
|
|
|
...prev,
|
2026-07-02 11:00:31 +08:00
|
|
|
materials: (prev.materials || []).map((item) => {
|
2026-07-02 15:01:19 +08:00
|
|
|
return item.id === record.id
|
2026-06-30 17:32:29 +08:00
|
|
|
? {
|
2026-07-01 11:55:19 +08:00
|
|
|
...item,
|
|
|
|
|
attachmentUrl,
|
2026-07-02 15:01:19 +08:00
|
|
|
materialFormat: ext,
|
2026-07-01 11:55:19 +08:00
|
|
|
uploadStatusCode: 2,
|
|
|
|
|
uploadStatusName: "已上传",
|
|
|
|
|
}
|
2026-07-02 11:00:31 +08:00
|
|
|
: item;
|
|
|
|
|
}),
|
2026-06-30 17:32:29 +08:00
|
|
|
}));
|
|
|
|
|
message.success(`材料已选择,${saveActionHint}`);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handlePersonnelAdd = (sourcePersonnelIds, rows = []) => {
|
|
|
|
|
const existing = new Set(
|
2026-07-01 11:55:19 +08:00
|
|
|
(detailRef.current?.personnelList || []).map((item) =>
|
2026-07-07 18:07:59 +08:00
|
|
|
String(item.sourcePersonnelId || item.id),
|
2026-07-01 11:55:19 +08:00
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
const idsToAdd = sourcePersonnelIds.filter(
|
|
|
|
|
(id) => !existing.has(String(id)),
|
2026-06-30 17:32:29 +08:00
|
|
|
);
|
|
|
|
|
if (!idsToAdd.length) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
|
|
|
|
const newRows = idsToAdd.map((id) => {
|
|
|
|
|
const row = rowMap.get(String(id));
|
2026-07-08 15:38:45 +08:00
|
|
|
return row;
|
2026-06-30 17:32:29 +08:00
|
|
|
});
|
2026-07-01 17:57:42 +08:00
|
|
|
setDetail((prev) => ({
|
2026-06-30 17:32:29 +08:00
|
|
|
...prev,
|
|
|
|
|
personnelList: [...(prev.personnelList || []), ...newRows],
|
|
|
|
|
}));
|
|
|
|
|
message.success(`已添加至列表,${saveActionHint}`);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handlePersonnelRemove = (record) => {
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: "提示",
|
2026-07-07 18:07:59 +08:00
|
|
|
content: `确认删除人员「${record.userName || record.personName}」?`,
|
2026-06-30 17:32:29 +08:00
|
|
|
onOk: () => {
|
2026-07-01 17:57:42 +08:00
|
|
|
setDetail((prev) => ({
|
2026-06-30 17:32:29 +08:00
|
|
|
...prev,
|
2026-07-01 11:55:19 +08:00
|
|
|
personnelList: (prev.personnelList || []).filter(
|
|
|
|
|
(item) => item.id !== record.id,
|
|
|
|
|
),
|
2026-06-30 17:32:29 +08:00
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleEquipmentAdd = (sourceEquipmentIds, rows = []) => {
|
|
|
|
|
const existing = new Set(
|
2026-07-01 11:55:19 +08:00
|
|
|
(detailRef.current?.equipmentList || []).map((item) =>
|
|
|
|
|
String(item.sourceEquipmentId),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
const idsToAdd = sourceEquipmentIds.filter(
|
|
|
|
|
(id) => !existing.has(String(id)),
|
2026-06-30 17:32:29 +08:00
|
|
|
);
|
|
|
|
|
if (!idsToAdd.length) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
|
|
|
|
const newRows = idsToAdd.map((id) => {
|
|
|
|
|
const row = rowMap.get(String(id));
|
2026-07-01 11:55:19 +08:00
|
|
|
return row
|
|
|
|
|
? mapEquipRowToFilingEquipment(row)
|
|
|
|
|
: mapEquipRowToFilingEquipment({ id });
|
2026-06-30 17:32:29 +08:00
|
|
|
});
|
2026-07-01 17:57:42 +08:00
|
|
|
setDetail((prev) => ({
|
2026-06-30 17:32:29 +08:00
|
|
|
...prev,
|
|
|
|
|
equipmentList: [...(prev.equipmentList || []), ...newRows],
|
|
|
|
|
}));
|
|
|
|
|
message.success(`已添加至列表,${saveActionHint}`);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleEquipmentRemove = (record) => {
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: "提示",
|
|
|
|
|
content: `确认移除装备「${record.deviceName}」?`,
|
|
|
|
|
onOk: () => {
|
2026-07-01 17:57:42 +08:00
|
|
|
setDetail((prev) => ({
|
2026-06-30 17:32:29 +08:00
|
|
|
...prev,
|
2026-07-01 11:55:19 +08:00
|
|
|
equipmentList: (prev.equipmentList || []).filter(
|
|
|
|
|
(item) => item.id !== record.id,
|
|
|
|
|
),
|
2026-06-30 17:32:29 +08:00
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-07-02 15:01:19 +08:00
|
|
|
const handleEquipmentCalibration = (record, { url }) => {
|
|
|
|
|
setDetail((prev) => ({
|
2026-06-30 17:32:29 +08:00
|
|
|
...prev,
|
2026-07-01 11:55:19 +08:00
|
|
|
equipmentList: (prev.equipmentList || []).map((item) =>
|
|
|
|
|
item.id === record.id ? { ...item, calibrationReportUrl: url } : item,
|
|
|
|
|
),
|
2026-06-30 17:32:29 +08:00
|
|
|
}));
|
|
|
|
|
};
|
|
|
|
|
|
2026-07-02 13:50:07 +08:00
|
|
|
const STEP_ITEMS = [
|
|
|
|
|
{
|
|
|
|
|
key: "basic",
|
|
|
|
|
label: "1. 备案基本信息",
|
|
|
|
|
children: <BasicInfoStep form={basicForm} disabled={readOnly} />,
|
|
|
|
|
forceRender: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "materials",
|
|
|
|
|
label: "2. 备案材料上传",
|
|
|
|
|
children: (
|
|
|
|
|
<MaterialStep
|
|
|
|
|
materials={detail?.materials || []}
|
|
|
|
|
disabled={readOnly}
|
|
|
|
|
onUpload={handleMaterialUpload}
|
|
|
|
|
/>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "commitment",
|
|
|
|
|
label: "3. 法定代表人承诺书",
|
2026-07-03 14:47:36 +08:00
|
|
|
children: (
|
|
|
|
|
<CommitmentStep
|
|
|
|
|
form={commitmentForm}
|
|
|
|
|
disabled={readOnly}
|
|
|
|
|
personnelOptions={personnelOptions}
|
|
|
|
|
/>
|
|
|
|
|
),
|
2026-07-02 13:50:07 +08:00
|
|
|
forceRender: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "personnel",
|
|
|
|
|
label: "4. 备案人员管理",
|
|
|
|
|
children: (
|
|
|
|
|
<PersonnelStep
|
|
|
|
|
personnelList={detail?.personnelList || []}
|
|
|
|
|
disabled={readOnly}
|
|
|
|
|
onAdd={handlePersonnelAdd}
|
|
|
|
|
onRemove={handlePersonnelRemove}
|
|
|
|
|
/>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: "equipment",
|
|
|
|
|
label: "5. 装备清单",
|
|
|
|
|
children: (
|
|
|
|
|
<EquipmentStep
|
|
|
|
|
equipmentList={detail?.equipmentList || []}
|
|
|
|
|
disabled={readOnly}
|
|
|
|
|
onAdd={handleEquipmentAdd}
|
|
|
|
|
onRemove={handleEquipmentRemove}
|
2026-07-02 15:01:19 +08:00
|
|
|
onUploadCalibration={handleEquipmentCalibration}
|
2026-07-02 13:50:07 +08:00
|
|
|
/>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
2026-06-30 17:32:29 +08:00
|
|
|
const stepIndex = STEP_ITEMS.findIndex((item) => item.key === activeStep);
|
|
|
|
|
const isLastStep = stepIndex === STEP_ITEMS.length - 1;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<PageLayout
|
|
|
|
|
title={MODE_TITLE[mode] || "资质备案表单"}
|
2026-07-01 11:55:19 +08:00
|
|
|
history={props.history}
|
|
|
|
|
previous
|
2026-06-30 17:32:29 +08:00
|
|
|
>
|
|
|
|
|
<Spin spinning={loading || submitting}>
|
|
|
|
|
<Tabs
|
|
|
|
|
activeKey={activeStep}
|
|
|
|
|
items={STEP_ITEMS}
|
2026-07-07 18:07:59 +08:00
|
|
|
onChange={goToStep}
|
2026-06-30 17:32:29 +08:00
|
|
|
/>
|
2026-07-03 14:47:36 +08:00
|
|
|
|
2026-07-07 14:32:37 +08:00
|
|
|
<Space>
|
|
|
|
|
{stepIndex > 0 && (
|
|
|
|
|
<Button
|
2026-07-07 18:07:59 +08:00
|
|
|
onClick={() => {
|
|
|
|
|
goToStep(STEP_ITEMS[stepIndex - 1].key);
|
2026-07-07 14:32:37 +08:00
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
上一步
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
{!isLastStep && (
|
|
|
|
|
<Button
|
|
|
|
|
type="primary"
|
2026-07-07 18:07:59 +08:00
|
|
|
onClick={() => {
|
|
|
|
|
goToStep(STEP_ITEMS[stepIndex + 1].key);
|
2026-07-07 14:32:37 +08:00
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
下一步
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
{!readOnly && isLastStep && (
|
|
|
|
|
<>
|
|
|
|
|
{mode !== FILING_FORM_MODE.FILED && (
|
2026-07-07 18:07:59 +08:00
|
|
|
<Button loading={submitting} onClick={handleSaveDraft}>
|
2026-07-07 14:32:37 +08:00
|
|
|
暂存
|
2026-06-30 17:32:29 +08:00
|
|
|
</Button>
|
2026-07-07 14:32:37 +08:00
|
|
|
)}
|
|
|
|
|
<Button type="primary" onClick={handleSubmitRequest}>
|
|
|
|
|
{mode === FILING_FORM_MODE.FILED ? "提交填报" : "提交申请"}
|
|
|
|
|
</Button>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</Space>
|
2026-06-30 17:32:29 +08:00
|
|
|
</Spin>
|
|
|
|
|
<PrerequisiteVerifyModal
|
|
|
|
|
open={verifyOpen}
|
|
|
|
|
result={verifyResult}
|
|
|
|
|
loading={submitting}
|
|
|
|
|
onCancel={() => setVerifyOpen(false)}
|
|
|
|
|
onConfirm={handleVerifyConfirm}
|
|
|
|
|
/>
|
|
|
|
|
</PageLayout>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Connect([NS_QUAL_FILING], true)(FilingFormPage);
|