diff --git a/src/api/qualReview/index.js b/src/api/qualReview/index.js index 6b2046c..1f83b90 100644 --- a/src/api/qualReview/index.js +++ b/src/api/qualReview/index.js @@ -127,4 +127,10 @@ export const queryOrgSelectList = declareRequest( export const fetchQualOnSiteReviewResultDetail = declareRequest( "siteReviewResultLoading", "Get > /safetyEval/qual-on-site-review/result-detail/{id}", +); + +export const queryQualOnSiteReviewOrgPage = declareRequest( + "siteReviewNoticeLoading", + "Get > /safetyEval/qual-on-site-review/org/page", + 'orgSiteReviewList: [] | res.data || [] & orgSiteReviewTotal: 0 | res.total || 0', ); \ No newline at end of file diff --git a/src/pages/Container/Layout/menuConfig.js b/src/pages/Container/Layout/menuConfig.js index 3aed2f8..221b8bc 100644 --- a/src/pages/Container/Layout/menuConfig.js +++ b/src/pages/Container/Layout/menuConfig.js @@ -177,6 +177,11 @@ const menuItems = [ label: "备案变更管理", icon: , }, + { + key: "/safetyEval/container/qualApplication/SiteReviewNotice", + label: "现场审查通知", + icon: , + }, ], }, { diff --git a/src/pages/Container/QualApplication/SiteReviewNotice/index.js b/src/pages/Container/QualApplication/SiteReviewNotice/index.js new file mode 100644 index 0000000..876e374 --- /dev/null +++ b/src/pages/Container/QualApplication/SiteReviewNotice/index.js @@ -0,0 +1,247 @@ +import React, { useState, useEffect } from "react"; +import { + Form, + Table, + Button, + Tag, + Modal, + Select, + Descriptions, + message, +} from "antd"; + +import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; +import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm"; +import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; +import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction"; +import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; +import { NS_QUAL_REVIEW } from "~/enumerate/namespace"; +import { ON_SITE_REVIEW_STATUS_MAP } from "~/enumerate/constant"; +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { tools } from "@cqsjjb/jjb-common-lib"; +import "./index.less"; + +const { router } = tools; + +const BIZ_TYPE_MAP = { + add: "新申请资质", + change: "资质变更", +}; + +const SiteReviewNotice = (props) => { + const [searchForm] = Form.useForm(); + const [detailModalVisible, setDetailModalVisible] = useState(false); + const [currentRecord, setCurrentRecord] = useState(null); + + const { + qualReview, + queryQualOnSiteReviewOrgPage, + } = props; + + const { + orgSiteReviewList = [], + orgSiteReviewTotal = 0, + siteReviewNoticeLoading, + } = qualReview || {}; + + useEffect(() => { + searchForm.setFieldsValue(router.query); + getData(); + }, []); + + const getData = () => { + queryQualOnSiteReviewPage({ + ...router.query, + }); + }; + + const queryQualOnSiteReviewPage = (params) => { + router.query = params; + queryQualOnSiteReviewOrgPage(params); + }; + + const handleSearch = (values) => { + const { reviewDateRange, ...rest } = values; + queryQualOnSiteReviewPage({ + ...router.query, + ...rest, + ...(reviewDateRange?.[0] && { reviewDateStartBegin: reviewDateRange[0].format("YYYY-MM-DD") }), + ...(reviewDateRange?.[1] && { reviewDateStartEnd: reviewDateRange[1].format("YYYY-MM-DD") }), + current: 1, + size: 10, + }); + }; + + const handleReset = (values) => { + searchForm.resetFields(); + queryQualOnSiteReviewPage({ ...values, current: 1, size: 10 }); + }; + + const handleViewDetail = (record) => { + setCurrentRecord(record); + setDetailModalVisible(true); + }; + + const handleConfirm = (record) => { + Modal.confirm({ + title: "确认现场审查安排", + content: `确定确认项目"${record.id}"的现场审查安排吗?确认后将反馈至监管端。`, + onOk: async () => { + // TODO: 调用确认接口 + message.success("现场审查安排已确认"); + getData(); + }, + }); + }; + + const columns = [ + { title: "通知编号", dataIndex: "id", width: 110 ,ellipsis: true }, + { + title: "申请事项", + dataIndex: "bizType", + width: 120, + render: (v) => BIZ_TYPE_MAP[v] || v || "-", + }, + { title: "监管部门", dataIndex: "supervisorContact", width: 130, ellipsis: true }, + { title: "现场审查时间", dataIndex: "reviewDateStart", width: 180 }, + { title: "审查地点", dataIndex: "reviewLocation", width: 180, ellipsis: true }, + { title: "审查组", dataIndex: "reviewMembers", width: 130, ellipsis: true }, + { + title: "材料准备", + dataIndex: "materialRequirements", + width: 160, + ellipsis: true, + }, + { + title: "状态", + dataIndex: "status", + width: 110, + render: (status) => { + const cfg = ON_SITE_REVIEW_STATUS_MAP[status]; + return cfg ? {cfg.label} : (status || "-"); + }, + }, + { + title: "操作", + width: 180, + fixed: "right", + render: (_, record) => ( + + + {record.status === "AGENCY_PENDING_CONFIRMATION" && ( + + )} + + ), + }, + ]; + + return ( + + + + + + , + + + 新申请资质 + 资质变更 + + , + + + , + + + {Object.entries(ON_SITE_REVIEW_STATUS_MAP).map(([value, cfg]) => ( + {cfg.label} + ))} + + , + ]} + onFinish={handleSearch} + onReset={handleReset} + /> + + `共 ${total} 条`, + current: Number(router.query.current) || 1, + pageSize: Number(router.query.size) || 10, + onChange: (page, pageSize) => { + queryQualOnSiteReviewPage({ ...router.query, current: page, size: pageSize }); + }, + }} + /> + + setDetailModalVisible(false)} + footer={null} + width={680} + destroyOnHide={true} + > + {currentRecord && ( + + {currentRecord.id} + + {BIZ_TYPE_MAP[currentRecord.bizType] || currentRecord.bizType || "-"} + + {currentRecord.supervisorContact || "-"} + {currentRecord.contactPhone || "-"} + {currentRecord.reviewDateStart || "-"} + {currentRecord.reviewLocation || "-"} + {currentRecord.reviewMembers || "-"} + {currentRecord.reviewLeader || "-"} + + + {ON_SITE_REVIEW_STATUS_MAP[currentRecord.status]?.label || currentRecord.status} + + + + {currentRecord.materialRequirements || "-"} + + + )} + + + ); +}; + +export default Connect( + [NS_QUAL_REVIEW], + true, +)(AntdTableFuncControl(SiteReviewNotice)); \ No newline at end of file diff --git a/src/pages/Container/QualApplication/SiteReviewNotice/index.less b/src/pages/Container/QualApplication/SiteReviewNotice/index.less new file mode 100644 index 0000000..e6a200b --- /dev/null +++ b/src/pages/Container/QualApplication/SiteReviewNotice/index.less @@ -0,0 +1,15 @@ +.srn { + &-search-form { + margin-bottom: 16px; + } + + &-title { + font-weight: 500; + } + + &-sub { + font-size: 12px; + color: #999; + margin-top: 2px; + } +} \ No newline at end of file diff --git a/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js b/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js index 591291e..87b92d9 100644 --- a/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js +++ b/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js @@ -246,12 +246,12 @@ const EvalProjectCreate = (props) => { - + - + @@ -259,6 +259,7 @@ const EvalProjectCreate = (props) => {