优化存在下一步的页面按钮位置
parent
082be2d4e3
commit
af59333709
|
|
@ -2,7 +2,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Divider, Form, message, Modal, Space, Spin } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { useEffect, useState } from "react";
|
||||
import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
|
|
@ -26,6 +26,9 @@ function Add(props) {
|
|||
const [formValues, setFormValues] = useState({});
|
||||
const [specialList, setSpecialList] = useState([]);
|
||||
const [qualificationsId, setQualificationsId] = useState("");
|
||||
const [stepTwoLoading, setStepTwoLoading] = useState(false);
|
||||
|
||||
const stepTwoRef = useRef(null);
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
||||
|
|
@ -46,18 +49,55 @@ function Add(props) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.resubmit ? "重新提交" : (query.id ? "编辑" : "新增")} isShowFooter={false}>
|
||||
<Page
|
||||
headerTitle={query.resubmit ? "重新提交" : (query.id ? "编辑" : "新增")}
|
||||
isShowFooter={currentStep === 2}
|
||||
customActionButtons={(
|
||||
<Space>
|
||||
<Button
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "填写的信息将被清除,确定要返回吗?",
|
||||
onOk: () => setCurrentStep(1),
|
||||
});
|
||||
}}
|
||||
>
|
||||
上一步
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
stepTwoRef.current?.onSubmit();
|
||||
}}
|
||||
>
|
||||
提交审核
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
>
|
||||
{currentStep === 1
|
||||
&& <StepOne setFormValues={setFormValues} setCurrentStep={setCurrentStep} setQualificationsId={setQualificationsId} formValues={formValues} form={form} />}
|
||||
&& (
|
||||
<StepOne
|
||||
setFormValues={setFormValues}
|
||||
setCurrentStep={setCurrentStep}
|
||||
setQualificationsId={setQualificationsId}
|
||||
formValues={formValues}
|
||||
form={form}
|
||||
/>
|
||||
)}
|
||||
{currentStep === 2
|
||||
&& (
|
||||
<StepTwo
|
||||
setCurrentStep={setCurrentStep}
|
||||
ref={stepTwoRef}
|
||||
formValues={formValues}
|
||||
query={query}
|
||||
setSpecialList={setSpecialList}
|
||||
qualificationsId={qualificationsId}
|
||||
specialList={specialList}
|
||||
setLoading={setStepTwoLoading}
|
||||
/>
|
||||
)}
|
||||
</Page>
|
||||
|
|
@ -228,7 +268,7 @@ const StepOneComponent = (props) => {
|
|||
/>
|
||||
);
|
||||
};
|
||||
const StepTwoComponent = (props) => {
|
||||
const StepTwoComponent = forwardRef((props, ref) => {
|
||||
const query = props.query;
|
||||
|
||||
const specialList = props.specialList;
|
||||
|
|
@ -362,11 +402,19 @@ const StepTwoComponent = (props) => {
|
|||
}
|
||||
};
|
||||
|
||||
const isLoading = props.qualificationApply.qualificationApplyLoading || uploadFileLoading || deleteFileLoading || getFileLoading;
|
||||
|
||||
useEffect(() => {
|
||||
props.setLoading(isLoading);
|
||||
}, [isLoading]);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
onSubmit,
|
||||
}));
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Spin
|
||||
spinning={props.qualificationApply.qualificationApplyLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||
>
|
||||
<Spin spinning={isLoading}>
|
||||
{typeGroup.map(item => (
|
||||
<div key={item.dataType}>
|
||||
<Divider orientation="left">{`${item.dataTypeName}信息`}</Divider>
|
||||
|
|
@ -418,21 +466,6 @@ const StepTwoComponent = (props) => {
|
|||
/>
|
||||
</div>
|
||||
))}
|
||||
<div style={{ textAlign: "center", marginTop: 20 }}>
|
||||
<Space>
|
||||
<Button onClick={() => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "填写的信息将被清除,确定要返回吗?",
|
||||
onOk: () => props.setCurrentStep(1),
|
||||
});
|
||||
}}
|
||||
>
|
||||
上一步
|
||||
</Button>
|
||||
<Button type="primary" onClick={onSubmit}>提交审核</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</Spin>
|
||||
{uploadFileModalOpen && (
|
||||
<FileUpload
|
||||
|
|
@ -448,7 +481,7 @@ const StepTwoComponent = (props) => {
|
|||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
const FileUpload = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Divider, Form, message, Modal, Space, Spin } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/Gwj";
|
||||
|
|
@ -39,6 +39,10 @@ function Add(props) {
|
|||
const [projectApprovalFlowAddCmdList, setProjectApprovalFlowAddCmdList] = useState([]); // 项目审核流程
|
||||
const [qualificationsTypeId, setQualificationsTypeId] = useState(); // 资质类型
|
||||
const [corpinfoId, setCorpinfoId] = useState(); // 项目id
|
||||
const [stepTwoLoading, setStepTwoLoading] = useState(false);
|
||||
|
||||
const stepTwoRef = useRef(null);
|
||||
|
||||
const { getFile } = useGetFile();
|
||||
// 获取详情数据
|
||||
const getData = async () => {
|
||||
|
|
@ -84,7 +88,31 @@ function Add(props) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "项目备案申请"} isShowFooter={false}>
|
||||
<Page
|
||||
headerTitle={query.id ? "编辑" : "项目备案申请"}
|
||||
isShowFooter={currentStep === 2}
|
||||
customActionButtons={(
|
||||
<Space>
|
||||
<Button
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
setCurrentStep(1);
|
||||
}}
|
||||
>
|
||||
上一步
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
stepTwoRef.current?.onSubmit();
|
||||
}}
|
||||
>
|
||||
提交审核
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
>
|
||||
<>
|
||||
{currentStep === 1
|
||||
&& (
|
||||
|
|
@ -104,7 +132,7 @@ function Add(props) {
|
|||
{currentStep === 2
|
||||
&& (
|
||||
<StepTwo
|
||||
setCurrentStep={setCurrentStep}
|
||||
ref={stepTwoRef}
|
||||
formValues={formValues}
|
||||
query={query}
|
||||
setUsercontentAddCmdList={setUsercontentAddCmdList}
|
||||
|
|
@ -116,6 +144,7 @@ function Add(props) {
|
|||
projectApprovalFlowAddCmdList={projectApprovalFlowAddCmdList}
|
||||
corpinfoId={corpinfoId}
|
||||
qualificationsTypeId={qualificationsTypeId}
|
||||
setLoading={setStepTwoLoading}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
|
@ -285,13 +314,51 @@ const StepOneComponent = (props) => {
|
|||
{ name: "userName", label: "项目负责人", onlyForLabel: true },
|
||||
{ name: "initiationTime", label: "立项时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "startProjectTime", label: "计划开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "endProjectTime", label: "计划竣工时间", render: FORM_ITEM_RENDER_ENUM.DATE, rules: [validatorEndTime(startProjectTime)] },
|
||||
{ name: "chooseForm", label: "项目选取形式", render: <DictionarySelect dictValue="project_choose_form" onGetLabel={label => form.setFieldValue("chooseFormName", label)} /> },
|
||||
{
|
||||
name: "endProjectTime",
|
||||
label: "计划竣工时间",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE,
|
||||
rules: [validatorEndTime(startProjectTime)],
|
||||
},
|
||||
{
|
||||
name: "chooseForm",
|
||||
label: "项目选取形式",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="project_choose_form"
|
||||
onGetLabel={label => form.setFieldValue("chooseFormName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "chooseFormName", label: "项目选取形式名称", onlyForLabel: true },
|
||||
{ name: "fourNewFlag", label: "是否涉及四新工作内容", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||
{ name: "threePeopleFlag", label: "是否涉及三人及以上工作内容", labelCol: { span: 10 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||
{ name: "nightWorkFlag", label: "是否涉及夜间作业", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||
{ name: "specialFlag", label: "是否包含特殊作业", labelCol: { span: 8 }, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||
{
|
||||
name: "fourNewFlag",
|
||||
label: "是否涉及四新工作内容",
|
||||
labelCol: { span: 8 },
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
||||
},
|
||||
{
|
||||
name: "threePeopleFlag",
|
||||
label: "是否涉及三人及以上工作内容",
|
||||
labelCol: { span: 10 },
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
||||
},
|
||||
{
|
||||
name: "nightWorkFlag",
|
||||
label: "是否涉及夜间作业",
|
||||
labelCol: { span: 8 },
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
||||
},
|
||||
{
|
||||
name: "specialFlag",
|
||||
label: "是否包含特殊作业",
|
||||
labelCol: { span: 8 },
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
||||
},
|
||||
{ label: "项目审核信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
|
|
@ -341,7 +408,13 @@ const StepOneComponent = (props) => {
|
|||
),
|
||||
},
|
||||
// { name: "qualificationsTypeName", label: "项目类别名称", onlyForLabel: true },
|
||||
{ name: "subcontractFlag", label: "是否存在分包项目", span: 24, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] },
|
||||
{
|
||||
name: "subcontractFlag",
|
||||
label: "是否存在分包项目",
|
||||
span: 24,
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
||||
},
|
||||
{
|
||||
name: "isLocalCompany",
|
||||
label: "是否为属地公司推荐",
|
||||
|
|
@ -441,9 +514,12 @@ const StepOneComponent = (props) => {
|
|||
label: "选择主管部门",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: deptList,
|
||||
itemsField: { valueKey: "deptId", labelKey: (item) => {
|
||||
itemsField: {
|
||||
valueKey: "deptId",
|
||||
labelKey: (item) => {
|
||||
return `${item.deptName}(${item.corpName})`;
|
||||
} },
|
||||
},
|
||||
},
|
||||
componentProps: {
|
||||
onChange: (event) => {
|
||||
const label2 = deptList.find(item => item.deptId === event);
|
||||
|
|
@ -567,7 +643,7 @@ const StepOneComponent = (props) => {
|
|||
/>
|
||||
);
|
||||
};
|
||||
const StepTwoComponent = (props) => {
|
||||
const StepTwoComponent = forwardRef((props, ref) => {
|
||||
const query = props.query;
|
||||
const projectFileList = props.projectFileAddCmdList || []; // 项目资料
|
||||
const usercontentList = props.usercontentAddCmdList || []; // 项目审核人员
|
||||
|
|
@ -597,7 +673,10 @@ const StepTwoComponent = (props) => {
|
|||
const getData = async () => {
|
||||
for (let i = 0; i < projectFileList.length; i++) {
|
||||
if (projectFileList[i].projectFileId) {
|
||||
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["148"], eqForeignKey: projectFileList[i].projectFileId });
|
||||
const files = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||
eqForeignKey: projectFileList[i].projectFileId,
|
||||
});
|
||||
projectFileList[i].files = files;
|
||||
}
|
||||
}
|
||||
|
|
@ -723,7 +802,15 @@ const StepTwoComponent = (props) => {
|
|||
userPostName: item.postName,
|
||||
projectLeader: item.projectLeader,
|
||||
}));
|
||||
const data = { ...props.formValues, projectUserAddCmdList: [...userList], projectFileAddCmdList: [...projectFileList], projectLocalCompanyAddCmdList: [...projectLocalCompanyAddCmdList], projectApprovalUserAddCmdList: [...projectApprovalUserAddCmdList], projectApprovalFlowAddCmdList: [...projectApprovalFlowAddCmdList], corpinfoId };
|
||||
const data = {
|
||||
...props.formValues,
|
||||
projectUserAddCmdList: [...userList],
|
||||
projectFileAddCmdList: [...projectFileList],
|
||||
projectLocalCompanyAddCmdList: [...projectLocalCompanyAddCmdList],
|
||||
projectApprovalUserAddCmdList: [...projectApprovalUserAddCmdList],
|
||||
projectApprovalFlowAddCmdList: [...projectApprovalFlowAddCmdList],
|
||||
corpinfoId,
|
||||
};
|
||||
const { success } = await props[!query.id ? "projectAdd" : "projectUpdate"]({
|
||||
...data,
|
||||
id: query.id,
|
||||
|
|
@ -745,11 +832,19 @@ const StepTwoComponent = (props) => {
|
|||
setChooseFilsListModalOpen(false);
|
||||
};
|
||||
|
||||
const isLoading = props.qualificationStatistics.qualificationStatisticsLoading || uploadFileLoading || deleteFileLoading || getFileLoading;
|
||||
|
||||
useEffect(() => {
|
||||
props.setLoading(isLoading);
|
||||
}, [isLoading]);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
onSubmit,
|
||||
}));
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Spin
|
||||
spinning={props.qualificationStatistics.qualificationStatisticsLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||
>
|
||||
<Spin spinning={isLoading}>
|
||||
<div>
|
||||
<Divider orientation="left">项目相关资料</Divider>
|
||||
<Table
|
||||
|
|
@ -783,7 +878,12 @@ const StepTwoComponent = (props) => {
|
|||
rowKey={record => record.id || record.detailId}
|
||||
columns={[
|
||||
{ title: "材料名称", key: "dataName", dataIndex: "dataName" },
|
||||
{ title: "上传时间", key: "createTime", dataIndex: "createTime", render: (_, record) => record.createTime || "-" },
|
||||
{
|
||||
title: "上传时间",
|
||||
key: "createTime",
|
||||
dataIndex: "createTime",
|
||||
render: (_, record) => record.createTime || "-",
|
||||
},
|
||||
{
|
||||
title: "时效性",
|
||||
key: "validityPeriod",
|
||||
|
|
@ -859,17 +959,6 @@ const StepTwoComponent = (props) => {
|
|||
]}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ textAlign: "center", marginTop: 20 }}>
|
||||
<Space>
|
||||
<Button onClick={() => {
|
||||
props.setCurrentStep(1);
|
||||
}}
|
||||
>
|
||||
上一步
|
||||
</Button>
|
||||
<Button type="primary" onClick={onSubmit}>提交审核</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</Spin>
|
||||
{uploadFileModalOpen && (
|
||||
<FileUpload
|
||||
|
|
@ -894,7 +983,12 @@ const StepTwoComponent = (props) => {
|
|||
/>
|
||||
)}
|
||||
{viewProjectReviewUserModalOpen
|
||||
&& <ViewProjectReviewUserModal onCancel={() => setViewProjectReviewUserModalOpen(false)} data={viewProjectReviewUserModalData} />}
|
||||
&& (
|
||||
<ViewProjectReviewUserModal
|
||||
onCancel={() => setViewProjectReviewUserModalOpen(false)}
|
||||
data={viewProjectReviewUserModalData}
|
||||
/>
|
||||
)}
|
||||
{chooseFilsListModalOpen && (
|
||||
<ChooseFilsList
|
||||
data={projectFileList}
|
||||
|
|
@ -907,7 +1001,7 @@ const StepTwoComponent = (props) => {
|
|||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
});
|
||||
const ChooseFilsComponent = (props) => {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]); // 存储选中的行键
|
||||
const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据
|
||||
|
|
@ -955,7 +1049,12 @@ const ChooseFilsComponent = (props) => {
|
|||
rowKey="detailId"
|
||||
columns={[
|
||||
{ title: "材料名称", dataIndex: "dataName" },
|
||||
{ title: "上传时间", key: "createTime", dataIndex: "createTime", render: (_, record) => record.createTime || "-" },
|
||||
{
|
||||
title: "上传时间",
|
||||
key: "createTime",
|
||||
dataIndex: "createTime",
|
||||
render: (_, record) => record.createTime || "-",
|
||||
},
|
||||
{
|
||||
title: "时效性",
|
||||
key: "validityPeriod",
|
||||
|
|
@ -1080,7 +1179,11 @@ const UserSelectComponent = (props) => {
|
|||
{ title: "姓名", dataIndex: "name" },
|
||||
{ title: "所属部门", dataIndex: "departmentName" },
|
||||
{ title: "所属岗位", dataIndex: "postName" },
|
||||
{ title: "是否存在人资系统", dataIndex: "rzFlag", render: (_, record) => record.rzFlag === 1 ? "是" : "否" },
|
||||
{
|
||||
title: "是否存在人资系统",
|
||||
dataIndex: "rzFlag",
|
||||
render: (_, record) => record.rzFlag === 1 ? "是" : "否",
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Divider, Form, message, Modal, Space, Spin } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/Gwj";
|
||||
|
|
@ -38,6 +38,10 @@ function Add(props) {
|
|||
const [projectApprovalFlowAddCmdList, setProjectApprovalFlowAddCmdList] = useState([]); // 项目审核流程
|
||||
const [qualificationsTypeId, setQualificationsTypeId] = useState(); // 资质类型
|
||||
const [corpinfoId, setCorpinfoId] = useState(); // 项目id
|
||||
const [stepTwoLoading, setStepTwoLoading] = useState(false);
|
||||
|
||||
const stepTwoRef = useRef(null);
|
||||
|
||||
const { getFile } = useGetFile();
|
||||
|
||||
const getCurrentUserInfo = async () => {
|
||||
|
|
@ -83,7 +87,31 @@ function Add(props) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<Page
|
||||
headerTitle={query.id ? "编辑" : "新增"}
|
||||
isShowFooter={currentStep === 2}
|
||||
customActionButtons={(
|
||||
<Space>
|
||||
<Button
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
setCurrentStep(1);
|
||||
}}
|
||||
>
|
||||
上一步
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
stepTwoRef.current?.onSubmit();
|
||||
}}
|
||||
>
|
||||
提交审核
|
||||
</Button>
|
||||
</Space>
|
||||
)}
|
||||
>
|
||||
{currentStep === 1
|
||||
&& (
|
||||
<StepOne
|
||||
|
|
@ -101,7 +129,7 @@ function Add(props) {
|
|||
{currentStep === 2
|
||||
&& (
|
||||
<StepTwo
|
||||
setCurrentStep={setCurrentStep}
|
||||
ref={stepTwoRef}
|
||||
formValues={formValues}
|
||||
query={query}
|
||||
setUsercontentAddCmdList={setUsercontentAddCmdList}
|
||||
|
|
@ -113,6 +141,7 @@ function Add(props) {
|
|||
projectApprovalFlowAddCmdList={projectApprovalFlowAddCmdList}
|
||||
corpinfoId={corpinfoId}
|
||||
qualificationsTypeId={qualificationsTypeId}
|
||||
setLoading={setStepTwoLoading}
|
||||
/>
|
||||
)}
|
||||
</Page>
|
||||
|
|
@ -373,7 +402,7 @@ const StepOneComponent = (props) => {
|
|||
/>
|
||||
);
|
||||
};
|
||||
const StepTwoComponent = (props) => {
|
||||
const StepTwoComponent = forwardRef((props, ref) => {
|
||||
const query = props.query;
|
||||
const projectFileList = props.projectFileAddCmdList || []; // 项目资料
|
||||
const usercontentList = props.usercontentAddCmdList || []; // 项目审核人员
|
||||
|
|
@ -550,11 +579,20 @@ const StepTwoComponent = (props) => {
|
|||
setProjectFileList([...enterList, ...formattedRows]);
|
||||
setChooseFilsListModalOpen(false);
|
||||
};
|
||||
|
||||
const isLoading = props.qualificationStatistics.qualificationStatisticsLoading || uploadFileLoading || deleteFileLoading || getFileLoading;
|
||||
|
||||
useEffect(() => {
|
||||
props.setLoading(isLoading);
|
||||
}, [isLoading]);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
onSubmit,
|
||||
}));
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Spin
|
||||
spinning={props.qualificationStatistics.qualificationStatisticsLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||
>
|
||||
<Spin spinning={isLoading}>
|
||||
<div>
|
||||
<Divider orientation="left">项目相关资料</Divider>
|
||||
<Table
|
||||
|
|
@ -663,17 +701,6 @@ const StepTwoComponent = (props) => {
|
|||
]}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ textAlign: "center", marginTop: 20 }}>
|
||||
<Space>
|
||||
<Button onClick={() => {
|
||||
props.setCurrentStep(1);
|
||||
}}
|
||||
>
|
||||
上一步
|
||||
</Button>
|
||||
<Button type="primary" onClick={onSubmit}>提交审核</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</Spin>
|
||||
{uploadFileModalOpen && (
|
||||
<FileUpload
|
||||
|
|
@ -711,7 +738,7 @@ const StepTwoComponent = (props) => {
|
|||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
});
|
||||
const ChooseFilsComponent = (props) => {
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]); // 存储选中的行键
|
||||
const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据
|
||||
|
|
|
|||
Loading…
Reference in New Issue