<template>
  <div>
    <div class="mrg-b">
      <!--<drop-filter :columns="wholeLabels" :storeKey="storeKey" :storeLabels="storeLables" @doFilter="labels => storeLables = labels"></drop-filter>-->
      <el-table ref="table" stripe border :max-height="tableMaxHeight" :data="tableData" :filteredLabels="storeLables" style="width: 100%">
        <table-column label="出库单号" prop="soNo">
        </table-column>
        <table-column label="出库单行号" prop="lineNo">
        </table-column>
        <table-column label="状态">
          <template slot-scope="scope">
            <p>{{ $utils.keyMatcher(scope.row.status, $keys.stockOut.status).name }}</p>
          </template>
        </table-column>
        <table-column label="出库单类型">
          <template slot-scope="scope">
            {{ $utils.keyMatcher(scope.row.soType, $keys.stockOut.soType).name }}
          </template>
        </table-column>
        <table-column label="物流单号" prop="logisticNo">
        </table-column>
        <table-column label="物流单行号" prop="logisticLineNo">
        </table-column>
        <table-column label="货主">
          <template slot-scope="scope">
            <p>{{scope.row.ownerCode}}</p>
            <p>{{scope.row.ebcuNameCn}}</p>
          </template>
        </table-column>
        <table-column label="商品">
          <template slot-scope="scope">
            <p>{{scope.row.skuCode}}</p>
            <p>{{scope.row.skuName}}</p>
          </template>
        </table-column>
        <table-column label="快速录入码" prop="quickCode">
        </table-column>
        <table-column label="订单时间" prop="orderTime">
        </table-column>
        <table-column label="包装规格" prop="packCode">
        </table-column>
        <table-column label="订货数EA" prop="qtySoEa">
        </table-column>
        <table-column label="发货数EA" prop="qtyShipEa">
        </table-column>
        <table-column label="订货重量(吨)" prop="soWeight">
        </table-column>
        <table-column label="发货重量(吨)" prop="shipWeight">
        </table-column>
        <table-column label="预计发货时间">
          <template slot-scope="scope">
            <p>从：{{scope.row.fmEtd}}</p>
            <p>到：{{scope.row.toEtd}}</p>
          </template>
        </table-column>
        <table-column label="收货人" prop="consigneeName">
        </table-column>
        <table-column label="创建人登录名" prop="creatorLoginName">
        </table-column>
        <table-column label="创建人姓名" prop="creatorNameCn">
        </table-column>
        <table-column label="创建时间" prop="createTime">
        </table-column>
        <table-column label="修改人登录名" prop="modifyLoginName">
        </table-column>
        <table-column label="修改人姓名" prop="modifierNameCn">
        </table-column>
        <table-column label="修改时间" prop="modifyTime">
        </table-column>
        <table-column label="生产日期" prop="lotAtt01">
        </table-column>
        <table-column label="失效日期" prop="lotAtt02">
        </table-column>
        <table-column label="入库日期" prop="lotAtt03">
        </table-column>
        <table-column label="品质">
          <template slot-scope="scope">
            {{ $utils.keyMatcher(scope.row.lotAtt04, $keys.common.lotAtt04).name }}
          </template>
        </table-column>
        <table-column label="批次属性5" prop="lotAtt05">
        </table-column>
        <table-column label="批次属性6" prop="lotAtt06">
        </table-column>
        <table-column label="批次属性7" prop="lotAtt07">
        </table-column>
        <table-column label="批次属性8" prop="lotAtt08">
        </table-column>
        <table-column label="批次属性9" prop="lotAtt09">
        </table-column>
        <table-column label="批次属性10" prop="lotAtt10">
        </table-column>
        <table-column label="批次属性11" prop="lotAtt11">
        </table-column>
        <table-column label="批次属性12" prop="lotAtt12">
        </table-column>
      </el-table>
    </div>
    <div>
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total">
      </el-pagination>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {

      storeKey: 'outDaily'
    }
  },
  props: {
    tableData: {
      type: Array,
      default: () => []
    },
    total: Number,
    currentPage: Number,
    pageSize: Number,
  },
  methods: {

    // 当前页码
    handleCurrentChange (currentPage) {
      const query = { 'page.limitCount': this.pageSize, 'page.currentPage': currentPage }
      this.$emit('getList', query)
    },

    // 每页显示条数
    handleSizeChange (pageSize) {
      const query = { 'page.limitCount': pageSize, 'page.currentPage': this.currentPage }
      this.$emit('getList', query)
    },
  }
}
</script>
<style lang="scss" scoped>
    .mrg-b{
        margin-bottom: 20px;
    }
    .mrg-l{
        margin-left:10px;
    }
    .blue{
      cursor:pointer;
      color:#0682ea
    }
</style>
