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