处理序号字典

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

@ -8,7 +8,7 @@ import { useIntl } from 'umi';
//本地服务/接口
import { getCategoryPage } from '../services';
//本地组件
import CategoryAddModal from './CategoryAddModal';
// import CategoryAddModal from './CategoryAddModal';
interface Data {
id: number;
@ -78,7 +78,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
dataIndex: "index",
key: "index",
align: "center",
render: (_: any, __: any, idx: number) => idx + 1,
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
width: 60,
},
{
@ -139,7 +139,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
<Form.Item>
<Button onClick={handleReset}></Button>
</Form.Item>
<Form.Item>
{/* <Form.Item>
<Button
type="primary"
style={{ background: "#52a8ff", borderColor: "#52a8ff" }}
@ -147,7 +147,7 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
>
新增品类
</Button>
</Form.Item>
</Form.Item> */}
</Form>
{/* 表格内容 */}
<Table
@ -158,12 +158,12 @@ const SupplierAccessDetailModal: React.FC<SupplierAccessDetailModalProps> = ({ v
pagination={pagination}
onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)}
/>
{/* 新增品类弹窗 */}
{/* 新增品类弹窗
<CategoryAddModal
visible={addModalVisible}
onCancel={() => setAddModalVisible(false)}
// onOk={...} // 根据你的业务需要加
/>
/> */}
</Modal>
);
};

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);