<template>
    <order-page ref="pageRef" :pageConfig="pageConfig" permissionKey="awaitPay">
        <template #toolbar>
            <el-button
                type="success"
                plain
                v-permission="'recycleOrder:awaitPay:batchPayment'"
                @click="handleBatchPayment"
            >
                批量支付书款
            </el-button>
        </template>
    </order-page>
</template>

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

    defineOptions({ name: 'RecycleOrderAwaitPay' });

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

    const pageConfig = reactive({
        pageUrl: '/order/orderInfo/pay/pageList',
        exportUrl: '/order/orderInfo/pay/export',
        fileName: '待付款订单',
        cacheKey: 'awaitPayTable'
    });

    //批量支付书款
    function handleBatchPayment() {
        pageRef.value?.handleBatchPayment(null);
    }
</script>
