修改bug

dev
tangjie 2026-07-15 17:41:16 +08:00
parent f5bfa06e0b
commit 93862a9903
5 changed files with 91 additions and 75 deletions

View File

@ -11,8 +11,7 @@ import FilingListTable from "../../FilingListTable";
const { router } = tools; const { router } = tools;
function FiledManageListPage(props) { function FiledManageListPage(props) {
const { qualFiling } = props;
const {qualFilingLoading}= qualFiling;
const [searchForm] = Form.useForm(); const [searchForm] = Form.useForm();
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [dataSource, setDataSource] = useState([]); const [dataSource, setDataSource] = useState([]);
@ -58,32 +57,10 @@ function FiledManageListPage(props) {
props.history.push(`/container/qualApplication/filingForm?mode=${FILING_FORM_MODE.FILED}`); 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 ( return (
<> <>
@ -102,32 +79,9 @@ function FiledManageListPage(props) {
onSearch={handleSearch} onSearch={handleSearch}
onPageChange={handlePageChange} onPageChange={handlePageChange}
onCreate={handleCreate} onCreate={handleCreate}
extraActions={(record) => {...props}
Number(record.filingStatusCode) === 3
? <Button type="link" size="small" onClick={() => handleShowReview(record)}>打回原因</Button>
: null
}
/> />
<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>
</> </>
); );
} }

View File

@ -99,6 +99,7 @@ function FilingApplicationListPage(props) {
onPageChange={handlePageChange} onPageChange={handlePageChange}
onCreate={handleCreate} onCreate={handleCreate}
onDelete={handleDelete} onDelete={handleDelete}
{...props}
/> />
); );
} }

View File

@ -48,7 +48,6 @@ function FilingChangeListPage(props) {
}, []); }, []);
const handleSearch = (values) => { const handleSearch = (values) => {
router.query = { ...values, current: 1, size: 10 }; router.query = { ...values, current: 1, size: 10 };
getData(); getData();
}; };
@ -62,23 +61,11 @@ function FilingChangeListPage(props) {
getData(pagination); getData(pagination);
}; };
const handleStartChange = async (record) => {
try {
props.history.push(`/container/qualApplication/filingForm?mode=change&id=${record.id}`);
} finally {
}
};
return ( return (
<> <>
<FilingListTable <FilingListTable
PageLayout={PageLayout} PageLayout={PageLayout}
listTitle="备案变更管理" listTitle="备案变更管理"
mode={FILING_FORM_MODE.CHANGE} mode={FILING_FORM_MODE.CHANGE}
showChangeCount showChangeCount
dataSource={dataSource} dataSource={dataSource}
@ -90,7 +77,7 @@ function FilingChangeListPage(props) {
onSearch={handleSearch} onSearch={handleSearch}
onPageChange={handlePageChange} onPageChange={handlePageChange}
onChangeCountClick={(record) => setHistoryRecord(record)} onChangeCountClick={(record) => setHistoryRecord(record)}
{...props}
/> />
<ChangeHistoryModal <ChangeHistoryModal
open={!!historyRecord} 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));

View File

@ -80,7 +80,7 @@ export default function EquipmentStep({
width: 180, width: 180,
render: (_, record) => ( render: (_, record) => (
<Space size="small"> <Space size="small">
{record.calibrationReportUrl ? ( {record.calibrationReportUrl && (
<Button <Button
type="link" type="link"
size="small" size="small"
@ -94,18 +94,18 @@ export default function EquipmentStep({
> >
预览 预览
</Button> </Button>
) : ( )}
!disabled && ( {!disabled && (
<UploadButton <UploadButton
uploadProps={{ uploadProps={{
accept: 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)} onSuccess={(data) => onUploadCalibration?.(record, data)}
buttonProps={{ children: "上传报告" }} >
/> {record.calibrationReportUrl ? "重新上传" : "上传报告"}
) </UploadButton>
)} )}
</Space> </Space>
), ),
}, },

View File

@ -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 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 TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
import { useState } from "react";
import { import {
CHONGQING_DISTRICTS, CHONGQING_DISTRICTS,
QUALIFICATION_INDUSTRY_OPTIONS_MAP, QUALIFICATION_INDUSTRY_OPTIONS_MAP,
@ -34,9 +35,13 @@ export default function FilingListTable({
onDelete, onDelete,
extraActions, extraActions,
history, history,
qualFiling,
qualFilingReviewGet,
}) { }) {
const statusOptions = getFilingStatusOptions(mode); const statusOptions = getFilingStatusOptions(mode);
const { qualFilingLoading } = qualFiling;
const canEditRow = (record) => { const canEditRow = (record) => {
if (mode === FILING_FORM_MODE.CHANGE) { if (mode === FILING_FORM_MODE.CHANGE) {
return [1, 3, 5].includes(record.filingStatusCode); return [1, 3, 5].includes(record.filingStatusCode);
@ -44,6 +49,41 @@ export default function FilingListTable({
return [3, 5].includes(record.filingStatusCode); 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 = [ const columns = [
{ {
title: "备案属地", title: "备案属地",
@ -122,6 +162,15 @@ export default function FilingListTable({
查看 查看
</Button> </Button>
{extraActions?.(record)} {extraActions?.(record)}
{Number(record.filingStatusCode) === 3 ? (
<Button
type="link"
size="small"
onClick={() => handleShowReview(record)}
>
打回原因
</Button>
) : null}
{canEditRow(record) && ( {canEditRow(record) && (
<Button <Button
type="link" type="link"
@ -238,6 +287,28 @@ export default function FilingListTable({
if (onPageChange) onPageChange(pagination); 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> </PageLayout>
); );
} }