import { useContextSection, useQueryTableList, useTableExportEvent, } from '@hooks'; import {FC} from 'react'; import {PRELAOD_KEY, context, pageContext, searchContext} from '../context'; import {exportInventoryLog, getInventoryDetailedList} from '@apis'; import {Card} from 'antd'; import {Table, TableTools} from '@components'; import {ColumnsType} from 'antd/es/table'; import {InventoryLogListData} from '@models'; import { HUGE_TABLE_WIDTH, MODAL_PAGE_SIZE_LIST, NORMAL_TABLE_WIDTH, } from '@utils'; const columns: ColumnsType = [ {title: '物料编号', dataIndex: 'wllbCode', width: NORMAL_TABLE_WIDTH}, {title: '物料名称', dataIndex: 'name', width: HUGE_TABLE_WIDTH}, { title: '库位名称', dataIndex: 'storageLocationName', width: NORMAL_TABLE_WIDTH, }, { title: '系统库存', dataIndex: 'total', width: NORMAL_TABLE_WIDTH, align: 'right', }, { title: '实际库存', dataIndex: 'amount', width: NORMAL_TABLE_WIDTH, align: 'right', }, ]; const TableList: FC = function () { const params = useContextSection(context, state => state[0]); const [{data, count}] = useQueryTableList({ queryFn: getInventoryDetailedList, pageContext, searchContext, params, }); const [isExporting, onExport] = useTableExportEvent({ fn: exportInventoryLog, pageContext, context, }); return ( ); }; export default TableList;