diff --git a/jjb.config.js b/jjb.config.js index a713470..87d7133 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -10,6 +10,7 @@ module.exports = { javaGitBranch: "", // 接口服务地址 API_HOST: "http://192.168.20.100:30140", + // API_HOST: "http://192.168.10.41:81", }, production: { // 应用后端分支名称,部署上线需要 diff --git a/package.json b/package.json index 813ade8..2d87f04 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "lodash-es": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", - "zy-react-library": "^1.0.156" + "zy-react-library": "^1.0.171" }, "devDependencies": { "@antfu/eslint-config": "^5.4.1", diff --git a/src/api/qualificationStatistics/index.js b/src/api/qualificationStatistics/index.js index fabb040..01c7cb1 100644 --- a/src/api/qualificationStatistics/index.js +++ b/src/api/qualificationStatistics/index.js @@ -1,6 +1,85 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime"; +export const corpInfoList = declareRequest( + `Post > @/basicInfo/corpInfo/list`, +); export const qualificationStatistics = declareRequest( "qualificationStatisticsLoading", `Get > /xgfManager/qualificationsApply/statistics`, ); + +export const qualificationsList = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/qualifications/listAll`, +); + +export const inCheckList = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/project/inCheckList`, +); +export const userList = declareRequest( + `Post > @/basicInfo/user/list`, +); +export const projectAdd = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/project/save`, +); +export const projectUpdate = declareRequest( + "qualificationStatisticsLoading", + `Put > @/xgfManager/project/edit`, +); +export const userQualificationInfo = declareRequest( + `Post > @/basicInfo/userQualificationInfo/list`, +); +export const projectDetail = declareRequest( + "qualificationStatisticsLoading", + `Get > /xgfManager/project/{id}`, +); +export const projectApprovalFlow = declareRequest( + "qualificationStatisticsLoading", + `Get > /xgfManager/projectApprovalFlow/getRejectCause/`, +); +export const deptListByType = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/qualifications/deptListByType`, +); +export const userListByDeptId = declareRequest( + "qualificationStatisticsLoading", + `Get > /xgfManager/qualifications/userListByDeptId/{id}`, +); +export const qualificationsDetails = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/qualifications/qualificationsDetails/`, +); +export const projectAudit = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/project/audit`, +); +export const projectListAll = declareRequest( + "qualificationStatisticsLoading", + `Get > /xgfManager/project/listAll`, +); +export const corpInfoInfo = declareRequest( + "qualificationStatisticsLoading", + `Post > @/basicInfo/corpInfo/info/{id}`, +); +export const projectPage = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/project/projectPage`, +); +export const projectUserList = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/projectUser/list`, +); +export const projectUserDelete = declareRequest( + "qualificationStatisticsLoading", + `Delete > @/xgfManager/projectUser/{id}`, +); +export const projectUserAdd = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/projectUser/addProjectUser`, +); +export const projectUserChangeRecordList = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/projectUserChangeRecord/list`, +); diff --git a/src/components/ViewProjectReviewUserModal/index.js b/src/components/ViewProjectReviewUserModal/index.js new file mode 100644 index 0000000..5361e5e --- /dev/null +++ b/src/components/ViewProjectReviewUserModal/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Modal } from "antd"; +import { useEffect, useMemo, useRef, useState } from "react"; +import Table from "zy-react-library/components/Table"; +import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg"; +import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; +import useGetFile from "zy-react-library/hooks/useGetFile"; +import useTable from "zy-react-library/hooks/useTable"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +const ViewProjectReviewUserModal = (props) => { + const eqQualificationinfoType = props.data.eqQualificationinfoType; + const [form] = Form.useForm(); + const { loading: getFileLoading, getFile } = useGetFile(); + const { tableProps } = useTable(props["userQualificationInfo"], { + form, + params: { + eqQualificationinfoType: props.data.eqQualificationinfoType, + eqUserld: props.data.id, + }, + }); + const [tableData, setTableData] = useState([]); + const hasFetchedRef = useRef(false); + useEffect(() => { + // 只在第一次获取数据时执行,或者数据真正变化时 + if (tableProps.dataSource + && tableProps.dataSource.length > 0 + && !getFileLoading + && !hasFetchedRef.current) { + hasFetchedRef.current = true; + + const fetchFiles = async () => { + const dataWithFiles = await Promise.all( + tableProps.dataSource.map(async (item) => { + try { + const files = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM["6"], + eqForeignKey: item.userId, + }); + return { ...item, files: files || [] }; + } + catch (error) { + console.error("获取文件失败:", error); + return { ...item, files: [] }; + } + }), + ); + + setTableData(dataWithFiles); + }; + + fetchFiles(); + } + }, [tableProps.dataSource, getFileLoading, getFile]); + + // 使用 useMemo 避免重复计算 + const enhancedTableProps = useMemo(() => ({ + ...tableProps, + dataSource: tableData.length > 0 ? tableData : tableProps.dataSource || [], + }), [tableProps, tableData]); + + if (eqQualificationinfoType === 1) { + return ( + 取消, + ]} + > + () }, + + ]} + {...enhancedTableProps} + /> + + ); + } + else { + return ( + 取消, + ]} + > +
() }, + + ]} + {...enhancedTableProps} + /> + + ); + } +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(ViewProjectReviewUserModal); diff --git a/src/enumerate/constant/index.js b/src/enumerate/constant/index.js index 50a747e..eb022d7 100644 --- a/src/enumerate/constant/index.js +++ b/src/enumerate/constant/index.js @@ -12,3 +12,13 @@ export {}; // FIRST_PARTY_AUDITING(100, "集团单位审核"), // COMPANY_DEPARTMENT_AUDITING(200, "股份主管部门审核"), // COMPANY_SAFETY_AUDITING(300, "股份安监部门审核"); +export const PROJECT_STATUS_MAP = [ + { name: "待提交", bianma: "0" }, + { name: "待主管部门审核", bianma: "1" }, + { name: "待执行属地公司审核", bianma: "2" }, + { name: "待推荐属地公司审核", bianma: "3" }, + { name: "运行中", bianma: "4" }, + { name: "已完成", bianma: "5" }, + { name: "已驳回", bianma: "6" }, + { name: "待集团公司审核", bianma: "7" }, +]; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/List/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/List/index.js new file mode 100644 index 0000000..d3a2658 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/List/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "two-level", + eqProjectStatus: 7, + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/ReView/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/index.js new file mode 100644 index 0000000..d4ad7a8 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectApproval/index.js @@ -0,0 +1,5 @@ +function ProjectApproval(props) { + return (
{props.children}
); +} + +export default ProjectApproval; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/Add/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/Add/index.js new file mode 100644 index 0000000..00c3d01 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/Add/index.js @@ -0,0 +1,7 @@ +import AddView from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/Add"; + +function Add(props) { + return (); +}; + +export default Add; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/List/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/List/index.js new file mode 100644 index 0000000..a691aa4 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/List/index.js @@ -0,0 +1,7 @@ +import ListView from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/list"; + +function List(props) { + return (); +}; + +export default List; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/ReView/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/index.js new file mode 100644 index 0000000..43c7c37 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingApplication/index.js @@ -0,0 +1,5 @@ +function ProjectFilingApplication(props) { + return (
{props.children}
); +} + +export default ProjectFilingApplication; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/List/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/List/index.js new file mode 100644 index 0000000..1dd4246 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/List/index.js @@ -0,0 +1,100 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["projectPage"], { + form, + params: { + searchType: 2, + }, + }); + + return ( +
+ ), + }, + { name: "eqSubcontractFlag", label: "是否存在分包", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [ + { bianma: "1", name: "是" }, + { bianma: "0", name: "否" }, + ] }, + { + name: "eqProjectStatus", + label: "项目审核状态", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: PROJECT_STATUS_MAP, + }, + ]} + form={form} + onFinish={getData} + /> +
record.isLocalCompany === 1 ? "是" : "否" }, + { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "主管部门", dataIndex: "manageDeptName" }, + { title: "项目类别", dataIndex: "qualificationsTypeName" }, + { title: "是否存在分包", dataIndex: "subcontractFlag", render: (_, record) => record.subcontractFlag === 1 ? "是" : "否" }, + { title: "分包项目总数", dataIndex: "secondLevelTotal" }, + { + title: "一级项目备案审核状态", + dataIndex: "projectStatus", + render: (_, record) => getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 350, + render: (_, record) => ( + + + + + + ), + }, + ]} + {...tableProps} + /> + + ); +} + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/ReView/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/UserChange/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/UserChange/index.js new file mode 100644 index 0000000..16dacf7 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/UserChange/index.js @@ -0,0 +1,7 @@ +import ViewUserChange from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange"; + +function UserChange(props) { + return (); +}; + +export default UserChange; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js new file mode 100644 index 0000000..8fd8500 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js @@ -0,0 +1,7 @@ +import ViewUserChangeRecordPage from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord"; + +function UserChangeRecord(props) { + return (); +}; + +export default UserChangeRecord; diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/index.js new file mode 100644 index 0000000..c7d3094 --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/index.js @@ -0,0 +1,5 @@ +function ProjectFilingInformation(props) { + return (
{props.children}
); +} + +export default ProjectFilingInformation; diff --git a/src/pages/Container/BranchCompany/ProjectReview/index.js b/src/pages/Container/BranchCompany/ProjectReview/index.js new file mode 100644 index 0000000..a5a821c --- /dev/null +++ b/src/pages/Container/BranchCompany/ProjectReview/index.js @@ -0,0 +1,5 @@ +function ProjectReview(props) { + return (
{props.children}
); +} + +export default ProjectReview; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/List/index.js new file mode 100644 index 0000000..8a3b26a --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/List/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "one-level", + eqSubcontractFlag: 0, + eqProjectStatus: 3, + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/List/index.js new file mode 100644 index 0000000..5a16049 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/List/index.js @@ -0,0 +1,73 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "one-level", + eqSubcontractFlag: 0, + eqProjectStatus: 2, + }, + }); + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + + ), + }, + ]} + {...tableProps} + /> + + ); +} +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/List/index.js new file mode 100644 index 0000000..e4039d9 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/List/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "one-level", + eqSubcontractFlag: 1, + eqProjectStatus: 3, + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/List/index.js new file mode 100644 index 0000000..f802a49 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/List/index.js @@ -0,0 +1,74 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "one-level", + eqSubcontractFlag: 1, + eqProjectStatus: 2, + }, + }); + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + + ), + }, + ]} + {...tableProps} + /> + + ); +} + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/index.js new file mode 100644 index 0000000..d4ad7a8 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/index.js @@ -0,0 +1,5 @@ +function ProjectApproval(props) { + return (
{props.children}
); +} + +export default ProjectApproval; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/List/index.js new file mode 100644 index 0000000..a2c9511 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/List/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "two-level", + eqProjectStatus: 3, + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/List/index.js new file mode 100644 index 0000000..5b2a91c --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/List/index.js @@ -0,0 +1,73 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "two-level", + eqProjectStatus: 2, + }, + }); + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + + ), + }, + ]} + {...tableProps} + /> + + ); +} + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Submit/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/index.js new file mode 100644 index 0000000..c96891d --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/index.js @@ -0,0 +1,5 @@ +function ProjectApprovalTwo(props) { + return (
{props.children}
); +} + +export default ProjectApprovalTwo; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/List/index.js new file mode 100644 index 0000000..7bee826 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/List/index.js @@ -0,0 +1,7 @@ +import ListView from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/list"; + +function List(props) { + return (); +}; + +export default List; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/UserChange/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/UserChange/index.js new file mode 100644 index 0000000..16dacf7 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/UserChange/index.js @@ -0,0 +1,7 @@ +import ViewUserChange from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange"; + +function UserChange(props) { + return (); +}; + +export default UserChange; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js new file mode 100644 index 0000000..8fd8500 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js @@ -0,0 +1,7 @@ +import ViewUserChangeRecordPage from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord"; + +function UserChangeRecord(props) { + return (); +}; + +export default UserChangeRecord; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/index.js new file mode 100644 index 0000000..c7d3094 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformation/index.js @@ -0,0 +1,5 @@ +function ProjectFilingInformation(props) { + return (
{props.children}
); +} + +export default ProjectFilingInformation; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/List/index.js new file mode 100644 index 0000000..b83223c --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/List/index.js @@ -0,0 +1,7 @@ +import ListView from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/list"; + +function List(props) { + return (); +}; + +export default List; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/ReView/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/UserChange/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/UserChange/index.js new file mode 100644 index 0000000..16dacf7 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/UserChange/index.js @@ -0,0 +1,7 @@ +import ViewUserChange from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange"; + +function UserChange(props) { + return (); +}; + +export default UserChange; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/UserChangeRecord/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/UserChangeRecord/index.js new file mode 100644 index 0000000..8fd8500 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/UserChangeRecord/index.js @@ -0,0 +1,7 @@ +import ViewUserChangeRecordPage from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord"; + +function UserChangeRecord(props) { + return (); +}; + +export default UserChangeRecord; diff --git a/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/index.js b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/index.js new file mode 100644 index 0000000..c7d3094 --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/ProjectFilingInformationSub/index.js @@ -0,0 +1,5 @@ +function ProjectFilingInformation(props) { + return (
{props.children}
); +} + +export default ProjectFilingInformation; diff --git a/src/pages/Container/Local/ProjectReview/index.js b/src/pages/Container/Local/ProjectReview/index.js new file mode 100644 index 0000000..a5a821c --- /dev/null +++ b/src/pages/Container/Local/ProjectReview/index.js @@ -0,0 +1,5 @@ +function ProjectReview(props) { + return (
{props.children}
); +} + +export default ProjectReview; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/Add/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/Add/index.js new file mode 100644 index 0000000..e918ac0 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/Add/index.js @@ -0,0 +1,1079 @@ +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 FormBuilder from "zy-react-library/components/FormBuilder"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import AddIcon from "zy-react-library/components/Icon/AddIcon"; +import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/Gwj"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj"; +import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj"; +import Table from "zy-react-library/components/Table"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; +import useDeleteFile from "zy-react-library/hooks/useDeleteFile"; +import useGetFile from "zy-react-library/hooks/useGetFile"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import useTable from "zy-react-library/hooks/useTable"; +import useUploadFile from "zy-react-library/hooks/useUploadFile"; +import { validatorEndTime } from "zy-react-library/utils"; +import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function Add(props) { + const query = useGetUrlQuery(); + const [form] = Form.useForm(); + const [currentStep, setCurrentStep] = useState(1); + const [formValues, setFormValues] = useState({}); + const [projectFileAddCmdList, setProjectFileAddCmdList] = useState([]); // 项目资料 + const [usercontentAddCmdList, setUsercontentAddCmdList] = useState([]); // 项目审核人员 + const [projectLocalCompanyAddCmdList, setProjectLocalCompanyAddCmdList] = useState([]); // 项目执行属地公司 + const [projectApprovalUserAddCmdList, setProjectApprovalUserAddCmdList] = useState([]); // 项目审核人员 + const [projectApprovalFlowAddCmdList, setProjectApprovalFlowAddCmdList] = useState([]); // 项目审核流程 + const [corpinfoId, setCorpinfoId] = useState(); // 项目id + const { getFile } = useGetFile(); + // 获取详情数据 + const getData = async () => { + const { data } = await props["projectDetail"]({ id: query.id }); + if (data.agreementFileUuid) { + const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["156"], eqForeignKey: data.agreementFileUuid }); + data.projectFiles = files; + } + setFormValues(data); + form.setFieldsValue(data); + let projectUserAddCmdList = []; + if (data.projectUserAddCmdList && data.projectUserAddCmdList.length > 0) { + const otherUsers = data.projectUserAddCmdList.map((item) => { + return { + ...item, + id: item.userId, + name: item.userName, + departmentId: item.deptId, + departmentName: item.deptName, + type: "normal", // 普通项目人员 + phone: item.userPhone || "", + postName: item.userPostName || "", + }; + }); + projectUserAddCmdList = [...projectUserAddCmdList, ...otherUsers]; + } + setProjectFileAddCmdList(data.projectFileAddCmdList); + setUsercontentAddCmdList(projectUserAddCmdList); + setProjectLocalCompanyAddCmdList(data.projectLocalCompanyAddCmdList); + setProjectApprovalUserAddCmdList(data.projectApprovalUserAddCmdList); + setProjectApprovalFlowAddCmdList(data.projectApprovalFlowAddCmdList); + setCorpinfoId(data.corpinfoId); + }; + + useEffect(() => { + query.id && getData(); + }, []); + + return ( +
+ +
+ {currentStep === 1 + && ( + + )} + {currentStep === 2 + && ( + + )} +
+
+ ); +} + +const StepOneComponent = (props) => { + const form = props.form; + const approvalCorpId = Form.useWatch("approvalCorpId", form); // 项目审核部门公司 + const approvalDeptId = Form.useWatch("approvalDeptId", form); // 项目审核部门 + const isLocalCompany = Form.useWatch("isLocalCompany", form); // 是否为属地公司推荐 + const qualificationsTypeId = Form.useWatch("qualificationsTypeId", form); + const recommendCorpId = Form.useWatch("recommendCorpId", form); + const recommendDeptId = Form.useWatch("recommendDeptId", form); + const [corpInfoList, setCorpInfoList] = useState([]); // 项目执行属地公司 + const [cropList, setCorpList] = useState([]); // 项目审核公司 + const startProjectTime = Form.useWatch("startProjectTime", form); // 项目开始时间 + const [deptList, setDeptList] = useState([]); + const [userList, setUserList] = useState([]); + // 获取项目执行属地公司数据 + const getCorpInfoList = async () => { + const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [0, 1, 2] }); + setCorpInfoList(data); + }; + // 获取项目执行属地公司名称列表数据 + const getCropList = async () => { + const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [1] }); + setCorpList(data); + }; + const getDeptList = async (id) => { + const { data } = await props["deptListByType"]({ qualificationsTypeId: id }); + setDeptList(data); + }; + const getUserList = async (id) => { + const { data } = id ? await props["userListByDeptId"]({ id }) : []; + setUserList(data); + }; + const handleProjectLeaderChange = (label, extraInfo) => { + if (!extraInfo.userId) + return; + const existingLeaderIndex = props.usercontentAddCmdList.findIndex( + item => item.projectLeader === 1, + ); + const newUserList = [...props.usercontentAddCmdList]; + + // 如果已存在项目负责人,更新之 + if (existingLeaderIndex >= 0) { + newUserList[existingLeaderIndex] = { + ...newUserList[existingLeaderIndex], + id: extraInfo.userId, + name: label, + departmentId: extraInfo?.departmentId || "", + departmentName: extraInfo?.departmentName || "", + phone: extraInfo?.phone || "", + postName: extraInfo?.postName || "", + projectLeader: 1, + }; + } + else { + // 如果不存在,添加新的项目负责人 + newUserList.unshift({ + id: extraInfo.userId, + name: label, + departmentId: extraInfo?.departmentId || "", + departmentName: extraInfo?.departmentName || "", + phone: extraInfo?.phone || "", + postName: extraInfo?.postName || "", + projectLeader: 1, + }); + } + + props.setUsercontentAddCmdList(newUserList); + }; + useEffect(() => { + getCorpInfoList(); + getCropList(); + if (props.formValues.isLocalCompany) { + getDeptList(props.formValues.qualificationsTypeId); + getUserList(props.formValues.manageDeptId); + } + form.setFieldsValue(props.formValues); + if (props.formValues.userId && props.formValues.userName) { + const existingLeader = props.usercontentAddCmdList.find( + item => item.projectLeader === 1, + ); + + if (!existingLeader) { + const newUserList = [ + { + id: props.formValues.userId, + name: props.formValues.userName, + departmentId: props.formValues.deptId || "", + departmentName: props.formValues.deptName || "", + phone: props.formValues.userPhone || "", + postName: props.formValues.userPostName || "", + projectLeader: 1, + }, + ...props.usercontentAddCmdList.filter(item => item.projectLeader !== 1), + ]; + props.setUsercontentAddCmdList(newUserList); + } + } + }, [props.formValues]); + return ( + { + props.setCurrentStep(2); + props.setFormValues(values); + }} + values={{ stakeholderLevel: "one-level", stakeholderLevelName: "一级相关方" }} + submitButtonText="下一步" + options={[ + { label: "项目基础信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, + { name: "projectName", label: "项目名称" }, + { name: "userId", label: "项目负责人", render: ( + { + form.setFieldValue("userName", label); + }} + onGetOption={(option) => { + if (option) { + const extraInfo = { + name: option.name, + phone: option.phone || "", + postName: option.postName || "", + departmentId: option.departmentId || "", + departmentName: option.departmentName || "", + userId: option.id, + }; + handleProjectLeaderChange(option.name, extraInfo); + } + }} + /> + ), componentProps: { + onChange: (userId) => { + if (!userId) { + // 如果清空了项目负责人,从项目人员列表中移除 + const newUserList = props.usercontentAddCmdList.filter( + item => item.projectLeader !== 1, + ); + props.setUsercontentAddCmdList(newUserList); + } + }, + } }, + { 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: 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: 8 }, 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", label: "项目类别", span: 24, wrapperCol: { span: 5 }, render: ( + form.setFieldValue("qualificationsTypeName", label)} + onChange={() => { + + }} + /> + ) }, + { name: "qualificationsTypeName", label: "项目类别名称", onlyForLabel: true }, + { name: "subcontractFlag", label: "是否存在分包项目", span: 24, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }] }, + { name: "isLocalCompany", label: "是否为属地公司推荐", span: 24, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }], componentProps: { + onChange: (event) => { + if (event.target.value === 0) { + getDeptList(qualificationsTypeId); + } + form.setFieldsValue({ + recommendCorpId: "", + recommendCorpName: "", + recommendDeptId: "", + recommendDeptName: "", + recommendUserIds: [], + recommendUserNames: "", + manageDeptId: "", + manageDeptName: "", + manageUserIds: [], + manageUserNames: "", + }); + }, + } }, + ...(isLocalCompany === 1 + ? [ + { + name: "recommendCorpId", + label: "推荐属地公司名称", + labelCol: { span: 5 }, + items: cropList, + render: FORM_ITEM_RENDER_ENUM.SELECT, + itemsField: { valueKey: "id", labelKey: "corpName" }, + componentProps: { + onChange: (event) => { + const label = cropList.find(item => item.id === event)?.corpName; + form.setFieldValue("recommendCorpName", label); + form.setFieldsValue({ + recommendDeptId: "", + recommendDeptName: "", + recommendUserIds: [], + recommendUserNames: "", + }); + }, + }, + }, + { name: "recommendCorpName", label: "推荐属地公司名称", onlyForLabel: true }, + { + name: "recommendDeptId", + labelCol: { span: 5 }, + label: "推荐属地公司部门", + render: ( + form.setFieldValue("recommendDeptName", label)} + onChange={() => { + form.setFieldsValue({ + recommendUserIds: [], + recommendUserNames: "", + }); + }} + /> + ), + }, + { name: "recommendDeptName", label: "推荐属地公司部门", onlyForLabel: true }, + { + name: "recommendUserIds", + label: "推荐属地公司人员", + span: 8, + labelCol: { span: 5 }, + wrapperCol: { span: 19 }, + render: ( + form.setFieldValue("recommendUserNames", label)} + mode="multiple" + /> + ), + }, + { name: "recommendUserNames", label: "推荐属地公司人员", onlyForLabel: true }, + ] + : [ + { + name: "manageDeptId", + labelCol: { span: 5 }, + label: "选择主管部门", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: deptList, + itemsField: { valueKey: "deptId", labelKey: "deptName" }, + componentProps: { + onChange: (event) => { + const label = deptList.find(item => item.deptId === event)?.deptName; + form.setFieldValue("manageDeptName", label); + form.setFieldsValue({ + manageUserIds: [], + recommendUserNames: "", + }); + getUserList(event); + }, + }, + }, + { name: "manageDeptName", label: "选择主管部门名称", onlyForLabel: true }, + { + name: "manageUserIds", + label: "主管部门审核人", + span: 16, + labelCol: { span: 3 }, + wrapperCol: { span: 8 }, + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: userList, + itemsField: { valueKey: "userId", labelKey: "userName" }, + componentProps: { + mode: "multiple", + onChange: (event) => { + const labels = event + .map(userId => userList.find(item => item.userId === userId)?.userName) + .filter(Boolean); + form.setFieldValue("manageUserNames", labels); + }, + }, + }, + { name: "manageUserNames", label: "主管部门审核人名称", onlyForLabel: true }, + ]), + { + name: "approvalCorpId", + label: "项目执行属地公司名称", + labelCol: { span: 5 }, + items: corpInfoList, + render: FORM_ITEM_RENDER_ENUM.SELECT, + itemsField: { valueKey: "id", labelKey: "corpName" }, + componentProps: { + onChange: (event) => { + const label = corpInfoList.find(item => item.id === event)?.corpName; + form.setFieldValue("approvalCorpName", label); + form.setFieldsValue({ + approvalDeptId: "", + approvalDeptName: "", + approvalUserIds: [], + approvalUserNames: "", + }); + }, + }, + }, + { name: "approvalCorpName", label: "项目执行属地公司名称", onlyForLabel: true }, + { + name: "approvalDeptId", + labelCol: { span: 5 }, + label: "项目执行属地公司部门", + render: ( + form.setFieldValue("approvalDeptName", label)} + onChange={() => { + form.setFieldsValue({ + approvalUserIds: [], + approvalUserNames: "", + }); + }} + /> + ), + }, + { name: "approvalDeptName", label: "项目执行属地公司部门名称", onlyForLabel: true }, + { + name: "approvalUserIds", + label: "项目执行属地公司人员", + labelCol: { span: 5 }, + render: ( + form.setFieldValue("approvalUserNames", label)} + mode="multiple" + /> + ), + }, + { name: "approvalUserNames", label: "项目执行属地公司人员名称", onlyForLabel: true }, + { name: "projectFiles", label: "安全管理协议", span: 24, render: ( + { + form.setFieldValue("deleteProjectFileAddCmdList", [...(form.getFieldValue("deleteProjectFileAddCmdList") || []), file]); + }} + /> + ) }, + { name: "deleteProjectFileAddCmdList", label: "删除的安全管理协议", onlyForLabel: true }, + { name: "agreementFileUuid", label: "安全协议uuid", onlyForLabel: true }, + { name: "stakeholderLevel", onlyForLabel: true }, + { name: "stakeholderLevelName", onlyForLabel: true }, + ]} + /> + ); +}; +const StepTwoComponent = (props) => { + const query = props.query; + const projectFileList = props.projectFileAddCmdList || []; // 项目资料 + const usercontentList = props.usercontentAddCmdList || []; // 项目审核人员 + const setProjectFileList = props.setProjectFileAddCmdList || []; // 项目资料赋值 + const setUsercontentList = props.setUsercontentAddCmdList || []; // 项目审核人员赋值 + const projectLocalCompanyAddCmdList = props.projectLocalCompanyAddCmdList || []; // 项目所属属地公司 + const projectApprovalUserAddCmdList = props.projectApprovalUserAddCmdList || []; // 项目审核人员 + const projectApprovalFlowAddCmdList = props.projectApprovalFlowAddCmdList || []; // 项目审核流程 + const corpinfoId = props.corpinfoId; // 公司id + + const [uploadFileModalOpen, setUploadFileModalOpen] = useState(false); // 上传文件弹窗显示 + const [usercontentOpen, setUsercontentOpen] = useState(false); // 选择项目审核人员弹窗显示 + const [uploadFileModalData, setUploadFileModalData] = useState({ // 上传文件弹窗数据 + index: -1, + files: [], + }); + const [fetchUserList, setFetchUserList] = useState({ // 选择项目审核人员弹窗数据 + index: -1, + }); + const { loading: uploadFileLoading, uploadFile } = useUploadFile(); + const { loading: deleteFileLoading, deleteFile } = useDeleteFile(); + const [viewProjectReviewUserModalOpen, setViewProjectReviewUserModalOpen] = useState(false); // 查看特种作业人员证书弹窗 + const [viewProjectReviewUserModalData, setViewProjectReviewUserModalData] = useState({}); // 查看安全人员证书列表 + const { loading: getFileLoading, getFile } = useGetFile(); + const [chooseFilsListModalOpen, setChooseFilsListModalOpen] = useState(false); + const [setChooseFilsListModalData] = useState({}); + const getData = async () => { + for (let i = 0; i < projectFileList.length; i++) { + const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["151"], eqForeignKey: projectFileList[i].projectFileId }); + projectFileList[i].files = files; + } + }; + useEffect(() => { + getData(); + }, []); + // 点击新增项目相关资料 + const onUploadFileOpen = () => { + // 初始化项目相关资料弹窗数据 + setUploadFileModalData({ + type: "add", + index: -1, + files: [], + deleteFiles: [], + }); + setUploadFileModalOpen(true); + }; + // 项目相关资料提交 + const onUploadFileConfirm = (values) => { + const newItem = { + dataName: values.dataName, + files: values.files || [], + deleteFiles: values.deleteFiles || [], + startValidityPeriod: values.startValidityPeriod, + endValidityPeriod: values.endValidityPeriod, + createTime: dayjs().format("YYYY-MM-DD hh:mm:ss"), + }; + if (values.type === "add") { + setProjectFileList(prev => [...prev, newItem]); + } + else { + setProjectFileList((prev) => { + const newList = [...prev]; + if (values.index >= 0 && values.index < newList.length) { + newList[values.index] = { ...newList[values.index], ...newItem }; + } + return newList; + }); + } + setUploadFileModalOpen(false); + }; + // 点击修改项目相关资料 + const handleEdit = (index) => { + const item = projectFileList[index]; + setUploadFileModalData({ + type: "update", + index, + files: item.files || [], + deleteFiles: item.deleteFiles || [], + dataName: item.dataName, + startValidityPeriod: item.startValidityPeriod, + endValidityPeriod: item.endValidityPeriod, + }); + setUploadFileModalOpen(true); + }; + // 点击删除项目相关资料 + const handleDelete = (index) => { + Modal.confirm({ + title: "确认删除", + content: "确定要删除这条资料吗?", + onOk: () => { + setProjectFileList((prev) => { + const newList = [...prev]; + newList.splice(index, 1); + return newList; + }); + message.success("删除成功"); + }, + }); + }; + // 点击新增项目人员 + const OnUsercontentOpen = () => { + setUsercontentOpen(true); + setFetchUserList(usercontentList); + }; + // 项目人员确认提交 + const handleConfirmAdd = (selectedData) => { + setUsercontentList(selectedData); + setFetchUserList(selectedData); + // 关闭弹窗 + setUsercontentOpen(false); + }; + // 提交审核 + const onSubmit = async () => { + if (props.formValues.length === 0) { + message.error(`请新增项目相关资料`); + return; + } + if (usercontentList.length === 0) { + message.error(`请新增项目人员`); + return; + } + + await deleteFile({ single: false, files: props.formValues.deleteProjectFileAddCmdList }); + const { id: agreementFileUuid } = await uploadFile({ + single: false, + files: props.formValues.projectFiles, + params: { type: UPLOAD_FILE_TYPE_ENUM["156"], foreignKey: props.formValues.agreementFileUuid }, + }); + props.formValues.agreementFileUuid = agreementFileUuid; + + for (let i = 0; i < projectFileList.length; i++) { + await deleteFile({ single: false, files: projectFileList[i].deleteFiles }); + const { id } = await uploadFile({ + single: false, + files: projectFileList[i].files, + params: { type: UPLOAD_FILE_TYPE_ENUM["151"], foreignKey: projectFileList[i].projectFileId }, + }); + projectFileList[i].projectFileId = id; + } + console.log("usercontentList", usercontentList); + const userList = usercontentList.map(item => ({ + userId: item.id, + userName: item.name, + deptId: item.departmentId, + deptName: item.departmentName, + userPhone: item.phone, + userPostName: item.postName, + projectLeader: item.projectLeader, + })); + console.log("userList", userList); + 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, + }); + if (success) { + message.success("提交成功,请等待审核"); + window.history.back(); + } + }; + const handleChooseFilsSubmit = (selectedRows) => { + const existingIds = projectFileList + .filter(item => item.detailId) + .map(item => item.detailId); + const newRows = selectedRows.filter(row => + row.detailId && !existingIds.includes(row.detailId), + ); + const formattedRows = newRows.map(row => ({ + ...row, + })); + + // 合并到现有列表中 + setProjectFileList(prev => [...prev, ...formattedRows]); + setChooseFilsListModalOpen(false); + }; + return ( +
+ +
+ 项目相关资料 +
( + <> + + + + )} + dataSource={projectFileList} + pagination={false} + options={false} + disabledResizer={true} + rowKey={record => record.id || record.dataName} + columns={[ + { title: "材料名称", key: "dataName", dataIndex: "dataName" }, + { title: "上传时间", key: "createTime", dataIndex: "createTime", render: (_, record) => record.createTime || "-" }, + { + title: "时效性", + key: "validityPeriod", + dataIndex: "startValidityPeriod", + render: (_, record) => record.startValidityPeriod ? `${record.startValidityPeriod}至${record.endValidityPeriod}` : "-", + }, + { + title: "操作", + render: (_, record, index) => ( + + + + + ), + }, + ]} + /> + +
+ 项目人员 +
( + <> + + + )} + dataSource={usercontentList} + pagination={false} + options={false} + disabledResizer={true} + rowKey="id" + columns={[ + { title: "姓名", dataIndex: "name" }, + { title: "部门", dataIndex: "departmentName" }, + { + title: "操作", + render: (_, record) => ( + + + + + ), + }, + ]} + /> + +
+ + + + +
+ + {uploadFileModalOpen && ( + { + setUploadFileModalOpen(false); + }} + onSubmit={(values) => { + setUploadFileModalOpen(false); + onUploadFileConfirm(values); + }} + /> + )} + {usercontentOpen && ( + { + setUsercontentOpen(false); + }} + onConfirm={handleConfirmAdd} + /> + )} + {viewProjectReviewUserModalOpen + && setViewProjectReviewUserModalOpen(false)} data={viewProjectReviewUserModalData} />} + {chooseFilsListModalOpen && ( + { + setChooseFilsListModalOpen(false); + }} + /> + )} + + ); +}; +const ChooseFilsComponent = (props) => { + const [selectedRowKeys, setSelectedRowKeys] = useState([]); // 存储选中的行键 + const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据 + const { tableProps } = useTable(props["qualificationsDetails"], { + params: { + qualificationsTypeId: "", + }, + }); + const submit = () => { + if (props.onSubmit) { + props.onSubmit(selectedRows); + } + }; + useEffect(() => { + if (props.data && Array.isArray(props.data)) { + const keys = props.data + .filter(item => item && item.detailId) + .map(item => item.detailId); + setSelectedRowKeys(keys); + setSelectedRows(props.data); + } + }, [props.data]); + const handleRowSelectionChange = (selectedRowKeys, selectedRows) => { + setSelectedRowKeys(selectedRowKeys); + setSelectedRows(selectedRows); + }; + return ( + +
record.createTime || "-" }, + { + title: "时效性", + key: "validityPeriod", + dataIndex: "startValidityPeriod", + render: (_, record) => record.startValidityPeriod ? `${record.startValidityPeriod}至${record.endValidityPeriod}` : "-", + }, + ]} + {...tableProps} + /> + + ); +}; +// 选择项目人员的组件 +const UsercontentComponent = (props) => { + const [form] = Form.useForm(); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); // 存储选中的行键 + const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据 + const [inDepartmentId, setInDepartmentId] = useState([]); // 存储已选择的部门id + const { tableProps, getData } = useTable(props["userList"], { + form, + params: { + likeName: "", + likeUserIdCard: "", + inDepartmentId, + eqEmploymentFlag: 1, // 在职 + }, + }); + const projectLeader = useMemo(() => { + if (props.data && Array.isArray(props.data)) { + return props.data.find(item => item.projectLeader === 1); + } + return null; + }, [props.data]); + // 初始化选中的数据 + useEffect(() => { + const initialSelectedRows = [...(props.data || [])]; + const initialSelectedKeys = initialSelectedRows + .filter(item => item && item.id) + .map(item => item.id); + const processedRows = initialSelectedRows.map(item => ({ + ...item, + projectLeader: item.projectLeader || (projectLeader && item.id === projectLeader.id ? 1 : 0), + })); + setSelectedRowKeys(initialSelectedKeys); + setSelectedRows(processedRows); + }, [props.data, projectLeader]); + const handleConfirmAdd = () => { + if (props.onConfirm) { + // 确保项目负责人始终在选中列表中 + const finalSelectedRows = [...selectedRows]; + if (projectLeader && !selectedRows.find(item => item.id === projectLeader.id)) { + finalSelectedRows.unshift(projectLeader); + } + + // 为选中的用户数据添加 projectLeader 字段 + const processedRows = finalSelectedRows.map(item => ({ + ...item, + projectLeader: projectLeader && item.id === projectLeader.id ? 1 : 0, + })); + + props.onConfirm(processedRows); + } + }; + const handleRowSelectionChange = (selectedRowKeys, selectedRows) => { + // 如果项目负责人已存在,确保不会被取消选择 + if (projectLeader) { + const leaderKey = projectLeader.id; + if (!selectedRowKeys.includes(leaderKey)) { + selectedRowKeys.push(leaderKey); + selectedRows.push({ + ...projectLeader, + projectLeader: 1, + }); + } + } + + setSelectedRowKeys([...selectedRowKeys]); + setSelectedRows([...selectedRows]); + }; + return ( + + { + getData(values); + }} + /> +
+
+ { + setInDepartmentId(checkedKeys); + getData(); + }} + /> +
+
+
({ + // 如果是项目负责人,禁用取消选择 + disabled: projectLeader && record.id === projectLeader.id, + }), + }} + rowKey="id" + toolBarRender={() => ( + <> + + + )} + columns={[ + { title: "手机号", dataIndex: "phone" }, + { title: "姓名", dataIndex: "name" }, + { title: "所属部门", dataIndex: "departmentName" }, + { title: "所属岗位", dataIndex: "postName" }, + { title: "是否存在人资系统", dataIndex: "rzFlag", render: (_, record) => record.rzFlag === 1 ? "是" : "否" }, + ]} + {...tableProps} + /> + + + + ); +}; +// 项目资料信息的组件 +const FileUpload = (props) => { + const [form] = Form.useForm(); + const startValidityPeriod = Form.useWatch("startValidityPeriod", form); + useEffect(() => { + form.setFieldsValue({ + type: props.data.type, + index: props.data.index, + dataName: props.data.dataName, + files: props.data.files, + startValidityPeriod: props.data.startValidityPeriod, + endValidityPeriod: props.data.endValidityPeriod, + }); + }, []); + + return ( + + props.onSubmit(values)} + span={24} + labelCol={{ span: 8 }} + options={[ + { name: "dataName", label: "资料名称" }, + { + name: "startValidityPeriod", + label: "有效期开始时间", + render: FORM_ITEM_RENDER_ENUM.DATE, + }, + { name: "type", label: "新增或修改", onlyForLabel: true }, + { name: "index", label: "索引", onlyForLabel: true }, + { + name: "endValidityPeriod", + label: "有效期结束时间", + render: FORM_ITEM_RENDER_ENUM.DATE, + rules: [validatorEndTime(startValidityPeriod)], + }, + { + name: "files", + label: "资料", + render: ( + { + form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), files]); + }} + /> + ), + }, + { name: "deleteFiles", label: "删除的资料", onlyForLabel: true }, + ]} + /> + + ); +}; + +const StepOne = Connect([NS_QUALIFICATION_STATISTICS], true)(StepOneComponent); +const StepTwo = Connect([NS_QUALIFICATION_STATISTICS], true)(StepTwoComponent); +const Usercontent = Connect([NS_QUALIFICATION_STATISTICS], true)(UsercontentComponent); +const ChooseFilsList = Connect([NS_QUALIFICATION_STATISTICS], true)(ChooseFilsComponent); + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(Add); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/List/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/List/index.js new file mode 100644 index 0000000..e723177 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/List/index.js @@ -0,0 +1,156 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import AddIcon from "zy-react-library/components/Icon/AddIcon"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevel: "one-level", + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + { name: "eqSubcontractFlag", label: "是否存在分包", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [{ name: "是", bianma: "1" }, { name: "否", bianma: "0" }] }, + { + name: "", + label: "项目审核状态", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: PROJECT_STATUS_MAP, + }, + ]} + form={form} + onFinish={getData} + /> +
( + + + + )} + columns={[ + { title: "项目名称", dataIndex: "projectName" }, + { title: "是否为属地公司推荐", dataIndex: "isLocalCompany", render: (_, record) => record.isLocalCompany === 1 ? "是" : "否" }, + { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "主管部门", dataIndex: "manageDeptName" }, + { title: "项目类别", dataIndex: "qualificationsTypeName" }, + { title: "是否存在分包", dataIndex: "subcontractFlag", render: (_, record) => record.subcontractFlag === 1 ? "是" : "否" }, + { + title: "一级项目备案审核状态", + dataIndex: "projectStatus", + render: (_, record) => getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + + {record.projectStatus === 6 && ( + <> + + + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js new file mode 100644 index 0000000..44f34af --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js @@ -0,0 +1,454 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Divider, Form, Input, message, Modal, Space, Spin } from "antd"; +import { useEffect, useState } from "react"; +import FormBuilder from "zy-react-library/components/FormBuilder"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Table from "zy-react-library/components/Table"; +import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; +import useGetFile from "zy-react-library/hooks/useGetFile"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import { getLabelName } from "zy-react-library/utils"; +import ViewProjectReviewDetailsModal from "~/components/ViewProjectReviewDetailsModal"; +import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; +import "./index.less"; + +function Review(props) { + const query = useGetUrlQuery(); + const [form] = Form.useForm(); + const [viewProjectReviewDetailsModalOpen, setViewProjectReviewDetailsModalOpen] = useState(false); + const [viewProjectReviewDetailsModalData, setViewProjectReviewDetailsModalData] = useState({}); + const [info, setInfo] = useState({}); + const { getFile } = useGetFile(); + const [projectFileAddCmdList, setProjectFileAddCmdList] = useState([]); + const [projectUserAddCmdList, setProjectUserAddCmdList] = useState([]); + const [viewProjectReviewUserModalOpen, setViewProjectReviewUserModalOpen] = useState(false); + const [viewProjectReviewUserModalData, setViewProjectReviewUserModalData] = useState({}); // 查看安全人员证书列表 + const [projectListAll, setProjectListAll] = useState([]); + const typeList = [ + { bianma: "0", name: "普通企业" }, + { bianma: "1", name: "集团单位" }, + { bianma: "2", name: "股份单位" }, + { bianma: "3", name: "相关方企业" }, + { bianma: "4", name: "货主单位" }, + { bianma: "5", name: "驻港单位" }, + ]; + const getData = async () => { + const projectDetailResult = await props["projectDetail"]({ id: query.id }); + if (!projectDetailResult || !projectDetailResult.data) { + return; + } + const projectData = projectDetailResult.data; + if (projectData.agreementFileUuid) { + const file = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM["156"], + eqForeignKey: projectData.agreementFileUuid, + }); + projectData.files = file; + } + setProjectFileAddCmdList(projectData.projectFileAddCmdList || []); + setProjectUserAddCmdList(projectData.projectUserAddCmdList || []); + if (projectData.corpinfoId) { + try { + const corpInfoResult = await props["corpInfoInfo"]({ + id: projectData.corpinfoId, + }); + const qiyefile = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM["6"], + eqForeignKey: projectData.corpinfoId, + }); + corpInfoResult.data.qiyefile = qiyefile; + projectData.corpInfo = corpInfoResult.data; + } + // eslint-disable-next-line no-unused-vars,unused-imports/no-unused-vars + catch (error) { + projectData.corpInfo = null; + } + } + else { + projectData.corpInfo = null; + } + + setInfo(projectData); + }; + const getProjectListAll = async () => { + const { data } = await props["projectListAll"]({}); + setProjectListAll(data); + }; + const auditSubmit = (result) => { + if (result === 1) { + if (query.projectStatusLast === "7") { + Modal.confirm({ + title: "审核确认", + icon: null, + okText: "确认审核", + cancelText: "取消", + width: 1200, + content: ( +
+ +
+ ), + onOk: async () => { + try { + const values = await form.validateFields(); + const { success } = await props["projectAudit"]({ + id: query.id, + result, + relatedProjectId: values.id, + }); + if (success) { + message.success("审核通过"); + getData(); + props.history.goBack(); + } + } + catch (error) { + // 表单验证失败,不关闭弹窗 + return Promise.reject(error); + } + }, + }); + } + else { + Modal.confirm({ + title: "审核确认", + content: "确定要通过审核吗?", + onOk: async () => { + const { success } = await props["projectAudit"]({ + id: query.id, + result, + }); + if (success) { + message.success("审核通过"); + getData(); + props.history.goBack(); + } + }, + }); + } + } + else { + Modal.confirm({ + title: "审核驳回", + content: ( +
+
确定要驳回审核吗?
+
+ + + + +
+ ), + icon: null, + okText: "确认驳回", + cancelText: "取消", + width: 500, + onOk: async () => { + try { + const values = await form.validateFields(); + const { success } = await props["projectAudit"]({ + id: query.id, + result, + rejectReason: values.rejectReason, // 添加拒绝原因 + }); + if (success) { + message.success("审核驳回成功"); + getData(); + props.history.goBack(); + } + } + catch (error) { + // 表单验证失败,不关闭弹窗 + return Promise.reject(error); + } + }, + }); + } + }; + useEffect(() => { + getData(); + }, []); + useEffect(() => { + getProjectListAll(); + }, []); + return ( +
+ +
+ {info.relatedProjectId && ( +
+ 一级项目信息 +

+ 公司名称: + {info.parentProjectCorpName} +

+
+

+ 项目名称: + {info.parentProjectName} + 项目 +

+ +
+
+ )} +
+ 项目基础信息 + + }, + ]} + /> + +
+
+ 企业基础信息 + + }, + { label: "营业执照有效期", children: `${info.corpInfo?.licenseStart}-${info.corpInfo?.licenseEnd}` }, + { label: "", children: "" }, + ]} + /> + +
+
+ 项目资料信息 +
record.startValidityPeriod ? `${record.startValidityPeriod}至${record.endValidityPeriod}` : "-", + }, + { + title: "操作", + render: (_, record) => ( + + ), + }, + ]} + /> + +
+ 项目人员 +
( + + + + ), + }, + ]} + + /> + + {info.subcontractFlag === 1 && ( +
+ 分包项目信息详情 + +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }) }, + { + title: "操作", + render: (_, record) => ( + + ), + }, + ]} + /> + + + )} +
+ {info.stakeholderLevel === "one-level" ? "一级项目审核信息" : "审核记录"} + +
getLabelName({ list: [{ name: "审核中", bianma: "1" }, { name: "已通过", bianma: "2" }, { name: "已驳回", bianma: "3" }], status: record.approvalStatus }) }, + ]} + /> + + + {(query.projectStatusLast === "1" || query.projectStatusLast === "3" || query.projectStatusLast === "7") + && ( +
+ + +
+ )} + {query.projectStatusLast === "2" + && ( +
+ + +
+ )} + {viewProjectReviewUserModalOpen + && setViewProjectReviewUserModalOpen(false)} data={viewProjectReviewUserModalData} />} + {viewProjectReviewDetailsModalOpen + && ( + setViewProjectReviewDetailsModalOpen(false)} + data={viewProjectReviewDetailsModalData} + /> + )} + {props.children} + + + + ); +} + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(Review); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.less b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.less new file mode 100644 index 0000000..ce8fde6 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.less @@ -0,0 +1,57 @@ +.qualification-view { + .flows-container { + width: 80%; + margin: 10px auto 0; + + .flows { + display: flex; + justify-content: space-between; + align-items: flex-start; + + .flow { + text-align: center; + min-width: 120px; + + .status { + border-radius: 50%; + border: 1px solid rgba(0, 0, 0, 0.2); + padding: 10px; + width: 80px; + height: 80px; + line-height: 60px; + margin: 0 auto 10px; + + &.blue { + color: #1890ff; + border-color: #1890ff; + } + + &.green { + color: #52c41a; + border-color: #52c41a; + } + + &.red { + color: #ff4d4f; + border-color: #ff4d4f; + } + } + } + + .line { + flex: 1; + height: 2px; + background-color: #1890ff; + align-self: center; + margin: 0 10px; + } + } + } + + +} +.btn_bottom{ + text-align: center; + margin-top: 20px; + +} diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/index.js new file mode 100644 index 0000000..43c7c37 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/index.js @@ -0,0 +1,5 @@ +function ProjectFilingApplication(props) { + return (
{props.children}
); +} + +export default ProjectFilingApplication; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/List/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/List/index.js new file mode 100644 index 0000000..f8e5a36 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/List/index.js @@ -0,0 +1,101 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["projectPage"], { + form, + params: { + searchType: 5, + eqStakeholderLevel: "one-level", + }, + }); + + return ( +
+ ), + }, + { name: "eqSubcontractFlag", label: "是否存在分包", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [ + { bianma: "1", name: "是" }, + { bianma: "0", name: "否" }, + ] }, + { + name: "eqProjectStatus", + label: "项目审核状态", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: PROJECT_STATUS_MAP, + }, + ]} + form={form} + onFinish={getData} + /> +
record.isLocalCompany === 1 ? "是" : "否" }, + { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "主管部门", dataIndex: "manageDeptName" }, + { title: "项目类别", dataIndex: "qualificationsTypeName" }, + { title: "是否存在分包", dataIndex: "subcontractFlag", render: (_, record) => record.subcontractFlag ? "是" : "否" }, + { title: "分包项目总数", dataIndex: "secondLevelTotal" }, + { + title: "一级项目备案审核状态", + dataIndex: "projectStatus", + render: (_, record) => getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 350, + render: (_, record) => ( + + + + + + ), + }, + ]} + {...tableProps} + /> + + ); +} + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/ReView/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/UserChange/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/UserChange/index.js new file mode 100644 index 0000000..16dacf7 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/UserChange/index.js @@ -0,0 +1,7 @@ +import ViewUserChange from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange"; + +function UserChange(props) { + return (); +}; + +export default UserChange; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/UserChangeRecord/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/UserChangeRecord/index.js new file mode 100644 index 0000000..8fd8500 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/UserChangeRecord/index.js @@ -0,0 +1,7 @@ +import ViewUserChangeRecordPage from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord"; + +function UserChangeRecord(props) { + return (); +}; + +export default UserChangeRecord; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/index.js new file mode 100644 index 0000000..c7d3094 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationManagement/index.js @@ -0,0 +1,5 @@ +function ProjectFilingInformation(props) { + return (
{props.children}
); +} + +export default ProjectFilingInformation; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/Add/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/Add/index.js new file mode 100644 index 0000000..cf5cfae --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/Add/index.js @@ -0,0 +1,932 @@ +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 FormBuilder from "zy-react-library/components/FormBuilder"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import AddIcon from "zy-react-library/components/Icon/AddIcon"; +import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/Gwj"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj"; +import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj"; +import Table from "zy-react-library/components/Table"; +import Upload from "zy-react-library/components/Upload"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; +import useDeleteFile from "zy-react-library/hooks/useDeleteFile"; +import useGetFile from "zy-react-library/hooks/useGetFile"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import useTable from "zy-react-library/hooks/useTable"; +import useUploadFile from "zy-react-library/hooks/useUploadFile"; +import { validatorEndTime } from "zy-react-library/utils"; +import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function Add(props) { + const query = useGetUrlQuery(); + const [form] = Form.useForm(); + const [currentStep, setCurrentStep] = useState(1); + const [formValues, setFormValues] = useState({}); + const [projectFileAddCmdList, setProjectFileAddCmdList] = useState([]); // 项目资料 + const [usercontentAddCmdList, setUsercontentAddCmdList] = useState([]); // 项目审核人员 + const [projectLocalCompanyAddCmdList, setProjectLocalCompanyAddCmdList] = useState([]); // 项目执行属地公司 + const [projectApprovalUserAddCmdList, setProjectApprovalUserAddCmdList] = useState([]); // 项目审核人员 + const [projectApprovalFlowAddCmdList, setProjectApprovalFlowAddCmdList] = useState([]); // 项目审核流程 + const [corpinfoId, setCorpinfoId] = useState(); // 项目id + const { getFile } = useGetFile(); + // 获取详情数据 + const getData = async () => { + const { data } = await props["projectDetail"]({ id: query.id }); + if (data.agreementFileUuid) { + const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["156"], eqForeignKey: data.agreementFileUuid }); + data.projectFiles = files; + } + setFormValues(data); + form.setFieldsValue(data); + let projectUserAddCmdList = []; + if (data.projectUserAddCmdList && data.projectUserAddCmdList.length > 0) { + const otherUsers = data.projectUserAddCmdList.map((item) => { + return { + ...item, + id: item.userId, + name: item.userName, + departmentId: item.deptId, + departmentName: item.deptName, + type: "normal", // 普通项目人员 + phone: item.userPhone || "", + postName: item.userPostName || "", + }; + }); + projectUserAddCmdList = [...projectUserAddCmdList, ...otherUsers]; + } + setProjectFileAddCmdList(data.projectFileAddCmdList); + setUsercontentAddCmdList(projectUserAddCmdList); + setProjectLocalCompanyAddCmdList(data.projectLocalCompanyAddCmdList); + setProjectApprovalUserAddCmdList(data.projectApprovalUserAddCmdList); + setProjectApprovalFlowAddCmdList(data.projectApprovalFlowAddCmdList); + setCorpinfoId(data.corpinfoId); + }; + + useEffect(() => { + query.id && getData(); + }, []); + + return ( +
+ +
+ {currentStep === 1 + && ( + + )} + {currentStep === 2 + && ( + + )} +
+
+ ); +} + +const StepOneComponent = (props) => { + const form = props.form; + const approvalCorpId = Form.useWatch("approvalCorpId", form); // 项目审核部门公司 + const approvalDeptId = Form.useWatch("approvalDeptId", form); // 项目审核部门 + const [corpInfoList, setCorpInfoList] = useState([]); // 项目执行属地公司 + const startProjectTime = Form.useWatch("startProjectTime", form); // 项目开始时间 + // 获取项目执行属地公司数据 + const getCorpInfoList = async () => { + const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [0, 1, 2] }); + setCorpInfoList(data); + }; + const handleProjectLeaderChange = (label, extraInfo) => { + if (!extraInfo.userId) + return; + const existingLeaderIndex = props.usercontentAddCmdList.findIndex( + item => item.projectLeader === 1, + ); + const newUserList = [...props.usercontentAddCmdList]; + + // 如果已存在项目负责人,更新之 + if (existingLeaderIndex >= 0) { + newUserList[existingLeaderIndex] = { + ...newUserList[existingLeaderIndex], + id: extraInfo.userId, + name: label, + departmentId: extraInfo?.departmentId || "", + departmentName: extraInfo?.departmentName || "", + phone: extraInfo?.phone || "", + postName: extraInfo?.postName || "", + projectLeader: 1, + }; + } + else { + // 如果不存在,添加新的项目负责人 + newUserList.unshift({ + id: extraInfo.userId, + name: label, + departmentId: extraInfo?.departmentId || "", + departmentName: extraInfo?.departmentName || "", + phone: extraInfo?.phone || "", + postName: extraInfo?.postName || "", + projectLeader: 1, + }); + } + + props.setUsercontentAddCmdList(newUserList); + }; + useEffect(() => { + getCorpInfoList(); + form.setFieldsValue(props.formValues); + if (props.formValues.userId && props.formValues.userName) { + const existingLeader = props.usercontentAddCmdList.find( + item => item.projectLeader === 1, + ); + + if (!existingLeader) { + const newUserList = [ + { + id: props.formValues.userId, + name: props.formValues.userName, + departmentId: props.formValues.deptId || "", + departmentName: props.formValues.deptName || "", + phone: props.formValues.userPhone || "", + postName: props.formValues.userPostName || "", + projectLeader: 1, + }, + ...props.usercontentAddCmdList.filter(item => item.projectLeader !== 1), + ]; + props.setUsercontentAddCmdList(newUserList); + } + } + }, [props.formValues]); + return ( + { + props.setCurrentStep(2); + props.setFormValues(values); + }} + values={{ stakeholderLevel: "two-level", stakeholderLevelName: "二级相关方" }} + submitButtonText="下一步" + options={[ + { label: "项目基础信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, + { name: "projectName", label: "项目名称" }, + { name: "userId", label: "项目负责人", render: ( + { + form.setFieldValue("userName", label); + }} + onGetOption={(option) => { + if (option) { + const extraInfo = { + name: option.name, + phone: option.phone || "", + postName: option.postName || "", + departmentId: option.departmentId || "", + departmentName: option.departmentName || "", + userId: option.id, + }; + handleProjectLeaderChange(option.name, extraInfo); + } + }} + /> + ), componentProps: { + onChange: (userId) => { + if (!userId) { + // 如果清空了项目负责人,从项目人员列表中移除 + const newUserList = props.usercontentAddCmdList.filter( + item => item.projectLeader !== 1, + ); + props.setUsercontentAddCmdList(newUserList); + } + }, + } }, + { 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: 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: 8 }, 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", label: "项目类别", span: 24, wrapperCol: { span: 5 }, render: ( + form.setFieldValue("qualificationsTypeName", label)} + onChange={() => { + + }} + /> + ) }, + { name: "qualificationsTypeName", label: "项目类别名称", onlyForLabel: true }, + { + name: "approvalCorpId", + label: "集团公司审核", + labelCol: { span: 5 }, + items: corpInfoList, + render: FORM_ITEM_RENDER_ENUM.SELECT, + itemsField: { valueKey: "id", labelKey: "corpName" }, + componentProps: { + onChange: (event) => { + const label = corpInfoList.find(item => item.id === event)?.corpName; + form.setFieldValue("approvalCorpName", label); + form.setFieldsValue({ + approvalDeptId: "", + approvalDeptName: "", + approvalUserIds: [], + approvalUserNames: "", + }); + }, + }, + }, + { name: "approvalCorpName", label: "集团公司审核名称", onlyForLabel: true }, + { + name: "approvalDeptId", + labelCol: { span: 5 }, + label: "集团公司部门审核", + render: ( + form.setFieldValue("approvalDeptName", label)} + onChange={() => { + form.setFieldsValue({ + approvalUserIds: [], + approvalUserNames: "", + }); + }} + /> + ), + }, + { name: "approvalDeptName", label: "集团公司部门审核名称", onlyForLabel: true }, + { + name: "approvalUserIds", + label: "集团公司人员审核", + labelCol: { span: 5 }, + render: ( + form.setFieldValue("approvalUserNames", label)} + mode="multiple" + /> + ), + }, + { name: "approvalUserNames", label: "集团公司人员审核名称", onlyForLabel: true }, + { name: "projectFiles", label: "安全管理协议", span: 24, render: ( + { + form.setFieldValue("deleteProjectFileAddCmdList", [...(form.getFieldValue("deleteProjectFileAddCmdList") || []), file]); + }} + /> + ) }, + { name: "deleteProjectFileAddCmdList", label: "删除的安全管理协议", onlyForLabel: true }, + { name: "agreementFileUuid", label: "安全协议uuid", onlyForLabel: true }, + { name: "stakeholderLevel", onlyForLabel: true }, + { name: "stakeholderLevelName", onlyForLabel: true }, + ]} + /> + ); +}; +const StepTwoComponent = (props) => { + const query = props.query; + const projectFileList = props.projectFileAddCmdList || []; // 项目资料 + const usercontentList = props.usercontentAddCmdList || []; // 项目审核人员 + const setProjectFileList = props.setProjectFileAddCmdList || []; // 项目资料赋值 + const setUsercontentList = props.setUsercontentAddCmdList || []; // 项目审核人员赋值 + const projectLocalCompanyAddCmdList = props.projectLocalCompanyAddCmdList || []; // 项目所属属地公司 + const projectApprovalUserAddCmdList = props.projectApprovalUserAddCmdList || []; // 项目审核人员 + const projectApprovalFlowAddCmdList = props.projectApprovalFlowAddCmdList || []; // 项目审核流程 + const corpinfoId = props.corpinfoId; // 公司id + + const [uploadFileModalOpen, setUploadFileModalOpen] = useState(false); // 上传文件弹窗显示 + const [usercontentOpen, setUsercontentOpen] = useState(false); // 选择项目审核人员弹窗显示 + const [uploadFileModalData, setUploadFileModalData] = useState({ // 上传文件弹窗数据 + index: -1, + files: [], + }); + const [fetchUserList, setFetchUserList] = useState({ // 选择项目审核人员弹窗数据 + index: -1, + }); + const { loading: uploadFileLoading, uploadFile } = useUploadFile(); + const { loading: deleteFileLoading, deleteFile } = useDeleteFile(); + const [viewProjectReviewUserModalOpen, setViewProjectReviewUserModalOpen] = useState(false); // 查看特种作业人员证书弹窗 + const [viewProjectReviewUserModalData, setViewProjectReviewUserModalData] = useState({}); // 查看安全人员证书列表 + const { loading: getFileLoading, getFile } = useGetFile(); + const [chooseFilsListModalOpen, setChooseFilsListModalOpen] = useState(false); + const getData = async () => { + for (let i = 0; i < projectFileList.length; i++) { + const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["151"], eqForeignKey: projectFileList[i].projectFileId }); + projectFileList[i].files = files; + } + }; + useEffect(() => { + getData(); + }, []); + // 点击新增项目相关资料 + const onUploadFileOpen = () => { + // 初始化项目相关资料弹窗数据 + setUploadFileModalData({ + type: "add", + index: -1, + files: [], + deleteFiles: [], + }); + setUploadFileModalOpen(true); + }; + // 项目相关资料提交 + const onUploadFileConfirm = (values) => { + const newItem = { + dataName: values.dataName, + files: values.files || [], + deleteFiles: values.deleteFiles || [], + startValidityPeriod: values.startValidityPeriod, + endValidityPeriod: values.endValidityPeriod, + createTime: dayjs().format("YYYY-MM-DD hh:mm:ss"), + }; + if (values.type === "add") { + setProjectFileList(prev => [...prev, newItem]); + } + else { + setProjectFileList((prev) => { + const newList = [...prev]; + if (values.index >= 0 && values.index < newList.length) { + newList[values.index] = { ...newList[values.index], ...newItem }; + } + return newList; + }); + } + setUploadFileModalOpen(false); + }; + // 点击修改项目相关资料 + const handleEdit = (index) => { + const item = projectFileList[index]; + setUploadFileModalData({ + type: "update", + index, + files: item.files || [], + deleteFiles: item.deleteFiles || [], + dataName: item.dataName, + startValidityPeriod: item.startValidityPeriod, + endValidityPeriod: item.endValidityPeriod, + }); + setUploadFileModalOpen(true); + }; + // 点击删除项目相关资料 + const handleDelete = (index) => { + Modal.confirm({ + title: "确认删除", + content: "确定要删除这条资料吗?", + onOk: () => { + setProjectFileList((prev) => { + const newList = [...prev]; + newList.splice(index, 1); + return newList; + }); + message.success("删除成功"); + }, + }); + }; + // 点击新增项目人员 + const OnUsercontentOpen = () => { + setUsercontentOpen(true); + setFetchUserList(usercontentList); + }; + // 项目人员确认提交 + const handleConfirmAdd = (selectedData) => { + setUsercontentList(selectedData); + setFetchUserList(selectedData); + // 关闭弹窗 + setUsercontentOpen(false); + }; + // 提交审核 + const onSubmit = async () => { + if (props.formValues.length === 0) { + message.error(`请新增项目相关资料`); + return; + } + if (usercontentList.length === 0) { + message.error(`请新增项目人员`); + return; + } + + await deleteFile({ single: false, files: props.formValues.deleteProjectFileAddCmdList }); + const { id: agreementFileUuid } = await uploadFile({ + single: false, + files: props.formValues.projectFiles, + params: { type: UPLOAD_FILE_TYPE_ENUM["156"], foreignKey: props.formValues.agreementFileUuid }, + }); + props.formValues.agreementFileUuid = agreementFileUuid; + + for (let i = 0; i < projectFileList.length; i++) { + await deleteFile({ single: false, files: projectFileList[i].deleteFiles }); + const { id } = await uploadFile({ + single: false, + files: projectFileList[i].files, + params: { type: UPLOAD_FILE_TYPE_ENUM["151"], foreignKey: projectFileList[i].projectFileId }, + }); + projectFileList[i].projectFileId = id; + } + console.log("usercontentList", usercontentList); + const userList = usercontentList.map(item => ({ + userId: item.id, + userName: item.name, + deptId: item.departmentId, + deptName: item.departmentName, + userPhone: item.phone, + userPostName: item.postName, + projectLeader: item.projectLeader, + })); + console.log("userList", userList); + 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, + }); + if (success) { + message.success("提交成功,请等待审核"); + window.history.back(); + } + }; + const handleChooseFilsSubmit = (selectedRows) => { + const existingIds = projectFileList + .filter(item => item.detailId) + .map(item => item.detailId); + const newRows = selectedRows.filter(row => + row.detailId && !existingIds.includes(row.detailId), + ); + const formattedRows = newRows.map(row => ({ + ...row, + })); + + // 合并到现有列表中 + setProjectFileList(prev => [...prev, ...formattedRows]); + setChooseFilsListModalOpen(false); + }; + return ( +
+ +
+ 项目相关资料 +
( + <> + + + + )} + dataSource={projectFileList} + pagination={false} + options={false} + disabledResizer={true} + rowKey={record => record.id || record.dataName} + columns={[ + { title: "材料名称", key: "dataName", dataIndex: "dataName" }, + { title: "上传时间", key: "createTime", dataIndex: "createTime", render: (_, record) => record.createTime || "-" }, + { + title: "时效性", + key: "validityPeriod", + dataIndex: "startValidityPeriod", + render: (_, record) => record.startValidityPeriod ? `${record.startValidityPeriod}至${record.endValidityPeriod}` : "-", + }, + { + title: "操作", + render: (_, record, index) => ( + + + + + ), + }, + ]} + /> + +
+ 项目人员 +
( + <> + + + )} + dataSource={usercontentList} + pagination={false} + options={false} + disabledResizer={true} + rowKey="id" + columns={[ + { title: "姓名", dataIndex: "name" }, + { title: "部门", dataIndex: "departmentName" }, + { + title: "操作", + render: (_, record) => ( + + + + + ), + }, + ]} + /> + +
+ + + + +
+ + {uploadFileModalOpen && ( + { + setUploadFileModalOpen(false); + }} + onSubmit={(values) => { + setUploadFileModalOpen(false); + onUploadFileConfirm(values); + }} + /> + )} + {usercontentOpen && ( + { + setUsercontentOpen(false); + }} + onConfirm={handleConfirmAdd} + /> + )} + {viewProjectReviewUserModalOpen + && setViewProjectReviewUserModalOpen(false)} data={viewProjectReviewUserModalData} />} + {chooseFilsListModalOpen && ( + { + setChooseFilsListModalOpen(false); + }} + /> + )} + + ); +}; +const ChooseFilsComponent = (props) => { + const [selectedRowKeys, setSelectedRowKeys] = useState([]); // 存储选中的行键 + const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据 + const { tableProps } = useTable(props["qualificationsDetails"], { + params: { + qualificationsTypeId: "", + }, + }); + const submit = () => { + if (props.onSubmit) { + props.onSubmit(selectedRows); + } + }; + useEffect(() => { + if (props.data && Array.isArray(props.data)) { + const keys = props.data + .filter(item => item && item.detailId) + .map(item => item.detailId); + setSelectedRowKeys(keys); + setSelectedRows(props.data); + } + }, [props.data]); + const handleRowSelectionChange = (selectedRowKeys, selectedRows) => { + setSelectedRowKeys(selectedRowKeys); + setSelectedRows(selectedRows); + }; + return ( + +
record.createTime || "-" }, + { + title: "时效性", + key: "validityPeriod", + dataIndex: "startValidityPeriod", + render: (_, record) => record.startValidityPeriod ? `${record.startValidityPeriod}至${record.endValidityPeriod}` : "-", + }, + ]} + {...tableProps} + /> + + ); +}; +// 选择项目人员的组件 +const UsercontentComponent = (props) => { + const [form] = Form.useForm(); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); // 存储选中的行键 + const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据 + const [inDepartmentId, setInDepartmentId] = useState([]); // 存储已选择的部门id + const { tableProps, getData } = useTable(props["userList"], { + form, + params: { + likeName: "", + likeUserIdCard: "", + inDepartmentId, + eqEmploymentFlag: 1, // 在职 + }, + }); + const projectLeader = useMemo(() => { + if (props.data && Array.isArray(props.data)) { + return props.data.find(item => item.projectLeader === 1); + } + return null; + }, [props.data]); + // 初始化选中的数据 + useEffect(() => { + const initialSelectedRows = [...(props.data || [])]; + const initialSelectedKeys = initialSelectedRows + .filter(item => item && item.id) + .map(item => item.id); + const processedRows = initialSelectedRows.map(item => ({ + ...item, + projectLeader: item.projectLeader || (projectLeader && item.id === projectLeader.id ? 1 : 0), + })); + setSelectedRowKeys(initialSelectedKeys); + setSelectedRows(processedRows); + }, [props.data, projectLeader]); + const handleConfirmAdd = () => { + if (props.onConfirm) { + // 确保项目负责人始终在选中列表中 + const finalSelectedRows = [...selectedRows]; + if (projectLeader && !selectedRows.find(item => item.id === projectLeader.id)) { + finalSelectedRows.unshift(projectLeader); + } + + // 为选中的用户数据添加 projectLeader 字段 + const processedRows = finalSelectedRows.map(item => ({ + ...item, + projectLeader: projectLeader && item.id === projectLeader.id ? 1 : 0, + })); + + props.onConfirm(processedRows); + } + }; + const handleRowSelectionChange = (selectedRowKeys, selectedRows) => { + // 如果项目负责人已存在,确保不会被取消选择 + if (projectLeader) { + const leaderKey = projectLeader.id; + if (!selectedRowKeys.includes(leaderKey)) { + selectedRowKeys.push(leaderKey); + selectedRows.push({ + ...projectLeader, + projectLeader: 1, + }); + } + } + + setSelectedRowKeys([...selectedRowKeys]); + setSelectedRows([...selectedRows]); + }; + return ( + + { + getData(values); + }} + /> +
+
+ { + setInDepartmentId(checkedKeys); + getData(); + }} + /> +
+
+
({ + // 如果是项目负责人,禁用取消选择 + disabled: projectLeader && record.id === projectLeader.id, + }), + }} + rowKey="id" + toolBarRender={() => ( + <> + + + )} + columns={[ + { title: "手机号", dataIndex: "phone" }, + { title: "姓名", dataIndex: "name" }, + { title: "所属部门", dataIndex: "departmentName" }, + { title: "所属岗位", dataIndex: "postName" }, + { title: "是否存在人资系统", dataIndex: "rzFlag", render: (_, record) => record.rzFlag === 1 ? "是" : "否" }, + ]} + {...tableProps} + /> + + + + ); +}; +// 项目资料信息的组件 +const FileUpload = (props) => { + const [form] = Form.useForm(); + const startValidityPeriod = Form.useWatch("startValidityPeriod", form); + useEffect(() => { + form.setFieldsValue({ + type: props.data.type, + index: props.data.index, + dataName: props.data.dataName, + files: props.data.files, + startValidityPeriod: props.data.startValidityPeriod, + endValidityPeriod: props.data.endValidityPeriod, + }); + }, []); + + return ( + + props.onSubmit(values)} + span={24} + labelCol={{ span: 8 }} + options={[ + { name: "dataName", label: "资料名称" }, + { + name: "startValidityPeriod", + label: "有效期开始时间", + render: FORM_ITEM_RENDER_ENUM.DATE, + }, + { name: "type", label: "新增或修改", onlyForLabel: true }, + { name: "index", label: "索引", onlyForLabel: true }, + { + name: "endValidityPeriod", + label: "有效期结束时间", + render: FORM_ITEM_RENDER_ENUM.DATE, + rules: [validatorEndTime(startValidityPeriod)], + }, + { + name: "files", + label: "资料", + render: ( + { + form.setFieldValue("deleteFiles", [...(form.getFieldValue("deleteFiles") || []), files]); + }} + /> + ), + }, + { name: "deleteFiles", label: "删除的资料", onlyForLabel: true }, + ]} + /> + + ); +}; + +const StepOne = Connect([NS_QUALIFICATION_STATISTICS], true)(StepOneComponent); +const StepTwo = Connect([NS_QUALIFICATION_STATISTICS], true)(StepTwoComponent); +const Usercontent = Connect([NS_QUALIFICATION_STATISTICS], true)(UsercontentComponent); +const ChooseFilsList = Connect([NS_QUALIFICATION_STATISTICS], true)(ChooseFilsComponent); + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(Add); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/List/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/List/index.js new file mode 100644 index 0000000..063c250 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/List/index.js @@ -0,0 +1,145 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import AddIcon from "zy-react-library/components/Icon/AddIcon"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevel: "two-level", + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + { + name: "", + label: "项目审核状态", + render: FORM_ITEM_RENDER_ENUM.SELECT, + items: PROJECT_STATUS_MAP, + }, + ]} + form={form} + onFinish={getData} + /> +
( + + + + )} + columns={[ + { title: "集团单位名称", dataIndex: "corpinfoName" }, + { title: "一级项目名称", dataIndex: "parentProjectName" }, + { title: "二级项目名称", dataIndex: "projectName" }, + { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "上级审核主管部门", dataIndex: "manageDeptName" }, + { title: "项目类别", dataIndex: "qualificationsTypeName" }, + { + title: "项目备案审核状态", + dataIndex: "projectStatus", + render: (_, record) => getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/ReView/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/index.js new file mode 100644 index 0000000..43c7c37 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/index.js @@ -0,0 +1,5 @@ +function ProjectFilingApplication(props) { + return (
{props.children}
); +} + +export default ProjectFilingApplication; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/List/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/List/index.js new file mode 100644 index 0000000..85eb3b2 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/List/index.js @@ -0,0 +1,89 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["projectPage"], { + form, + params: { + searchType: 5, + eqStakeholderLevel: "two-level", + }, + }); + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 350, + render: (_, record) => ( + + + + + + ), + }, + ]} + {...tableProps} + /> + + ); +} + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/ReView/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/UserChange/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/UserChange/index.js new file mode 100644 index 0000000..16dacf7 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/UserChange/index.js @@ -0,0 +1,7 @@ +import ViewUserChange from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange"; + +function UserChange(props) { + return (); +}; + +export default UserChange; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/UserChangeRecord/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/UserChangeRecord/index.js new file mode 100644 index 0000000..8fd8500 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/UserChangeRecord/index.js @@ -0,0 +1,7 @@ +import ViewUserChangeRecordPage from "~/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord"; + +function UserChangeRecord(props) { + return (); +}; + +export default UserChangeRecord; diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/index.js new file mode 100644 index 0000000..c7d3094 --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/index.js @@ -0,0 +1,5 @@ +function ProjectFilingInformation(props) { + return (
{props.children}
); +} + +export default ProjectFilingInformation; diff --git a/src/pages/Container/Stakeholder/ProjectReview/index.js b/src/pages/Container/Stakeholder/ProjectReview/index.js new file mode 100644 index 0000000..a5a821c --- /dev/null +++ b/src/pages/Container/Stakeholder/ProjectReview/index.js @@ -0,0 +1,5 @@ +function ProjectReview(props) { + return (
{props.children}
); +} + +export default ProjectReview; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/List/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/List/index.js new file mode 100644 index 0000000..63963a6 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/List/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "one-level", + eqSubcontractFlag: 0, + eqProjectStatus: 1, + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/ReView/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/NoSubcontract/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/List/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/List/index.js new file mode 100644 index 0000000..8c6676c --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/List/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "one-level", + eqSubcontractFlag: 1, + eqProjectStatus: 1, + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/ReView/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/index.js new file mode 100644 index 0000000..c886109 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/Subcontract/index.js @@ -0,0 +1,5 @@ +function Subcontract(props) { + return (
{props.children}
); +} + +export default Subcontract; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApproval/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/index.js new file mode 100644 index 0000000..d4ad7a8 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApproval/index.js @@ -0,0 +1,5 @@ +function ProjectApproval(props) { + return (
{props.children}
); +} + +export default ProjectApproval; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/List/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/List/index.js new file mode 100644 index 0000000..34d3d11 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/List/index.js @@ -0,0 +1,118 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Descriptions, Form, Modal, Space } from "antd"; +import { useState } from "react"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["inCheckList"], { + form, + params: { + eqStakeholderLevelL: "two-level", + eqProjectStatus: 1, + }, + }); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); // 驳回原因弹窗 + const [rejectReason, setRejectReason] = useState(false); // 驳回原因 + // 点击查看驳回原因 + const onViewRejectReason = async (id) => { + const { data } = await props["projectApprovalFlow"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 150, + render: (_, record) => ( + + + {record.projectStatus === 6 && ( + + )} + + ), + }, + ]} + {...tableProps} + /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + + ); +} +const RejectReason = (props) => { + return ( + 取消, + ]} + > + + + ); +}; + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/ReView/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/index.js new file mode 100644 index 0000000..c96891d --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectApprovalTwo/index.js @@ -0,0 +1,5 @@ +function ProjectApprovalTwo(props) { + return (
{props.children}
); +} + +export default ProjectApprovalTwo; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/List/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/List/index.js new file mode 100644 index 0000000..d557deb --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/List/index.js @@ -0,0 +1,91 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, Space } from "antd"; +import Search from "zy-react-library/components/Search"; +import DictionarySelect from "zy-react-library/components/Select/Dictionary"; +import Table from "zy-react-library/components/Table"; +import useTable from "zy-react-library/hooks/useTable"; +import { getLabelName } from "zy-react-library/utils"; +import { PROJECT_STATUS_MAP } from "~/enumerate/constant"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function List(props) { + const [form] = Form.useForm(); + const { tableProps, getData } = useTable(props["projectPage"], { + form, + params: { + searchType: props.searchType || 1, + eqStakeholderLevel: props.eqStakeholderLevel || "", + }, + }); + + return ( +
+ ), + }, + ]} + form={form} + onFinish={getData} + /> +
record.subcontractFlag ? "是" : "否" }, + { title: "二级项目数", dataIndex: "secondLevelTotal" }, + { title: "项目执行属地公司", dataIndex: "companyName" }, + { + title: "项目备案审核状态", + dataIndex: "projectStatus", + render: (_, record) => getLabelName({ list: PROJECT_STATUS_MAP, status: record.projectStatus }), + }, + { + title: "操作", + fixed: "right", + width: 350, + render: (_, record) => ( + + + + + + ), + }, + ]} + {...tableProps} + /> + + ); +} + +export default Connect([NS_QUALIFICATION_STATISTICS], true)(List); diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/ReView/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/ReView/index.js new file mode 100644 index 0000000..fb0f03b --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/ReView/index.js @@ -0,0 +1,7 @@ +import ViewPage from "~/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView"; + +function ReView(props) { + return (); +}; + +export default ReView; diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange/index.js new file mode 100644 index 0000000..3b9e513 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChange/index.js @@ -0,0 +1,343 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Button, Form, message, Modal, Space } from "antd"; +import { useEffect, useMemo, useState } from "react"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import AddIcon from "zy-react-library/components/Icon/AddIcon"; +import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/Gwj"; +import Search from "zy-react-library/components/Search"; +import Table from "zy-react-library/components/Table"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import useTable from "zy-react-library/hooks/useTable"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function UserChange(props) { + const query = useGetUrlQuery(); + const { tableProps, getData } = useTable(props["projectUserList"], { params: { eqProjectId: query.id } }); + const { tableProps: allData } = useTable(props["projectUserList"], { params: { eqProjectId: query.id, pageIndex: 1, pageSize: 999999 } }); + const [usercontentOpen, setUsercontentOpen] = useState(false); // 选择项目审核人员弹窗显示 + const [fetchUserList, setFetchUserList] = useState([]); // 已存在的项目人员数据 + + const onDelete = (record) => { + Modal.confirm({ + title: "删除确认", + content: "确定要删除吗?", + onOk: async () => { + const { success } = await props["projectUserDelete"]({ id: record.id }); + if (success) { + message.success("删除成功"); + getData(); + } + }, + }); + }; + + // 点击新增项目人员 + const OnUsercontentOpen = () => { + setUsercontentOpen(true); + // 保存已存在的项目人员数据,用于弹窗回显 + if (allData.dataSource && Array.isArray(allData.dataSource)) { + setFetchUserList(allData.dataSource.map(item => ({ + id: item.userId || item.id, + name: item.userName || item.name, + departmentId: item.deptId || item.departmentId, + departmentName: item.deptName || item.departmentName, + phone: item.userPhone || item.phone, + postName: item.userPostName || item.postName, + projectLeader: item.projectLeader || 0, + }))); + } + }; + + // 项目人员确认提交 + const handleConfirmAdd = async (selectedData) => { + const userList = selectedData.map(item => ({ + userId: item.id, + userName: item.name, + deptId: item.departmentId, + deptName: item.departmentName, + userPhone: item.phone, + userPostName: item.postName, + projectLeader: item.projectLeader, + })); + const { success } = await props["projectUserAdd"]({ + id: query.id, + projectUserAddCmdList: userList, + }); + if (success) { + message.success("新增成功"); + setUsercontentOpen(false); + getData(); + } + }; + + return ( +
+ +
+
( + + + + )} + columns={[ + { title: "姓名", dataIndex: "userName" }, + { title: "部门", dataIndex: "deptName" }, + { + title: "是否为项目负责人", + dataIndex: "projectLeader", + render: value => value === 1 ? "是" : "否", + }, + { + title: "操作", + fixed: "right", + render: (_, record) => ( + + + + + ), + }, + ]} + {...tableProps} + /> + + {usercontentOpen && ( + { + setUsercontentOpen(false); + }} + onConfirm={handleConfirmAdd} + /> + )} + + ); +} + +// 选择项目人员的组件 +const UsercontentComponent = (props) => { + const [form] = Form.useForm(); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); // 存储选中的行键 + const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据 + const [inDepartmentId, setInDepartmentId] = useState([]); // 存储已选择的部门id + const [tableDataSource, setTableDataSource] = useState([]); // 表格数据源 + + const { tableProps, getData } = useTable(props["userList"], { + form, + params: { + likeName: "", + likeUserIdCard: "", + inDepartmentId, + eqEmploymentFlag: 1, // 在职 + }, + }); + + // 合并表格数据:接口返回的数据 + 已存在但可能不在接口数据中的人员 + useEffect(() => { + if (tableProps.dataSource) { + // 创建已存在用户的ID映射,用于去重 + const existingUserIds = new Set(); + const mergedData = []; + + // 1. 添加接口返回的数据 + tableProps.dataSource.forEach((item) => { + mergedData.push({ + ...item, + // 统一字段名 + id: item.id, + name: item.username || item.name, + }); + existingUserIds.add(item.id); + }); + + // 2. 添加已存在但不在接口数据中的用户 + if (props.data && Array.isArray(props.data)) { + props.data.forEach((user) => { + if (!existingUserIds.has(user.id)) { + mergedData.push({ + ...user, + id: user.id, + name: user.name, + // 确保有必要的字段 + username: user.name, + departmentName: user.departmentName, + postName: user.postName, + phone: user.phone, + rzFlag: user.rzFlag, + }); + } + }); + } + + setTableDataSource(mergedData); + } + }, [tableProps.dataSource, props.data]); + + const projectLeader = useMemo(() => { + if (props.data && Array.isArray(props.data)) { + return props.data.find(item => item.projectLeader === 1); + } + return null; + }, [props.data]); + + // 初始化选中的数据 + useEffect(() => { + if (props.data && Array.isArray(props.data)) { + const initialSelectedRows = []; + const initialSelectedKeys = []; + + props.data.forEach((item) => { + if (item && item.id) { + initialSelectedKeys.push(item.id); + initialSelectedRows.push({ + ...item, + name: item.name, + projectLeader: item.projectLeader || 0, + }); + } + }); + + setSelectedRowKeys(initialSelectedKeys); + setSelectedRows(initialSelectedRows); + } + }, [props.data]); + + const handleConfirmAdd = () => { + if (props.onConfirm) { + // 获取所有选中的行 + const selectedUsers = selectedRows; + + // 确保项目负责人在列表中 + if (projectLeader && !selectedUsers.find(item => item.id === projectLeader.id)) { + selectedUsers.unshift({ + ...projectLeader, + projectLeader: 1, + }); + } + + // 为选中的用户数据添加 projectLeader 字段 + const processedRows = selectedUsers.map(item => ({ + ...item, + projectLeader: projectLeader && item.id === projectLeader.id ? 1 : 0, + })); + + props.onConfirm(processedRows); + } + }; + + const handleRowSelectionChange = (selectedRowKeys, selectedRows) => { + // 处理选中的行 + const processedSelectedRows = selectedRows.map(row => ({ + ...row, + projectLeader: projectLeader && row.id === projectLeader.id ? 1 : 0, + })); + + setSelectedRowKeys(selectedRowKeys); + setSelectedRows(processedSelectedRows); + }; + + return ( + + { + getData(values); + }} + /> +
+
+ { + setInDepartmentId(checkedKeys); + getData(); + }} + /> +
+
+
({ + // 如果是项目负责人,禁用取消选择 + disabled: projectLeader && record.id === projectLeader.id, + }), + }} + rowKey="id" + toolBarRender={() => ( + <> + + + )} + columns={[ + { title: "手机号", dataIndex: "phone" }, + { + title: "姓名", + dataIndex: "name", + render: (text, record) => ( +
+ {text} + {projectLeader && record.id === projectLeader.id && ( + (项目负责人) + )} +
+ ), + }, + { title: "所属部门", dataIndex: "departmentName" }, + { title: "所属岗位", dataIndex: "postName" }, + { title: "是否存在人资系统", dataIndex: "rzFlag", render: (_, record) => record.rzFlag === 1 ? "是" : "否" }, + ]} + dataSource={tableDataSource} + pagination={tableProps.pagination} + loading={tableProps.loading} + /> + + + + ); +}; + +const Usercontent = Connect([NS_QUALIFICATION_STATISTICS], true)(UsercontentComponent); +export default Connect([NS_QUALIFICATION_STATISTICS], true)(UserChange); diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js new file mode 100644 index 0000000..49b7e69 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/UserChangeRecord/index.js @@ -0,0 +1,29 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import HeaderBack from "zy-react-library/components/HeaderBack"; +import Table from "zy-react-library/components/Table"; +import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; +import useTable from "zy-react-library/hooks/useTable"; +import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; + +function UserChange(props) { + const query = useGetUrlQuery(); + const { tableProps } = useTable(props["projectUserChangeRecordList"], { params: { eqProjectId: query.id } }); + + return ( +
+ +
+
{ return text === 1 ? "删除" : "新增"; } }, + { title: "记录时间", dataIndex: "createTime" }, + ]} + {...tableProps} + /> + + + ); +} +export default Connect([NS_QUALIFICATION_STATISTICS], true)(UserChange); diff --git a/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/index.js b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/index.js new file mode 100644 index 0000000..c7d3094 --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/ProjectFilingInformation/index.js @@ -0,0 +1,5 @@ +function ProjectFilingInformation(props) { + return (
{props.children}
); +} + +export default ProjectFilingInformation; diff --git a/src/pages/Container/Supervision/ProjectReview/index.js b/src/pages/Container/Supervision/ProjectReview/index.js new file mode 100644 index 0000000..a5a821c --- /dev/null +++ b/src/pages/Container/Supervision/ProjectReview/index.js @@ -0,0 +1,5 @@ +function ProjectReview(props) { + return (
{props.children}
); +} + +export default ProjectReview;