import { ProTable } from '@ant-design/pro-components';
import {getStoreLogList} from '@/services/stock'
import { queryTable,queryDict } from '@/utils/request';
import { useRef, useState } from 'react';

const OutAndInList = (props) => {
  const { id } = props;

  const [showDetail, setShowDetail] = useState(false);
  const [activeKey, setActiveKey] = useState('');
  const actionRef = useRef();

  const columns = [
    {
      title: '名称',
      dataIndex: 'name',
    },
    {
      title: '分类',
      dataIndex: 'type',
    },
    {
      title: '操作',
      dataIndex: 'optType',
      search: false,
    },
    {
      title: '操作量',
      dataIndex: 'amount',
      search: false,
    },
    {
      title: '操作后库存',
      dataIndex: 'pre_amount',
      search: false,
    },
  ];

  return (
    <ProTable
      actionRef={actionRef}
      params={{storeId:id}}
      rowKey="id"
      // search={false}
      request={queryTable(getStoreLogList)}
      columns={columns}
    />
  );
};

export default OutAndInList;
