// 财务管理
import type { Route } from '@/global'

const Layout = () => import('@/layouts/index.vue')

const routes: Route.recordRaw[] = [
  {
    path: '/contractManagement',
    component: Layout,
    redirect: 'contractManagement/list',
    name: 'ContractManagement',
    meta: {
      title: '合同管理',
      icon: 'ep:key',
      auth: '/finance/contractManagement',
    },
    children: [
      {
        path: 'list',
        name: 'contractManagementList',
        component: () => import('@/views/finance/contract/list.vue'),
        meta: {
          title: '收入合同管理',
          icon: 'ep:key',
          auth: '/finance/contractManagement/income',
        },
      },
      {
        path: ':type/:id?',
        name: 'contractManagementDetail',
        component: () => import('@/views/finance/contract/edit.vue'),
        meta: {
          title: '收入合同管理详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/contractManagement/list',
        },
      },
    ],
  },
  {
    path: '/businessSettlement',
    component: Layout,
    redirect: 'businessSettlement/list',
    name: 'BusinessSettlement',
    meta: {
      title: '业务结算',
      icon: 'ep:key',
      auth: '/finance/businessSettlement',
    },
    children: [
      {
        path: 'list',
        name: 'businessSettlementList',
        component: () => import('@/views/finance/businessSettlement/list.vue'),
        meta: {
          title: '业务结算',
          icon: 'ep:key',
          auth: '/finance/businessSettlement/list',
        },
      },
      {
        path: ':type/:id?',
        name: 'businessSettlementDetail',
        component: () => import('@/views/finance/businessSettlement/edit.vue'),
        meta: {
          title: '业务结算详情',
          icon: 'ep:key',
          sidebar: false,
          breadcrumb: true,
          activeMenu: '/businessSettlement/list',
        },
      },
    ],
  },
]

export default routes
