huwei 2026-07-08 11:21:53 +08:00
commit 61ec803e88
4 changed files with 215 additions and 78 deletions

View File

@ -21,7 +21,8 @@ const { router } = tools;
const ExpertVerification = (props) => {
const [form] = Form.useForm();
const { qualReview, queryReviewList } = props;
const { qualReviewList, qualReviewTotal, qualReviewLoading } = qualReview || {};
const { qualReviewList, qualReviewTotal, qualReviewLoading } =
qualReview || {};
const handleSearch = () => {
queryReviewList({
@ -53,10 +54,20 @@ const ExpertVerification = (props) => {
fixed: "left",
render: (_, __, index) => index + 1,
},
{ title: "机构名称", dataIndex: "filingUnitName", width: 220, 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: "businessScope",
width: 180,
ellipsis: true,
},
{
title: "确认状态",
dataIndex: "filingStatusCode",
@ -73,11 +84,21 @@ const ExpertVerification = (props) => {
fixed: "right",
render: (_, record) => (
<TableAction>
<Button type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}`)}>
<Button
type="link"
size="small"
// onClick={() => props.history.push(`FilingDetail?id=${record.id}`)}
>
查看
</Button>
{record.filingStatusCode === 2 && (
<Button type="link" size="small" onClick={() => props.history.push(`QualReviewForm?id=${record.id}`)}>
<Button
type="link"
size="small"
// onClick={() =>
// props.history.push(`QualReviewForm?id=${record.id}`)
// }
>
核验
</Button>
)}
@ -94,7 +115,11 @@ const ExpertVerification = (props) => {
loading={qualReviewLoading}
formLine={[
<Form.Item key="filingUnitName" name="filingUnitName">
<ControlWrapper.Input label="机构名称" placeholder="请输入" allowClear />
<ControlWrapper.Input
label="机构名称"
placeholder="请输入"
allowClear
/>
</Form.Item>,
<Form.Item key="filingUnitTypeName" name="filingUnitTypeName">
<ControlWrapper.Select
@ -168,4 +193,7 @@ const ExpertVerification = (props) => {
);
};
export default Connect([NS_QUAL_REVIEW], true)(AntdTableFuncControl(ExpertVerification));
export default Connect(
[NS_QUAL_REVIEW],
true,
)(AntdTableFuncControl(ExpertVerification));

View File

@ -1,5 +1,15 @@
import React, { useState, useEffect } from "react";
import { Button, Form, Select, Space, Table, Tag, Modal, Input, DatePicker } from "antd";
import {
Button,
Form,
Select,
Space,
Table,
Tag,
Modal,
Input,
DatePicker,
} 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";
@ -58,7 +68,7 @@ const QualPublicity = (props) => {
setPublicityTarget(record);
setPublicityDept(undefined);
setPublicityContent(
"依据《安全评价机构管理规定》等相关法规,经审核,该机构符合安全评价机构资质条件,现予以公示,接受社会监督。"
"依据《安全评价机构管理规定》等相关法规,经审核,该机构符合安全评价机构资质条件,现予以公示,接受社会监督。",
);
setPublicityStartDate(null);
setPublicityEndDate(null);
@ -106,7 +116,12 @@ const QualPublicity = (props) => {
{ title: "机构名称", dataIndex: "orgName", width: 220, ellipsis: true },
{ title: "机构类型", dataIndex: "orgType", width: 100 },
{ title: "证书编号", dataIndex: "certNo", width: 140, ellipsis: true },
{ title: "安全评价业务范围", dataIndex: "businessScope", width: 180, ellipsis: true },
{
title: "安全评价业务范围",
dataIndex: "businessScope",
width: 180,
ellipsis: true,
},
{ title: "审核部门", dataIndex: "reviewDept", width: 120, ellipsis: true },
{ title: "审核通过时间", dataIndex: "reviewTime", width: 120 },
{
@ -124,11 +139,21 @@ const QualPublicity = (props) => {
fixed: "right",
render: (_, record) => (
<Space>
<Button type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}`)}>
<Button
type="link"
size="small"
onClick={() => {
// props.history.push(`FilingDetail?id=${record.id}`)
}}
>
查看
</Button>
{record.status === "pending" && (
<Button type="link" size="small" onClick={() => openPublicity(record)}>
<Button
type="link"
size="small"
onClick={() => openPublicity(record)}
>
公示
</Button>
)}
@ -148,7 +173,11 @@ const QualPublicity = (props) => {
loading={loading}
formLine={[
<Form.Item key="orgName" name="orgName">
<ControlWrapper.Input label="机构名称" placeholder="请输入" allowClear />
<ControlWrapper.Input
label="机构名称"
placeholder="请输入"
allowClear
/>
</Form.Item>,
<Form.Item key="orgType" name="orgType">
<ControlWrapper.Select
@ -230,7 +259,9 @@ const QualPublicity = (props) => {
footer={
<div style={{ display: "flex", justifyContent: "flex-end", gap: 8 }}>
<Button onClick={() => setPublicityVisible(false)}>取消</Button>
<Button type="primary" onClick={handlePublicitySubmit}>提交公示</Button>
<Button type="primary" onClick={handlePublicitySubmit}>
提交公示
</Button>
</div>
}
>
@ -240,7 +271,9 @@ const QualPublicity = (props) => {
</div>
<div>
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>机构名称</div>
<div style={{ fontSize: "0.88rem", fontWeight: 500 }}>{publicityTarget?.orgName || "—"}</div>
<div style={{ fontSize: "0.88rem", fontWeight: 500 }}>
{publicityTarget?.orgName || "—"}
</div>
</div>
<div>
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>公示部门</div>
@ -263,9 +296,17 @@ const QualPublicity = (props) => {
onChange={(e) => setPublicityContent(e.target.value)}
/>
</div>
<div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: "0.5rem" }}>
<div
style={{
display: "grid",
gridTemplateColumns: "1fr 1fr",
gap: "0.5rem",
}}
>
<div>
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>公示开始时间</div>
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>
公示开始时间
</div>
<DatePicker
style={{ width: "100%" }}
placeholder="请选择"
@ -274,7 +315,9 @@ const QualPublicity = (props) => {
/>
</div>
<div>
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>公示结束时间</div>
<div style={{ fontSize: "0.8rem", marginBottom: 4 }}>
公示结束时间
</div>
<DatePicker
style={{ width: "100%" }}
placeholder="请选择"

View File

@ -1,10 +1,9 @@
import { Button, Card, Col, Descriptions, Form, Modal, Row, Statistic, Tag } from "antd";
import { Button, Card, Col, Descriptions, Form, Modal, Row, Statistic, Table, Tag } from "antd";
import { useEffect, useState } from "react";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import Search from "zy-react-library/components/Search";
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 SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
import { CHONGQING_DISTRICTS } from "~/enumerate/enterpriseOptions";
import {
ACCOUNT_SOURCE_OPTIONS,
@ -24,16 +23,36 @@ const SCORE_RING_COLOR = {
"C级": "#faad14",
};
function EnterprisePortraitPage() {
function EnterprisePortraitPage(props) {
const [searchForm] = Form.useForm();
const [viewOpen, setViewOpen] = useState(false);
const [detail, setDetail] = useState(null);
const [detailLoading, setDetailLoading] = useState(false);
const [dataSource, setDataSource] = useState([]);
const [total, setTotal] = useState(0);
const [loading, setLoading] = useState(false);
const [pageIndex, setPageIndex] = useState(1);
const [pageSize, setPageSize] = useState(10);
const { tableProps, getData } = useTable(queryEnterprisePortraitPage, { form: searchForm });
const fetchData = async (page = 1, size = 10) => {
setLoading(true);
try {
const formData = searchForm.getFieldsValue();
const res = await queryEnterprisePortraitPage({ ...formData, pageIndex: page, pageSize: size });
setDataSource(res?.data || []);
setTotal(res?.totalCount || 0);
}
catch {
setDataSource([]);
setTotal(0);
}
finally {
setLoading(false);
}
};
useEffect(() => {
getData();
fetchData();
}, []);
const openProfile = async (id) => {
@ -60,27 +79,41 @@ function EnterprisePortraitPage() {
</div>
}
>
<Search
<SearchForm
form={searchForm}
options={[
{ name: "enterpriseName", label: "企业名称", placeholder: "关键字搜索" },
{
name: "district",
label: "属地",
render: FORM_ITEM_RENDER_ENUM.SELECT,
options: CHONGQING_DISTRICTS,
},
{
name: "accountSource",
label: "开户来源",
render: FORM_ITEM_RENDER_ENUM.SELECT,
options: ACCOUNT_SOURCE_OPTIONS,
},
loading={loading}
formLine={[
<Form.Item key="enterpriseName" name="enterpriseName">
<ControlWrapper.Input label="企业名称" allowClear placeholder="关键字搜索" />
</Form.Item>,
<Form.Item key="district" name="district">
<ControlWrapper.Select label="属地" allowClear placeholder="请选择" options={CHONGQING_DISTRICTS} />
</Form.Item>,
<Form.Item key="accountSource" name="accountSource">
<ControlWrapper.Select label="开户来源" allowClear placeholder="请选择" options={ACCOUNT_SOURCE_OPTIONS} />
</Form.Item>,
]}
onFinish={getData}
onFinish={() => fetchData(1, 10)}
style={{
marginBottom: '16px'
}}
/>
<Table
{...tableProps}
dataSource={dataSource}
loading={loading}
pagination={{
current: pageIndex,
pageSize,
total,
showSizeChanger: true,
showTotal: (t) => `${t}`,
}}
onChange={(pag) => {
setPageIndex(pag.current);
setPageSize(pag.pageSize);
fetchData(pag.current, pag.pageSize);
}}
scroll={{ y: props.scrollY }}
columns={[
{ title: "企业名称", dataIndex: "enterpriseName", ellipsis: true },
{ title: "项目按时完成", dataIndex: "projectOnTime", width: 120 },
@ -206,4 +239,4 @@ function EnterprisePortraitPage() {
);
}
export default EnterprisePortraitPage;
export default AntdTableFuncControl(EnterprisePortraitPage);

View File

@ -1,10 +1,10 @@
import { Button, Descriptions, Form, Modal, Table, Tag, Tooltip } from "antd";
import { Button, Descriptions, Form, Modal, Tag, Tooltip, Table } from "antd";
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
import { useEffect, useState } from "react";
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import Search from "zy-react-library/components/Search";
import TableList 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 SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
import { getEvaluatorDetail, queryEvaluatorPage } from "~/mock/regulator/basicInfo";
const YES_NO_OPTIONS = [
@ -23,17 +23,37 @@ const CERT_STATUS_COLOR = {
expired: "error",
};
function EvaluatorInfoPage() {
function EvaluatorInfoPage(props) {
const [searchForm] = Form.useForm();
const [viewOpen, setViewOpen] = useState(false);
const [detail, setDetail] = useState(null);
const [detailLoading, setDetailLoading] = useState(false);
const [certPreview, setCertPreview] = useState(null);
const [dataSource, setDataSource] = useState([]);
const [total, setTotal] = useState(0);
const [loading, setLoading] = useState(false);
const [pageIndex, setPageIndex] = useState(1);
const [pageSize, setPageSize] = useState(10);
const { tableProps, getData } = useTable(queryEvaluatorPage, { form: searchForm });
const fetchData = async (page = 1, size = 10) => {
setLoading(true);
try {
const formData = searchForm.getFieldsValue();
const res = await queryEvaluatorPage({ ...formData, pageIndex: page, pageSize: size });
setDataSource(res?.data || []);
setTotal(res?.totalCount || 0);
}
catch {
setDataSource([]);
setTotal(0);
}
finally {
setLoading(false);
}
};
useEffect(() => {
getData();
fetchData();
}, []);
const openDetail = async (id) => {
@ -61,34 +81,47 @@ function EvaluatorInfoPage() {
</div>
}
>
<Search
<SearchForm
form={searchForm}
options={[
{ name: "evaluatorName", label: "评价师名称", placeholder: "关键字搜索" },
{ name: "orgName", label: "机构名称", placeholder: "关键字搜索" },
{
name: "employmentStatus",
label: "是否在职",
render: FORM_ITEM_RENDER_ENUM.SELECT,
options: YES_NO_OPTIONS,
},
{
name: "registerEngineerFlag",
label: "是否注册安全工程师",
render: FORM_ITEM_RENDER_ENUM.SELECT,
options: YES_NO_OPTIONS,
},
{
name: "status",
label: "状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
options: STATUS_OPTIONS,
},
loading={loading}
formLine={[
<Form.Item key="evaluatorName" name="evaluatorName">
<ControlWrapper.Input label="评价师名称" allowClear placeholder="关键字搜索" />
</Form.Item>,
<Form.Item key="orgName" name="orgName">
<ControlWrapper.Input label="机构名称" allowClear placeholder="关键字搜索" />
</Form.Item>,
<Form.Item key="employmentStatus" name="employmentStatus">
<ControlWrapper.Select label="是否在职" allowClear placeholder="请选择" options={YES_NO_OPTIONS} />
</Form.Item>,
<Form.Item key="registerEngineerFlag" name="registerEngineerFlag">
<ControlWrapper.Select label="是否注册安全工程师" allowClear placeholder="请选择" options={YES_NO_OPTIONS} />
</Form.Item>,
<Form.Item key="status" name="status">
<ControlWrapper.Select label="状态" allowClear placeholder="请选择" options={STATUS_OPTIONS} />
</Form.Item>,
]}
onFinish={getData}
onFinish={() => fetchData(1, 10)}
style={{
marginBottom: '16px'
}}
/>
<TableList
{...tableProps}
<Table
dataSource={dataSource}
loading={loading}
pagination={{
current: pageIndex,
pageSize,
total,
showSizeChanger: true,
showTotal: (t) => `${t}`,
}}
onChange={(pag) => {
setPageIndex(pag.current);
setPageSize(pag.pageSize);
fetchData(pag.current, pag.pageSize);
}}
scroll={{ y: props.scrollY }}
columns={[
{ title: "机构名称", dataIndex: "orgName", ellipsis: true },
{ title: "评价师名称", dataIndex: "evaluatorName", width: 120 },
@ -209,4 +242,4 @@ function EvaluatorInfoPage() {
);
}
export default EvaluatorInfoPage;
export default AntdTableFuncControl(EvaluatorInfoPage);