import { Layout } from '@/utils/routerHelper'
const pre = 'erp'

export default {
  path: '/erp',
  component: Layout,
  name: `${pre}`,
  redirect: '/erp/menu',
  meta: {
    title: 'erp',
    icon: 'vi-eos-icons:role-binding',
    alwaysShow: true
  },
  children: [
    {
      path: 'menu',
      component: () => import('@/views/Erp/Menu/Menu.vue'),
      name: `${pre}-menu`,
      meta: {
        title: 'erp菜单'
      }
    },
    {
      path: 'user',
      component: () => import('@/views/Erp/User/User.vue'),
      name: `${pre}-user`,
      meta: {
        title: '管理员'
      }
    },
    {
      path: 'role',
      component: () => import('@/views/Erp/Role/Role.vue'),
      name: `${pre}-role`,
      meta: {
        title: '角色管理'
      }
    },
    {
      path: 'want',
      component: () => import('@/views/Erp/Want/Want.vue'),
      name: `${pre}-want`,
      meta: {
        title: '要货管理'
      }
    },
    {
      path: 'want_edit/:type/:id',
      component: () => import('@/views/Erp/Want/WantEdit.vue'),
      name: `${pre}-want_edit`,
      meta: {
        title: '添加修改要货'
      }
    },
    {
      path: 'purchase',
      component: () => import('@/views/Erp/Purchase/Purchase.vue'),
      name: `${pre}-purchase`,
      meta: {
        title: '要货管理'
      }
    },
    {
      path: 'purchase_edit/:type/:id',
      component: () => import('@/views/Erp/Purchase/PurchaseEdit.vue'),
      name: `${pre}-purchase_edit`,
      meta: {
        title: '添加修改要货'
      }
    },
    {
      path: 'out',
      component: () => import('@/views/Erp/Out/Out.vue'),
      name: `${pre}-out`,
      meta: {
        title: '出库管理'
      }
    },
    {
      path: 'out_edit/:type/:id',
      component: () => import('@/views/Erp/Out/OutEdit.vue'),
      name: `${pre}-out_edit`,
      meta: {
        title: '添加修改出库'
      }
    },
    {
      path: 'simple',
      component: () => import('@/views/Erp/Simple/Simple.vue'),
      name: `${pre}-simple`,
      meta: {
        title: '收货管理'
      }
    },
    {
      path: 'losses',
      component: () => import('@/views/Erp/Losses/Losses.vue'),
      name: `${pre}-losses`,
      meta: {
        title: '收货管理'
      }
    },
    {
      path: 'losses_edit/:type/:id',
      component: () => import('@/views/Erp/Losses/LossesEdit.vue'),
      name: `${pre}-losses_edit`,
      meta: {
        title: '添加修改要货'
      }
    },
    {
      path: 'mirror',
      component: () => import('@/views/Erp/Mirror/Mirror.vue'),
      name: `${pre}-mirror`,
      meta: {
        title: '镜像列表'
      }
    },
    {
      path: 'adjust',
      component: () => import('@/views/Erp/Adjust/Adjust.vue'),
      name: `${pre}-adjust`,
      meta: {
        title: '调价列表'
      }
    },
    {
      path: 'adjust_edit/:type/:id',
      component: () => import('@/views/Erp/Adjust/AdjustEdit.vue'),
      name: `${pre}-adjust_edit`,
      meta: {
        title: '添加调价'
      }
    },
    {
      path: 'check',
      component: () => import('@/views/Erp/Check/Check.vue'),
      name: `${pre}-check`,
      meta: {
        title: '盘点列表'
      }
    },
    {
      path: 'check_edit/:type/:id',
      component: () => import('@/views/Erp/Check/CheckEdit.vue'),
      name: `${pre}-check_edit`,
      meta: {
        title: '添加盘点'
      }
    },
  ]
}
