<template>
    <div>
        <ListPage :column="tableColumn" :tableApi="settlementOrderList" :isSelect="true" :scopeBtns="scopeBtns"
            :searchBtns="searchBtns" ref="userTableRef" tableKey="orderId" :tabList="tabList"
            :tabsearchKey="tabKey" defaultTab="10" />
        <DialogForm ref="dialogFormRef" :title="dialogType ==='settlement'?costdialogData.title : dialogData.title" 
        :column="dialogType ==='settlement'?costdialogData.column : dialogData.column" 
        @submit="submitForm"
            labelWidth="120px" />
    </div>
</template>

<script setup>
import { ref, computed } from 'vue';
import ListPage from '@/views/components/ListPage/index.vue';
import DialogForm from '@/views/components/DialogForm/index.vue';
import { settlementOrderList } from "@/api/finance/settlement.js";
import useUserStore from '@/store/modules/user'

import useData from './useData';
import usePlatform from './usePlatform';
import useRegional from './useRegional';
import useService from './useService';
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
const jlzj_area_type = ref(userStore.user.dept.areaType);// 0: 平台 3:区域公司 4:服务中心
const useFun ={
    "0":usePlatform,
    "3":useRegional,
    "4":useService,
}
const {
    tableColumn,
    tabList,
    tabKey,
} = useFun[jlzj_area_type.value](proxy);

const {
    dialogFormRef,
    userTableRef,
    searchBtns,
    scopeBtns,
    dialogData,
    costdialogData,
    dialogType,
    submitForm
} = useData({ proxy, jlzj_area_type });
console.log('tableColumn', tableColumn);





</script>

<style lang='scss' scoped></style>