From ec8be80200af474448a2b3acd305154a9b5c2653 Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Thu, 2 Jul 2026 18:46:33 +0800 Subject: [PATCH] feat --- .api/qual-filing-review-post/spec.json | 53 ++++++ .api/qual-filing-review-post/type.d.ts | 10 ++ src/api/qualExpert/index.js | 6 + src/enumerate/constant/index.js | 7 + .../QualificationReview/FilingDetail/index.js | 5 +- .../QualificationReview/QualConfirm/index.js | 88 ++++------ .../QualConfirmForm/index.js | 68 +++----- .../QualificationReview/QualReview/index.js | 7 +- .../QualReviewForm/ReviewModal.js | 157 ++++++++++++++++++ .../QualReviewForm/index.js | 150 +---------------- 10 files changed, 306 insertions(+), 245 deletions(-) create mode 100644 .api/qual-filing-review-post/spec.json create mode 100644 .api/qual-filing-review-post/type.d.ts create mode 100644 src/pages/Container/QualificationReview/QualReviewForm/ReviewModal.js diff --git a/.api/qual-filing-review-post/spec.json b/.api/qual-filing-review-post/spec.json new file mode 100644 index 0000000..02c1595 --- /dev/null +++ b/.api/qual-filing-review-post/spec.json @@ -0,0 +1,53 @@ +{ + "openapi": "3.0.1", + "info": { "title": "审核", "version": "1.0.0" }, + "paths": { + "/qual-filing/review": { + "post": { + "summary": "审核", + "tags": ["资质备案申请管理"], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/QualFilingReviewAddCmd" } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SingleResponseVoid" } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "QualFilingReviewAddCmd": { + "type": "object", + "properties": { + "filingId": { "type": "integer", "format": "int64", "description": "备案申请id(后端Long)" }, + "reviewResult": { "type": "string", "description": "审核结果(1通过2待定3不通过)" }, + "reviewResultRemark": { "type": "string", "description": "审核结果文字描述" }, + "filingExpertId": { "type": "integer", "format": "int64", "description": "专家id(后端Long)" }, + "filingExpertName": { "type": "string", "description": "专家名称" }, + "reviewOpinion": { "type": "string", "description": "综合审核意见" } + } + }, + "SingleResponseVoid": { + "type": "object", + "properties": { + "success": { "type": "boolean", "description": "是否成功" }, + "code": { "type": "string", "description": "响应码" }, + "message": { "type": "string", "description": "响应消息" }, + "data": { "type": "null", "description": "响应数据" } + } + } + } + } +} \ No newline at end of file diff --git a/.api/qual-filing-review-post/type.d.ts b/.api/qual-filing-review-post/type.d.ts new file mode 100644 index 0000000..15605f0 --- /dev/null +++ b/.api/qual-filing-review-post/type.d.ts @@ -0,0 +1,10 @@ +/** POST /qual-filing/review — 审核 */ + +interface QualFilingReviewAddCmd { + filingId?: string; // 备案申请id(后端Long) + reviewResult?: string; // 审核结果(1通过2待定3不通过) + reviewResultRemark?: string; // 审核结果文字描述 + filingExpertId?: string; // 专家id(后端Long) + filingExpertName?: string; // 专家名称 + reviewOpinion?: string; // 综合审核意见 +} \ No newline at end of file diff --git a/src/api/qualExpert/index.js b/src/api/qualExpert/index.js index 961434f..bc048e4 100644 --- a/src/api/qualExpert/index.js +++ b/src/api/qualExpert/index.js @@ -30,4 +30,10 @@ export const modifyExpert = declareRequest( export const deleteExpert = declareRequest( "qualExpertSubmitLoading", "Post > @/safetyEval/qual-filing-expert/delete", +); + +// 审核提交 +export const reviewSubmit = declareRequest( + "qualExpertSubmitLoading", + "Post > @/safetyEval/qual-filing/review", ); \ No newline at end of file diff --git a/src/enumerate/constant/index.js b/src/enumerate/constant/index.js index 5f6e9ae..10ebc28 100644 --- a/src/enumerate/constant/index.js +++ b/src/enumerate/constant/index.js @@ -50,6 +50,13 @@ export const GENDER_OPTIONS = [ { label: "女", value: 2 }, ]; +/** 审核结果 */ +export const REVIEW_RESULT_OPTIONS = [ + { label: "通过", value: 1 }, + + { label: "不通过", value: 3 }, +]; + /** 专家等级 */ export const EXPERT_LEVEL_MAP = { 1: "一级", diff --git a/src/pages/Container/QualificationReview/FilingDetail/index.js b/src/pages/Container/QualificationReview/FilingDetail/index.js index b480f6c..9bd6849 100644 --- a/src/pages/Container/QualificationReview/FilingDetail/index.js +++ b/src/pages/Container/QualificationReview/FilingDetail/index.js @@ -5,7 +5,6 @@ import { REVIEW_STATUS_MAP } from "~/enumerate/constant"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { NS_QUAL_REVIEW } from "~/enumerate/namespace"; import { tools } from "@cqsjjb/jjb-common-lib"; -import { MOCK_DETAIL } from "../mockData"; import FilingTabs from "../FilingTabs"; const {router}=tools; @@ -15,8 +14,8 @@ const {router}=tools; const FilingDetail = (props) => { const { qualReview, fetchQualFilingDetail } = props; const { fetchQualFilingDetailLoading, qualFilingDetail } = qualReview; - const detail = MOCK_DETAIL; - const statusConfig = REVIEW_STATUS_MAP[detail.reviewStatus]; + + const statusConfig = REVIEW_STATUS_MAP[qualFilingDetail.reviewStatus]; useEffect(() => { fetchQualFilingDetail({ diff --git a/src/pages/Container/QualificationReview/QualConfirm/index.js b/src/pages/Container/QualificationReview/QualConfirm/index.js index 63cb4dc..5821c1c 100644 --- a/src/pages/Container/QualificationReview/QualConfirm/index.js +++ b/src/pages/Container/QualificationReview/QualConfirm/index.js @@ -1,48 +1,28 @@ import React, { useState, useEffect } from "react"; -import { Button, Form, Select, Space, Table, Tag } from "antd"; +import { Button, Form, Select, Table, Tag } from "antd"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm"; +import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction"; import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; import { tools } from "@cqsjjb/jjb-common-lib"; +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { NS_QUAL_REVIEW } from "~/enumerate/namespace"; import { VERIFY_STATUS_MAP } from "~/enumerate/constant"; -const MOCK_DATA = [ - { - id: 1, - orgName: "重庆恒安安全评价有限公司", - orgType: "本地机构", - certNo: "API-2025-032", - businessScope: "化工, 建筑施工", - confirmStatus: "pending", - }, - { - id: 2, - orgName: "重庆安环检测技术有限公司", - orgType: "本地机构", - certNo: "API-2025-028", - businessScope: "矿山", - confirmStatus: "passed", - }, - { - id: 3, - orgName: "上海安信评价中心(重庆办)", - orgType: "异地机构", - certNo: "API-2025-045", - businessScope: "石油加工", - confirmStatus: "rejected", - }, -]; - const { router } = tools; const QualConfirm = (props) => { const [form] = Form.useForm(); - const [loading, setLoading] = useState(false); + const { qualReview, queryReviewList } = props; + const { qualReviewList, qualReviewTotal, qualReviewLoading } = qualReview || {}; const handleSearch = () => { - setLoading(true); - setTimeout(() => setLoading(false), 500); + queryReviewList({ + ...router.query, + supervision: true, + applyTypeCode: 2, + }); }; const handleReset = (values) => { @@ -50,34 +30,34 @@ const QualConfirm = (props) => { ...router.query, ...values, current: 1, - pageSize: 10, + size: 10, }; handleSearch(); }; useEffect(() => { form.setFieldsValue(router.query); + handleSearch(); }, []); const columns = [ { title: "序号", - dataIndex: "id", width: 60, fixed: "left", - render: (text, record, index) => index + 1, + render: (_, __, index) => index + 1, }, - { title: "机构名称", dataIndex: "orgName", width: 220, ellipsis: true }, - { title: "机构类型", dataIndex: "orgType", width: 100 }, - { title: "证书编号", dataIndex: "certNo", width: 140, ellipsis: true }, + { title: "机构名称", dataIndex: "filingUnitName", width: 220, ellipsis: true }, + { title: "机构类型", dataIndex: "filingUnitTypeName", width: 100 }, + { title: "证书编号", dataIndex: "filingNo", width: 140, ellipsis: true }, { title: "安全评价业务范围", dataIndex: "businessScope", width: 180, ellipsis: true }, { title: "确认状态", - dataIndex: "confirmStatus", + dataIndex: "filingStatusCode", width: 100, render: (status) => { const config = VERIFY_STATUS_MAP[status]; - return config ? {config.label} : status; + return config ? {config.label} : "--"; }, }, { @@ -85,16 +65,16 @@ const QualConfirm = (props) => { width: 140, fixed: "right", render: (_, record) => ( - + - {record.confirmStatus !== "passed" && ( + {record.filingStatusCode !== "passed" && ( )} - + ), }, ]; @@ -104,12 +84,12 @@ const QualConfirm = (props) => { + , - + { 建筑施工 , - + { ...router.query, ...values, current: 1, - pageSize: 10, + size: 10, }; handleSearch(); }} @@ -161,21 +141,21 @@ const QualConfirm = (props) => { `共 ${total} 条`, - current: router.query.current, - pageSize: router.query.pageSize, + current: router.query.current || 1, + pageSize: router.query.size || 10, onChange: (page, pageSize) => { router.query = { ...router.query, current: page, - pageSize, + size: pageSize, }; handleSearch(); }, @@ -185,4 +165,4 @@ const QualConfirm = (props) => { ); }; -export default AntdTableFuncControl(QualConfirm); +export default Connect([NS_QUAL_REVIEW], true)(AntdTableFuncControl(QualConfirm)); \ No newline at end of file diff --git a/src/pages/Container/QualificationReview/QualConfirmForm/index.js b/src/pages/Container/QualificationReview/QualConfirmForm/index.js index 80f507d..038e88a 100644 --- a/src/pages/Container/QualificationReview/QualConfirmForm/index.js +++ b/src/pages/Container/QualificationReview/QualConfirmForm/index.js @@ -1,21 +1,27 @@ import React, { useState } from "react"; import { Button, Select, Tag, Space, Input } from "antd"; +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { NS_QUAL_REVIEW } from "~/enumerate/namespace"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; -import { MOCK_DETAIL, MOCK_MATERIALS, MOCK_PERSONNEL } from "../mockData"; + import "./indes.less"; const { TextArea } = Input; -const LIST_PATH = "./../"; - const QualConfirmForm = (props) => { const [result, setResult] = useState(undefined); const [opinion, setOpinion] = useState(""); - const detail = MOCK_DETAIL; - const totalCount = MOCK_MATERIALS.length; - const qualifiedCount = 8; // mock 符合数 - const isPersonnelMet = MOCK_PERSONNEL.length >= 25; + + const { qualReview, fetchQualFilingDetail } = props; + const { fetchQualFilingDetailLoading, qualFilingDetail } = qualReview; + + + useEffect(() => { + fetchQualFilingDetail({ + id: router.query.id, + }); + }, []); const handleSubmit = () => { console.log("确认提交:", { result, opinion }); @@ -40,15 +46,15 @@ const QualConfirmForm = (props) => {
机构名称
-
{detail.orgName}
+
{qualFilingDetail.orgName}
证书编号
-
{detail.certNo}
+
{qualFilingDetail.certNo}
业务范围
-
{detail.scopeName}
+
{qualFilingDetail.scopeName}
提交时间
@@ -57,37 +63,6 @@ const QualConfirmForm = (props) => {
- {/* 分析结果 */} -
-
分析结果
-
-
-
备案材料核验
-
{totalCount}/{totalCount}
-
全部已上传
-
-
-
材料符合性
-
{qualifiedCount}/{totalCount}
-
符合要求
-
-
-
人员配备
-
- {MOCK_PERSONNEL.length}/25 -
-
{isPersonnelMet ? "满足要求" : "不满足要求"}
-
-
- {!isPersonnelMet && ( -
- 当前备案人员{MOCK_PERSONNEL.length}人,需满足专职技术人员不少于25人的要求,建议机构补充人员后再确认。 -
- )} -
- - - {/* 确认意见 */}
确认意见
@@ -118,12 +93,17 @@ const QualConfirmForm = (props) => { {/* 操作按钮 */}
- - +
); }; -export default QualConfirmForm; + +export default Connect( + [NS_QUAL_REVIEW], + true, +)(QualConfirmForm); diff --git a/src/pages/Container/QualificationReview/QualReview/index.js b/src/pages/Container/QualificationReview/QualReview/index.js index ff71d50..276cc68 100644 --- a/src/pages/Container/QualificationReview/QualReview/index.js +++ b/src/pages/Container/QualificationReview/QualReview/index.js @@ -25,6 +25,7 @@ const QualReview = (props) => { queryReviewList({ ...router.query, supervision: true, + applyTypeCode: 1, }); }; @@ -175,12 +176,12 @@ const QualReview = (props) => { showQuickJumper: true, showTotal: (total) => `共 ${total} 条`, current: router.query.current || 1, - size: router.query.size || 10, - onChange: (page, size) => { + pageSize: router.query.size || 10, + onChange: (page, pageSize) => { router.query = { ...router.query, current: page, - size, + size: pageSize, }; handleSearch(); }, diff --git a/src/pages/Container/QualificationReview/QualReviewForm/ReviewModal.js b/src/pages/Container/QualificationReview/QualReviewForm/ReviewModal.js new file mode 100644 index 0000000..26a743a --- /dev/null +++ b/src/pages/Container/QualificationReview/QualReviewForm/ReviewModal.js @@ -0,0 +1,157 @@ +import React, { useEffect, useMemo } from "react"; +import { Button, Form, Input, message, Modal, Select } from "antd"; +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { NS_QUAL_EXPERT } from "~/enumerate/namespace"; +import { REVIEW_RESULT_OPTIONS } from "~/enumerate/constant"; + +const { TextArea } = Input; + +/** + * 审核操作弹窗 + * @param {boolean} open + * @param {string|number} filingId - 备案申请ID + * @param {function} onCancel + * @param {function} onSuccess - 审核成功后回调(刷新列表等) + */ +const statStyle = { background: "#fff", border: "1px solid #d9d9d9", borderRadius: 6, padding: "0.4rem", textAlign: "center" }; +const statLabelStyle = { fontSize: "0.7rem", color: "rgba(0,0,0,0.45)" }; + +const ReviewModal = (props) => { + const { open, filingId, legalPassCount = 0, legalFailCount = 0, onCancel, onSuccess } = props; + const { qualExpert, queryExpertPage, reviewSubmit } = props; + const { qualExpertList, qualExpertSubmitLoading } = qualExpert || {}; + + const [form] = Form.useForm(); + + useEffect(() => { + if (open) { + form.resetFields(); + queryExpertPage({ current: 1, size: 100 }); + } + }, [open]); + + const expertOptions = useMemo( + () => + (qualExpertList || []).map((item) => ({ + label: `${item.userName}${item.certificate ? `(${item.certificate})` : ""}`, + value: item.id, + expert: item, + })), + [qualExpertList], + ); + + const handleOk = async () => { + const values = await form.validateFields(); + const selected = expertOptions.find((o) => o.value === values.filingExpertId); + const params = { + filingId, + reviewResult: values.reviewResult, + reviewResultRemark: REVIEW_RESULT_OPTIONS.find((r) => r.value === values.reviewResult)?.label, + filingExpertId: values.filingExpertId, + filingExpertName: selected?.expert?.userName, + reviewOpinion: values.reviewOpinion, + }; + const res = await reviewSubmit(params); + if (res?.success !== false) { + message.success("审核提交成功"); + onCancel(); + onSuccess?.(); + } + }; + + return ( + + + + + } + > +
+
+ 评价分析 +
+
+
+
已核验材料
+
+ {legalPassCount + legalFailCount} +
+
+
+
符合
+
+ {legalPassCount} +
+
+
+
不符合
+
+ {legalFailCount} +
+
+
+
+ +
+ + + + + +