import Main from '@/components/main'

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  title: { String|Number|Function }
 *         显示在侧边栏、面包屑和标签栏的文字
 *         使用'{{ 多语言字段 }}'形式结合多语言使用，例子看多语言的路由配置;
 *         可以传入一个回调函数，参数是当前路由对象，例子看动态路由和带参路由
 *  hideInBread: (false) 设为true后此级路由将不会出现在面包屑中，示例看QQ群路由配置
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面在切换标签后不会缓存，如果需要缓存，无需设置这个字段，而且需要设置页面组件name属性和路由配置的name一致
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 *  beforeCloseName: (-) 设置该字段，则在关闭当前tab页时会去'@/router/before-close.js'里寻找该字段名对应的方法，作为关闭前的钩子函数
 * }
 */

export default [
  {
    path: "/login",
    name: "login",
    meta: {
      title: "Login - 登录",
    },
    component: () => import("@/view/login/login.vue"),
  },
  {
    path: "/technology_board",
    name: "technology_board",
    meta: {
      title: "技术员看板",
    },
    component: () => import("@/view/other-manage/technology-board"),
  },
  {
    path: "/",
    name: "_home",
    redirect: "/home",
    component: Main,
    meta: {
      hideInMenu: true,
    },
    children: [
      {
        path: "/home",
        name: "home",
        meta: {
          hideInMenu: false,
          title: "首页",
          notCache: true,
          icon: "md-home",
          hideInHeaderBar: true,
          access: ["admin", "supervisor", "manager"],
        },
        component: () => import("@/view/single-page/home"),
      },
      {
        path: "/schedule",
        name: "schedule",
        meta: {
          hideInMenu: true,
          title: "待办事项",
          notCache: true,
          icon: "md-home",
        },
        component: () => import("@/view/index/schedule/schedule"),
      },
      {
        path: "/msg",
        name: "msg",
        meta: {
          hideInMenu: true,
          title: "消息提醒",
          notCache: true,
          icon: "md-home",
        },
        component: () => import("@/view/index/msg/msg"),
      },
      {
        path: "/use_today",
        name: "use_today",
        meta: {
          hideInMenu: true,
          title: "今日消耗",
          notCache: true,
          icon: "md-home",
        },
        component: () => import("@/view/index/use-today/use-today"),
      },
      {
        path: "/use_detail",
        name: "use_detail",
        meta: {
          hideInMenu: true,
          title: "消耗详情",
          notCache: true,
          icon: "md-home",
        },
        component: () => import("@/view/index/use-today/use-detail"),
      },
      {
        path: "/material_stranded",
        name: "material_stranded",
        meta: {
          hideInMenu: true,
          title: "滞留物料",
          notCache: true,
          icon: "md-home",
        },
        component: () =>
          import("@/view/index/material-stranded/material-stranded"),
      },
      {
        path: "/store_warning",
        name: "store_warning",
        meta: {
          hideInMenu: true,
          title: "库存预警",
          notCache: true,
          icon: "md-home",
        },
        component: () => import("@/view/index/store-warning/store-warning"),
      },
      {
        path: "/error_401",
        name: "error_401",
        meta: {
          hideInMenu: true,
          title: "error_401",
          notCache: true,
          icon: "md-home",
        },
        component: () => import("@/view/error-page/401"),
      },
    ],
  },
  {
    path: "/back_management",
    name: "back_management",
    meta: {
      title: "管理端",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/back_office_management",
        name: "back_office_management",
        hideInMenu: true,
        meta: {
          title: "后台管理",
          icon: "md-settings",
        },
        component: () =>
          import("@/view/back-management/back-office-management"),
      },
    ],
  },
  {
    path: "/other_manage",
    name: "other_manage",
    meta: {
      title: "其他",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/other_apply",
        name: "other_apply",
        hideInMenu: true,
        meta: {
          title: "发起申请",
          icon: "md-settings",
        },
        component: () => import("@/view/other-manage/apply"),
      },
      {
        path: "/test",
        name: "test",
        meta: {
          title: "测试打印",
          icon: "md-settings",
        },
        component: () => import("@/view/other-manage/test-print"),
      },
    ],
  },
  {
    path: "/base_manage",
    name: "base_manage",
    meta: {
      title: "基础维护",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/warehouse_maintenance",
        name: "warehouse_maintenance",
        hideInMenu: true,
        meta: {
          title: "仓库维护",
        },
        component: () =>
          import(
            "@/view/base-manage/warehouse-maintenance/warehouse-maintenance"
          ),
      },
      {
        path: "/subarea_manage",
        name: "subarea_manage",
        meta: {
          title: "分区管理",
          notCache: true,
        },
        component: () =>
          import("@/view/base-manage/warehouse-maintenance/subarea-manage"),
      },
      {
        path: "/material_maintenance",
        name: "material_maintenance",
        meta: {
          title: "物料维护",
        },
        component: () =>
          import(
            "@/view/base-manage/material-maintenance/material-maintenance"
          ),
      },
      {
        path: "/provider_maintenance2",
        name: "provider_maintenance2",
        meta: {
          title: "供应商维护",
        },
        component: () =>
          import(
            "@/view/base-manage/provider-maintenance/provider-maintenance"
          ),
      },
      {
        path: "/provider_maintenance",
        name: "provider_maintenance",
        meta: {
          title: "供应商维护",
        },
        component: () =>
          import(
            "@/view/base-manage/provider-maintenance/provider-maintenance2"
          ),
      },
      {
        path: "/purchaseList",
        name: "purchaseList",
        meta: {
          title: "供应商采购概况",
        },
        component: () =>
          import("@/view/base-manage/provider-maintenance/purchaseList"),
      },
      {
        path: "/purchaseListDtl",
        name: "purchaseListDtl",
        meta: {
          title: "供应商采购概况",
        },
        component: () =>
          import("@/view/base-manage/provider-maintenance/purchaseListDtl"),
      },
      {
        path: "/provider_price_maintenance",
        name: "provider_price_maintenance",
        meta: {
          title: "价格维护",
        },
        component: () =>
          import(
            "@/view/base-manage/provider-maintenance/provider-price-maintenance"
          ),
      },
    ],
  },
  {
    path: "/system_manage",
    name: "system_manage",
    meta: {
      title: "系统管理",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/menu_manage",
        name: "menu_manage",
        meta: {
          title: "菜单管理",
        },
        component: () => import("@/view/system-manage/menu"),
      },
      {
        path: "/user_manage",
        name: "user_manage",
        meta: {
          notCache: true,
          title: "用户管理",
        },
        component: () => import("@/view/system-manage/user"),
      },
      {
        path: "/role_manage",
        name: "role_manage",
        meta: {
          title: "角色管理",
        },
        component: () => import("@/view/system-manage/role"),
      },
      {
        path: "/dictionary_manage",
        name: "dictionary_manage",
        meta: {
          title: "字典管理",
        },
        component: () => import("@/view/system-manage/dictionary/dictionary"),
      },
      {
        path: "/version_manage",
        name: "version_manage",
        meta: {
          title: "版本控制",
        },
        component: () => import("@/view/system-manage/vision-manage/index"),
      },
      {
        path: "/store_update_old",
        name: "store_update_old",
        meta: {
          title: "物料修正（旧）",
        },
        component: () =>
          import("@/view/system-manage/store-update/store-update"),
      },
    ],
  },
  {
    path: "/material_manage",
    name: "material_manage",
    meta: {
      title: "物料管理",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/material_apply",
        name: "material_apply",
        meta: {
          title: "物料申购",
          icon: "ios-cart-outline",
        },
        component: () =>
          import("@/view/material-manege/material-apply/material-apply"),
      },
      {
        path: "/material_apply_detail",
        name: "material_apply_detail",
        meta: {
          title: "申购明细",
          icon: "ios-cart-outline",
        },
        component: () =>
          import(
            "@/view/material-manege/material-apply-detail/material-apply-detail"
          ),
      },
      {
        path: "/purchaseTotal",
        name: "purchaseTotal",
        meta: {
          title: "申购金额统计",
        },
        component: () =>
          import("@/view/material-manege/purchaseTotal/purchaseTotal"),
      },
      {
        path: "/material_contract",
        name: "material_contract",
        meta: {
          title: "合同管理",
        },
        component: () => import("@/view/material-manege/contract/contract"),
      },

      {
        path: "/material_pay2",
        name: "material_pay2",
        meta: {
          title: "合同付款",
        },
        component: () => import("@/view/material-manege/pay/pay"),
      },
      {
        path: "/material_pay",
        name: "material_pay",
        meta: {
          title: "合同付款-新",
        },
        component: () => import("@/view/material-manege/pay/pay2"),
      },
      {
        path: "/material_pay_detail",
        name: "material_pay_detail",
        meta: {
          title: "付款详情",
          notCache: true,
        },
        component: () => import("@/view/material-manege/pay/pay-detail"),
      },
      {
        path: "/pay_transit",
        name: "pay_transit",
        meta: {
          title: "在途金额",
          notCache: true,
        },
        component: () => import("@/view/material-manege/pay/pay-transit"),
      },
      {
        path: "/material_bill",
        name: "material_bill",
        meta: {
          title: "付款账单",
        },
        component: () => import("@/view/material-manege/pay/bill"),
      },
      {
        path: "/pay_history",
        name: "pay_history",
        meta: {
          title: "历史付款记录",
        },
        component: () => import("@/view/material-manege/pay/pay-history"),
      },
      {
        path: "/pay-history2",
        name: "pay-history2",
        meta: {
          title: "历史付款记录",
        },
        component: () => import("@/view/material-manege/pay/pay-history2"),
      },

      {
        path: "/pay_history_detail",
        name: "pay_history_detail",
        meta: {
          title: "历史付款记录",
        },
        component: () =>
          import("@/view/material-manege/pay/pay-history-detail"),
      },
      {
        path: "/provider_tag_manage",
        name: "provider_tag_manage",
        meta: {
          title: "合同标签",
        },
        component: () =>
          import(
            "@/view/provider-manage/provider-shipment-manage/provider-shipment-manage"
          ),
      },
    ],
  },
  {
    path: "/store_in_manage",
    name: "store_in_manage",
    meta: {
      title: "入库管理",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/store_in_record",
        name: "store_in_record",
        meta: {
          title: "入库记录",
          notCache: true,
        },
        component: () =>
          import("@/view/store-in-manage/store-in-record/store-in-record"),
      },
      {
        path: "/quality_record",
        name: "quality_record",
        meta: {
          title: "质检记录",
        },
        component: () =>
          import("@/view/store-in-manage/quality-record/quality-record"),
      },
      {
        path: "/quality_record_detail",
        name: "quality_record_detail",
        meta: {
          title: "质检详情",
          notCache: true,
        },
        component: () =>
          import("@/view/store-in-manage/quality-record/quality-record-detail"),
      },
      {
        path: "/tag",
        name: "tag",
        meta: {
          title: "标签管理",
        },
        component: () => import("@/view/store-in-manage/tag/tag"),
      },
      {
        path: "/return_material",
        name: "return_material",
        meta: {
          title: "退料管理",
        },
        component: () =>
          import("@/view/store-in-manage/return-material/return-material"),
      },
    ],
  },
  {
    path: "/store_manage",
    name: "store_manage",
    meta: {
      title: "库存管理",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/store",
        name: "store",
        meta: {
          title: "库存管理",
        },
        component: () =>
          import("@/view/store-manage/store-manage/store-manage"),
      },
      {
        path: "/store2",
        name: "store2",
        meta: {
          title: "库存管理",
        },
        component: () =>
          import("@/view/store-manage/store-manage/store-manage-2"),
      },
      {
        path: "/inventory",
        name: "inventory",
        meta: {
          title: "发起盘点",
        },
        component: () => import("@/view/store-manage/store-manage/inventory"),
      },
      {
        path: "/inventory_update",
        name: "inventory_update",
        meta: {
          title: "修改盘点记录",
        },
        component: () =>
          import("@/view/store-manage/store-manage/inventory-update"),
      },
      {
        path: "/inventory_record",
        name: "inventory_record",
        meta: {
          title: "盘点记录",
        },
        component: () =>
          import("@/view/store-manage/inventory-record/inventory-record"),
      },
      {
        path: "/inventory_record_new",
        name: "inventory_record_new",
        meta: {
          title: "最新盘点记录",
        },
        component: () =>
          import("@/view/store-manage/inventory-record/inventory-record-new"),
      },
      {
        path: "/error_tag",
        name: "error_tag",
        meta: {
          title: "异常标签查询",
        },
        component: () =>
          import("@/view/store-manage/inventory-record/error-tag"),
      },
      {
        path: "/error_tag_detail",
        name: "error_tag_detail",
        meta: {
          title: "异常标签明细",
          notCache: true,
        },
        component: () =>
          import("@/view/store-manage/inventory-record/error-tag-detail"),
      },
      {
        path: "/inventory_record_detail",
        name: "inventory_record_detail",
        meta: {
          title: "盘点记录详情",
        },
        component: () =>
          import(
            "@/view/store-manage/inventory-record/inventory-record-detail"
          ),
      },
      {
        path: "/store_report",
        name: "store_report",
        meta: {
          title: "库存报表",
        },
        component: () =>
          import("@/view/store-manage/store-report/store-report"),
      },
      {
        path: "/store_material",
        name: "store_material",
        meta: {
          title: "物料库存",
        },
        component: () =>
          import("@/view/store-manage/store-material/store-material"),
      },
      {
        path: "/store_update",
        name: "store_update",
        meta: {
          title: "物料修正",
        },
        component: () =>
          import("@/view/store-manage/store-update/store-update"),
      },
    ],
  },
  {
    path: "/store_out_manage",
    name: "store_out_manage",
    meta: {
      title: "出库管理",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/apply_manage",
        name: "apply_manage",
        meta: {
          title: "领料管理",
        },
        component: () =>
          import("@/view/store-out-manage/apply-manage/apply-manage"),
      },
      {
        path: "/store_out_record",
        name: "store_out_record",
        meta: {
          title: "出库记录",
        },
        component: () =>
          import("@/view/store-out-manage/store-out-record/store-out-record"),
      },
      {
        path: "/technician_reprot",
        name: "technician_reprot",
        meta: {
          title: "技术员报表",
        },
        component: () =>
          import("@/view/store-manage/technician-reprot/site-inventory"),
      },
      {
        path: "/site_inventory",
        name: "site_inventory",
        meta: {
          title: "现场库存盘点",
          notCache: true,
        },
        component: () =>
          import("@/view/store-manage/technician-reprot/site-inventory"),
      },
      {
        path: "/error_out",
        name: "error_out",
        meta: {
          title: "异常出库",
        },
        component: () => import("@/view/store-out-manage/error-out/error-out"),
      },
      {
        path: "/picking_tracking",
        name: "picking_tracking",
        meta: {
          title: "指定领料追踪",
        },
        component: () =>
          import("@/view/store-out-manage/picking-tracking/picking-tracking"),
      },
      {
        path: "/daily_report",
        name: "daily_report",
        meta: {
          title: "每日面料使用率报表",
        },
        component: () =>
          import("@/view/store-out-manage/daily-report/daily-report"),
      },
      {
        path: "/return_warehouse_total",
        name: "return_warehouse_total",
        meta: {
          title: "退仓看板",
        },
        component: () =>
          import("@/view/store-out-manage/return-warehouse-total/return-warehouse-total"),
      },
    ],
  },
  {
    path: "/tag_manage",
    name: "tag_manage",
    meta: {
      title: "标签管理",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/tag_new",
        name: "tag_new",
        meta: {
          title: "新建标签",
        },
        component: () => import("@/view/tag-manage/tag-new/tag-new"),
      },
    ],
  },
  {
    path: "/provider_manage",
    name: "provider_manage",
    meta: {
      title: "供应商WEB",
      icon: "md-settings",
    },
    component: Main,
    children: [
      {
        path: "/provider_shipment_manage",
        name: "provider_shipment_manage",
        meta: {
          title: "出货管理",
        },
        component: () =>
          import(
            "@/view/provider-manage/provider-shipment-manage/provider-shipment-manage"
          ),
      },
    ],
  },
];
