diff --git a/src/api/qualificationApply/index.js b/src/api/qualificationApply/index.js index b8bab6a..511f112 100644 --- a/src/api/qualificationApply/index.js +++ b/src/api/qualificationApply/index.js @@ -30,3 +30,7 @@ export const qualificationApplyRejectReason = declareRequest( "qualificationApplyLoading", `Get > /xgfManager/qualificationsApply/getRejectReason/{id}`, ); +export const invalidateQualifications = declareRequest( + "qualificationApplyLoading", + `Get > /xgfManager/qualificationsApply/invalidateQualifications/{id}`, +); diff --git a/src/api/qualificationStatistics/index.js b/src/api/qualificationStatistics/index.js index aff8c09..daad68e 100644 --- a/src/api/qualificationStatistics/index.js +++ b/src/api/qualificationStatistics/index.js @@ -18,7 +18,7 @@ export const inCheckList = declareRequest( `Post > @/xgfManager/project/inCheckList`, ); export const userList = declareRequest( - `Post > @/basicInfo/user/list`, + `Post > @/basicInfo/user/pageByNopermission`, ); export const projectAdd = declareRequest( "qualificationStatisticsLoading", @@ -83,3 +83,7 @@ export const projectUserChangeRecordList = declareRequest( "qualificationStatisticsLoading", `Post > @/xgfManager/projectUserChangeRecord/list`, ); +export const qualificationsTypeList = declareRequest( + "qualificationStatisticsLoading", + `Post > @/xgfManager/qualifications/projectUserChangeRecord/list`, +); diff --git a/src/components/ViewProjectReviewUserModal/index.js b/src/components/ViewProjectReviewUserModal/index.js index 5361e5e..e9ab19c 100644 --- a/src/components/ViewProjectReviewUserModal/index.js +++ b/src/components/ViewProjectReviewUserModal/index.js @@ -9,13 +9,11 @@ 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, }, }); @@ -59,7 +57,6 @@ const ViewProjectReviewUserModal = (props) => { dataSource: tableData.length > 0 ? tableData : tableProps.dataSource || [], }), [tableProps, tableData]); - if (eqQualificationinfoType === 1) { return ( { /> ); - } - else { - return ( - 取消, - ]} - > - () }, - - ]} - {...enhancedTableProps} - /> - - ); - } }; export default Connect([NS_QUALIFICATION_STATISTICS], true)(ViewProjectReviewUserModal); diff --git a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/List/index.js b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/List/index.js index 22ec3a5..685cb4a 100644 --- a/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/List/index.js +++ b/src/pages/Container/BranchCompany/ProjectReview/ProjectFilingInformation/List/index.js @@ -49,7 +49,7 @@ function List(props) { columns={[ { title: "项目名称", dataIndex: "projectName" }, { title: "是否为属地公司推荐", dataIndex: "isLocalCompany", render: (_, record) => record.isLocalCompany === 1 ? "是" : "否" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, { title: "是否存在分包", dataIndex: "subcontractFlag", render: (_, record) => record.subcontractFlag === 1 ? "是" : "否" }, diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/List/index.js index a7a6653..984754b 100644 --- a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/List/index.js +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubcontract/List/index.js @@ -52,7 +52,7 @@ function List(props) { { title: "项目名称", dataIndex: "projectName" }, { title: "股份主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "项目备案审核状态", dataIndex: "projectStatus", diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/List/index.js index e991605..6cc2d0e 100644 --- a/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/List/index.js +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/NoSubmit/List/index.js @@ -43,7 +43,7 @@ function List(props) { { title: "项目名称", dataIndex: "projectName" }, { title: "股份主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "项目备案审核状态", dataIndex: "projectStatus", diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/List/index.js index 5deadf9..7ae1b95 100644 --- a/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/List/index.js +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Subcontract/List/index.js @@ -52,7 +52,7 @@ function List(props) { { title: "项目名称", dataIndex: "projectName" }, { title: "股份主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "项目备案审核状态", dataIndex: "projectStatus", diff --git a/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/List/index.js index ae44373..6353835 100644 --- a/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/List/index.js +++ b/src/pages/Container/Local/ProjectReview/ProjectApproval/Submit/List/index.js @@ -43,7 +43,7 @@ function List(props) { { title: "股份主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, { title: "二级项目数", dataIndex: "secondLevelTotal" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "项目备案审核状态", dataIndex: "projectStatus", diff --git a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/List/index.js b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/List/index.js index 80056a8..255bf74 100644 --- a/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/List/index.js +++ b/src/pages/Container/Local/ProjectReview/ProjectApprovalTwo/Subcontract/List/index.js @@ -47,12 +47,12 @@ function List(props) { />
{ + const userInfo = await getUserInfo(); + setUserInfo(userInfo); + }; + useEffect(() => { + getCurrentUserInfo(); query.id && getData(); }, []); @@ -82,8 +92,10 @@ function Add(props) { setCurrentStep={setCurrentStep} formValues={formValues} form={form} + userInfo={userInfo} usercontentAddCmdList={usercontentAddCmdList} setUsercontentAddCmdList={setUsercontentAddCmdList} + setQualificationsTypeId={setQualificationsTypeId} /> )} {currentStep === 2 @@ -100,6 +112,7 @@ function Add(props) { projectApprovalUserAddCmdList={projectApprovalUserAddCmdList} projectApprovalFlowAddCmdList={projectApprovalFlowAddCmdList} corpinfoId={corpinfoId} + qualificationsTypeId={qualificationsTypeId} /> )} @@ -116,27 +129,34 @@ const StepOneComponent = (props) => { 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 [qualificationsTypeList, setQualificationsTypeList] = useState([]); // 获取项目执行属地公司数据 const getCorpInfoList = async () => { - const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [0, 1, 2] }); + const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [0] }); setCorpInfoList(data); }; - // 获取项目执行属地公司名称列表数据 - const getCropList = async () => { - const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [1] }); - setCorpList(data); + // 获取资质类型数据 + const getQualificationsTypeList = async () => { + const { data } = await props["qualificationsTypeList"](); + setQualificationsTypeList(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 uniqueUsers = data.filter((item, index, self) => + index === self.findIndex((t) => ( + t.userId === item.userId && t.userName === item.userName + )) + ); + setUserList(uniqueUsers); }; const handleProjectLeaderChange = (label, extraInfo) => { if (!extraInfo.userId) @@ -176,7 +196,7 @@ const StepOneComponent = (props) => { }; useEffect(() => { getCorpInfoList(); - getCropList(); + getQualificationsTypeList(); if (props.formValues.isLocalCompany === 0) { getDeptList(props.formValues.qualificationsTypeId); getUserList(props.formValues.manageDeptId); @@ -206,6 +226,7 @@ const StepOneComponent = (props) => { }, [props.formValues]); return ( { 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: "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); + } + }} + 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 }, @@ -256,47 +280,71 @@ const StepOneComponent = (props) => { { 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: "threePeopleFlag", label: "是否涉及三人及以上工作内容", labelCol: { span: 9 }, 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)} - style={{ width: "100%" }} - onChange={() => {}} - /> - ) }, + { + name: "qualificationsTypeId", label: "项目类别", span: 24, wrapperCol: { span: 5 }, + items: qualificationsTypeList, + render: FORM_ITEM_RENDER_ENUM.SELECT, + itemsField: { valueKey: "qualificationsTypeId", labelKey: "qualificationsTypeName" }, + onGetLabel: (label) => { + form.setFieldValue("qualificationsTypeName", label); + }, + componentProps: { + onChange: (event) => { + if (form.getFieldValue("isLocalCompany") === 0) { + getDeptList(event); + } + props.setQualificationsTypeId(event); + form.setFieldsValue({ + recommendCorpId: "", + recommendCorpName: "", + recommendDeptId: "", + recommendDeptName: "", + recommendUserIds: [], + recommendUserNames: "", + manageDeptId: "", + manageDeptName: "", + manageUserIds: [], + manageUserNames: "", + }); + }, + }, + }, + { name: "qualificationsTypeName", label: "项目类别名称", onlyForLabel: true }, { span: 24, render: (
- 如果选择项目类别或等级没有您相应的选项时,请在"资质准入管理"中查看是否持有对应类比或等级的相关资质。 + 如果选择项目类别或等级没有您相应的选项时,请在"资质准入管理"中查看是否持有对应类别或等级的相关资质。
), }, { 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: "", - }); - }, - } }, + { + 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: "", + }); + }, + } + }, { span: 24, render: ( @@ -307,104 +355,104 @@ const StepOneComponent = (props) => { }, ...(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); + { + name: "recommendCorpId", + label: "推荐属地公司名称", + labelCol: { span: 6 }, + 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("recommendCorpName", label); + form.setFieldsValue({ + recommendDeptId: "", + recommendDeptName: "", + recommendUserIds: [], + recommendUserNames: "", + }); + }, + }, + }, + { name: "recommendCorpName", label: "推荐属地公司名称", onlyForLabel: true }, + { + name: "recommendDeptId", + labelCol: { span: 6 }, + label: "推荐属地公司部门", + render: ( + form.setFieldValue("recommendDeptName", label)} + onChange={() => { 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: "recommendDeptName", label: "推荐属地公司部门", onlyForLabel: true }, + { + name: "recommendUserIds", + label: "推荐属地公司人员", + span: 8, + labelCol: { span: 6 }, + 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: "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: "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: "manageUserNames", label: "主管部门审核人名称", onlyForLabel: true }, + ]), { render: (
@@ -416,7 +464,7 @@ const StepOneComponent = (props) => { { name: "approvalCorpId", label: "项目执行属地公司名称", - labelCol: { span: 5 }, + labelCol: { span: 7 }, items: corpInfoList, render: FORM_ITEM_RENDER_ENUM.SELECT, itemsField: { valueKey: "id", labelKey: "corpName" }, @@ -436,7 +484,7 @@ const StepOneComponent = (props) => { { name: "approvalCorpName", label: "项目执行属地公司名称", onlyForLabel: true }, { name: "approvalDeptId", - labelCol: { span: 5 }, + labelCol: { span: 7 }, label: "项目执行属地公司部门", render: ( { { name: "approvalUserIds", label: "项目执行属地公司人员", - labelCol: { span: 5 }, + labelCol: { span: 7 }, render: ( { ), }, { name: "approvalUserNames", label: "项目执行属地公司人员名称", onlyForLabel: true }, - { name: "projectFiles", label: "安全管理协议", span: 24, render: ( - { - form.setFieldValue("deleteProjectFileAddCmdList", [...(form.getFieldValue("deleteProjectFileAddCmdList") || []), file]); - }} - /> - ) }, + { + 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 }, @@ -761,23 +811,10 @@ const StepTwoComponent = (props) => { setViewProjectReviewUserModalOpen(true); setViewProjectReviewUserModalData({ ...record, - eqQualificationinfoType: 1, }); }} > - 特种作业人员证书 - - ), @@ -804,6 +841,7 @@ const StepTwoComponent = (props) => { {uploadFileModalOpen && ( { setUploadFileModalOpen(false); }} @@ -841,7 +879,7 @@ const ChooseFilsComponent = (props) => { const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据 const { tableProps } = useTable(props["qualificationsDetails"], { params: { - qualificationsTypeId: "", + qualificationsTypeId: props.qualificationsTypeId, }, useStorageQueryCriteria: false, }); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/List/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/List/index.js index 2d89f3d..c28045e 100644 --- a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/List/index.js +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/List/index.js @@ -71,7 +71,7 @@ function List(props) { columns={[ { title: "项目名称", dataIndex: "projectName" }, { title: "是否为属地公司推荐", dataIndex: "isLocalCompany", render: (_, record) => record.isLocalCompany === 1 ? "是" : "否" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, { title: "是否存在分包", dataIndex: "subcontractFlag", render: (_, record) => record.subcontractFlag === 1 ? "是" : "否" }, diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js index 995bafe..140c312 100644 --- a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js @@ -266,7 +266,7 @@ function Review(props) { { label: "立项时间", children: info.initiationTime }, { label: "计划开始时间", children: info.startProjectTime }, { label: "计划竣工时间", children: info.endProjectTime }, - { label: "选取形式", children: info.chooseForm }, + { label: "选取形式", children: info.chooseFormName }, { label: "是否涉及四新工作内容", children: info.fourNewFlag === 1 ? "是" : "否" }, { label: "是否涉及三人及以上工作内容", children: info.threePeopleFlag === 1 ? "是" : "否" }, { label: "是否涉及夜间作业", children: info.nightWorkFlag === 1 ? "是" : "否" }, @@ -292,7 +292,7 @@ function Review(props) { { label: "单位经营地址", children: info.corpInfo?.addressBusiness }, { label: "企业规模", children: info.corpInfo?.scaleName }, { label: "法定代表人姓名", children: info.corpInfo?.lrName }, - { label: "打定代表人电话", children: info.corpInfo?.lrMobile }, + { label: "法定代表人电话", children: info.corpInfo?.lrMobile }, { label: "主要负责人姓名", children: info.corpInfo?.contacts }, { label: "主要负责人电话", children: info.corpInfo?.contactsPhone }, { label: "成立日期", children: info.corpInfo?.createDate }, @@ -301,7 +301,7 @@ function Review(props) { { label: "注册资金(万元)", children: info.corpInfo?.regcapital }, { label: "企业类型", children: getLabelName({ list: typeList, status: info.corpInfo?.type }) }, { label: "营业执照", children: }, - { label: "营业执照有效期", children: `${info.corpInfo?.licenseStart}-${info.corpInfo?.licenseEnd}` }, + { label: "营业执照有效期", children: info.corpInfo?.licenseStart ? `${info.corpInfo?.licenseStart}-${info.corpInfo?.licenseEnd}` : "-" }, { label: "", children: "" }, ]} /> @@ -371,7 +371,7 @@ function Review(props) { />
- {info.subcontractFlag === 1 && ( + {info.subcontractFlag === 1 && info.subcontractProjectList && info.subcontractProjectList.length > 0 && (
分包项目信息详情
record.isLocalCompany === 1 ? "是" : "否" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, { title: "是否存在分包", dataIndex: "subcontractFlag", render: (_, record) => record.subcontractFlag ? "是" : "否" }, diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/Add/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/Add/index.js index a2512dd..8c1af09 100644 --- a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/Add/index.js +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/Add/index.js @@ -16,6 +16,7 @@ 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 useGetUserInfo from "zy-react-library/hooks/useGetUserInfo"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useTable from "zy-react-library/hooks/useTable"; import useUploadFile from "zy-react-library/hooks/useUploadFile"; @@ -24,18 +25,26 @@ import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal" import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace"; function Add(props) { + const { getUserInfo } = useGetUserInfo(); const query = useGetUrlQuery(); const [form] = Form.useForm(); + const [userInfo, setUserInfo] = useState({}); const [currentStep, setCurrentStep] = useState(1); const [formValues, setFormValues] = useState({}); const [projectFileAddCmdList, setProjectFileAddCmdList] = useState([]); // 项目资料 const [usercontentAddCmdList, setUsercontentAddCmdList] = useState([]); // 项目审核人员 - const [projectLocalCompanyAddCmdList, setProjectLocalCompanyAddCmdList] = useState([]); // 项目执行属地公司 + const [projectLocalCompanyAddCmdList, setProjectLocalCompanyAddCmdList] = useState([]); // 项目属地单位 const [projectApprovalUserAddCmdList, setProjectApprovalUserAddCmdList] = useState([]); // 项目审核人员 const [projectApprovalFlowAddCmdList, setProjectApprovalFlowAddCmdList] = useState([]); // 项目审核流程 + const [qualificationsTypeId, setQualificationsTypeId] = useState(); // 资质类型 const [corpinfoId, setCorpinfoId] = useState(); // 项目id const { getFile } = useGetFile(); - // 获取详情数据 + + const getCurrentUserInfo = async () => { + const userInfo = await getUserInfo(); + setUserInfo(userInfo); + }; + const getData = async () => { const { data } = await props["projectDetail"]({ id: query.id }); if (data.agreementFileUuid) { @@ -69,6 +78,7 @@ function Add(props) { }; useEffect(() => { + getCurrentUserInfo(); query.id && getData(); }, []); @@ -81,8 +91,10 @@ function Add(props) { setCurrentStep={setCurrentStep} formValues={formValues} form={form} + userInfo={userInfo} usercontentAddCmdList={usercontentAddCmdList} setUsercontentAddCmdList={setUsercontentAddCmdList} + setQualificationsTypeId={setQualificationsTypeId} /> )} {currentStep === 2 @@ -99,6 +111,7 @@ function Add(props) { projectApprovalUserAddCmdList={projectApprovalUserAddCmdList} projectApprovalFlowAddCmdList={projectApprovalFlowAddCmdList} corpinfoId={corpinfoId} + qualificationsTypeId={qualificationsTypeId} /> )} @@ -109,13 +122,20 @@ const StepOneComponent = (props) => { const form = props.form; const approvalCorpId = Form.useWatch("approvalCorpId", form); // 项目审核部门公司 const approvalDeptId = Form.useWatch("approvalDeptId", form); // 项目审核部门 - const [corpInfoList, setCorpInfoList] = useState([]); // 项目执行属地公司 + const qualificationsTypeId = Form.useWatch("qualificationsTypeId", form); + const [corpInfoList, setCorpInfoList] = useState([]); // 项目属地单位 const startProjectTime = Form.useWatch("startProjectTime", form); // 项目开始时间 - // 获取项目执行属地公司数据 + const [qualificationsTypeList, setQualificationsTypeList] = useState([]); + // 获取项目属地单位数据 const getCorpInfoList = async () => { - const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [0, 1, 2] }); + const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, inType: [0] }); setCorpInfoList(data); }; + // 获取资质类型数据 + const getQualificationsTypeList = async () => { + const { data } = await props["qualificationsTypeList"](); + setQualificationsTypeList(data); + }; const handleProjectLeaderChange = (label, extraInfo) => { if (!extraInfo.userId) return; @@ -154,6 +174,7 @@ const StepOneComponent = (props) => { }; useEffect(() => { getCorpInfoList(); + getQualificationsTypeList(); form.setFieldsValue(props.formValues); if (props.formValues.userId && props.formValues.userName) { const existingLeader = props.usercontentAddCmdList.find( @@ -179,6 +200,7 @@ const StepOneComponent = (props) => { }, [props.formValues]); return ( { { name: "projectName", label: "项目名称" }, { name: "userId", label: "项目负责人", render: ( { form.setFieldValue("userName", label); @@ -210,6 +234,15 @@ const StepOneComponent = (props) => { handleProjectLeaderChange(option.name, extraInfo); } }} + onChange={(userId) => { + if (!userId) { + // 如果清空了项目负责人,从项目人员列表中移除 + const newUserList = props.usercontentAddCmdList.filter( + item => item.projectLeader !== 1, + ); + props.setUsercontentAddCmdList(newUserList); + } + }} /> ), componentProps: { onChange: (userId) => { @@ -233,18 +266,37 @@ const StepOneComponent = (props) => { { 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", + name: "qualificationsTypeId", label: "项目类别", span: 24, wrapperCol: { span: 5 }, + items: qualificationsTypeList, + render: FORM_ITEM_RENDER_ENUM.SELECT, + itemsField: { valueKey: "qualificationsTypeId", labelKey: "qualificationsTypeName" }, + onGetLabel: (label) => { + form.setFieldValue("qualificationsTypeName", label); + }, + componentProps: { + onChange: (event) => { + if (form.getFieldValue("isLocalCompany") === 0) { + getDeptList(event); + } + props.setQualificationsTypeId(event); + form.setFieldsValue({ + recommendCorpId: "", + recommendCorpName: "", + recommendDeptId: "", + recommendDeptName: "", + recommendUserIds: [], + recommendUserNames: "", + manageDeptId: "", + manageDeptName: "", + manageUserIds: [], + manageUserNames: "", + }); + }, + }, + }, + { name: "qualificationsTypeName", label: "项目类别名称", onlyForLabel: true }, + { name: "approvalCorpId", label: "集团公司审核", labelCol: { span: 5 }, items: corpInfoList, @@ -341,6 +393,7 @@ const StepTwoComponent = (props) => { const [viewProjectReviewUserModalData, setViewProjectReviewUserModalData] = useState({}); // 查看安全人员证书列表 const { loading: getFileLoading, getFile } = useGetFile(); const [chooseFilsListModalOpen, setChooseFilsListModalOpen] = useState(false); + const [chooseFilsListModalData, 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 }); @@ -503,6 +556,7 @@ const StepTwoComponent = (props) => { icon={} onClick={() => { setChooseFilsListModalOpen(true); + setChooseFilsListModalData(projectFileList); }} > 添加已审核资质资料 @@ -631,6 +685,7 @@ const StepTwoComponent = (props) => { {uploadFileModalOpen && ( { setUploadFileModalOpen(false); }} @@ -654,7 +709,8 @@ const StepTwoComponent = (props) => { {chooseFilsListModalOpen && ( { setChooseFilsListModalOpen(false); }} @@ -668,7 +724,7 @@ const ChooseFilsComponent = (props) => { const [selectedRows, setSelectedRows] = useState([]); // 存储选中行的完整数据 const { tableProps } = useTable(props["qualificationsDetails"], { params: { - qualificationsTypeId: "", + qualificationsTypeId: props.qualificationsTypeId, }, useStorageQueryCriteria: false, }); diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/List/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/List/index.js index a6a538a..921af3b 100644 --- a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/List/index.js +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwo/List/index.js @@ -71,7 +71,7 @@ function List(props) { { title: "集团单位名称", dataIndex: "corpinfoName" }, { title: "一级项目名称", dataIndex: "parentProjectName" }, { title: "二级项目名称", dataIndex: "projectName" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "上级审核主管部门", dataIndex: "manageDeptName" }, { title: "项目类别", dataIndex: "qualificationsTypeName" }, { diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/List/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/List/index.js index 8c8cef0..ad8a86b 100644 --- a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/List/index.js +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplicationTwoManagement/List/index.js @@ -38,10 +38,10 @@ function List(props) {
record.subcontractFlag ? "是" : "否" }, { title: "二级项目数", dataIndex: "secondLevelTotal" }, - { title: "项目执行属地公司", dataIndex: "companyName" }, + { title: "项目属地单位", dataIndex: "companyName" }, { title: "项目备案审核状态", dataIndex: "projectStatus",