feat
parent
77a2b1739f
commit
907c0d3842
|
|
@ -32,8 +32,3 @@ export const deleteExpert = declareRequest(
|
|||
"Post > @/safetyEval/qual-filing-expert/delete",
|
||||
);
|
||||
|
||||
// 审核提交
|
||||
export const reviewSubmit = declareRequest(
|
||||
"qualExpertSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing/review",
|
||||
);
|
||||
|
|
@ -17,3 +17,34 @@ export const fetchQualFilingDetail = declareRequest(
|
|||
"Get > /safetyEval/qual-filing/detail",
|
||||
'qualFilingDetail: {} | res.data || {}',
|
||||
);
|
||||
|
||||
export const queryQualChangePage = declareRequest(
|
||||
"qualReviewLoading",
|
||||
"Get > /safetyEval/qual-filing-change/page",
|
||||
"qualReviewList: [] | res.data || [] & qualReviewTotal: 0 | res.total || 0",
|
||||
);
|
||||
|
||||
// 审核提交
|
||||
export const reviewSubmit = declareRequest(
|
||||
"qualReviewSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing/review",
|
||||
);
|
||||
|
||||
// ─── 变更模式 ───
|
||||
|
||||
export const fetchQualChangeDetail = declareRequest(
|
||||
"fetchQualFilingDetailLoading",
|
||||
"Get > /safetyEval/qual-filing-change/detail",
|
||||
'qualFilingDetail: {} | res.data || {}',
|
||||
);
|
||||
|
||||
export const queryChangeComplianceCheck = declareRequest(
|
||||
"qualReviewLoading",
|
||||
"Get > /safetyEval/qual-filing-change/compliance-check",
|
||||
'complianceCheckItems: [] | res.data || []',
|
||||
);
|
||||
|
||||
export const changeReviewSubmit = declareRequest(
|
||||
"qualReviewSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing-change/review",
|
||||
);
|
||||
|
|
@ -37,6 +37,15 @@ export const PUBLICITY_STATUS_MAP = {
|
|||
published: { label: "已公示", color: "success" },
|
||||
};
|
||||
|
||||
/** 备案状态(通用,含变更审核中、暂存) */
|
||||
export const FILING_STATUS_MAP = {
|
||||
1: { label: "已备案", color: "success" },
|
||||
2: { label: "审核中", color: "processing" },
|
||||
3: { label: "已打回", color: "error" },
|
||||
4: { label: "变更审核中", color: "processing" },
|
||||
5: { label: "暂存", color: "default" },
|
||||
};
|
||||
|
||||
/** 变更状态 */
|
||||
export const CHANGE_STATUS_MAP = {
|
||||
stuck: { label: "停滞中", color: "error" },
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@ const {router}=tools;
|
|||
|
||||
|
||||
const FilingDetail = (props) => {
|
||||
const { qualReview, fetchQualFilingDetail } = props;
|
||||
const { qualReview, fetchQualFilingDetail, fetchQualChangeDetail } = props;
|
||||
const { fetchQualFilingDetailLoading, qualFilingDetail } = qualReview;
|
||||
const isChange = router.query.mode === "change";
|
||||
|
||||
const statusConfig = REVIEW_STATUS_MAP[qualFilingDetail.reviewStatus];
|
||||
const statusConfig = REVIEW_STATUS_MAP[qualFilingDetail.filingStatusCode];
|
||||
|
||||
useEffect(() => {
|
||||
fetchQualFilingDetail({
|
||||
id: router.query.id,
|
||||
});
|
||||
const action = isChange ? fetchQualChangeDetail : fetchQualFilingDetail;
|
||||
action({ id: router.query.id });
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,51 +1,28 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import { Button, Form, Select, Space, Table, Tag } from "antd";
|
||||
import React, { useEffect } from "react";
|
||||
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 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 { tools } from "@cqsjjb/jjb-common-lib";
|
||||
import { CHANGE_STATUS_MAP } from "~/enumerate/constant";
|
||||
|
||||
const MOCK_DATA = [
|
||||
{
|
||||
id: 1,
|
||||
orgName: "重庆安评技术研究院有限公司",
|
||||
orgType: "本地机构",
|
||||
filingNo: "BA-2026-001",
|
||||
businessScope: "化工",
|
||||
changeItem: "法定代表人变更",
|
||||
changeStatus: "pending",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
orgName: "重庆恒安安全评价有限公司",
|
||||
orgType: "本地机构",
|
||||
filingNo: "BA-2025-032",
|
||||
businessScope: "化工, 建筑施工",
|
||||
changeItem: "注册地址变更",
|
||||
changeStatus: "stuck",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
orgName: "北京中安评价中心(重庆分公司)",
|
||||
orgType: "异地机构",
|
||||
filingNo: "BA-2026-015",
|
||||
businessScope: "矿山",
|
||||
changeItem: "业务范围变更",
|
||||
changeStatus: "approved",
|
||||
},
|
||||
];
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||
import { FILING_STATUS_MAP } from "~/enumerate/constant";
|
||||
|
||||
const { router } = tools;
|
||||
|
||||
const QualChange = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { qualReview, queryQualChangePage } = props;
|
||||
const { qualReviewList, qualReviewTotal, qualReviewLoading } = qualReview || {};
|
||||
|
||||
const handleSearch = () => {
|
||||
setLoading(true);
|
||||
setTimeout(() => setLoading(false), 500);
|
||||
queryQualChangePage({
|
||||
...router.query,
|
||||
current: router.query.current || 1,
|
||||
size: router.query.size || 10,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = (values) => {
|
||||
|
|
@ -53,35 +30,34 @@ const QualChange = (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: "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: "changeItem", width: 140, ellipsis: true },
|
||||
{ title: "经营范围", dataIndex: "businessScope", width: 180, ellipsis: true },
|
||||
{
|
||||
title: "变更状态",
|
||||
dataIndex: "changeStatus",
|
||||
title: "备案状态",
|
||||
dataIndex: "filingStatusCode",
|
||||
width: 100,
|
||||
render: (status) => {
|
||||
const config = CHANGE_STATUS_MAP[status];
|
||||
return config ? <Tag color={config.color}>{config.label}</Tag> : status;
|
||||
render: (code) => {
|
||||
const config = FILING_STATUS_MAP[code];
|
||||
return config ? <Tag color={config.color}>{config.label}</Tag> : "--";
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -89,16 +65,17 @@ const QualChange = (props) => {
|
|||
width: 140,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}`)}>
|
||||
<TableAction>
|
||||
<Button type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}&
|
||||
`)}>
|
||||
查看
|
||||
</Button>
|
||||
{record.changeStatus !== "approved" && (
|
||||
<Button type="link" size="small" onClick={() => props.history.push(`QualReviewForm?id=${record.id}`)}>
|
||||
审核
|
||||
{record.filingStatusCode == 2 && (
|
||||
<Button type="link" size="small" onClick={() => props.history.push(`QualConfirmForm?id=${record.id}&mode=change`)}>
|
||||
确认
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
</TableAction>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
|
@ -108,37 +85,21 @@ const QualChange = (props) => {
|
|||
<SearchForm
|
||||
style={{ marginBottom: 24 }}
|
||||
form={form}
|
||||
loading={loading}
|
||||
loading={qualReviewLoading}
|
||||
formLine={[
|
||||
<Form.Item key="orgName" name="orgName">
|
||||
<ControlWrapper.Input label="机构名称" placeholder="请输入" allowClear />
|
||||
</Form.Item>,
|
||||
<Form.Item key="filingNo" name="filingNo">
|
||||
<ControlWrapper.Input label="备案编号" placeholder="请输入" allowClear />
|
||||
</Form.Item>,
|
||||
<Form.Item key="businessScope" name="businessScope">
|
||||
<Form.Item key="filingStatusCode" name="filingStatusCode">
|
||||
<ControlWrapper.Select
|
||||
label="安全评价业务范围"
|
||||
label="备案状态"
|
||||
placeholder="请选择"
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
<Select.Option value="石油加工">石油加工</Select.Option>
|
||||
<Select.Option value="化工">化工</Select.Option>
|
||||
<Select.Option value="矿山">矿山</Select.Option>
|
||||
<Select.Option value="建筑施工">建筑施工</Select.Option>
|
||||
</ControlWrapper.Select>
|
||||
</Form.Item>,
|
||||
<Form.Item key="changeStatus" name="changeStatus">
|
||||
<ControlWrapper.Select
|
||||
label="变更状态"
|
||||
placeholder="请选择"
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
<Select.Option value="stuck">停滞中</Select.Option>
|
||||
<Select.Option value="pending">待审核</Select.Option>
|
||||
<Select.Option value="approved">已审核</Select.Option>
|
||||
{Object.entries(FILING_STATUS_MAP).map(([code, config]) => (
|
||||
<Select.Option key={code} value={Number(code)}>{config.label}</Select.Option>
|
||||
))}
|
||||
</ControlWrapper.Select>
|
||||
</Form.Item>,
|
||||
]}
|
||||
|
|
@ -148,7 +109,7 @@ const QualChange = (props) => {
|
|||
...router.query,
|
||||
...values,
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
size: 10,
|
||||
};
|
||||
handleSearch();
|
||||
}}
|
||||
|
|
@ -157,21 +118,21 @@ const QualChange = (props) => {
|
|||
<Table
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
dataSource={MOCK_DATA}
|
||||
dataSource={qualReviewList}
|
||||
scroll={{ y: props.scrollY }}
|
||||
loading={loading}
|
||||
loading={qualReviewLoading}
|
||||
pagination={{
|
||||
total: MOCK_DATA.length,
|
||||
total: qualReviewTotal,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
showTotal: (total) => `共 ${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();
|
||||
},
|
||||
|
|
@ -181,4 +142,4 @@ const QualChange = (props) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default AntdTableFuncControl(QualChange);
|
||||
export default Connect([NS_QUAL_REVIEW], true)(AntdTableFuncControl(QualChange));
|
||||
|
|
@ -8,7 +8,7 @@ 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";
|
||||
import { FILING_STATUS_MAP } from "~/enumerate/constant";
|
||||
|
||||
const { router } = tools;
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ const QualConfirm = (props) => {
|
|||
dataIndex: "filingStatusCode",
|
||||
width: 100,
|
||||
render: (status) => {
|
||||
const config = VERIFY_STATUS_MAP[status];
|
||||
const config = FILING_STATUS_MAP[status];
|
||||
return config ? <Tag color={config.color}>{config.label}</Tag> : "--";
|
||||
},
|
||||
},
|
||||
|
|
@ -69,7 +69,7 @@ const QualConfirm = (props) => {
|
|||
<Button type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}`)}>
|
||||
查看
|
||||
</Button>
|
||||
{record.filingStatusCode !== "passed" && (
|
||||
{record.filingStatusCode == 2&& (
|
||||
<Button type="link" size="small" onClick={() => props.history.push(`QualConfirmForm?id=${record.id}`)}>
|
||||
确认
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { useEffect } from "react";
|
|||
import { Button, Form, Input, Select, Tag, Space, message } from "antd";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||
import { NS_QUAL_REVIEW, NS_QUAL_EXPERT } from "~/enumerate/namespace";
|
||||
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||
|
||||
import "./indes.less";
|
||||
|
|
@ -12,24 +12,26 @@ const { TextArea } = Input;
|
|||
const QualConfirmForm = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const { router } = tools;
|
||||
const { qualReview, qualExpert, fetchQualFilingDetail, reviewSubmit } = props;
|
||||
const { fetchQualFilingDetailLoading, qualFilingDetail } = qualReview || {};
|
||||
const {qualExpertSubmitLoading}= qualExpert;
|
||||
const { qualReview, fetchQualFilingDetail, fetchQualChangeDetail, reviewSubmit, changeReviewSubmit } = props;
|
||||
const { fetchQualFilingDetailLoading, qualReviewSubmitLoading, qualFilingDetail } = qualReview || {};
|
||||
const isChange = router.query.mode === "change";
|
||||
|
||||
useEffect(() => {
|
||||
fetchQualFilingDetail({ id: router.query.id });
|
||||
const action = isChange ? fetchQualChangeDetail : fetchQualFilingDetail;
|
||||
action({ id: router.query.id });
|
||||
}, []);
|
||||
|
||||
const handleSubmit = async () => {
|
||||
const values = await form.validateFields();
|
||||
const REMARK_MAP = { 1: "确认通过", 3: "打回" };
|
||||
const submitAction = isChange ? changeReviewSubmit : reviewSubmit;
|
||||
const params = {
|
||||
filingId: router.query.id,
|
||||
reviewResult: values.reviewResult,
|
||||
reviewResultRemark: REMARK_MAP[values.reviewResult],
|
||||
reviewOpinion: values.reviewOpinion,
|
||||
};
|
||||
const res = await reviewSubmit(params);
|
||||
const res = await submitAction(params);
|
||||
if (res?.success !== false) {
|
||||
message.success("确认提交成功");
|
||||
props.history.goBack();
|
||||
|
|
@ -97,7 +99,7 @@ const QualConfirmForm = (props) => {
|
|||
|
||||
{/* 操作按钮 */}
|
||||
<div className="footer-bar">
|
||||
<Button type="primary" onClick={handleSubmit} loading={ fetchQualFilingDetailLoading || qualExpertSubmitLoading}>
|
||||
<Button type="primary" onClick={handleSubmit} loading={ fetchQualFilingDetailLoading || qualReviewSubmitLoading}>
|
||||
提交确认
|
||||
</Button>
|
||||
</div>
|
||||
|
|
@ -108,6 +110,6 @@ const QualConfirmForm = (props) => {
|
|||
|
||||
|
||||
export default Connect(
|
||||
[NS_QUAL_REVIEW, NS_QUAL_EXPERT],
|
||||
[NS_QUAL_REVIEW],
|
||||
true,
|
||||
)(QualConfirmForm);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
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 { NS_QUAL_EXPERT, NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||
import { REVIEW_RESULT_OPTIONS } from "~/enumerate/constant";
|
||||
|
||||
const { TextArea } = Input;
|
||||
|
|
@ -17,9 +17,10 @@ const statStyle = { background: "#fff", border: "1px solid #d9d9d9", borderRadiu
|
|||
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 { open, filingId, isChange = false, legalPassCount = 0, legalFailCount = 0, onCancel, onSuccess } = props;
|
||||
const { qualExpert, qualReview, queryExpertPage, reviewSubmit, changeReviewSubmit } = props;
|
||||
const { qualExpertList } = qualExpert || {};
|
||||
const { qualReviewSubmitLoading } = qualReview || {};
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
|
|
@ -43,6 +44,7 @@ const ReviewModal = (props) => {
|
|||
const handleOk = async () => {
|
||||
const values = await form.validateFields();
|
||||
const selected = expertOptions.find((o) => o.value === values.filingExpertId);
|
||||
const submitAction = isChange ? changeReviewSubmit : reviewSubmit;
|
||||
const params = {
|
||||
filingId,
|
||||
reviewResult: values.reviewResult,
|
||||
|
|
@ -51,7 +53,7 @@ const ReviewModal = (props) => {
|
|||
filingExpertName: selected?.expert?.userName,
|
||||
reviewOpinion: values.reviewOpinion,
|
||||
};
|
||||
const res = await reviewSubmit(params);
|
||||
const res = await submitAction(params);
|
||||
if (res?.success !== false) {
|
||||
message.success("审核提交成功");
|
||||
onCancel();
|
||||
|
|
@ -68,7 +70,7 @@ const ReviewModal = (props) => {
|
|||
footer={
|
||||
<div style={{ display: "flex", justifyContent: "flex-end", gap: 8 }}>
|
||||
<Button onClick={onCancel}>取消</Button>
|
||||
<Button type="primary" loading={qualExpertSubmitLoading} onClick={handleOk}>
|
||||
<Button type="primary" loading={qualReviewSubmitLoading} onClick={handleOk}>
|
||||
提交
|
||||
</Button>
|
||||
</div>
|
||||
|
|
@ -154,4 +156,4 @@ const ReviewModal = (props) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default Connect([NS_QUAL_EXPERT], true)(ReviewModal);
|
||||
export default Connect([NS_QUAL_EXPERT, NS_QUAL_REVIEW], true)(ReviewModal);
|
||||
|
|
@ -12,8 +12,10 @@ import "./indes.less";
|
|||
const { router } = tools;
|
||||
|
||||
const QualReviewForm = (props) => {
|
||||
const { queryComplianceCheck, qualReview, fetchQualFilingDetail } = props;
|
||||
const { qualReviewLoading, complianceCheckItems, fetchQualFilingDetailLoading, qualFilingDetail } = qualReview;
|
||||
const { queryComplianceCheck, fetchQualFilingDetail, queryChangeComplianceCheck, fetchQualChangeDetail } = props;
|
||||
const { qualReview, qualReviewLoading, complianceCheckItems, fetchQualFilingDetailLoading, qualFilingDetail } = qualReview;
|
||||
const { router } = tools;
|
||||
const isChange = router.query.mode === "change";
|
||||
const [compliance, setCompliance] = useState({});
|
||||
const [reviewVisible, setReviewVisible] = useState(false);
|
||||
|
||||
|
|
@ -27,8 +29,10 @@ const QualReviewForm = (props) => {
|
|||
).length;
|
||||
|
||||
useEffect(() => {
|
||||
queryComplianceCheck({id: router.query.id});
|
||||
fetchQualFilingDetail({id: router.query.id});
|
||||
const complianceAction = isChange ? queryChangeComplianceCheck : queryComplianceCheck;
|
||||
const detailAction = isChange ? fetchQualChangeDetail : fetchQualFilingDetail;
|
||||
complianceAction({ id: router.query.id });
|
||||
detailAction({ id: router.query.id });
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
@ -88,6 +92,7 @@ const QualReviewForm = (props) => {
|
|||
<ReviewModal
|
||||
open={reviewVisible}
|
||||
filingId={qualFilingDetail?.id}
|
||||
isChange={isChange}
|
||||
legalPassCount={legalPassCount}
|
||||
legalFailCount={legalFailCount}
|
||||
onCancel={() => setReviewVisible(false)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue