修改bug
parent
f5bfa06e0b
commit
93862a9903
|
|
@ -11,8 +11,7 @@ import FilingListTable from "../../FilingListTable";
|
|||
const { router } = tools;
|
||||
|
||||
function FiledManageListPage(props) {
|
||||
const { qualFiling } = props;
|
||||
const {qualFilingLoading}= qualFiling;
|
||||
|
||||
const [searchForm] = Form.useForm();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [dataSource, setDataSource] = useState([]);
|
||||
|
|
@ -58,32 +57,10 @@ function FiledManageListPage(props) {
|
|||
props.history.push(`/container/qualApplication/filingForm?mode=${FILING_FORM_MODE.FILED}`);
|
||||
};
|
||||
|
||||
const [reviewModalOpen, setReviewModalOpen] = useState(false);
|
||||
const [reviewList, setReviewList] = useState([]);
|
||||
|
||||
const handleShowReview = async (record) => {
|
||||
setReviewModalOpen(true);
|
||||
setReviewList([]);
|
||||
try {
|
||||
const res = await props.qualFilingReviewGet({ filingId: record.filingId || record.id, current: 1, size: 999 });
|
||||
setReviewList(res?.data || []);
|
||||
} catch {
|
||||
setReviewList([]);
|
||||
}
|
||||
};
|
||||
|
||||
const handleCloseReview = () => {
|
||||
setReviewModalOpen(false);
|
||||
setReviewList([]);
|
||||
};
|
||||
|
||||
const REVIEW_RESULT_MAP = { 1: "通过", 2: "待定", 3: "不通过" };
|
||||
const reviewColumns = [
|
||||
{ title: "审核结果", dataIndex: "reviewResult", width: 100, render: (v) => REVIEW_RESULT_MAP[v] || v || "-" },
|
||||
{ title: "审核结果说明", dataIndex: "reviewResultRemark", ellipsis: true },
|
||||
{ title: "审核专家", dataIndex: "filingExpertName", width: 120 },
|
||||
{ title: "综合审核意见", dataIndex: "reviewOpinion", ellipsis: true },
|
||||
];
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
@ -102,32 +79,9 @@ function FiledManageListPage(props) {
|
|||
onSearch={handleSearch}
|
||||
onPageChange={handlePageChange}
|
||||
onCreate={handleCreate}
|
||||
extraActions={(record) =>
|
||||
Number(record.filingStatusCode) === 3
|
||||
? <Button type="link" size="small" onClick={() => handleShowReview(record)}>打回原因</Button>
|
||||
: null
|
||||
}
|
||||
{...props}
|
||||
/>
|
||||
<Modal
|
||||
open={reviewModalOpen}
|
||||
title="打回原因"
|
||||
width={800}
|
||||
loading={qualFilingLoading}
|
||||
cancelText="关闭"
|
||||
okButtonProps={{ style: { display: "none" } }}
|
||||
onCancel={handleCloseReview}
|
||||
>
|
||||
{reviewList.length ? (
|
||||
<Table
|
||||
rowKey="id"
|
||||
size="small"
|
||||
bordered
|
||||
pagination={false}
|
||||
dataSource={reviewList}
|
||||
columns={reviewColumns}
|
||||
/>
|
||||
) : !qualFilingLoading ? <Empty /> : null}
|
||||
</Modal>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ function FilingApplicationListPage(props) {
|
|||
onPageChange={handlePageChange}
|
||||
onCreate={handleCreate}
|
||||
onDelete={handleDelete}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ function FilingChangeListPage(props) {
|
|||
}, []);
|
||||
|
||||
const handleSearch = (values) => {
|
||||
|
||||
router.query = { ...values, current: 1, size: 10 };
|
||||
getData();
|
||||
};
|
||||
|
|
@ -62,23 +61,11 @@ function FilingChangeListPage(props) {
|
|||
getData(pagination);
|
||||
};
|
||||
|
||||
const handleStartChange = async (record) => {
|
||||
|
||||
try {
|
||||
|
||||
props.history.push(`/container/qualApplication/filingForm?mode=change&id=${record.id}`);
|
||||
|
||||
} finally {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<FilingListTable
|
||||
PageLayout={PageLayout}
|
||||
listTitle="备案变更管理"
|
||||
|
||||
mode={FILING_FORM_MODE.CHANGE}
|
||||
showChangeCount
|
||||
dataSource={dataSource}
|
||||
|
|
@ -90,7 +77,7 @@ function FilingChangeListPage(props) {
|
|||
onSearch={handleSearch}
|
||||
onPageChange={handlePageChange}
|
||||
onChangeCountClick={(record) => setHistoryRecord(record)}
|
||||
|
||||
{...props}
|
||||
/>
|
||||
<ChangeHistoryModal
|
||||
open={!!historyRecord}
|
||||
|
|
@ -101,4 +88,7 @@ function FilingChangeListPage(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_QUAL_FILING], true)(AntdTableFuncControl(FilingChangeListPage));
|
||||
export default Connect(
|
||||
[NS_QUAL_FILING],
|
||||
true,
|
||||
)(AntdTableFuncControl(FilingChangeListPage));
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export default function EquipmentStep({
|
|||
width: 180,
|
||||
render: (_, record) => (
|
||||
<Space size="small">
|
||||
{record.calibrationReportUrl ? (
|
||||
{record.calibrationReportUrl && (
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
|
|
@ -94,17 +94,17 @@ export default function EquipmentStep({
|
|||
>
|
||||
预览
|
||||
</Button>
|
||||
) : (
|
||||
!disabled && (
|
||||
)}
|
||||
{!disabled && (
|
||||
<UploadButton
|
||||
uploadProps={{
|
||||
accept:
|
||||
".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg,.gif,.bmp,.webp",
|
||||
".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg,.bmp,.webp",
|
||||
}}
|
||||
onSuccess={(data) => onUploadCalibration?.(record, data)}
|
||||
buttonProps={{ children: "上传报告" }}
|
||||
/>
|
||||
)
|
||||
>
|
||||
{record.calibrationReportUrl ? "重新上传" : "上传报告"}
|
||||
</UploadButton>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { Button, Form, Tag, Table, Typography, Select } from "antd";
|
||||
import { Button, Form, Tag, Table, Typography, Select, Modal, Empty } from "antd";
|
||||
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 { useState } from "react";
|
||||
import {
|
||||
CHONGQING_DISTRICTS,
|
||||
QUALIFICATION_INDUSTRY_OPTIONS_MAP,
|
||||
|
|
@ -34,9 +35,13 @@ export default function FilingListTable({
|
|||
onDelete,
|
||||
extraActions,
|
||||
history,
|
||||
qualFiling,
|
||||
qualFilingReviewGet,
|
||||
}) {
|
||||
const statusOptions = getFilingStatusOptions(mode);
|
||||
|
||||
const { qualFilingLoading } = qualFiling;
|
||||
|
||||
const canEditRow = (record) => {
|
||||
if (mode === FILING_FORM_MODE.CHANGE) {
|
||||
return [1, 3, 5].includes(record.filingStatusCode);
|
||||
|
|
@ -44,6 +49,41 @@ export default function FilingListTable({
|
|||
return [3, 5].includes(record.filingStatusCode);
|
||||
};
|
||||
|
||||
const [reviewModalOpen, setReviewModalOpen] = useState(false);
|
||||
const [reviewList, setReviewList] = useState([]);
|
||||
const REVIEW_RESULT_MAP = { 1: "通过", 2: "待定", 3: "不通过" };
|
||||
const reviewColumns = [
|
||||
{
|
||||
title: "审核结果",
|
||||
dataIndex: "reviewResult",
|
||||
width: 100,
|
||||
render: (v) => REVIEW_RESULT_MAP[v] || v || "-",
|
||||
},
|
||||
{ title: "审核结果说明", dataIndex: "reviewResultRemark", ellipsis: true },
|
||||
{ title: "审核专家", dataIndex: "filingExpertName", width: 120 },
|
||||
{ title: "综合审核意见", dataIndex: "reviewOpinion", ellipsis: true },
|
||||
];
|
||||
|
||||
const handleShowReview = async (record) => {
|
||||
setReviewModalOpen(true);
|
||||
setReviewList([]);
|
||||
try {
|
||||
const res = await qualFilingReviewGet({
|
||||
filingId: record.filingId || record.id,
|
||||
current: 1,
|
||||
size: 999,
|
||||
});
|
||||
setReviewList(res?.data || []);
|
||||
} catch {
|
||||
setReviewList([]);
|
||||
}
|
||||
};
|
||||
|
||||
const handleCloseReview = () => {
|
||||
setReviewModalOpen(false);
|
||||
setReviewList([]);
|
||||
};
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: "备案属地",
|
||||
|
|
@ -122,6 +162,15 @@ export default function FilingListTable({
|
|||
查看
|
||||
</Button>
|
||||
{extraActions?.(record)}
|
||||
{Number(record.filingStatusCode) === 3 ? (
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => handleShowReview(record)}
|
||||
>
|
||||
打回原因
|
||||
</Button>
|
||||
) : null}
|
||||
{canEditRow(record) && (
|
||||
<Button
|
||||
type="link"
|
||||
|
|
@ -238,6 +287,28 @@ export default function FilingListTable({
|
|||
if (onPageChange) onPageChange(pagination);
|
||||
}}
|
||||
/>
|
||||
<Modal
|
||||
open={reviewModalOpen}
|
||||
title="打回原因"
|
||||
width={800}
|
||||
loading={qualFilingLoading}
|
||||
cancelText="关闭"
|
||||
okButtonProps={{ style: { display: "none" } }}
|
||||
onCancel={handleCloseReview}
|
||||
>
|
||||
{reviewList.length ? (
|
||||
<Table
|
||||
rowKey="id"
|
||||
size="small"
|
||||
bordered
|
||||
pagination={false}
|
||||
dataSource={reviewList}
|
||||
columns={reviewColumns}
|
||||
/>
|
||||
) : !qualFilingLoading ? (
|
||||
<Empty />
|
||||
) : null}
|
||||
</Modal>
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue