<template>
    <order-page
        ref="pageRef"
        :pageConfig="pageConfig"
        permissionKey="awaitSign"
    >
        <template #toolbar>
            <el-button
                type="danger"
                plain
                v-permission="'recycleOrder:awaitSign:batchCancel'"
                @click="handleBatchCancel"
            >
                批量取消订单
            </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: 'RecycleOrderawaitSign' });

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

    const pageConfig = reactive({
        pageUrl: '/order/orderInfo/sign/pageList',
        exportUrl: '/order/orderInfo/sign/export',
        fileName: '待签收订单',
        cacheKey: 'awaitSignTable'
    });

    //批量取消订单
    function handleBatchCancel() {
        pageRef.value?.operatBatch({
            title: '确认批量取消订单？',
            url: '/recycleOrder/batchAudit'
        });
    }
</script>
