<template>
  <div class="app-container">
    <!--工具栏-->
    <div class="head-container">
      <!--如果想在工具栏加入更多按钮，可以使用插槽方式， slot = 'left' or 'right'-->
      <crudOperation :permission="permission" />
      <!--表格渲染-->
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'入窑时间')" />
        <el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'入窑时间')" />
        <el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'托盘号')" />
        <el-table-column prop="material_code" label="产品编码" :min-width="flexWidth('material_code',crud.data,'拆垛工位')" />
        <el-table-column prop="material_name" label="产品名称" :min-width="flexWidth('material_name',crud.data,'分拣工单')" />
        <el-table-column prop="instorage_time" label="入库时间" :min-width="flexWidth('instorage_time',crud.data,'分拣工单')" />
      </el-table>
      <!--分页组件-->
      <pagination />
    </div>
  </div>
</template>

<script>
import CRUD, { crud, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
export default {
  name: 'MaterialTimeout',
  components: { pagination, crudOperation, rrOperation, udOperation },
  mixins: [presenter(), header(), crud()],
  cruds() {
    return CRUD({
      title: '入窑记录报表',
      url: 'api/report/inventoryMaterialTimeoutWarning',
      optShow: {
        add: false,
        edit: false,
        del: false,
        download: false
      }
    })
  },
  data() {
    return {
      permission: {
      },
      rules: {
      }
    }
  },
  methods: {
    // 钩子：在获取表格数据之前执行，false 则代表不获取数据
    [CRUD.HOOK.beforeRefresh]() {
      return true
    }
  }
}
</script>

<style scoped>

</style>
