<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" :filteredLabels="storeLables" :data="tableData" style="width: 100%">
        <table-column label="入库单号" prop="asnNo">
        </table-column>
        <table-column label="入库单行号" prop="入库单行号">
        </table-column>
        <table-column label="状态">
          <template slot-scope="scope">
            <p>{{ $utils.keyMatcher(scope.row.status, $keys.stockIn.status).name }}</p>
          </template>
        </table-column>
        <table-column label="入库单类型">
          <template slot-scope="scope">
            {{ $utils.keyMatcher(scope.row.asnType, $keys.stockIn.asnType).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="rcvTime">
        </table-column>
        <table-column label="包装规格" prop="packCode">
        </table-column>
        <table-column label="预收数EA" prop="qtyAsnEa">
        </table-column>
        <table-column label="已收数EA" prop="qtyRcvEa">
        </table-column>
        <table-column label="预收重量(吨)" prop="asnWeight">
        </table-column>
        <table-column label="已收重量(吨)" prop="rcvWeight">
        </table-column>
        <table-column label="收货库位" prop="toLoc">
        </table-column>
        <table-column label="收货跟踪号" prop="toId">
        </table-column>
        <table-column label="预计到货时间">
          <template slot-scope="scope">
            <p>从：{{scope.row.fmEta}}</p>
            <p>到：{{scope.row.toEta}}</p>
          </template>
        </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="创建人登录名" 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="品质">
          <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: 'inDaily'
    }
  },
  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>
