//卡券营销
import card from '../../views/card'
import cardList from '../../views/card/list'
import cardRecord from '../../views/card/record'
import cardRecordSend from '../../views/card/record-send'
import cardRecordGet from '../../views/card/record-get'
import cardRecordCache from '../../views/card/record-cache'
import cardGroupSend from '../../views/card/group-send'
import cardAnalysis from '../../views/card/analysis'
import cardForm from '../../views/card/form.vue'
import cardShelf from '../../views/card/shelf'
import cardManager from '../../views/card/manager'
import cardCheck from '../../views/card/check'


export default  {
  path: 'card',
  name: '卡券营销',
  component: card,
  meta: {},
  redirect:'card/list',
  children:[
    {
      path: 'list',
      name: '卡券库',
      component: cardList,
      meta: {
        path:'/card/list'
      },
    },
    {
      path: 'record',
      name: '卡券记录',
      component: cardRecord,
      meta: {},
      redirect:'record/send',
      children:[
        {
          path: 'get',
          name: '领取记录',
          component: cardRecordGet,
          meta: {
            path:'/card/record/get'
          },
        },
        {
          path: 'send',
          name: '投放记录',
          component: cardRecordSend,
          meta: {},
        },
        {
          path: 'cache',
          name: '临时领取记录',
          component: cardRecordCache,
          meta: {},
        }
      ]
    },
    {
      path: 'groupsend',
      name: '新建卡券群发',
      component: cardGroupSend,
      meta: {
        type:'add'
      },
    },
    {
      path: 'groupsend/:id',
      name: '卡券群发',
      component: cardGroupSend,
      meta: {
        type:'edit',
        path:'/card/record/send'
      }
    },
    {
      path: 'groupsend/:id/:name',
      name: '卡券投放',
      component: cardGroupSend,
      meta: {
        type:'send',
        path:'/card/list'
      }
    },
    {
      path: 'groupinfo/:id',
      name: '卡券群发详情',
      component: cardGroupSend,
      meta: {
        type:'info',
        path:'/card/record/send'
      }
    },
    {
      path: 'edit/:id',
      name: '卡券编辑',
      component: cardForm,
      meta: {
        type:'edit',
        path:'/card/list'
      }
    },
    {
      path: 'info/:id',
      name: '卡券详情',
      component: cardForm,
      meta: {
        type:'info',
        path:'/card/record/get'
      }
    },
    {
      path: 'copy/:id',
      name: '卡券复制',
      component: cardForm,
      meta: {
        type:'copy',
        path:'/card/record/get'
      }
    },
    {
      path: 'add',
      name: '新增卡券',
      component: cardForm,
      meta: {
        type:'add',
        path:'/card/list'
      }
    },
    {
      path: 'analysis/:id',
      name: '卡券报表',
      component: cardAnalysis,
      meta: {
        path:'/card/list'
      }
    },
    {
      path: 'shelfanalysis/:id',
      name: '卡券展架报表',
      component: cardAnalysis,
      meta: {
        type:'shelf',
        path:'/card/shelf'
      }
    },
    {
      path: 'shelf',
      name: '卡券展架',
      component: cardShelf,
      meta: {
        path:'/card/shelf'
      },
    },
    {
      path: 'shelf/:id',
      name: '卡券管理',
      component: cardManager,
      meta: {
        path:'/card/shelf'
      },
    },
    {
      path: 'check',
      name: '核销纠错',
      component: cardCheck,
      meta: {
        path:'/card/check'
      },
    },
  ]
};
