feat
parent
77a2b1739f
commit
907c0d3842
|
|
@ -32,8 +32,3 @@ export const deleteExpert = declareRequest(
|
||||||
"Post > @/safetyEval/qual-filing-expert/delete",
|
"Post > @/safetyEval/qual-filing-expert/delete",
|
||||||
);
|
);
|
||||||
|
|
||||||
// 审核提交
|
|
||||||
export const reviewSubmit = declareRequest(
|
|
||||||
"qualExpertSubmitLoading",
|
|
||||||
"Post > @/safetyEval/qual-filing/review",
|
|
||||||
);
|
|
||||||
|
|
@ -16,4 +16,35 @@ export const fetchQualFilingDetail = declareRequest(
|
||||||
"fetchQualFilingDetailLoading",
|
"fetchQualFilingDetailLoading",
|
||||||
"Get > /safetyEval/qual-filing/detail",
|
"Get > /safetyEval/qual-filing/detail",
|
||||||
'qualFilingDetail: {} | res.data || {}',
|
'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" },
|
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 = {
|
export const CHANGE_STATUS_MAP = {
|
||||||
stuck: { label: "停滞中", color: "error" },
|
stuck: { label: "停滞中", color: "error" },
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,15 @@ const {router}=tools;
|
||||||
|
|
||||||
|
|
||||||
const FilingDetail = (props) => {
|
const FilingDetail = (props) => {
|
||||||
const { qualReview, fetchQualFilingDetail } = props;
|
const { qualReview, fetchQualFilingDetail, fetchQualChangeDetail } = props;
|
||||||
const { fetchQualFilingDetailLoading, qualFilingDetail } = qualReview;
|
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(() => {
|
useEffect(() => {
|
||||||
fetchQualFilingDetail({
|
const action = isChange ? fetchQualChangeDetail : fetchQualFilingDetail;
|
||||||
id: router.query.id,
|
action({ id: router.query.id });
|
||||||
});
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,51 +1,28 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { 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 PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
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 { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { CHANGE_STATUS_MAP } from "~/enumerate/constant";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||||
const MOCK_DATA = [
|
import { FILING_STATUS_MAP } from "~/enumerate/constant";
|
||||||
{
|
|
||||||
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",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
const QualChange = (props) => {
|
const QualChange = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [loading, setLoading] = useState(false);
|
const { qualReview, queryQualChangePage } = props;
|
||||||
|
const { qualReviewList, qualReviewTotal, qualReviewLoading } = qualReview || {};
|
||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
setLoading(true);
|
queryQualChangePage({
|
||||||
setTimeout(() => setLoading(false), 500);
|
...router.query,
|
||||||
|
current: router.query.current || 1,
|
||||||
|
size: router.query.size || 10,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReset = (values) => {
|
const handleReset = (values) => {
|
||||||
|
|
@ -53,35 +30,34 @@ const QualChange = (props) => {
|
||||||
...router.query,
|
...router.query,
|
||||||
...values,
|
...values,
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
size: 10,
|
||||||
};
|
};
|
||||||
handleSearch();
|
handleSearch();
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.setFieldsValue(router.query);
|
form.setFieldsValue(router.query);
|
||||||
|
handleSearch();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: "序号",
|
title: "序号",
|
||||||
dataIndex: "id",
|
|
||||||
width: 60,
|
width: 60,
|
||||||
fixed: "left",
|
fixed: "left",
|
||||||
render: (text, record, index) => index + 1,
|
render: (_, __, index) => index + 1,
|
||||||
},
|
},
|
||||||
{ title: "机构名称", dataIndex: "orgName", width: 220, ellipsis: true },
|
{ title: "机构名称", dataIndex: "filingUnitName", width: 220, ellipsis: true },
|
||||||
{ title: "机构类型", dataIndex: "orgType", width: 100 },
|
{ title: "机构类型", dataIndex: "filingUnitTypeName", width: 100 },
|
||||||
{ title: "备案编号", dataIndex: "filingNo", width: 140, ellipsis: true },
|
{ title: "备案编号", dataIndex: "filingNo", width: 140, ellipsis: true },
|
||||||
{ title: "安全评价业务范围", dataIndex: "businessScope", width: 180, ellipsis: true },
|
{ title: "经营范围", dataIndex: "businessScope", width: 180, ellipsis: true },
|
||||||
{ title: "变更项", dataIndex: "changeItem", width: 140, ellipsis: true },
|
|
||||||
{
|
{
|
||||||
title: "变更状态",
|
title: "备案状态",
|
||||||
dataIndex: "changeStatus",
|
dataIndex: "filingStatusCode",
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (status) => {
|
render: (code) => {
|
||||||
const config = CHANGE_STATUS_MAP[status];
|
const config = FILING_STATUS_MAP[code];
|
||||||
return config ? <Tag color={config.color}>{config.label}</Tag> : status;
|
return config ? <Tag color={config.color}>{config.label}</Tag> : "--";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -89,16 +65,17 @@ const QualChange = (props) => {
|
||||||
width: 140,
|
width: 140,
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<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>
|
</Button>
|
||||||
{record.changeStatus !== "approved" && (
|
{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(`QualConfirmForm?id=${record.id}&mode=change`)}>
|
||||||
审核
|
确认
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</TableAction>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -108,37 +85,21 @@ const QualChange = (props) => {
|
||||||
<SearchForm
|
<SearchForm
|
||||||
style={{ marginBottom: 24 }}
|
style={{ marginBottom: 24 }}
|
||||||
form={form}
|
form={form}
|
||||||
loading={loading}
|
loading={qualReviewLoading}
|
||||||
formLine={[
|
formLine={[
|
||||||
<Form.Item key="orgName" name="orgName">
|
|
||||||
<ControlWrapper.Input label="机构名称" placeholder="请输入" allowClear />
|
|
||||||
</Form.Item>,
|
|
||||||
<Form.Item key="filingNo" name="filingNo">
|
<Form.Item key="filingNo" name="filingNo">
|
||||||
<ControlWrapper.Input label="备案编号" placeholder="请输入" allowClear />
|
<ControlWrapper.Input label="备案编号" placeholder="请输入" allowClear />
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
<Form.Item key="businessScope" name="businessScope">
|
<Form.Item key="filingStatusCode" name="filingStatusCode">
|
||||||
<ControlWrapper.Select
|
<ControlWrapper.Select
|
||||||
label="安全评价业务范围"
|
label="备案状态"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
>
|
||||||
<Select.Option value="石油加工">石油加工</Select.Option>
|
{Object.entries(FILING_STATUS_MAP).map(([code, config]) => (
|
||||||
<Select.Option value="化工">化工</Select.Option>
|
<Select.Option key={code} value={Number(code)}>{config.label}</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>
|
|
||||||
</ControlWrapper.Select>
|
</ControlWrapper.Select>
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
]}
|
]}
|
||||||
|
|
@ -148,7 +109,7 @@ const QualChange = (props) => {
|
||||||
...router.query,
|
...router.query,
|
||||||
...values,
|
...values,
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
size: 10,
|
||||||
};
|
};
|
||||||
handleSearch();
|
handleSearch();
|
||||||
}}
|
}}
|
||||||
|
|
@ -157,21 +118,21 @@ const QualChange = (props) => {
|
||||||
<Table
|
<Table
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={MOCK_DATA}
|
dataSource={qualReviewList}
|
||||||
scroll={{ y: props.scrollY }}
|
scroll={{ y: props.scrollY }}
|
||||||
loading={loading}
|
loading={qualReviewLoading}
|
||||||
pagination={{
|
pagination={{
|
||||||
total: MOCK_DATA.length,
|
total: qualReviewTotal,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showTotal: (total) => `共 ${total} 条`,
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
current: router.query.current,
|
current: router.query.current || 1,
|
||||||
pageSize: router.query.pageSize,
|
pageSize: router.query.size || 10,
|
||||||
onChange: (page, pageSize) => {
|
onChange: (page, pageSize) => {
|
||||||
router.query = {
|
router.query = {
|
||||||
...router.query,
|
...router.query,
|
||||||
current: page,
|
current: page,
|
||||||
pageSize,
|
size: pageSize,
|
||||||
};
|
};
|
||||||
handleSearch();
|
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 { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||||
import { VERIFY_STATUS_MAP } from "~/enumerate/constant";
|
import { FILING_STATUS_MAP } from "~/enumerate/constant";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ const QualConfirm = (props) => {
|
||||||
dataIndex: "filingStatusCode",
|
dataIndex: "filingStatusCode",
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (status) => {
|
render: (status) => {
|
||||||
const config = VERIFY_STATUS_MAP[status];
|
const config = FILING_STATUS_MAP[status];
|
||||||
return config ? <Tag color={config.color}>{config.label}</Tag> : "--";
|
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 type="link" size="small" onClick={() => props.history.push(`FilingDetail?id=${record.id}`)}>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
{record.filingStatusCode !== "passed" && (
|
{record.filingStatusCode == 2&& (
|
||||||
<Button type="link" size="small" onClick={() => props.history.push(`QualConfirmForm?id=${record.id}`)}>
|
<Button type="link" size="small" onClick={() => props.history.push(`QualConfirmForm?id=${record.id}`)}>
|
||||||
确认
|
确认
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useEffect } from "react";
|
||||||
import { Button, Form, Input, Select, Tag, Space, message } from "antd";
|
import { Button, Form, Input, Select, Tag, Space, message } from "antd";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
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 PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
|
|
||||||
import "./indes.less";
|
import "./indes.less";
|
||||||
|
|
@ -12,24 +12,26 @@ const { TextArea } = Input;
|
||||||
const QualConfirmForm = (props) => {
|
const QualConfirmForm = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
const { qualReview, qualExpert, fetchQualFilingDetail, reviewSubmit } = props;
|
const { qualReview, fetchQualFilingDetail, fetchQualChangeDetail, reviewSubmit, changeReviewSubmit } = props;
|
||||||
const { fetchQualFilingDetailLoading, qualFilingDetail } = qualReview || {};
|
const { fetchQualFilingDetailLoading, qualReviewSubmitLoading, qualFilingDetail } = qualReview || {};
|
||||||
const {qualExpertSubmitLoading}= qualExpert;
|
const isChange = router.query.mode === "change";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetchQualFilingDetail({ id: router.query.id });
|
const action = isChange ? fetchQualChangeDetail : fetchQualFilingDetail;
|
||||||
|
action({ id: router.query.id });
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
const REMARK_MAP = { 1: "确认通过", 3: "打回" };
|
const REMARK_MAP = { 1: "确认通过", 3: "打回" };
|
||||||
|
const submitAction = isChange ? changeReviewSubmit : reviewSubmit;
|
||||||
const params = {
|
const params = {
|
||||||
filingId: router.query.id,
|
filingId: router.query.id,
|
||||||
reviewResult: values.reviewResult,
|
reviewResult: values.reviewResult,
|
||||||
reviewResultRemark: REMARK_MAP[values.reviewResult],
|
reviewResultRemark: REMARK_MAP[values.reviewResult],
|
||||||
reviewOpinion: values.reviewOpinion,
|
reviewOpinion: values.reviewOpinion,
|
||||||
};
|
};
|
||||||
const res = await reviewSubmit(params);
|
const res = await submitAction(params);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("确认提交成功");
|
message.success("确认提交成功");
|
||||||
props.history.goBack();
|
props.history.goBack();
|
||||||
|
|
@ -97,7 +99,7 @@ const QualConfirmForm = (props) => {
|
||||||
|
|
||||||
{/* 操作按钮 */}
|
{/* 操作按钮 */}
|
||||||
<div className="footer-bar">
|
<div className="footer-bar">
|
||||||
<Button type="primary" onClick={handleSubmit} loading={ fetchQualFilingDetailLoading || qualExpertSubmitLoading}>
|
<Button type="primary" onClick={handleSubmit} loading={ fetchQualFilingDetailLoading || qualReviewSubmitLoading}>
|
||||||
提交确认
|
提交确认
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -108,6 +110,6 @@ const QualConfirmForm = (props) => {
|
||||||
|
|
||||||
|
|
||||||
export default Connect(
|
export default Connect(
|
||||||
[NS_QUAL_REVIEW, NS_QUAL_EXPERT],
|
[NS_QUAL_REVIEW],
|
||||||
true,
|
true,
|
||||||
)(QualConfirmForm);
|
)(QualConfirmForm);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect, useMemo } from "react";
|
import React, { useEffect, useMemo } from "react";
|
||||||
import { Button, Form, Input, message, Modal, Select } from "antd";
|
import { Button, Form, Input, message, Modal, Select } from "antd";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
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";
|
import { REVIEW_RESULT_OPTIONS } from "~/enumerate/constant";
|
||||||
|
|
||||||
const { TextArea } = Input;
|
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 statLabelStyle = { fontSize: "0.7rem", color: "rgba(0,0,0,0.45)" };
|
||||||
|
|
||||||
const ReviewModal = (props) => {
|
const ReviewModal = (props) => {
|
||||||
const { open, filingId, legalPassCount = 0, legalFailCount = 0, onCancel, onSuccess } = props;
|
const { open, filingId, isChange = false, legalPassCount = 0, legalFailCount = 0, onCancel, onSuccess } = props;
|
||||||
const { qualExpert, queryExpertPage, reviewSubmit } = props;
|
const { qualExpert, qualReview, queryExpertPage, reviewSubmit, changeReviewSubmit } = props;
|
||||||
const { qualExpertList, qualExpertSubmitLoading } = qualExpert || {};
|
const { qualExpertList } = qualExpert || {};
|
||||||
|
const { qualReviewSubmitLoading } = qualReview || {};
|
||||||
|
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
|
|
@ -43,6 +44,7 @@ const ReviewModal = (props) => {
|
||||||
const handleOk = async () => {
|
const handleOk = async () => {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
const selected = expertOptions.find((o) => o.value === values.filingExpertId);
|
const selected = expertOptions.find((o) => o.value === values.filingExpertId);
|
||||||
|
const submitAction = isChange ? changeReviewSubmit : reviewSubmit;
|
||||||
const params = {
|
const params = {
|
||||||
filingId,
|
filingId,
|
||||||
reviewResult: values.reviewResult,
|
reviewResult: values.reviewResult,
|
||||||
|
|
@ -51,7 +53,7 @@ const ReviewModal = (props) => {
|
||||||
filingExpertName: selected?.expert?.userName,
|
filingExpertName: selected?.expert?.userName,
|
||||||
reviewOpinion: values.reviewOpinion,
|
reviewOpinion: values.reviewOpinion,
|
||||||
};
|
};
|
||||||
const res = await reviewSubmit(params);
|
const res = await submitAction(params);
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("审核提交成功");
|
message.success("审核提交成功");
|
||||||
onCancel();
|
onCancel();
|
||||||
|
|
@ -68,7 +70,7 @@ const ReviewModal = (props) => {
|
||||||
footer={
|
footer={
|
||||||
<div style={{ display: "flex", justifyContent: "flex-end", gap: 8 }}>
|
<div style={{ display: "flex", justifyContent: "flex-end", gap: 8 }}>
|
||||||
<Button onClick={onCancel}>取消</Button>
|
<Button onClick={onCancel}>取消</Button>
|
||||||
<Button type="primary" loading={qualExpertSubmitLoading} onClick={handleOk}>
|
<Button type="primary" loading={qualReviewSubmitLoading} onClick={handleOk}>
|
||||||
提交
|
提交
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</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,11 +12,13 @@ import "./indes.less";
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
const QualReviewForm = (props) => {
|
const QualReviewForm = (props) => {
|
||||||
const { queryComplianceCheck, qualReview, fetchQualFilingDetail } = props;
|
const { queryComplianceCheck, fetchQualFilingDetail, queryChangeComplianceCheck, fetchQualChangeDetail } = props;
|
||||||
const { qualReviewLoading, complianceCheckItems, fetchQualFilingDetailLoading, qualFilingDetail } = qualReview;
|
const { qualReview, qualReviewLoading, complianceCheckItems, fetchQualFilingDetailLoading, qualFilingDetail } = qualReview;
|
||||||
|
const { router } = tools;
|
||||||
|
const isChange = router.query.mode === "change";
|
||||||
const [compliance, setCompliance] = useState({});
|
const [compliance, setCompliance] = useState({});
|
||||||
const [reviewVisible, setReviewVisible] = useState(false);
|
const [reviewVisible, setReviewVisible] = useState(false);
|
||||||
|
|
||||||
const statusConfig = REVIEW_STATUS_MAP[qualFilingDetail.filingStatusCode];
|
const statusConfig = REVIEW_STATUS_MAP[qualFilingDetail.filingStatusCode];
|
||||||
|
|
||||||
const legalPassCount = complianceCheckItems.filter(
|
const legalPassCount = complianceCheckItems.filter(
|
||||||
|
|
@ -27,8 +29,10 @@ const QualReviewForm = (props) => {
|
||||||
).length;
|
).length;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
queryComplianceCheck({id: router.query.id});
|
const complianceAction = isChange ? queryChangeComplianceCheck : queryComplianceCheck;
|
||||||
fetchQualFilingDetail({id: router.query.id});
|
const detailAction = isChange ? fetchQualChangeDetail : fetchQualFilingDetail;
|
||||||
|
complianceAction({ id: router.query.id });
|
||||||
|
detailAction({ id: router.query.id });
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -88,6 +92,7 @@ const QualReviewForm = (props) => {
|
||||||
<ReviewModal
|
<ReviewModal
|
||||||
open={reviewVisible}
|
open={reviewVisible}
|
||||||
filingId={qualFilingDetail?.id}
|
filingId={qualFilingDetail?.id}
|
||||||
|
isChange={isChange}
|
||||||
legalPassCount={legalPassCount}
|
legalPassCount={legalPassCount}
|
||||||
legalFailCount={legalFailCount}
|
legalFailCount={legalFailCount}
|
||||||
onCancel={() => setReviewVisible(false)}
|
onCancel={() => setReviewVisible(false)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue