import Layout from '@/layout'
import {roterPre} from '@/settings'

const merchantRouter =
  {
    path: `${roterPre}/merchant`,
    name: 'merchant',
    meta: {
      icon: 'dashboard',
      title: '商户管理'
    },
    alwaysShow: true,
    component: Layout,
    children: [
      // 商户列表
      {
        path: 'list',
        name: 'MerchantList',
        meta: {
          title: '联盟商家',
          noCache: true,
          merchant_type: 0,
        },
        component: () => import('@/views/merchant/list/index')
      },
      {
        path: 'shop',
        name: 'MerchantShopList',
        meta: {
          title: '酒道馆',
          noCache: true,
          merchant_type: 1,
        },
        component: () => import('@/views/merchant/list/index')
      },
      {
        path: 'supplier',
        name: 'MerchantSupplierList',
        meta: {
          title: '供应商',
          noCache: true,
          merchant_type: 2,
        },
        component: () => import('@/views/merchant/list/index')
      },
      {
        path: 'smoke',
        name: 'MerchantSmokeList',
        meta: {
          title: '烟酒店',
          noCache: true,
          merchant_type: 3,
        },
        component: () => import('@/views/merchant/list/index')
      },
      {
        path: 'supermarket',
        name: 'MerchantSupermarketList',
        meta: {
          title: '超市',
          noCache: true,
          merchant_type: 4,
        },
        component: () => import('@/views/merchant/list/index')
      },
      {
        path: 'province',
        name: 'MerchantProvinceList',
        meta: {
          title: '省公司门店',
          noCache: true,
          merchant_type: 5,
        },
        component: () => import('@/views/merchant/list/index')
      },
      {
        path: 'hall',
        name: 'MerchantHallList',
        meta: {
          title: '城市会客厅',
          noCache: true,
          merchant_type: 6,
        },
        component: () => import('@/views/merchant/list/index')
      },
      {
        path: 'health',
        name: 'MerchantHealthList',
        meta: {
          title: '健康体检馆',
          noCache: true,
          merchant_type: 7,
        },
        component: () => import('@/views/merchant/list/index')
      },
      // 商户申请审核列表
      {
        path: 'application',
        name: 'MerchantApplication',
        meta: {
          title: '商户申请',
          noCache: true,
          merchant_type: 0,
        },
        component: () => import('@/views/merchant/application/index')
      },
      {
        path: 'shopApply',
        name: 'MerchantShopApply',
        meta: {
          title: '酒道馆申请审核',
          noCache: true,
          merchant_type: 1,
        },
        component: () => import('@/views/merchant/application/index')
      },
      {
        path: 'smoke_apply',
        name: 'SmokeApplyList',
        meta: {
          title: '入驻申请审核',
          noCache: true,
          merchant_type: 3,
        },
        component: () => import('@/views/merchant/application/index')
      },
      {
        path: 'supermarket_apply',
        name: 'supermarketApplyList',
        meta: {
          title: '入驻申请审核',
          noCache: true,
          merchant_type: 4,
        },
        component: () => import('@/views/merchant/application/index')
      },
      {
        path: 'hall_apply',
        name: 'hallApplyList',
        meta: {
          title: '入驻申请审核',
          noCache: true,
          merchant_type: 6,
        },
        component: () => import('@/views/merchant/application/index')
      },
      {
        path: 'health_apply',
        name: 'healthApplyList',
        meta: {
          title: '入驻申请审核',
          noCache: true,
          merchant_type: 7,
        },
        component: () => import('@/views/merchant/application/index')
      },
      // 商户补货额度管理
      {
        path: 'shop_quota',
        name: 'MerchantQuotaList',
        meta: {
          title: '酒道馆补货额度管理',
          noCache: true,
          merchant_type: 1,
        },
        component: () => import('@/views/merchant/quota/index')
      },
      {
        path: 'smoke_quota',
        name: 'SmokeQuotaList',
        meta: {
          title: '烟酒店补货额度管理',
          noCache: true,
          merchant_type: 3,
        },
        component: () => import('@/views/merchant/quota/index')
      },
      {
        path: 'supermarket_quota',
        name: 'supermarketQuotaList',
        meta: {
          title: '超市补货额度管理',
          noCache: true,
          merchant_type: 4,
        },
        component: () => import('@/views/merchant/quota/index')
      },
      {
        path: 'province_quota',
        name: 'provinceQuotaList',
        meta: {
          title: '省公司门店补货额度管理',
          noCache: true,
          merchant_type: 5,
        },
        component: () => import('@/views/merchant/quota/index')
      },
      {
        path: 'hall_quota',
        name: 'hallQuotaList',
        meta: {
          title: '城市会客厅补货额度管理',
          noCache: true,
          merchant_type: 6,
        },
        component: () => import('@/views/merchant/quota/index')
      },
      {
        path: 'health_quota',
        name: 'healthQuotaList',
        meta: {
          title: '健康体检馆补货额度管理',
          noCache: true,
          merchant_type: 7,
        },
        component: () => import('@/views/merchant/quota/index')
      },
      // 共创股东 - 列表
      {
        path: 'mer_shareholder',
        name: 'MerShareholderList',
        meta: {
          title: '联盟商家共创股东管理',
          noCache: true,
          merchant_type: 0,
        },
        component: () => import('@/views/merchant/shareholder/index')
      },
      {
        path: 'shop_shareholder',
        name: 'MerchantShareholderList',
        meta: {
          title: '酒道馆共创股东管理',
          noCache: true,
          merchant_type: 1,
        },
        component: () => import('@/views/merchant/shareholder/index')
      },
      {
        path: 'smoke_shareholder',
        name: 'SmokeShareholderList',
        meta: {
          title: '烟酒店共创股东管理',
          noCache: true,
          merchant_type: 3,
        },
        component: () => import('@/views/merchant/shareholder/index')
      },
      {
        path: 'supermarket_shareholder',
        name: 'supermarketShareholderList',
        meta: {
          title: '超市共创股东管理',
          noCache: true,
          merchant_type: 4,
        },
        component: () => import('@/views/merchant/shareholder/index')
      },
      {
        path: 'province_shareholder',
        name: 'provinceShareholderList',
        meta: {
          title: '省公司门店共创股东管理',
          noCache: true,
          merchant_type: 5,
        },
        component: () => import('@/views/merchant/shareholder/index')
      },
      {
        path: 'hall_shareholder',
        name: 'hallShareholderList',
        meta: {
          title: '城市会客厅共创股东管理',
          noCache: true,
          merchant_type: 6,
        },
        component: () => import('@/views/merchant/shareholder/index')
      },
      {
        path: 'health_shareholder',
        name: 'healthShareholderList',
        meta: {
          title: '健康体检馆共创股东管理',
          noCache: true,
          merchant_type: 7,
        },
        component: () => import('@/views/merchant/shareholder/index')
      },
      // 共创股东 - 等级管理
      {
        path: 'mer_shareholder_level',
        name: 'MerShareholderLevel',
        meta: {
          title: '联盟商家共创股东等级',
          noCache: true,
          merchant_type: 0,
        },
        component: () => import('@/views/merchant/shareholder/level')
      },
      {
        path: 'shop_shareholder_level',
        name: 'MerchantShareholderLevel',
        meta: {
          title: '酒道馆共创股东等级',
          noCache: true,
          merchant_type: 1,
        },
        component: () => import('@/views/merchant/shareholder/level')
      },
      {
        path: 'smoke_shareholder_level',
        name: 'SmokeShareholderLevel',
        meta: {
          title: '烟酒店共创股东等级',
          noCache: true,
          merchant_type: 3,
        },
        component: () => import('@/views/merchant/shareholder/level')
      },
      {
        path: 'supermarket_shareholder_level',
        name: 'supermarketShareholderLevel',
        meta: {
          title: '超市共创股东等级',
          noCache: true,
          merchant_type: 4,
        },
        component: () => import('@/views/merchant/shareholder/level')
      },
      {
        path: 'province_shareholder_level',
        name: 'provinceShareholderLevel',
        meta: {
          title: '省公司门店共创股东等级',
          noCache: true,
          merchant_type: 5,
        },
        component: () => import('@/views/merchant/shareholder/level')
      },
      {
        path: 'hall_shareholder_level',
        name: 'hallShareholderLevel',
        meta: {
          title: '城市会客厅共创股东等级',
          noCache: true,
          merchant_type: 6,
        },
        component: () => import('@/views/merchant/shareholder/level')
      },
      {
        path: 'health_shareholder_level',
        name: 'healthShareholderLevel',
        meta: {
          title: '健康体检馆共创股东等级',
          noCache: true,
          merchant_type: 7,
        },
        component: () => import('@/views/merchant/shareholder/level')
      },
      // 共创股东 - 餐费积分
      {
        path: 'mer_shareholder_integral',
        name: 'MerShareholderIntegral',
        meta: {
          title: '联盟商家餐费积分',
          noCache: true,
          merchant_type: 0,
        },
        component: () => import('@/views/merchant/shareholder/integral')
      },
      {
        path: 'shop_shareholder_integral',
        name: 'MerchantShareholderIntegral',
        meta: {
          title: '酒道馆餐费积分',
          noCache: true,
          merchant_type: 1,
        },
        component: () => import('@/views/merchant/shareholder/integral')
      },
      {
        path: 'smoke_shareholder_integral',
        name: 'SmokeShareholderIntegral',
        meta: {
          title: '烟酒店餐费积分',
          noCache: true,
          merchant_type: 3,
        },
        component: () => import('@/views/merchant/shareholder/integral')
      },
      {
        path: 'supermarket_shareholder_integral',
        name: 'supermarketShareholderIntegral',
        meta: {
          title: '超市餐费积分',
          noCache: true,
          merchant_type: 4,
        },
        component: () => import('@/views/merchant/shareholder/integral')
      },
      {
        path: 'province_shareholder_integral',
        name: 'provinceShareholderIntegral',
        meta: {
          title: '省公司门店餐费积分',
          noCache: true,
          merchant_type: 5,
        },
        component: () => import('@/views/merchant/shareholder/integral')
      },
      {
        path: 'hall_shareholder_integral',
        name: 'hallShareholderIntegral',
        meta: {
          title: '城市会客厅餐费积分',
          noCache: true,
          merchant_type: 6,
        },
        component: () => import('@/views/merchant/shareholder/integral')
      },
      {
        path: 'health_shareholder_integral',
        name: 'healthShareholderIntegral',
        meta: {
          title: '健康体检馆餐费积分',
          noCache: true,
          merchant_type: 7,
        },
        component: () => import('@/views/merchant/shareholder/integral')
      },




      // 其他
      {
        path: 'system',
        name: 'MerchantSystem',
        meta: {
          title: '商户权限管理',
          noCache: true
        },
        component: () => import('@/views/merchant/system/index')
      },
      {
        path: 'list/reconciliation/:id/:type?',
        name: 'MerchantRecord',
        component: () => import('@/views/merchant/list/record'),
        meta: {
          title: '商户对账',
          noCache: true,
          activeMenu: `${roterPre}/merchant/list`
        },
        hidden: true
      },
      {
        path: 'classify',
        name: 'MerchantClassify',
        meta: {
          title: '分类管理',
          noCache: true
        },
        component: () => import('@/views/merchant/classify')
      },
      {
        path: 'brand',
        name: 'MerchantBrand',
        meta: {
          title: '品牌管理',
          noCache: true
        },
        component: () => import('@/views/merchant/brand')
      },
      {
        path: 'agree',
        name: 'MerchantAgreement',
        meta: {
          title: '入驻协议',
          noCache: true
        },
        component: () => import('@/views/merchant/agreement')
      },
      {
        path: 'type',
        name: 'storeType',
        meta: {
          title: '店铺类型',
          noCache: true
        },
        component: () => import('@/views/merchant/type/index')
      },
      {
        path: 'applyMents',
        name: 'MerchantApplyMents',
        meta: {
          title: '服务申请',
          noCache: true
        },
        component: () => import('@/views/merchant/applyments/index')
      },
      {
        path: 'applyList',
        name: 'ApplyList',
        meta: {
          title: '分账商户列表'
        },
        component: () => import('@/views/merchant/applyments/list')
      },
      {
        path: 'type/description',
        name: 'MerTypeDesc',
        meta: {
          title: '店铺类型说明',
          noCache: true,
        },
        component: () => import('@/views/merchant/type/description')
      },
      {
        path: 'deposit_list',
        name: 'DepositList',
        meta: {
          title: '店铺保证金管理',
          noCache: true
        },
        component: () => import('@/views/merchant/deposit/index')
      },
      {
        path: 'recharge_record',
        name: 'RechargeRecord',
        meta: {
          title: '商户充值记录',
          noCache: true
        },
        component: () => import('@/views/merchant/rechargeRecord/index')
      },
    ]
  }

export default merchantRouter
