feat
parent
3eb7f90b8b
commit
bb66034d4d
|
|
@ -243,7 +243,7 @@ export const qualFilingFiledPage = declareRequest("qualFilingLoading", safePageR
|
||||||
|
|
||||||
export const qualFilingChangePage = declareRequest("qualFilingLoading", safePageResult(async (params) => {
|
export const qualFilingChangePage = declareRequest("qualFilingLoading", safePageResult(async (params) => {
|
||||||
const query = toFilingPageQuery(params);
|
const query = toFilingPageQuery(params);
|
||||||
const res = await apiGet("/safetyEval/qual-filing/change/page", query);
|
const res = await apiGet("/safetyEval/qual-filing-change/org/page", query);
|
||||||
return fromPageResponse(res, toFilingListRow);
|
return fromPageResponse(res, toFilingListRow);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
@ -329,13 +329,7 @@ export const qualFilingEquipmentDelete = declareRequest("qualFilingLoading", saf
|
||||||
return apiPostDelete("/safetyEval/qual-filing-equipment/delete", id);
|
return apiPostDelete("/safetyEval/qual-filing-equipment/delete", id);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const qualFilingChangeStart = declareRequest("qualFilingLoading", safeAction(async ({ originFilingId }) => {
|
|
||||||
const res = await apiPost(
|
|
||||||
`/safetyEval/qual-filing-change/start?originFilingId=${encodeURIComponent(asId(originFilingId))}`,
|
|
||||||
{},
|
|
||||||
);
|
|
||||||
return fromSingleResponse(res, (data) => ({ draftFilingId: asId(data) }));
|
|
||||||
}));
|
|
||||||
|
|
||||||
export const qualFilingChangeSubmit = declareRequest("qualFilingLoading", safeAction(async ({ draftFilingId }) => {
|
export const qualFilingChangeSubmit = declareRequest("qualFilingLoading", safeAction(async ({ draftFilingId }) => {
|
||||||
return apiPost("/safetyEval/qual-filing-change/submit", { draftFilingId: asId(draftFilingId) });
|
return apiPost("/safetyEval/qual-filing-change/submit", { draftFilingId: asId(draftFilingId) });
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ function FilingApplicationListPage(props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCreate = () => {
|
const handleCreate = () => {
|
||||||
goFilingForm({ mode: FILING_FORM_MODE.APPLICATION });
|
props.history.push(`/safetyEval/container/qualApplication/filingForm?mode=application`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDelete = (record) => {
|
const handleDelete = (record) => {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import {
|
||||||
} from "~/enumerate/qualFilingOptions";
|
} from "~/enumerate/qualFilingOptions";
|
||||||
import ChangeHistoryModal from "../../FilingForm/components/ChangeHistoryModal";
|
import ChangeHistoryModal from "../../FilingForm/components/ChangeHistoryModal";
|
||||||
import FilingListTable from "../../FilingListTable";
|
import FilingListTable from "../../FilingListTable";
|
||||||
import { goFilingForm } from "../../filingPaths";
|
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
|
|
@ -61,16 +60,9 @@ function FilingChangeListPage(props) {
|
||||||
const handleStartChange = async (record) => {
|
const handleStartChange = async (record) => {
|
||||||
setStartingId(record.id);
|
setStartingId(record.id);
|
||||||
try {
|
try {
|
||||||
const res = await props.qualFilingChangeStart({ originFilingId: record.id });
|
|
||||||
if (res?.success === false || !res?.data?.draftFilingId) {
|
props.history.push(`/safetyEval/container/qualApplication/filingForm?mode=change&id=${record.id}`);
|
||||||
message.error(res?.message || "发起变更失败");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
goFilingForm({
|
|
||||||
mode: FILING_FORM_MODE.CHANGE,
|
|
||||||
id: res.data.draftFilingId,
|
|
||||||
originFilingId: record.id,
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
setStartingId("");
|
setStartingId("");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue