fix
parent
fe284f6333
commit
5d6af1f5ef
|
|
@ -7,7 +7,7 @@ import { fetchQualFilingDetail, fetchQualChangeDetail, fromFilingPersonnelAddCmd
|
|||
import { NS_QUAL_FILING } from "~/enumerate/namespace";
|
||||
import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions";
|
||||
import { FILING_MATERIAL_TEMPLATE } from "../filingMaterialTemplate";
|
||||
import { clearLocalDraft, saveLocalDraft } from "../filingLocalDraft";
|
||||
|
||||
import {
|
||||
fetchOrgPersonnelOptions,
|
||||
mapEquipRowToFilingEquipment,
|
||||
|
|
@ -114,22 +114,7 @@ function FilingFormPage(props) {
|
|||
[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") {
|
||||
|
|
@ -169,10 +154,8 @@ function FilingFormPage(props) {
|
|||
setVerifyOpen(true);
|
||||
};
|
||||
|
||||
const handleVerifyConfirm = async (config) => {
|
||||
if (!verifyResult?.passed) {
|
||||
return;
|
||||
}
|
||||
const handleVerifyConfirm = async (config={}) => {
|
||||
|
||||
setSubmitting(true);
|
||||
|
||||
const currentDetail = collectCurrentDetail();
|
||||
|
|
@ -421,7 +404,7 @@ function FilingFormPage(props) {
|
|||
{!readOnly && isLastStep && (
|
||||
<>
|
||||
{mode !== FILING_FORM_MODE.FILED && (
|
||||
<Button loading={submitting} onClick={handleSaveDraft}>
|
||||
<Button loading={submitting} onClick={()=>handleVerifyConfirm({isSaveDraft:true})}>
|
||||
暂存
|
||||
</Button>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue