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

        <common-table
            ref="pageRef"
            :pageConfig="pageConfig"
            :columns="columns"
            :tools="false"
        />
    </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', minWidth: 120 },
        {
            label: '审核员',
            prop: 'auditUserName',
            align: 'center',
            minWidth: 120
        },
        {
            label: '录入员',
            prop: 'enterUserName',
            align: 'center',
            minWidth: 120
        },
        { label: '订单编号', prop: 'orderId', align: 'center', minWidth: 120 },
        { label: '审核时间', prop: 'auditTime', align: 'center', width: 180 }
    ]);

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

    const pageConfig = reactive({
        pageUrl: '/order/orderInfo/getBookCheckInfo',
        fileName: '审核员查询',
        cacheKey: 'auditorTable'
    });

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