import Layout from '@/layout'

const businessRouter = {
  path: '/business',
  component: Layout,
  name: 'Business',
  meta: { title: '业务中心', icon: 'el-icon-s-shop', roleValue: 'business_show' },
  redirect: '/business/outlet/list',
  children: [
    {
      path: 'oms',
      component: () => import('@/views/business/oms/index'),
      name: 'BusinessOMS',
      meta: { title: '点单', icon: 'el-icon-s-order', roleValue: 'business_oms_show' },
      redirect: '/business/oms/order',
      children: [
        {
          path: 'order',
          component: () => import('@/views/business/oms/list/index'),
          name: 'BusinessOMSOrder',
          meta: { title: '点单', roleValue: 'business_oms_order_list_show' }
        },
        {
          path: 'detail',
          component: () => import('@/views/business/oms/detail/index'),
          name: 'BusinessOMSDetail',
          meta: { title: '点单详情', roleValue: 'business_oms_detail_list_show' },
          hidden: true
        }
      ]
    },
    {
      path: 'saveWine',
      component: () => import('@/views/business/saveWine/index'),
      name: 'BusinessSaveWine',
      meta: { title: '存/取酒', icon: 'el-icon-goods', roleValue: 'business_saveWine_show' }
    },
    {
      path: 'place',
      component: () => import('@/views/business/place/index'),
      name: 'BusinessPlace',
      meta: { title: '订座安排', icon: 'el-icon-place', roleValue: 'business_place_show' },
      redirect: '/business/place/reserve',
      children: [
        {
          path: 'reserve',
          component: () => import('@/views/business/place/reserve/index'),
          name: 'BusinessPlaceReserve',
          meta: { title: '预订', roleValue: 'business_place_reserve_show' }
        },
        {
          path: 'set',
          component: () => import('@/views/business/place/set/index'),
          name: 'BusinessPlaceSet',
          meta: { title: '未来7天排座', roleValue: 'business_place_set_show' }
        },
        {
          path: 'list',
          component: () => import('@/views/business/place/list/index'),
          name: 'BusinessPlaceList',
          meta: { title: '座位设置', roleValue: 'business_place_list_show' }
        }
      ]
    },
    {
      path: 'sms',
      component: () => import('@/views/business/sms/index'),
      name: 'BusinessSMS',
      meta: { title: '演出计划', icon: 'el-icon-headset', roleValue: 'business_sms_show' },
      redirect: '/business/sms/plan',
      children: [
        {
          path: 'pickASong',
          component: () => import('@/views/business/sms/pickASong/index'),
          name: 'BusinessSMSPickASong',
          meta: { title: '点歌', roleValue: 'business_sms_pickASong_show' }
        },
        {
          path: 'reward',
          component: () => import('@/views/business/sms/reward/index'),
          name: 'BusinessSMSReward',
          meta: { title: '赞赏', roleValue: 'business_sms_reward_show' }
        },
        {
          path: 'plan',
          component: () => import('@/views/business/sms/plan/index'),
          name: 'BusinessSMSPlan',
          meta: { title: '演出安排', roleValue: 'business_sms_plan_show' }
        },
        {
          path: 'musicLib',
          component: () => import('@/views/business/sms/musicLib/index'),
          name: 'BusinessSMSMusicLib',
          meta: { title: '艺人曲库', roleValue: 'business_sms_musicLib_show' }
        },
        {
          path: 'playList',
          component: () => import('@/views/business/sms/playList/index'),
          name: 'BusinessSMSPlayList',
          meta: { title: '设置曲库', roleValue: 'business_sms_playList_show' },
          hidden: true
        }
      ]
    },
    {
      path: 'pms',
      component: () => import('@/views/business/pms/index'),
      name: 'BusinessPMS',
      meta: { title: '商品管理', icon: 'el-icon-goods', roleValue: 'business_pms_show' },
      redirect: '/business/pms/goods',
      children: [
        {
          path: 'goods',
          component: () => import('@/views/business/pms/goods/index'),
          name: 'BusinessPMSGoods',
          meta: { title: '商品列表', roleValue: 'business_pms_goods_show' }
        },
        {
          path: 'category',
          component: () => import('@/views/business/pms/category/index'),
          name: 'BusinessPMSCategory',
          meta: { title: '分类设置', roleValue: 'business_pms_category_show' }
        },
        {
          path: 'goodsAttr',
          component: () => import('@/views/business/pms/goodsAttr/index'),
          name: 'BusinessPMSGoodsAttr',
          meta: { title: '选配设置', roleValue: 'business_pms_goodsAttr_show' }
        }
      ]
    }
  ]
}

export default businessRouter
