<template>
    <el-container class="flex-column">
        <div class="table-search">
            <search @success="handleSuccess" status="1"></search>
            <el-alert type="warning" show-icon title="栏目提醒" description="已预约栏目的订单，用户如取消订单，无需商家同意，产品如已发货，请尽快修改订单状态到服务中，如造成经济损失，本核销系统不负法律责任（使用自动呼叫快递功能的商家忽略）" :closable="false" style="margin-bottom: 10px;"></el-alert>
            
            <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull" status="1" name="已预约订单" :searchKey="searchKey"></optionBtn>
        </div>
        <el-main class="nopadding">
            <div class="table-container">
                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" status="1"></tablePage>
            </div>
        </el-main>
    </el-container>  
</template>

<script>
import search from '@/views/manage/order/components/search';
import optionBtn from '@/views/manage/order/components/option';
import tablePage from '@/views/manage/order/components/table';
export default {
    components: {
        search,tablePage,optionBtn
    },
    data(){
        return {
            searchKey:{
                ex_status:1
            },
            dataSelect:[],
            dataSelectFull:[],
        }
    },
    methods: {
        tableHandle(data){
            this.dataSelect = data;
        },
        tableHandleFull(data){
            this.dataSelectFull = data;
        },
        handleSuccess(data){
            this.searchKey = data;
            this.$refs.tablePage.upData(data)
        },
        handleClick(name){
            this.activeName = name;
            this.searchKey.type = name;
            this.$refs.tablePage.upData(this.searchKey)
        }
    }
}
</script>