<template>
    <order-page
        ref="pageRef"
        :pageConfig="pageConfig"
        permissionKey="failedAudit"
    >
        <template #toolbar>
            <el-button
                type="warning"
                plain
                class="ele-btn-icon"
                v-permission="'recycleOrder:failedAudit:batchAudit'"
                @click="handleBatchAudit"
            >
                批量初审
            </el-button>
        </template>
    </order-page>
</template>

<script setup>
    import { ref, reactive } from 'vue';
    import OrderPage from '@/views/recycleOrder/components/order-page-all.vue';

    defineOptions({ name: 'RecycleOrderFailedAudit' });

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

    const pageConfig = reactive({
        pageUrl: '/order/orderInfo/refused/pageList',
        exportUrl: '/order/orderInfo/refused/export',
        fileName: '初审未通过',
        cacheKey: 'failedAuditTable'
    });

    //批量初审
    function handleBatchAudit() {
        pageRef.value?.operatBatch({
            title: '确认审核？',
            url: '/recycleOrder/batchAudit'
        });
    }
</script>
