<!-- 交易服务-出境检测 -->
<template>
    <app-view>
        <!-- 表格数据 -->
        <app-table :data="dataList" v-model:columns="columns" :loading="loading">
            <template #header>
                <app-auth-operation :menus="['add']" />
            </template>
            <!-- 操作 -->
            <template #operate="{ row }">
                <app-auth-operation :menus="handleOperateButtons(row)" :options="{ selectedRow: row }"
                    @closed="getGZCJJCOrderList" />
            </template>
            <template #footer>
                <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
                    @change="getGZCJJCOrderList" />
            </template>
        </app-table>
        {{ getGZCJStatusList() }}
    </app-view>
</template>

<script lang="ts" setup>
import { ElMessage } from 'element-plus'
import { getGZCJStatusList } from '@/constants/customs'
import { useCJJCOrder } from '@/business/customs'
import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
import AppTable from '@pc/components/base/table/index.vue'
import AppPagination from '@pc/components/base/pagination/index.vue'

const { loading, dataList, columns, total, pageIndex, pageSize, getGZCJJCOrderList } = useCJJCOrder()

const handleOperateButtons = (row: Ermcp.GZCJJCOrderRsp) => {
    switch (row.gzcjstatus) {
        default: {
            return null
        }
    }
}

getGZCJJCOrderList().catch((err) => ElMessage.error(err))
</script>