Merge remote-tracking branch 'origin/dev' into dev
commit
0784830acb
|
|
@ -1,54 +1,45 @@
|
||||||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import {
|
|
||||||
fromPageResponse,
|
|
||||||
fromQualificationForm,
|
|
||||||
fromSingleResponse,
|
|
||||||
toPageQuery,
|
|
||||||
toQualificationForm,
|
|
||||||
} from "../enterpriseInfo/adapter";
|
|
||||||
import { apiGet, apiPost, apiPostDelete, safeAction, safePageResult } from "../enterpriseInfo/http";
|
|
||||||
|
|
||||||
export const orgQualificationCertList = declareRequest("orgQualificationCertLoading", safePageResult(async (params) => {
|
// 分页查询
|
||||||
const query = toPageQuery(params, { likeCertName: "certName" });
|
export const orgQualificationCertList = declareRequest(
|
||||||
const res = await apiGet("/safetyEval/org-qualification/page", query);
|
"orgQualificationCertLoading",
|
||||||
return fromPageResponse(res, toQualificationForm);
|
"Get > /safetyEval/org-qualification/page",
|
||||||
}));
|
"orgQualificationCertList: [] | res.data?.records || res.data || [] & orgQualificationCertTotal: 0 | res.data?.total || 0",
|
||||||
|
);
|
||||||
|
|
||||||
export const orgQualificationCertInfo = declareRequest("orgQualificationCertLoading", safeAction(async (params) => {
|
// 新增
|
||||||
const res = await apiGet("/safetyEval/org-qualification/get", { id: params.id });
|
export const orgQualificationCertAdd = declareRequest(
|
||||||
return fromSingleResponse(res, toQualificationForm);
|
"orgQualificationCertLoading",
|
||||||
}));
|
"Post > @/safetyEval/org-qualification/save",
|
||||||
|
);
|
||||||
|
|
||||||
export const orgQualificationCertAdd = declareRequest("orgQualificationCertLoading", safeAction(async (values) => {
|
// 查询详情
|
||||||
const res = await apiPost("/safetyEval/org-qualification/save", fromQualificationForm(values));
|
export const orgQualificationCertInfo = declareRequest(
|
||||||
return fromSingleResponse(res, toQualificationForm);
|
"orgQualificationCertLoading",
|
||||||
}));
|
"Get > /safetyEval/org-qualification/get",
|
||||||
|
"orgQualificationCertDetail: {} | res.data || {}",
|
||||||
|
);
|
||||||
|
|
||||||
export const orgQualificationCertEdit = declareRequest("orgQualificationCertLoading", safeAction(async (values) => {
|
// 修改
|
||||||
const res = await apiPost("/safetyEval/org-qualification/modify", fromQualificationForm(values));
|
export const orgQualificationCertEdit = declareRequest(
|
||||||
return fromSingleResponse(res, toQualificationForm);
|
"orgQualificationCertLoading",
|
||||||
}));
|
"Post > @/safetyEval/org-qualification/modify",
|
||||||
|
);
|
||||||
|
|
||||||
export const orgQualificationCertRemove = declareRequest("orgQualificationCertLoading", safeAction(async ({ id }) => {
|
// 删除
|
||||||
return apiPostDelete("/safetyEval/org-qualification/delete", id);
|
export const orgQualificationCertRemove = declareRequest(
|
||||||
}));
|
"orgQualificationCertLoading",
|
||||||
|
"Post > @/safetyEval/org-qualification/delete",
|
||||||
|
);
|
||||||
|
|
||||||
export const orgQualificationCertDisable = declareRequest("orgQualificationCertLoading", safeAction(async ({ id }) => {
|
// 禁用
|
||||||
const res = await apiGet("/safetyEval/org-qualification/get", { id });
|
export const orgQualificationCertDisable = declareRequest(
|
||||||
const data = res?.data || {};
|
"orgQualificationCertLoading",
|
||||||
return apiPost("/safetyEval/org-qualification/modify", {
|
"Post > @/safetyEval/org-qualification/disable",
|
||||||
...data,
|
);
|
||||||
id,
|
|
||||||
enableFlag: 2,
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
||||||
export const orgQualificationCertEnable = declareRequest("orgQualificationCertLoading", safeAction(async ({ id }) => {
|
// 启用
|
||||||
const res = await apiGet("/safetyEval/org-qualification/get", { id });
|
export const orgQualificationCertEnable = declareRequest(
|
||||||
const data = res?.data || {};
|
"orgQualificationCertLoading",
|
||||||
return apiPost("/safetyEval/org-qualification/modify", {
|
"Post > @/safetyEval/org-qualification/enable",
|
||||||
...data,
|
);
|
||||||
id,
|
|
||||||
enableFlag: 1,
|
|
||||||
});
|
|
||||||
}));
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
import { Image, Tooltip, Tag } from "antd";
|
import { Image, Tooltip, Tag } from "antd";
|
||||||
import { getFileUrl } from "zy-react-library/utils";
|
|
||||||
|
|
||||||
/** 解析附件对象的可访问地址,兼容 filePath(相对路径)与 url(绝对/相对) */
|
/** 解析附件对象的可访问地址,兼容 filePath(相对路径)与 url(绝对/相对) */
|
||||||
export function resolvePreviewSrc(file = {}) {
|
export function resolvePreviewSrc(file = {}) {
|
||||||
const base = getFileUrl?.() || window.fileUrl || "";
|
const base = window.fileUrl || "";
|
||||||
const path = file.filePath;
|
const path = file.filePath;
|
||||||
const url = file.url;
|
const url = file.url;
|
||||||
if (path) {
|
if (path) {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import { NS_EQUIP_INFO } from "~/enumerate/namespace";
|
||||||
import { positiveNumberRule } from "~/utils/validators";
|
import { positiveNumberRule } from "~/utils/validators";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
const DUAL_CHANNEL_MAP = { 1: "是", 0: "否" };
|
const DUAL_CHANNEL_MAP = { 1: "是", 2: "否" };
|
||||||
|
|
||||||
function EquipInfoPage(props) {
|
function EquipInfoPage(props) {
|
||||||
const [formModalOpen, setFormModalOpen] = useState(false);
|
const [formModalOpen, setFormModalOpen] = useState(false);
|
||||||
|
|
@ -58,7 +58,7 @@ function EquipInfoPage(props) {
|
||||||
okText: "是",
|
okText: "是",
|
||||||
cancelText: "否",
|
cancelText: "否",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const res = await props.equipInfoRemove({ id });
|
const res = await props.equipInfoRemove({ data: id });
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
handleSearch();
|
handleSearch();
|
||||||
|
|
@ -111,7 +111,7 @@ function EquipInfoPage(props) {
|
||||||
form={searchForm}
|
form={searchForm}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
formLine={[
|
formLine={[
|
||||||
<Form.Item key="likeDeviceName" name="likeDeviceName">
|
<Form.Item key="likeDeviceName" name="deviceName">
|
||||||
<ControlWrapper.Input
|
<ControlWrapper.Input
|
||||||
label="设备名称"
|
label="设备名称"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
|
@ -473,7 +473,7 @@ function EquipFormModal({
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
options={[
|
options={[
|
||||||
{ label: "是", value: 1 },
|
{ label: "是", value: 1 },
|
||||||
{ label: "否", value: 0 },
|
{ label: "否", value: 2 },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { NS_STAFF_CERTIFICATE } from "~/enumerate/namespace";
|
import { NS_STAFF_CERTIFICATE } from "~/enumerate/namespace";
|
||||||
import CertPreviewImg from "~/components/CertPreviewImg";
|
import CertPreviewImg from "~/components/CertPreviewImg";
|
||||||
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
import { dateRangeRule } from "~/utils/validators";
|
import { dateRangeRule } from "~/utils/validators";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
@ -312,26 +313,8 @@ function CertModal({
|
||||||
<Form.Item name="reviewDate" label="复核日期">
|
<Form.Item name="reviewDate" label="复核日期">
|
||||||
<DatePicker style={{ width: "100%" }} />
|
<DatePicker style={{ width: "100%" }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<AttachmentUpload name="certAttachmentUrl" label="证书附件" maxCount={3} />
|
||||||
name="certAttachmentUrl"
|
|
||||||
label="证书附件"
|
|
||||||
valuePropName="fileList"
|
|
||||||
getValueFromEvent={(e) => {
|
|
||||||
if (Array.isArray(e)) return e;
|
|
||||||
return e?.fileList;
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Upload
|
|
||||||
action="/api/upload"
|
|
||||||
maxCount={3}
|
|
||||||
fileList={uploadFileList}
|
|
||||||
onChange={(info) => {
|
|
||||||
setUploadFileList(info.fileList);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
|
||||||
</Upload>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,47 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
DatePicker,
|
||||||
Descriptions,
|
Descriptions,
|
||||||
Form,
|
Form,
|
||||||
|
Image,
|
||||||
|
Input,
|
||||||
message,
|
message,
|
||||||
Modal,
|
Modal,
|
||||||
|
Select,
|
||||||
Table,
|
Table,
|
||||||
Upload,
|
|
||||||
} from "antd";
|
} from "antd";
|
||||||
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
|
import { PlusOutlined } from "@ant-design/icons";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
|
||||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||||
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
||||||
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
|
||||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
|
||||||
import CertPreviewImg, {
|
|
||||||
CertTooltipPreviewImg,
|
|
||||||
} from "~/components/CertPreviewImg";
|
|
||||||
import { NS_ORG_QUALIFICATION_CERT } from "~/enumerate/namespace";
|
import { NS_ORG_QUALIFICATION_CERT } from "~/enumerate/namespace";
|
||||||
import { QUALIFICATION_INDUSTRY_OPTIONS } from "~/enumerate/enterpriseOptions";
|
import { QUALIFICATION_INDUSTRY_OPTIONS } from "~/enumerate/enterpriseOptions";
|
||||||
import { formSelectField } from "~/utils/enterpriseForm";
|
|
||||||
import { isQualificationEnabled } from "~/api/enterpriseInfo/adapter";
|
|
||||||
import { safeGetFiles, safeRequest } from "~/utils";
|
|
||||||
import { toDayjs } from "~/utils/dateFormat";
|
import { toDayjs } from "~/utils/dateFormat";
|
||||||
import { mockUploadFileList, resolveUploadFileId } from "~/utils/mockUpload";
|
|
||||||
import { dateRangeRule } from "~/utils/validators";
|
import { dateRangeRule } from "~/utils/validators";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
const { TextArea } = Input;
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
|
/** certImageUrl(逗号分隔URL)↔ 文件列表({ url }[]) */
|
||||||
|
function parseCertImageUrl(str) {
|
||||||
|
if (!str) return [];
|
||||||
|
return String(str).split(",").filter(Boolean).map((url, i) => ({
|
||||||
|
url: url.trim(),
|
||||||
|
name: `证书图片${i + 1}.jpg`,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
function stringifyCertImageUrl(files) {
|
||||||
|
if (!files?.length) return undefined;
|
||||||
|
return files.map((f) => f.url || f.response?.data?.url).filter(Boolean).join(",");
|
||||||
|
}
|
||||||
|
|
||||||
function QualificationCertPage(props) {
|
function QualificationCertPage(props) {
|
||||||
const [addModalOpen, setAddModalOpen] = useState(false);
|
const [addModalOpen, setAddModalOpen] = useState(false);
|
||||||
|
|
@ -52,8 +62,8 @@ function QualificationCertPage(props) {
|
||||||
};
|
};
|
||||||
const res = await props.orgQualificationCertList(params);
|
const res = await props.orgQualificationCertList(params);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
setDataSource(res?.data?.records || res?.data || []);
|
setDataSource(res?.data || []);
|
||||||
setTotal(res?.data?.total || 0);
|
setTotal(res?.total || 0);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("[QualificationCert] list failed:", err);
|
console.warn("[QualificationCert] list failed:", err);
|
||||||
|
|
@ -63,12 +73,18 @@ function QualificationCertPage(props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReset = (values) => {
|
const handleReset = (values) => {
|
||||||
router.query = { ...router.query, ...values, current: 1, pageSize: 10 };
|
router.query = { ...values, validStartDate: undefined, validEndDate: undefined, current: 1, pageSize: 10 };
|
||||||
getData();
|
getData();
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.setFieldsValue(router.query);
|
const params = {
|
||||||
|
...router.query
|
||||||
|
};
|
||||||
|
if (params.validStartDate && params.validEndDate) {
|
||||||
|
params.validDate = [toDayjs(params.validStartDate), toDayjs(params.validEndDate)];
|
||||||
|
}
|
||||||
|
form.setFieldsValue(params);
|
||||||
getData();
|
getData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
@ -79,7 +95,7 @@ function QualificationCertPage(props) {
|
||||||
okText: "是",
|
okText: "是",
|
||||||
cancelText: "否",
|
cancelText: "否",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const res = await props.orgQualificationCertRemove({ id });
|
const res = await props.orgQualificationCertRemove({ data: id });
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -88,32 +104,16 @@ function QualificationCertPage(props) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDisable = (id) => {
|
const onToggleStatus = (record) => {
|
||||||
|
const enabled = record.enableFlag === 1;
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "是否停用该证书?",
|
content: enabled ? "是否停用该证书?" : "是否启用该证书?",
|
||||||
okText: "是",
|
okText: "是",
|
||||||
cancelText: "否",
|
cancelText: "否",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const res = await props.orgQualificationCertDisable({ id });
|
const action = enabled ? props.orgQualificationCertDisable : props.orgQualificationCertEnable;
|
||||||
if (res?.success !== false) {
|
const res = await action({ data: record.id });
|
||||||
message.success("操作成功");
|
|
||||||
await getData();
|
|
||||||
} else {
|
|
||||||
message.error(res?.message || "操作失败");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const onEnable = (id) => {
|
|
||||||
Modal.confirm({
|
|
||||||
title: "提示",
|
|
||||||
content: "是否启用该证书?",
|
|
||||||
okText: "是",
|
|
||||||
cancelText: "否",
|
|
||||||
onOk: async () => {
|
|
||||||
const res = await props.orgQualificationCertEnable({ id });
|
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("操作成功");
|
message.success("操作成功");
|
||||||
await getData();
|
await getData();
|
||||||
|
|
@ -137,7 +137,7 @@ function QualificationCertPage(props) {
|
||||||
extra={
|
extra={
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon={<AddIcon />}
|
icon={<PlusOutlined />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentId("");
|
setCurrentId("");
|
||||||
setAddModalOpen(true);
|
setAddModalOpen(true);
|
||||||
|
|
@ -165,8 +165,12 @@ function QualificationCertPage(props) {
|
||||||
]}
|
]}
|
||||||
onReset={handleReset}
|
onReset={handleReset}
|
||||||
onFinish={(values) => {
|
onFinish={(values) => {
|
||||||
|
if (values.validDate) {
|
||||||
|
values.validStartDate = values.validDate?.[0]?.format("YYYY-MM-DD");
|
||||||
|
values.validEndDate = values.validDate?.[1]?.format("YYYY-MM-DD");
|
||||||
|
delete values.validDate;
|
||||||
|
}
|
||||||
router.query = {
|
router.query = {
|
||||||
...router.query,
|
|
||||||
...values,
|
...values,
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -178,7 +182,7 @@ function QualificationCertPage(props) {
|
||||||
<Table
|
<Table
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "证照类别", dataIndex: "certType" },
|
{ title: "证照类别", dataIndex: "licenseTypeName" },
|
||||||
{ title: "证书名称", dataIndex: "certName" },
|
{ title: "证书名称", dataIndex: "certName" },
|
||||||
{
|
{
|
||||||
title: "证书有效期",
|
title: "证书有效期",
|
||||||
|
|
@ -191,14 +195,14 @@ function QualificationCertPage(props) {
|
||||||
title: "状态",
|
title: "状态",
|
||||||
width: 80,
|
width: 80,
|
||||||
render: (_, record) =>
|
render: (_, record) =>
|
||||||
isQualificationEnabled(record) ? "启用" : "禁用",
|
record.enableFlag === 1 ? "启用" : "禁用",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "照片",
|
title: "照片",
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_, record) =>
|
render: (_, record) =>
|
||||||
record.certImgFiles?.length ? (
|
record.certImageUrl ? (
|
||||||
<CertTooltipPreviewImg files={record.certImgFiles} />
|
<Image width={60} height={60} style={{ objectFit: "cover" }} src={record.certImageUrl.split(",")[0]?.trim()} preview={{ mask: "查看" }} />
|
||||||
) : (
|
) : (
|
||||||
<span>无</span>
|
<span>无</span>
|
||||||
),
|
),
|
||||||
|
|
@ -230,21 +234,13 @@ function QualificationCertPage(props) {
|
||||||
<Button danger type="link" onClick={() => onDelete(record.id)}>
|
<Button danger type="link" onClick={() => onDelete(record.id)}>
|
||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
{isQualificationEnabled(record) ? (
|
|
||||||
<Button type="link" onClick={() => onDisable(record.id)}>
|
|
||||||
禁用
|
|
||||||
</Button>
|
|
||||||
) : (
|
|
||||||
<Button type="link" onClick={() => onEnable(record.id)}>
|
|
||||||
启用
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</TableAction>
|
</TableAction>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
scroll={{ y: props.scrollY }}
|
scroll={{ y: props.scrollY , x: 1400}}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
total,
|
total,
|
||||||
|
|
@ -301,56 +297,31 @@ function CertFormModal({
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [submitting, setSubmitting] = useState(false);
|
const [submitting, setSubmitting] = useState(false);
|
||||||
const [detailLoading, setDetailLoading] = useState(false);
|
const [detailLoading, setDetailLoading] = useState(false);
|
||||||
const { getFile } = useGetFile();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!open) {
|
if (!open) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!currentId) {
|
if (!currentId) {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
form.setFieldsValue({ certImgs: mockUploadFileList("证书图片.jpg") });
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
(async () => {
|
(async () => {
|
||||||
setDetailLoading(true);
|
setDetailLoading(true);
|
||||||
try {
|
try {
|
||||||
const res = await safeRequest(requestDetails, { id: currentId });
|
const res = await requestDetails({ id: currentId });
|
||||||
if (cancelled || !res?.data) {
|
if (cancelled || !res?.data) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
const data = { ...res.data };
|
const data = { ...res.data };
|
||||||
data.issueDate = toDayjs(data.issueDate);
|
data.issueDate = toDayjs(data.issueDate);
|
||||||
data.validDate = [
|
data.validDate = [toDayjs(data.validStartDate), toDayjs(data.validEndDate)];
|
||||||
toDayjs(data.validStartDate),
|
data.certImageUrl = data.certImageUrl;
|
||||||
toDayjs(data.validEndDate),
|
|
||||||
];
|
|
||||||
data.certImgs = data.certImgFiles?.length
|
|
||||||
? data.certImgFiles
|
|
||||||
: mockUploadFileList("证书图片.jpg");
|
|
||||||
form.setFieldsValue(data);
|
form.setFieldsValue(data);
|
||||||
setDetailLoading(false);
|
|
||||||
|
|
||||||
const files = await safeGetFiles(
|
|
||||||
getFile,
|
|
||||||
{ eqType: "org_cert", eqForeignKey: data.id },
|
|
||||||
data.certImgFiles || [],
|
|
||||||
);
|
|
||||||
if (!cancelled && files.length) {
|
|
||||||
form.setFieldValue("certImgs", files);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("[QualificationCert] load detail failed:", err);
|
console.warn("[QualificationCert] load detail failed:", err);
|
||||||
} finally {
|
} finally {
|
||||||
if (!cancelled) {
|
if (!cancelled) setDetailLoading(false);
|
||||||
setDetailLoading(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
return () => {
|
return () => { cancelled = true; };
|
||||||
cancelled = true;
|
|
||||||
};
|
|
||||||
}, [open, currentId]);
|
}, [open, currentId]);
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
|
|
@ -363,10 +334,8 @@ function CertFormModal({
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
values.validStartDate = values.validDate?.[0];
|
values.validStartDate = values.validDate?.[0];
|
||||||
values.validEndDate = values.validDate?.[1];
|
values.validEndDate = values.validDate?.[1];
|
||||||
values.certImageUrl = resolveUploadFileId(values.certImgs);
|
values.certImageUrl = values.certImageUrl?.map((item) => item.url).join(",");
|
||||||
if (currentId) {
|
if (currentId) values.id = currentId;
|
||||||
values.id = currentId;
|
|
||||||
}
|
|
||||||
const request = currentId ? requestEdit : requestAdd;
|
const request = currentId ? requestEdit : requestAdd;
|
||||||
const res = await request(values);
|
const res = await request(values);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
|
|
@ -394,66 +363,63 @@ function CertFormModal({
|
||||||
<div style={{ color: "#999", marginBottom: 16, fontSize: 12 }}>
|
<div style={{ color: "#999", marginBottom: 16, fontSize: 12 }}>
|
||||||
严谨在本互联网非涉密平台处理、传输国家秘密和工作秘密,请确认扫描、传输的文件资料不涉及国家秘密和工作秘密
|
严谨在本互联网非涉密平台处理、传输国家秘密和工作秘密,请确认扫描、传输的文件资料不涉及国家秘密和工作秘密
|
||||||
</div>
|
</div>
|
||||||
<FormBuilder
|
<Form form={form} layout="horizontal" onFinish={handleSubmit} labelCol={{ span: 4 }}>
|
||||||
form={form}
|
<Form.Item
|
||||||
span={24}
|
name="licenseTypeName"
|
||||||
showActionButtons={false}
|
label="证照类型"
|
||||||
onFinish={handleSubmit}
|
rules={[{ required: true, message: "请选择证照类型" }]}
|
||||||
options={[
|
>
|
||||||
formSelectField(
|
<Select placeholder="请选择证照类型">
|
||||||
"certType",
|
{QUALIFICATION_INDUSTRY_OPTIONS.map((opt) => (
|
||||||
"证照类型",
|
<Select.Option key={opt.value} value={opt.label}>
|
||||||
QUALIFICATION_INDUSTRY_OPTIONS,
|
{opt.label}
|
||||||
{
|
</Select.Option>
|
||||||
rules: [{ required: true, message: "请选择证照类型" }],
|
))}
|
||||||
colProps: { span: 24 },
|
</Select>
|
||||||
},
|
</Form.Item>
|
||||||
),
|
<Form.Item
|
||||||
{
|
name="certName"
|
||||||
name: "certName",
|
label="证书名称"
|
||||||
label: "证书名称",
|
rules={[{ required: true, message: "请输入证书名称" }]}
|
||||||
rules: [{ required: true, message: "请输入证书名称" }],
|
>
|
||||||
},
|
<Input placeholder="请输入证书名称" />
|
||||||
{
|
</Form.Item>
|
||||||
name: "certNo",
|
<Form.Item
|
||||||
label: "证明编号",
|
name="certNo"
|
||||||
rules: [{ required: true, message: "请输入证明编号" }],
|
label="证明编号"
|
||||||
},
|
rules={[{ required: true, message: "请输入证明编号" }]}
|
||||||
{
|
>
|
||||||
name: "issueOrg",
|
<Input placeholder="请输入证明编号" />
|
||||||
label: "发证机关",
|
</Form.Item>
|
||||||
rules: [{ required: true, message: "请输入发证机关" }],
|
<Form.Item
|
||||||
},
|
name="issueOrg"
|
||||||
{
|
label="发证机关"
|
||||||
name: "issueDate",
|
rules={[{ required: true, message: "请输入发证机关" }]}
|
||||||
label: "发证日期",
|
>
|
||||||
render: FORM_ITEM_RENDER_ENUM.DATE,
|
<Input placeholder="请输入发证机关" />
|
||||||
rules: [{ required: true, message: "请选择发证日期" }],
|
</Form.Item>
|
||||||
},
|
<Form.Item
|
||||||
{
|
name="issueDate"
|
||||||
name: "validDate",
|
label="发证日期"
|
||||||
label: "证书有效期",
|
rules={[{ required: true, message: "请选择发证日期" }]}
|
||||||
render: FORM_ITEM_RENDER_ENUM.DATE_RANGE,
|
>
|
||||||
rules: [
|
<DatePicker style={{ width: "100%" }} placeholder="请选择发证日期" />
|
||||||
{ required: true, message: "请选择证书有效期" },
|
</Form.Item>
|
||||||
dateRangeRule(),
|
<Form.Item
|
||||||
],
|
name="validDate"
|
||||||
},
|
label="证书有效期"
|
||||||
{
|
rules={[
|
||||||
name: "remark",
|
{ required: true, message: "请选择证书有效期" },
|
||||||
label: "备注",
|
dateRangeRule(),
|
||||||
required: false,
|
]}
|
||||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
>
|
||||||
},
|
<RangePicker style={{ width: "100%" }} />
|
||||||
{
|
</Form.Item>
|
||||||
name: "certImgs",
|
<Form.Item name="remark" label="备注">
|
||||||
label: "证书图片",
|
<TextArea rows={3} placeholder="请输入备注" />
|
||||||
rules: [{ required: true, message: "请上传证书图片" }],
|
</Form.Item>
|
||||||
render: <Upload maxCount={3} />,
|
<AttachmentUpload name="certImageUrl" accept="image/*" label="证书图片" maxCount={3} />
|
||||||
},
|
</Form>
|
||||||
]}
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
/>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -461,7 +427,6 @@ function CertFormModal({
|
||||||
function CertViewModal({ open, currentId, requestDetails, onCancel }) {
|
function CertViewModal({ open, currentId, requestDetails, onCancel }) {
|
||||||
const [info, setInfo] = useState({});
|
const [info, setInfo] = useState({});
|
||||||
const [detailLoading, setDetailLoading] = useState(false);
|
const [detailLoading, setDetailLoading] = useState(false);
|
||||||
const { getFile } = useGetFile();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!open || !currentId) {
|
if (!open || !currentId) {
|
||||||
|
|
@ -472,34 +437,16 @@ function CertViewModal({ open, currentId, requestDetails, onCancel }) {
|
||||||
(async () => {
|
(async () => {
|
||||||
setDetailLoading(true);
|
setDetailLoading(true);
|
||||||
try {
|
try {
|
||||||
const res = await safeRequest(requestDetails, { id: currentId });
|
const res = await requestDetails({ id: currentId });
|
||||||
if (cancelled || !res?.data) {
|
if (cancelled || !res?.data) return;
|
||||||
return;
|
setInfo({ ...res.data, certImageUrlList: parseCertImageUrl(res.data.certImageUrl) });
|
||||||
}
|
|
||||||
const data = { ...res.data };
|
|
||||||
data.certImgs = data.certImgFiles || [];
|
|
||||||
setInfo(data);
|
|
||||||
setDetailLoading(false);
|
|
||||||
|
|
||||||
const files = await safeGetFiles(
|
|
||||||
getFile,
|
|
||||||
{ eqType: "org_cert", eqForeignKey: data.id },
|
|
||||||
data.certImgFiles || [],
|
|
||||||
);
|
|
||||||
if (!cancelled && files.length) {
|
|
||||||
setInfo((prev) => ({ ...prev, certImgs: files }));
|
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("[QualificationCert] load view failed:", err);
|
console.warn("[QualificationCert] load view failed:", err);
|
||||||
} finally {
|
} finally {
|
||||||
if (!cancelled) {
|
if (!cancelled) setDetailLoading(false);
|
||||||
setDetailLoading(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
return () => {
|
return () => { cancelled = true; };
|
||||||
cancelled = true;
|
|
||||||
};
|
|
||||||
}, [open, currentId]);
|
}, [open, currentId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -515,7 +462,7 @@ function CertViewModal({ open, currentId, requestDetails, onCancel }) {
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
>
|
>
|
||||||
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
<Descriptions bordered column={1} labelStyle={{ width: 160 }}>
|
||||||
<Descriptions.Item label="证照类型">{info.certType}</Descriptions.Item>
|
<Descriptions.Item label="证照类型">{info.licenseTypeName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="证书名称">{info.certName}</Descriptions.Item>
|
<Descriptions.Item label="证书名称">{info.certName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="证明编号">{info.certNo}</Descriptions.Item>
|
<Descriptions.Item label="证明编号">{info.certNo}</Descriptions.Item>
|
||||||
<Descriptions.Item label="发证机关">{info.issueOrg}</Descriptions.Item>
|
<Descriptions.Item label="发证机关">{info.issueOrg}</Descriptions.Item>
|
||||||
|
|
@ -525,7 +472,22 @@ function CertViewModal({ open, currentId, requestDetails, onCancel }) {
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="备注">{info.remark || "-"}</Descriptions.Item>
|
<Descriptions.Item label="备注">{info.remark || "-"}</Descriptions.Item>
|
||||||
<Descriptions.Item label="证书图片">
|
<Descriptions.Item label="证书图片">
|
||||||
<CertPreviewImg files={info.certImgs} />
|
{info.certImageUrlList?.length ? (
|
||||||
|
<Image.PreviewGroup>
|
||||||
|
{info.certImageUrlList.map((file, idx) => (
|
||||||
|
<Image
|
||||||
|
key={idx}
|
||||||
|
src={file.url}
|
||||||
|
alt="证书图片"
|
||||||
|
width={100}
|
||||||
|
height={100}
|
||||||
|
style={{ objectFit: "cover", marginRight: 8 }}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Image.PreviewGroup>
|
||||||
|
) : (
|
||||||
|
<span>暂无图片</span>
|
||||||
|
)}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,9 @@ import {
|
||||||
Select,
|
Select,
|
||||||
Table,
|
Table,
|
||||||
Tag,
|
Tag,
|
||||||
Upload,
|
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
||||||
import { UploadOutlined } from "@ant-design/icons";
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
|
|
@ -212,7 +211,6 @@ function ResignationApplyPage(props) {
|
||||||
function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [submitting, setSubmitting] = useState(false);
|
const [submitting, setSubmitting] = useState(false);
|
||||||
const [uploading, setUploading] = useState(false);
|
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
@ -228,6 +226,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
values.expectedResignDate =
|
values.expectedResignDate =
|
||||||
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
|
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
|
||||||
values.expectedResignDate;
|
values.expectedResignDate;
|
||||||
|
values.reportFileUrl = values.reportFileUrl?.map?.((f) => f.url).filter(Boolean).join(",") || undefined;
|
||||||
const res = await requestAdd(values);
|
const res = await requestAdd(values);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
|
|
@ -290,35 +289,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
||||||
<Form.Item name="remark" label="备注">
|
<Form.Item name="remark" label="备注">
|
||||||
<Input.TextArea rows={2} placeholder="请输入备注" />
|
<Input.TextArea rows={2} placeholder="请输入备注" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<AttachmentUpload name="reportFileUrl" label="离职通知报告" maxCount={1} accept=".pdf" />
|
||||||
name="reportFileUrl"
|
|
||||||
label="离职通知报告"
|
|
||||||
rules={[{ required: true, message: "请上传离职通知报告" }]}
|
|
||||||
>
|
|
||||||
<Upload
|
|
||||||
action={`${window.process.env.app.API_HOST}/safetyEval/file/upload`}
|
|
||||||
showUploadList={false}
|
|
||||||
maxCount={1}
|
|
||||||
accept=".pdf"
|
|
||||||
onChange={(info) => {
|
|
||||||
if (info.file.status === "uploading") {
|
|
||||||
setUploading(true);
|
|
||||||
} else {
|
|
||||||
setUploading(false);
|
|
||||||
if (info.file.status === "done") {
|
|
||||||
const data = info.file.response?.data;
|
|
||||||
if (data) {
|
|
||||||
form.setFieldsValue({ reportFileUrl: data.url || data });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button loading={uploading} icon={<UploadOutlined />}>
|
|
||||||
上传文件
|
|
||||||
</Button>
|
|
||||||
</Upload>
|
|
||||||
</Form.Item>
|
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@ function OrgPersonnelSelectModalInner(props) {
|
||||||
onChange: (page, pageSize) => getData(page, pageSize),
|
onChange: (page, pageSize) => getData(page, pageSize),
|
||||||
}}
|
}}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "人员姓名", dataIndex: "staffName" },
|
{ title: "人员姓名", dataIndex: "userName" },
|
||||||
{ title: "类型", dataIndex: "personType" },
|
{ title: "类型", dataIndex: "personTypeName" },
|
||||||
{ title: "职务", dataIndex: "positionName" },
|
{ title: "职务", dataIndex: "positionName" },
|
||||||
{ title: "职称", dataIndex: "titleName" },
|
{ title: "职称", dataIndex: "titleName" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ export default function PersonnelStep({
|
||||||
const [viewId, setViewId] = useState("");
|
const [viewId, setViewId] = useState("");
|
||||||
|
|
||||||
const existingIds = personnelList.map((item) => String(item.sourcePersonnelId || ""));
|
const existingIds = personnelList.map((item) => String(item.sourcePersonnelId || ""));
|
||||||
|
console.log(personnelList);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -35,7 +36,7 @@ export default function PersonnelStep({
|
||||||
dataSource={personnelList}
|
dataSource={personnelList}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
|
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
|
||||||
{ title: "人员姓名", dataIndex: "personName" },
|
{ title: "人员姓名", dataIndex: "userName" },
|
||||||
{ title: "类型", dataIndex: "personTypeName" },
|
{ title: "类型", dataIndex: "personTypeName" },
|
||||||
{ title: "职务", dataIndex: "positionName" },
|
{ title: "职务", dataIndex: "positionName" },
|
||||||
{ title: "职称", dataIndex: "titleName" },
|
{ title: "职称", dataIndex: "titleName" },
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,6 @@ function FilingFormPage(props) {
|
||||||
const detailRef = useRef(null);
|
const detailRef = useRef(null);
|
||||||
const readOnly = query.readOnly;
|
const readOnly = query.readOnly;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const saveActionHint =
|
const saveActionHint =
|
||||||
mode === FILING_FORM_MODE.FILED
|
mode === FILING_FORM_MODE.FILED
|
||||||
? "请点击提交后保存"
|
? "请点击提交后保存"
|
||||||
|
|
@ -138,7 +136,7 @@ function FilingFormPage(props) {
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
|
|
||||||
const currentDetail = collectCurrentDetail();
|
const currentDetail = collectCurrentDetail();
|
||||||
const word= mode === "change" ? "Change" : "";
|
const word = mode === "change" ? "Change" : "";
|
||||||
const body = {
|
const body = {
|
||||||
[`qualFiling${word}AddCmd`]: {
|
[`qualFiling${word}AddCmd`]: {
|
||||||
...currentDetail,
|
...currentDetail,
|
||||||
|
|
@ -165,9 +163,9 @@ function FilingFormPage(props) {
|
||||||
delete params.commitment;
|
delete params.commitment;
|
||||||
}
|
}
|
||||||
|
|
||||||
let action=props.submitQualFiling;
|
let action = props.submitQualFiling;
|
||||||
if (mode === FILING_FORM_MODE.CHANGE) {
|
if (mode === FILING_FORM_MODE.CHANGE) {
|
||||||
action=props.submitQualFilingChange;
|
action = props.submitQualFilingChange;
|
||||||
}
|
}
|
||||||
const result = await action(body);
|
const result = await action(body);
|
||||||
|
|
||||||
|
|
@ -213,9 +211,7 @@ function FilingFormPage(props) {
|
||||||
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
||||||
const newRows = idsToAdd.map((id) => {
|
const newRows = idsToAdd.map((id) => {
|
||||||
const row = rowMap.get(String(id));
|
const row = rowMap.get(String(id));
|
||||||
return row
|
return row;
|
||||||
? mapStaffRowToFilingPersonnel(row)
|
|
||||||
: mapStaffRowToFilingPersonnel({ id });
|
|
||||||
});
|
});
|
||||||
setDetail((prev) => ({
|
setDetail((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
|
|
@ -227,7 +223,7 @@ function FilingFormPage(props) {
|
||||||
const handlePersonnelRemove = (record) => {
|
const handlePersonnelRemove = (record) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: `确认删除人员「${record.personName}」?`,
|
content: `确认删除人员「${record.userName}」?`,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
setDetail((prev) => ({
|
setDetail((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
|
|
@ -354,7 +350,6 @@ function FilingFormPage(props) {
|
||||||
title={MODE_TITLE[mode] || "资质备案表单"}
|
title={MODE_TITLE[mode] || "资质备案表单"}
|
||||||
history={props.history}
|
history={props.history}
|
||||||
previous
|
previous
|
||||||
|
|
||||||
>
|
>
|
||||||
<Spin spinning={loading || submitting}>
|
<Spin spinning={loading || submitting}>
|
||||||
<Tabs
|
<Tabs
|
||||||
|
|
@ -372,43 +367,41 @@ function FilingFormPage(props) {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<Space>
|
||||||
<Space>
|
{stepIndex > 0 && (
|
||||||
{stepIndex > 0 && (
|
<Button
|
||||||
<Button
|
onClick={async () => {
|
||||||
onClick={async () => {
|
setActiveStep(STEP_ITEMS[stepIndex - 1].key);
|
||||||
setActiveStep(STEP_ITEMS[stepIndex - 1].key);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
上一步
|
||||||
上一步
|
</Button>
|
||||||
</Button>
|
)}
|
||||||
)}
|
{!isLastStep && (
|
||||||
{!isLastStep && (
|
<Button
|
||||||
<Button
|
type="primary"
|
||||||
type="primary"
|
onClick={async () => {
|
||||||
onClick={async () => {
|
setActiveStep(STEP_ITEMS[stepIndex + 1].key);
|
||||||
setActiveStep(STEP_ITEMS[stepIndex + 1].key);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
下一步
|
||||||
下一步
|
</Button>
|
||||||
</Button>
|
)}
|
||||||
)}
|
{!readOnly && isLastStep && (
|
||||||
{!readOnly && isLastStep && (
|
<>
|
||||||
<>
|
{mode !== FILING_FORM_MODE.FILED && (
|
||||||
{mode !== FILING_FORM_MODE.FILED && (
|
<Button
|
||||||
<Button
|
onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
|
||||||
onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
|
>
|
||||||
>
|
暂存
|
||||||
暂存
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
<Button type="primary" onClick={handleSubmitRequest}>
|
|
||||||
{mode === FILING_FORM_MODE.FILED ? "提交填报" : "提交申请"}
|
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
)}
|
||||||
)}
|
<Button type="primary" onClick={handleSubmitRequest}>
|
||||||
</Space>
|
{mode === FILING_FORM_MODE.FILED ? "提交填报" : "提交申请"}
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
</Spin>
|
</Spin>
|
||||||
<PrerequisiteVerifyModal
|
<PrerequisiteVerifyModal
|
||||||
open={verifyOpen}
|
open={verifyOpen}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue