导出与 天眼查部分的 品类库列表
This commit is contained in:
@ -1,19 +1,20 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
//第三方UI库/组件
|
||||
import { Form, Button, Table, Select, Input, Space, Tooltip } from 'antd';
|
||||
import { Form, Button, Table, Input, Space, Tooltip } from 'antd';
|
||||
import { SearchOutlined, DeleteOutlined } 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 SupplierViewModal from './components/SupplierViewModal';
|
||||
// import SupplierDetailModal from './components/SupplierDetailModal';
|
||||
import CategorySelector from '@/components/CategorySelector';
|
||||
import RegionTypeSelect from '@/components/CommonSelect/RegionTypeSelect'
|
||||
import AccessStatusSelect from '@/components/CommonSelect/AccessStatusSelect'
|
||||
//本地服务/接口
|
||||
import { getPageMy } from './services';
|
||||
import { downloadFile } from '@/utils/download';
|
||||
//统一列表分页
|
||||
import tableProps from '@/utils/tableProps'
|
||||
|
||||
@ -38,18 +39,16 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
//分页
|
||||
const [pagination, setPagination] = useState<TablePaginationConfig>({ current: 1, pageSize: 10, total: 0 });
|
||||
//查看是否显示状态
|
||||
const [viewVisible, setViewVisible] = useState(false);
|
||||
//准入明细是否显示状态
|
||||
const [detailVisible, setDetailVisible] = useState(false);
|
||||
//查看、准入明细 参数传递
|
||||
const [currentRecord, setCurrentRecord] = useState('');
|
||||
// //查看是否显示状态
|
||||
// const [viewVisible, setViewVisible] = useState(false);
|
||||
// //准入明细是否显示状态
|
||||
// const [detailVisible, setDetailVisible] = useState(false);
|
||||
// //查看、准入明细 参数传递
|
||||
// const [currentRecord, setCurrentRecord] = useState('');
|
||||
// 导出
|
||||
const handleExport = async () => {
|
||||
window.open(
|
||||
`${SERVER_BASE}/coscoSupplierBase/getPageMyExport`,
|
||||
'_blank',
|
||||
);
|
||||
const values = form.getFieldsValue();
|
||||
downloadFile('/coscoSupplierBase/getPageMyExport', 'GET', values);
|
||||
};
|
||||
// 查询
|
||||
const handleSearch = () => {
|
||||
@ -160,7 +159,7 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
render: (record: any) => (
|
||||
<Space>
|
||||
<a
|
||||
onClick={() => {
|
||||
onClick={() => {
|
||||
dispatch({
|
||||
type: 'globalModal/show',
|
||||
payload: {
|
||||
@ -193,7 +192,7 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
<CategorySelector multiple={false} style={{ width: 140 }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="accessStatus" label="准入状态">
|
||||
<AccessStatusSelect/>
|
||||
<AccessStatusSelect />
|
||||
</Form.Item>
|
||||
<Form.Item name="supplierType" label="境内/境外">
|
||||
<RegionTypeSelect />
|
||||
@ -218,24 +217,24 @@ const mySupplierInquiry: React.FC<mySupplierInquiryProps> = ({ dispatch }) => {
|
||||
columns={columns}
|
||||
dataSource={data}
|
||||
loading={loading}
|
||||
pagination={{...tableProps.pagination, total: pagination.total }}
|
||||
pagination={{ ...tableProps.pagination, total: pagination.total }}
|
||||
onChange={(pagination) => getList(pagination.current!, pagination.pageSize!)}
|
||||
style={{ flex: 1, minHeight: 0 }}
|
||||
scroll={{ y: 'calc(100vh - 350px)' }}
|
||||
/>
|
||||
</div>
|
||||
{/* 查看组件 */}
|
||||
{/* 查看组件
|
||||
<SupplierViewModal
|
||||
visible={viewVisible}
|
||||
record={currentRecord}
|
||||
onCancel={() => setViewVisible(false)}
|
||||
/>
|
||||
{/* 准入明细组件 */}
|
||||
/>*/}
|
||||
{/* 准入明细组件
|
||||
<SupplierDetailModal
|
||||
visible={detailVisible}
|
||||
record={currentRecord}
|
||||
onCancel={() => setDetailVisible(false)}
|
||||
/>
|
||||
/>*/}
|
||||
|
||||
</>
|
||||
);
|
||||
|
Reference in New Issue
Block a user