<template>
  <div>
    <el-tabs type="card"  @tab-click="handleClickTabs">
        <el-tab-pane>
            <span slot="label">入库单</span>
        </el-tab-pane>
        <el-tab-pane >
            <span slot="label">质检单</span>
        </el-tab-pane>
        <el-tab-pane>
            <span slot="label">出库</span>
        </el-tab-pane>
    </el-tabs>
    <list
    :tableData="tableData"
    :pageSize="pageSize"
    :currentPage="currentPage"
    :total="total"
    :tabIndex="tabIndex"
    @handleOpenForm="handleOpenForm"></list>
  </div>
</template>
<script>
import List from './list'
export default {
  components: {
    List
  },
  props: {
    tableData: Array,
    pageSize: Number,
    currentPage: Number,
    total: Number,
    tabIndex: Number,
  },
  data () {
    return {

    }
  },
  methods: {
    // 切换tab
    handleClickTabs (tab, event) {
      this.$emit('handleClickTabs', tab, event)
    },

    handleOpenForm (mode, ...args) {
      this.$emit('handleOpenForm', mode, ...args)
    },
    getList (urlKey, query) {
      this.$emit('getList', urlKey, query)
    }
  }
}
</script>
