import React, { PureComponent } from "react";
import { connect } from "dva";
import { Table } from "antd";
import styles from "./index.less";

class DetailTable extends PureComponent {
  constructor(props) {
    super(props);
  }
  render() {
    const columns = [
      {
        title: "序号",
        dataIndex: "key",
        key: "key",
        render: (text, record, index) => {
          return index + 1;
        }
      },
      {
        title: "商品名称",
        dataIndex: "commidityId",
        key: "commidityId"
      },
      // {
      //   title: "账面调拨数量",
      //   dataIndex: "quantity",
      //   key: "quantity"
      // },
      {
        title: "调拨数量",
        dataIndex: "actualQuantity",
        key: "actualQuantity"
      }
    ];
    const data = [];
    return (
      <div>
        <Table
          columns={columns}
          dataSource={this.props.data}
          rowKey={record => record.id}
          pagination={false}
        />
      </div>
    );
  }
}
// export default connect(() => ({}))(DetailTable);
export default DetailTable;
