处理序号字典

This commit is contained in:
孙景学
2025-07-10 09:31:22 +08:00
parent 1f2986b5ae
commit eefc97e553
26 changed files with 300 additions and 426 deletions

View File

@ -1,17 +1,17 @@
import React, { useEffect, useState } from "react";
//第三方UI库/组件
import { Form, Button, Table, Select, Input, Tree, Row, Col, Space, message } from 'antd';
import { Form, Button, Table , Input, Tree, Row, Col, Space, Tooltip } from 'antd';
import { SearchOutlined, DownloadOutlined, ReloadOutlined } from '@ant-design/icons';
//类型定义
import type { ColumnsType, TablePaginationConfig } from 'antd/es/table';
//umi 相关
import { connect } from 'umi';
//本地组件、弹窗、业务逻辑
import SupplierViewModal from './components/SupplierViewModal';
import SupplierDetailModal from './components/SupplierDetailModal';
//本地服务/接口
import { treeData, systemDict, getPagePe } from './services';
const { Option } = Select;
//下拉数据接口
type OptionType = { label: string; value: string };
// 列表数据接口
@ -20,11 +20,14 @@ interface Data {
name: string;
region: string;
supplierType: string;
personName: string;
regTime: string;
status: string;
}
const personQualifiedSupplierQuery: React.FC = () => {
interface Props {
dispatch: any;
}
const personQualifiedSupplierQuery: React.FC<Props> = ({ dispatch }) => {
//搜搜表单
const [form] = Form.useForm();
// 树数据
@ -146,7 +149,7 @@ const personQualifiedSupplierQuery: React.FC = () => {
key: 'index',
align: 'center',
width: 60,
render: (_: any, __: any, idx: number) => idx + 1,
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
},
{
title: '姓名',
@ -154,6 +157,21 @@ const personQualifiedSupplierQuery: React.FC = () => {
key: 'personName',
align: 'center',
ellipsis: true,
render: (dom, record) =>
<Tooltip title={record.personName}>
<a
onClick={() => {
dispatch({
type: 'globalModal/show',
payload: {
id: record.id,
},
});
}}
>
{record.personName}
</a>
</Tooltip>,
},
{
title: '身份证号',
@ -250,15 +268,15 @@ const personQualifiedSupplierQuery: React.FC = () => {
</Form.Item>
<Form.Item>
<Button type="primary" icon={<DownloadOutlined />} style={{ marginRight: 8 }} onClick={handleExport}>
</Button>
<Button type="primary" icon={<SearchOutlined />} htmlType="submit" onClick={handleSearch}>
</Button>
<Button style={{ marginLeft: 8 }} icon={<ReloadOutlined />} onClick={handleReset}>
</Button>
<Button type="primary" icon={<DownloadOutlined />} style={{ marginLeft: 8 }} onClick={handleExport}>
</Button>
</Form.Item>
</Form>
{/* 表格 */}
@ -289,4 +307,4 @@ const personQualifiedSupplierQuery: React.FC = () => {
);
};
export default personQualifiedSupplierQuery;
export default connect()(personQualifiedSupplierQuery);