From a56ebe2948f42afe46887c8233f722d9e601067e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=99=AF=E5=AD=A6?= <5412262+sun_jing_xue@user.noreply.gitee.com> Date: Tue, 12 Aug 2025 16:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=B8=8E=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../category/CategoryLibraryReview/index.tsx | 2 +- .../groupQualifiedSupplierQuery/index.tsx | 6 +-- .../mySupplierInquiry/index.tsx | 47 +++++++++++-------- .../personQualifiedSupplierQuery/index.tsx | 6 +-- .../registrationQuery/index.tsx | 6 +-- .../blacklistAudit/index.tsx | 4 +- 6 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/pages/supplier/category/CategoryLibraryReview/index.tsx b/src/pages/supplier/category/CategoryLibraryReview/index.tsx index 56f3d0b..497b6d1 100644 --- a/src/pages/supplier/category/CategoryLibraryReview/index.tsx +++ b/src/pages/supplier/category/CategoryLibraryReview/index.tsx @@ -75,7 +75,7 @@ const CategoryLibraryManage: React.FC = () => { const res = await approval({ id }); if (res.code === 200) { message.success('提交成功'); - getList(); // 刷新列表 + getList(1, pagination.pageSize || 10); } }, }); diff --git a/src/pages/supplier/informationRetrieval/groupQualifiedSupplierQuery/index.tsx b/src/pages/supplier/informationRetrieval/groupQualifiedSupplierQuery/index.tsx index 36557f1..a67caa0 100644 --- a/src/pages/supplier/informationRetrieval/groupQualifiedSupplierQuery/index.tsx +++ b/src/pages/supplier/informationRetrieval/groupQualifiedSupplierQuery/index.tsx @@ -40,17 +40,17 @@ const groupQualifiedSupplierQuery: React.FC = ({ dispatch }) => { // 查询 const handleSearch = () => { setPagination(p => ({ ...p, current: 1 })); - getList(selectedKeys ? selectedKeys : currentUser.organizationId); + getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize); }; const handleReset = () => { form.resetFields(); setPagination(p => ({ ...p, current: 1 })); - getList(selectedKeys ? selectedKeys : currentUser.organizationId); + getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize); }; const handleTreeSelect = (keys: string | number) => { const key = keys as string; setSelectedKeys(key); - getList(key); + getList(key,1, pagination.pageSize); }; diff --git a/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx b/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx index 4313614..42d3c87 100644 --- a/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx +++ b/src/pages/supplier/informationRetrieval/mySupplierInquiry/index.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; //第三方UI库/组件 -import { Form, Button, Table, Input, Space, Tooltip } from 'antd'; +import { Form, Button, Table, Input, Space, Tooltip, Select } from 'antd'; import { SearchOutlined, DeleteOutlined } from '@ant-design/icons'; //类型定义 import type { ColumnsType, TablePaginationConfig } from 'antd/es/table'; @@ -11,14 +11,24 @@ import { connect } from 'umi'; // import SupplierDetailModal from './components/SupplierDetailModal'; import CategorySelector from '@/components/TreeCategorySelector'; import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect' -import AccessStatusSelect from '@/components/CommonSelect/AccessStatusSelect' //本地服务/接口 import { getPageMy } from './services'; import { downloadFile } from '@/utils/download'; import { getDictList } from '@/servers/api/dicts' //统一列表分页 import tableProps from '@/utils/tableProps' +const accessStatusType = [ + { code: '0', dicName: '未准入' }, + { code: '1', dicName: '已准入' }, + { code: '2', dicName: '已退出' } +] +//准入状态 +const statusColor = (status: string) => { + if (status === '已驳回' || status === '已退出') return '#ef6969'; + if (status === '已准入') return '#004f8e'; + return undefined; +}; // 列表数据接口 interface Data { id: number; @@ -54,13 +64,13 @@ const mySupplierInquiry: React.FC = ({ dispatch }) => { // 查询 const handleSearch = () => { setPagination({ ...pagination, current: 1 }); - getList(); + getList(1, pagination.pageSize); }; // 重置 const handleReset = () => { form.resetFields(); setPagination({ ...pagination, current: 1 }); - getList(); + getList(1, pagination.pageSize); }; //列表方法 const getList = async (pageNo: number = 1, pageSize: number = 10) => { @@ -79,7 +89,6 @@ const mySupplierInquiry: React.FC = ({ dispatch }) => { } }; const [enterpriseTypeMap, setEnterpriseTypeMap] = useState<{ [code: string]: string }>({}); - const [approveTypeMap, setApproveTypeMap] = useState<{ [code: string]: string }>({}); // 初始化 useEffect(() => { getDictList('enterprise_type').then((res: any) => { @@ -92,15 +101,6 @@ const mySupplierInquiry: React.FC = ({ dispatch }) => { setEnterpriseTypeMap(map); } }) - getDictList('approve_type').then((res) => { - if (res.code == 200) { - const map: { [code: string]: string } = {}; - res.data.forEach((item: { code: string, dicName: string }) => { - map[item.code] = item.dicName; - }); - setApproveTypeMap(map); - } - }) getList(); }, []); @@ -184,11 +184,14 @@ const mySupplierInquiry: React.FC = ({ dispatch }) => { }, { title: '准入状态', - dataIndex: 'accessStatus', - key: 'accessStatus', + dataIndex: 'accessStatusCn', + key: 'accessStatusCn', + width: 160, align: 'center', - width: 140, - render: (code: string) => approveTypeMap[code] || code + render: (val: string) => + {val} }, { title: '操作', @@ -232,7 +235,11 @@ const mySupplierInquiry: React.FC = ({ dispatch }) => { - + @@ -260,7 +267,7 @@ const mySupplierInquiry: React.FC = ({ dispatch }) => { pagination={{ ...tableProps.pagination, total: pagination.total }} onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)} style={{ flex: 1, minHeight: 0 }} - scroll={{ y: 'calc(100vh - 350px)' }} + scroll={{ y: 'calc(100vh - 380px)' }} /> {/* 查看组件 diff --git a/src/pages/supplier/informationRetrieval/personQualifiedSupplierQuery/index.tsx b/src/pages/supplier/informationRetrieval/personQualifiedSupplierQuery/index.tsx index 92a944f..db1db44 100644 --- a/src/pages/supplier/informationRetrieval/personQualifiedSupplierQuery/index.tsx +++ b/src/pages/supplier/informationRetrieval/personQualifiedSupplierQuery/index.tsx @@ -43,18 +43,18 @@ const PersonQualifiedSupplierQuery: React.FC = ({ dispatch }) => { // 查询 const handleSearch = () => { setPagination(p => ({ ...p, current: 1 })); - getList(selectedKeys ? selectedKeys : currentUser.organizationId); + getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize); }; const handleReset = () => { form.resetFields(); setPagination(p => ({ ...p, current: 1 })); - getList(selectedKeys ? selectedKeys : currentUser.organizationId); + getList(selectedKeys ? selectedKeys : currentUser.organizationId, 1, pagination.pageSize); }; const handleTreeSelect = (keys: string | number) => { const key = keys as string; setSelectedKeys(key); - getList(key); + getList(key, 1, pagination.pageSize); }; const getList = async (orgId: string, pageNo: number = 1, pageSize: number = 10) => { diff --git a/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx b/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx index a88c5b7..fd4cf7d 100644 --- a/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx +++ b/src/pages/supplier/informationRetrieval/registrationQuery/index.tsx @@ -63,13 +63,13 @@ const RegistrationQuery: React.FC = ({ dispatch }) => { // 搜索 const handleSearch = () => { setPagination({ ...pagination, current: 1 }); - getList(); + getList(1, pagination.pageSize); }; // 重置 const handleReset = () => { form.resetFields(); setPagination({ ...pagination, current: 1 }); - getList(); + getList(1, pagination.pageSize); }; //列表方法 const getList = async (pageNo: number = 1, pageSize: number = 10) => { @@ -235,7 +235,7 @@ const RegistrationQuery: React.FC = ({ dispatch }) => { pagination={{ ...tableProps.pagination, total: pagination.total }} onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)} style={{ flex: 1, minHeight: 0 }} - scroll={{ y: 'calc(100vh - 350px)' }} + scroll={{ y: 'calc(100vh - 380px)' }} /> {/* 查看组件 */} { const res = await submit({ id }); if (res.code === 200) { message.success('提交成功'); - getList(); // 刷新列表 + getList(1, pagination.pageSize); } }, }); @@ -80,7 +80,7 @@ const blacklistManage: React.FC = () => { const res = await restoreSubmit({ id }); if (res.code === 200) { message.success('提交成功'); - getList(); // 刷新列表 + getList(1, pagination.pageSize); } }, });