<template>
  <ele-page flex-table>
    <page-search @search="reload"></page-search>

    <common-table
      ref="pageRef"
      :pageConfig="pageConfig"
      :columns="columns"
      :tools="false"
    >
    </common-table>
  </ele-page>
</template>

<script setup>
  import { ref, reactive } from 'vue';
  import CommonTable from '@/components/CommonPage/CommonTable.vue';
  import pageSearch from './components/page-search.vue';

  defineOptions({ name: 'auditorList' });

  /** 表格列配置 */
  const columns = ref([
    { label: 'ISBN', prop: 'isbn', align: 'center' },
    { label: '审核员', prop: 'godownName', align: 'center' },
    { label: '录入员', prop: 'godownName', align: 'center' },
    { label: '订单编号', prop: 'godownName', align: 'center' },
    { label: '录入时间', prop: 'createTime', align: 'center' }
  ]);

  /** 页面组件实例 */
  const pageRef = ref(null);

  const pageConfig = reactive({
    pageUrl: '/baseinfo/godown/pagelist',
    exportUrl: '/baseinfo/godown/export',
    fileName: '审核员查询',
    cacheKey: 'auditorTable'
  });

  //刷新表格
  function reload(where) {
    pageRef.value?.reload(where);
  }

  //导出excel
  function handleExportExcel() {
    pageRef.value?.exportData('审核员查询');
  }
</script>
