<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="tfNo">
            </table-column>
             <table-column
                label="状态"
                prop="status">
                <template slot-scope="scope">
                  {{$utils.keyMatcher(scope.row.status, $keys.storageTasks.status).name}}
                </template>
            </table-column>
             <table-column
                label="转移原因"
                prop="reasonCode">
                <template slot-scope="scope">
                  {{$utils.keyMatcher(scope.row.reasonCode, $keys.storageTasks.reasonCode).name}}
                </template>
            </table-column>
             <table-column
                label="转移时间"
                prop="tfTime">
            </table-column>
            <table-column
                label="转移单行号"
                prop="lineNo">
            </table-column>
            <table-column
                label="转移单行状态"
                prop="detailStatus">
                <template slot-scope="scope">
                  {{$utils.keyMatcher(scope.row.detailStatus, $keys.storageTasks.detailStatus).name}}
                </template>
            </table-column>
             <table-column
                label="源货主">
                <template slot-scope="scope">
                  <p>{{scope.row.fmOwner}}</p>
                  <p>{{scope.row.ebcuNameCn}}</p>
                </template>
            </table-column>
             <table-column
                label="源商品">
                <template slot-scope="scope">
                  <p>{{scope.row.fmSku}}</p>
                  <p>{{scope.row.fmSkuName}}</p>
                </template>
            </table-column>
            <table-column
                label="源批次号"
                prop="fmLot">
            </table-column>
            <table-column
                label="源库位"
                prop="fmLoc">
            </table-column>
            <table-column
                label="源跟踪号"
                prop="fmId">
            </table-column>
            <table-column
                label="源包装规格"
                prop="fmCdpaFormat">
            </table-column>
            <table-column
                label="源包装单位"
                prop="fmCdprDesc">
            </table-column>
            <table-column
                label="转出数"
                prop="fmQtyUom">
            </table-column>
            <table-column
                label="转出数EA"
                prop="fmQtyEa">
            </table-column>
            <table-column
                label="转出重量(吨)"
                prop="fmWeight">
            </table-column>
            <table-column
                label="转入重量(吨)"
                prop="toWeight">
            </table-column>
            <table-column
                label="转入数"
                prop="toQtyUom">
            </table-column>
            <table-column
                label="转入数EA"
                prop="toQtyEa">
            </table-column>
            <table-column
                label="转移操作人"
                prop="tfOp">
            </table-column>
            <table-column
                label="目标货主"
                prop="toOwner">
            </table-column>
            <table-column
                label="目标商品"
                prop="toSku">
            </table-column>
            <table-column
                label="目标批次号"
                prop="toLot">
            </table-column>
            <table-column
                label="目标库位"
                prop="toLoc">
            </table-column>
            <table-column
                label="目标跟踪号"
                prop="toId">
            </table-column>
            <table-column
                label="目标包装规格"
                prop="toCdpaFormat">
            </table-column>
            <table-column
                label="目标包装单位"
                prop="toCdprDesc">
            </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: 'tfOrder'
    }
  },
  props: {
    tableData: {
      type: Array,
      default: () => []
    },
    total: Number,
    currentPage: Number,
    pageSize: Number,
  },
  methods: {

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

    // 每页显示条数
    handleSizeChange (pageSize) {
      const query = { 'page.currentPage': this.currentPage, 'page.limitCount': pageSize }
      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>
