import React, { useRef, useState } from 'react'; import ProTable from '@ant-design/pro-table'; import type { ProColumns, ActionType } from '@ant-design/pro-table'; import { Form, Input, Button, Row, Col, DatePicker, Tabs, Space } from 'antd'; import { SearchOutlined, ReloadOutlined, PlusOutlined } from '@ant-design/icons'; const { RangePicker } = DatePicker; // 示例数据 const tableData = [ { id: 1, name: '中山市合创展包装材料有限公司', type: '经销商', unit: '重工', dept: '采购部', createTime: '2025-03-03', }, { id: 2, name: '深圳市欧阳华斯电源有限公司', type: '服务商', unit: '重工二级单位XXX', dept: '采购部', createTime: '2023-10-26', }, { id: 3, name: '广东振兴塑胶机械有限公司', type: '代理商', unit: '重工', dept: '采购部', createTime: '2023-10-18', }, { id: 4, name: '上海硕建建筑技术工程有限公司', type: '服务商', unit: '重工二级单位XXX', dept: '采购部', createTime: '2023-09-12', }, { id: 5, name: '中山市合创展包装材料有限公司', type: '经销商', unit: '重工', dept: '采购部', createTime: '2023-08-30', }, { id: 6, name: '深圳市欧阳华斯电源有限公司', type: '服务商', unit: '重工二级单位XXX', dept: '采购部', createTime: '2023-07-31', }, { id: 7, name: '广东振兴塑胶机械有限公司', type: '代理商', unit: '重工', dept: '采购部', createTime: '2023-07-25', }, { id: 8, name: '上海硕建建筑技术工程有限公司', type: '服务商', unit: '重工二级单位XXX', dept: '采购部', createTime: '2023-07-19', }, { id: 9, name: '广东振兴塑胶机械有限公司', type: '代理商', unit: '重工', dept: '采购部', createTime: '2023-07-17', }, { id: 10, name: '上海硕建建筑技术工程有限公司', type: '服务商', unit: '重工二级单位XXX', dept: '采购部', createTime: '2023-07-10', }, ]; const columns: ProColumns[] = [ { title: '序号', dataIndex: 'index', valueType: 'index', width: 48, align: 'center', }, { title: '供应商名称', dataIndex: 'name', align: 'center', ellipsis: true, }, { title: '供应商类型', dataIndex: 'type', align: 'center', }, { title: '创建单位', dataIndex: 'unit', align: 'center', ellipsis: true, }, { title: '创建部门', dataIndex: 'dept', align: 'center', }, { title: '创建时间', dataIndex: 'createTime', align: 'center', sorter: (a, b) => new Date(a.createTime).getTime() - new Date(b.createTime).getTime(), }, { title: '操作', dataIndex: 'option', align: 'center', valueType: 'option', render: (_, record) => ( 查看 编辑 ), }, ]; const SupplierRegisterAgent: React.FC = () => { const actionRef = useRef(); const [tabKey, setTabKey] = useState('inland'); // 查询区 const searchFormRender = (
); return (
{/* 查询区 */} {searchFormRender} {/* 表格 */}
); }; export default SupplierRegisterAgent;