feat
parent
540b779cef
commit
450d565b97
|
|
@ -165,21 +165,7 @@ export function toChangeHistory(data = {}) {
|
|||
};
|
||||
}
|
||||
|
||||
// ─── 查询参数映射 ───
|
||||
|
||||
export function toFilingPageQuery(params = {}, extra = {}) {
|
||||
const query = toPageQuery(params, {
|
||||
filingUnitName: "filingUnitName",
|
||||
filingTerritoryName: "filingTerritoryCode",
|
||||
filingNo: "filingNo",
|
||||
filingStatus: "filingStatusCode",
|
||||
});
|
||||
if (query.filingTerritoryCode) {
|
||||
query.filingTerritoryName = query.filingTerritoryCode;
|
||||
}
|
||||
delete query.orgId;
|
||||
return { ...query, ...extra };
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════
|
||||
// 接口 Action
|
||||
|
|
@ -203,20 +189,20 @@ export async function fetchQualFilingChangeHistory(originFilingId) {
|
|||
}
|
||||
|
||||
export const qualFilingPage = declareRequest("qualFilingLoading", safePageResult(async (params) => {
|
||||
const query = toFilingPageQuery(params, { });
|
||||
const res = await apiGet("/safetyEval/qual-filing/page", query);
|
||||
|
||||
const res = await apiGet("/safetyEval/qual-filing/page", params);
|
||||
return fromPageResponse(res, toFilingListRow);
|
||||
}));
|
||||
|
||||
export const qualFilingFiledPage = declareRequest("qualFilingLoading", safePageResult(async (params) => {
|
||||
const query = toFilingPageQuery(params);
|
||||
const res = await apiGet("/safetyEval/qual-filing/filed/page", query);
|
||||
|
||||
const res = await apiGet("/safetyEval/qual-filing/filed/page", params);
|
||||
return fromPageResponse(res, toFilingListRow);
|
||||
}));
|
||||
|
||||
export const qualFilingChangePage = declareRequest("qualFilingLoading", safePageResult(async (params) => {
|
||||
const query = toFilingPageQuery(params);
|
||||
const res = await apiGet("/safetyEval/qual-filing-change/org/page", query);
|
||||
|
||||
const res = await apiGet("/safetyEval/qual-filing-change/org/page", params);
|
||||
return fromPageResponse(res, toFilingListRow);
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { PlusOutlined } from "@ant-design/icons";
|
|||
const isImage = (url) =>
|
||||
/\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(url || "");
|
||||
|
||||
export default function AttachmentUpload({ name, label, disabled = false }) {
|
||||
export default function AttachmentUpload({ name, label, disabled = false, maxCount, accept }) {
|
||||
const [previewImage, setPreviewImage] = useState("");
|
||||
|
||||
return (
|
||||
|
|
@ -29,7 +29,6 @@ export default function AttachmentUpload({ name, label, disabled = false }) {
|
|||
};
|
||||
}}
|
||||
getValueFromEvent={({ fileList }) => {
|
||||
console.log(fileList, 'fileList')
|
||||
return (
|
||||
fileList?.map((file) => ({
|
||||
url: file.response?.data?.url || file.url,
|
||||
|
|
@ -44,6 +43,8 @@ export default function AttachmentUpload({ name, label, disabled = false }) {
|
|||
<Upload
|
||||
disabled={disabled}
|
||||
listType="picture-card"
|
||||
maxCount={maxCount}
|
||||
accept={accept}
|
||||
action={`${window.process.env.app.API_HOST}/safetyEval/file/upload`}
|
||||
onPreview={(file) => {
|
||||
if (isImage(file.url || file.thumbUrl)) {
|
||||
|
|
|
|||
|
|
@ -124,6 +124,8 @@ export default function CommitmentStep({
|
|||
name="legalRepSignatureUrl"
|
||||
label="电子签名"
|
||||
disabled={disabled}
|
||||
maxCount={1}
|
||||
accept="image/*"
|
||||
/>
|
||||
</Form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ function FilingFormPage(props) {
|
|||
if (result?.success) {
|
||||
setVerifyOpen(false);
|
||||
message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
|
||||
props.history.push("filingApplication/list");
|
||||
props.history.goBack();
|
||||
}
|
||||
setSubmitting(false);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue