import { colors } from './config';

/** 首页菜单 */
const iconColor = colors.primary;
export const menuConfig = [
  {
    title: '订单管理',
    icon: 'form',
    iconColor: iconColor,
    children: [
      {
        title: '销售订单',
        url: '/pages/orders/ordersList/ordersList',
        auth: 'SF_ERP_SALE_ORDERS_VIEW',
      },
      {
        title: '订单排序',
        url: '/pages/orders/orderSort/orderSort',
        auth: 'SF_ERP_SALE_ORDERS_VIEW',
      },
    ],
  },
  {
    title: '生产管理',
    icon: 'tools',
    iconColor: iconColor,
    children: [
      {
        title: '生产任务',
        url: '/pages/produce/orderTask/orderTask',
        auth: 'SF_ERP_PRODUCT_TASK_VIEW',
      },
      {
        title: '流程管理',
        url: '/pages/produce/processManage/processManage',
        auth: 'SF_ERP_PRODUCT_PROCESS_VIEW',
      },
      {
        title: '录入流程',
        url: '/pages/processEntry/processEntry',
        auth: 'SF_ERP_PRODUCT_PROCESS_ENTER',
      },
    ],
  },
  {
    title: '采购管理',
    icon: 'cart-add',
    iconColor: iconColor,
    children: [
      {
        title: '请购订单',
        url: '/pages/purchase/requestOrder/requestOrder',
        auth: 'SF_ERP_PURCHASE_REQUEST_VIEW',
      },
      {
        title: '采购订单',
        url: '/pages/purchase/buyOrder/buyOrder',
        auth: 'SF_ERP_PURCHASE_ORDER_VIEW',
      },
      {
        title: '采购入库',
        url: '/pages/purchase/buyInOrder/buyInOrder',
        auth: 'SF_ERP_PURCHASE_STORE_VIEW',
      },
      {
        title: '采购退货',
        url: '/pages/purchase/backOrder/backOrder',
        auth: 'SF_ERP_PURCHASE_BACK_VIEW',
      },
    ],
  },
  {
    title: '仓库管理',
    icon: 'home',
    iconColor: iconColor,
    children: [
      {
        title: '商品信息',
        url: '/pages/other/goods/goods',
        auth: 'SF_ERP_GOODS_VIEW',
      },
      {
        title: '批次信息',
        url: '/pages/other/batch/batch',
        auth: 'SF_ERP_GOODS_BATCH_VIEW',
      },
      {
        title: '原料出库',
        url: '/pages/other/outbound/outbound',
        auth: 'SF_ERP_OTHER_OUT_VIEW',
      },
      {
        title: '调拨出库',
        url: '/pages/other/transfer/transfer',
        auth: 'SF_ERP_TRANSFER_OUT_VIEW',
      },
    ],
  },
  {
    title: '财务管理',
    icon: 'currency-exchange',
    iconColor: iconColor,
    children: [
      { title: '收入单', url: '/pages/finance/income/income', auth: 'SF_FINANCE_INCOME_VIEW' },
      { title: '支出单', url: '/pages/finance/outcome/outcome', auth: 'SF_FINANCE_OUTCOME_VIEW' },
      { title: '转账单', url: '/pages/finance/giro/giro', auth: 'SF_FINANCE_TRANSFER_VIEW' },
      { title: '资金明细', url: '/pages/finance/flow/flow', auth: 'SF_FINANCE_FLOW_VIEW' },
    ],
  },
  {
    title: '基础资料',
    icon: 'grid-view',
    iconColor: iconColor,
    children: [
      { title: '仓库信息', url: '/pages/base/depot/depot', auth: 'SF_ERP_DEPOT_VIEW' },
      { title: '供应商', url: '/pages/base/supplier/supplier', auth: 'SF_ERP_SUPPLIER_VIEW' },
      { title: '经销商', url: '/pages/base/customer/customer', auth: 'SF_ERP_CUSTOMER_VIEW' },
      { title: '结算账户', url: '/pages/base/account/account', auth: 'SF_ERP_ACCOUNT_VIEW' },
      {
        title: '流程配置',
        url: '/pages/base/processConfig/processConfig',
        auth: 'SF_PROCESS_CONFIG_VIEW',
      },
      { title: '订单阶段', url: '/pages/base/orderStep/orderStep', auth: 'SF_ORDER_STEP_VIEW' },
      {
        title: '订单类型',
        url: '/pages/base/orderCategory/orderCategory',
        auth: 'SF_ORDER_STEP_VIEW',
      },
      {
        title: '产品类型',
        url: '/pages/base/productType/productType',
        auth: 'SF_PRODUCT_TYPE_VIEW',
      },
      {
        title: '收支项目',
        url: '/pages/base/item/item',
        auth: 'SF_FINANCE_ITEM_VIEW',
      },
    ],
  },
  {
    title: '用户管理',
    icon: 'usergroup',
    iconColor: iconColor,
    children: [
      { title: '组织架构', url: '/pages/manage/department/department', auth: 'SF_ERP_DEPART_VIEW' },
      { title: '岗位角色', url: '/pages/manage/group/group', auth: 'SF_ERP_GROUP_VIEW' },
      { title: '员工管理', url: '/pages/manage/staff/staff', auth: 'SF_ERP_STAFF_VIEW' },
      { title: '我的权限', url: '/pages/manage/my/my', auth: 'SF_MY_RIGHT_VIEW' },
    ],
  },
  {
    title: '日志查看',
    icon: 'assignment',
    iconColor: iconColor,
    children: [
      { title: '登录日志', url: '/pages/logs/loginLog/loginLog', auth: 'SF_ERP_LOG_VIEW' },
      { title: '操作日志', url: '/pages/logs/operateLog/operateLog', auth: 'SF_ERP_LOG_VIEW' },
    ],
  },
];
