import Vue from 'vue'
import Router from 'vue-router'

import routerBefore from '@/config/routerBefore.js'

// 主要
import main from '@/components/main.vue'
// 系统配置管理
//零星物资运输预约
import sporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/transportAppoint.vue'
import addSporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue'
import editSporadicTransportAppoint from '../components/sporadicMaterial/transportAppoint/editTransportAppoint.vue'
//内转零星运输计划
import addSporadicTransportPlan from '../components/sporadicMaterial/transportPlan/addTransportPlan.vue'
import sporadicTransportPlan from '../components/sporadicMaterial/transportPlan/transportPlan.vue'
//零星物资运输派单
import sporadicTransportOrder from '../components/sporadicMaterial/transportOrder/transportOrder.vue'
import addSporadicTransportOrder from '../components/sporadicMaterial/transportOrder/addTransportOrder.vue'
import editSporadicTransportOrder from '../components/sporadicMaterial/transportOrder/editTransportOrder.vue'
//零星物资进厂
import sporadicENenfactory from '../components/sporadicMaterial/sporadicEnfactory/enFactory.vue'
import sporadicENgrossWeight from '../components/sporadicMaterial/sporadicEnfactory/grossWeight.vue'
import sporadicENoutFactory from '../components/sporadicMaterial/sporadicEnfactory/outFactory.vue'
import sporadicENtareWeight from '../components/sporadicMaterial/sporadicEnfactory/tareWeight.vue'
import sporadicENunload from '../components/sporadicMaterial/sporadicEnfactory/unload.vue'
//零星物资出厂
import sporadicOUTenfactory from '../components/sporadicMaterial/sporadicOutfactory/enFactory.vue'
import sporadicOUTgrossWeight from '../components/sporadicMaterial/sporadicOutfactory/grossWeight.vue'
import sporadicOUToutFactory from '../components/sporadicMaterial/sporadicOutfactory/outFactory.vue'
import sporadicOUTtareWeight from '../components/sporadicMaterial/sporadicOutfactory/tareWeight.vue'
import sporadicOUTload from '../components/sporadicMaterial/sporadicOutfactory/load.vue'


//钢材退货运输预约
import steelReturnTransportAppoint from '../components/steelReturn/transportAppoint/transportAppoint.vue'
import addSteelReturnTransportAppoint from '../components/steelReturn/transportAppoint/addSteelReturnTransportAppoint'
import editSteelReturnTransportAppoint from '../components/steelReturn/transportAppoint/editTransportAppoint.vue'
//钢材退货运输派单
import steelReturnTransportOrder from '../components/steelReturn/transportOrder/transportOrder.vue'
import addSteelReturnTransportOrder from '../components/steelReturn/transportOrder/addTransportOrder.vue'
import editSteelReturnTransportOrder from '../components/steelReturn/transportOrder/editTransportOrder.vue'
//钢材退货运输执行
import steelReturnEnfactory from '../components/steelReturn/transportExcute/enFactory.vue'
import steelReturnGrossWeight from '../components/steelReturn/transportExcute/grossWeight.vue'
import steelReturnOutFactory from '../components/steelReturn/transportExcute/outFactory.vue'
import steelReturnTareWeight from '../components/steelReturn/transportExcute/tareWeight.vue'
import steelReturnUnload from '../components/steelReturn/transportExcute/unload.vue'

//一车多趟运输预约
import mornThanTransportAppoint from '../components/moreThanMaterialTruck/transportAppoint/transportAppoint.vue'
import addMornThanTransportAppoint from '../components/moreThanMaterialTruck/transportAppoint/addSporadicTransportAppoint.vue'
//一车多趟运输派单
import mornThanTransportOrder from '../components/moreThanMaterialTruck/transportOrder/transportOrder.vue'
import addMornThanTransportOrder from '../components/moreThanMaterialTruck/transportOrder/addTransportOrder.vue'
//一车多趟运输执行进厂
import mornThanENenfactory from '../components/moreThanMaterialTruck/sporadicEnfactory/enFactory.vue'
import mornThanENgrossWeight from '../components/moreThanMaterialTruck/sporadicEnfactory/grossWeight.vue'
import mornThanENoutFactory from '../components/moreThanMaterialTruck/sporadicEnfactory/outFactory.vue'
import mornThanENtareWeight from '../components/moreThanMaterialTruck/sporadicEnfactory/tareWeight.vue'
import mornThanENunload from '../components/moreThanMaterialTruck/sporadicEnfactory/unload.vue'
//一车多趟运输执行出厂
import mornThanOUTenfactory from '../components/moreThanMaterialTruck/sporadicOutfactory/enFactory.vue'
import mornThanOUTgrossWeight from '../components/moreThanMaterialTruck/sporadicOutfactory/grossWeight.vue'
import mornThanOUToutFactory from '../components/moreThanMaterialTruck/sporadicOutfactory/outFactory.vue'
import mornThanOUTtareWeight from '../components/moreThanMaterialTruck/sporadicOutfactory/tareWeight.vue'
import mornThanOUTload from '../components/moreThanMaterialTruck/sporadicOutfactory/load.vue'

// 内转零星内转进厂展示界面
import sporadicEnfactoryInward from '../components/sporadicMaterial/inwardSporadicFactory/enFactory.vue'
import sporadicgrossWeightInward from '../components/sporadicMaterial/inwardSporadicFactory/grossWeight.vue'
import sporadicLeavefactoryInward from '../components/sporadicMaterial/inwardSporadicFactory/LeaveFactory.vue'
import sporadicLoadInward from '../components/sporadicMaterial/inwardSporadicFactory/Load.vue'
import sporadicTareWeightInward from '../components/sporadicMaterial/inwardSporadicFactory/tareWeight.vue'
import sporadicUnloadInward from '../components/sporadicMaterial/inwardSporadicFactory/unload.vue'

Vue.use(Router)
const constantRouterMap = [
  {
    path: '/',
    name: 'main',
    meta: {title: '首页', code: 'xtpzgl'},
    component: main,
    redirect: {name: 'addSporadicTransportAppoint'},
    children: [
      //零星物资运输预约
      {path:'addSporadicTransportAppoint',name:'addSporadicTransportAppoint',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportAppoint},
      {path:'sporadicTransportAppoint',name:'sporadicTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportAppoint},
      {path: 'editSporadicTransportAppoint', name: 'editSporadicTransportAppoint', meta: {code: 'xtpzgl-yhgl'}, component: editSporadicTransportAppoint},
      //内转零星运输计划
      {path:'addSporadicTransportPlan',name:'addSporadicTransportPlan',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportPlan},
      {path:'sporadicTransportPlan',name:'sporadicTransportPlan',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportPlan},
      //零星物资运输订单
      {path:'addSporadicTransportOrder',name:'addSporadicTransportOrder',meta:{code:'xtpzgl-jggl'},component:addSporadicTransportOrder},
      {path:'sporadicTransportOrder',name:'sporadicTransportOrder',meta:{code:'xtpzgl-yhgl'},component:sporadicTransportOrder},
      {path: 'editSporadicTransportOrder', name: 'editSporadicTransportOrder', meta: {code: 'xtpzgl-yhgl'}, component: editSporadicTransportOrder},
      //零星物资进厂
      {path:'sporadicENenfactory',name:'sporadicENenfactory',meta:{code:'xtpzgl-yhgl'},component:sporadicENenfactory},
      {path:'sporadicENgrossWeight',name:'sporadicENgrossWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicENgrossWeight},
      {path:'sporadicENoutFactory',name:'sporadicENoutFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicENoutFactory},
      {path:'sporadicENtareWeight',name:'sporadicENtareWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicENtareWeight},
      {path:'sporadicENunload',name:'sporadicENunload',meta:{code:'xtpzgl-yhgl'},component:sporadicENunload},
      //零星物资出厂
      {path:'sporadicOUTenfactory',name:'sporadicOUTenfactory',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTenfactory},
      {path:'sporadicOUTgrossWeight',name:'sporadicOUTgrossWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTgrossWeight},
      {path:'sporadicOUToutFactory',name:'sporadicOUToutFactory',meta:{code:'xtpzgl-yhgl'},component:sporadicOUToutFactory},
      {path:'sporadicOUTtareWeight',name:'sporadicOUTtareWeight',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTtareWeight},
      {path:'sporadicOUTload',name:'sporadicOUTload',meta:{code:'xtpzgl-yhgl'},component:sporadicOUTload},

      //钢材退货运输预约
      {path:'addSteelReturnTransportAppoint',name:'addSteelReturnTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:addSteelReturnTransportAppoint},
      {path:'steelReturnTransportAppoint',name:'steelReturnTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:steelReturnTransportAppoint},
      {path: 'editSteelReturnTransportAppoint', name: 'editSteelReturnTransportAppoint', meta: {code: 'xtpzgl-yhgl'}, component: editSteelReturnTransportAppoint},
      //钢材退货运输订单
      {path:'addSteelReturnTransportOrder',name:'addSteelReturnTransportOrder',meta:{code:'xtpzgl-jggl'},component:addSteelReturnTransportOrder},
      {path:'steelReturnTransportOrder',name:'steelReturnTransportOrder',meta:{code:'xtpzgl-yhgl'},component:steelReturnTransportOrder},
      {path: 'editSteelReturnTransportOrder', name: 'editSteelReturnTransportOrder', meta: {code: 'xtpzgl-yhgl'}, component: editSteelReturnTransportOrder},
      //钢材退货进厂
      {path:'steelReturnEnfactory',name:'steelReturnEnfactory',meta:{code:'xtpzgl-yhgl'},component:steelReturnEnfactory},
      {path:'steelReturnGrossWeight',name:'steelReturnGrossWeight',meta:{code:'xtpzgl-yhgl'},component:steelReturnGrossWeight},
      {path:'steelReturnOutFactory',name:'steelReturnOutFactory',meta:{code:'xtpzgl-yhgl'},component:steelReturnOutFactory},
      {path:'steelReturnTareWeight',name:'steelReturnTareWeight',meta:{code:'xtpzgl-yhgl'},component:steelReturnTareWeight},
      {path:'steelReturnUnload',name:'steelReturnUnload',meta:{code:'xtpzgl-yhgl'},component:steelReturnUnload},

       //一车多趟运输预约
       {path:'addMornThanTransportAppoint',name:'addMornThanTransportAppoint',meta:{code:'xtpzgl-jggl'},component:addMornThanTransportAppoint},
       {path:'mornThanTransportAppoint',name:'mornThanTransportAppoint',meta:{code:'xtpzgl-yhgl'},component:mornThanTransportAppoint},
       //一车多趟运输订单
       {path:'addMornThanTransportOrder',name:'addMornThanTransportOrder',meta:{code:'xtpzgl-jggl'},component:addMornThanTransportOrder},
       {path:'mornThanTransportOrder',name:'mornThanTransportOrder',meta:{code:'xtpzgl-yhgl'},component:mornThanTransportOrder},
       //一车多趟进厂
       {path:'mornThanENenfactory',name:'mornThanENenfactory',meta:{code:'xtpzgl-yhgl'},component:mornThanENenfactory},
       {path:'mornThanENgrossWeight',name:'mornThanENgrossWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanENgrossWeight},
       {path:'mornThanENoutFactory',name:'mornThanENoutFactory',meta:{code:'xtpzgl-yhgl'},component:mornThanENoutFactory},
       {path:'mornThanENtareWeight',name:'mornThanENtareWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanENtareWeight},
       {path:'mornThanENunload',name:'mornThanENunload',meta:{code:'xtpzgl-yhgl'},component:mornThanENunload},
       //一车多趟出厂
       {path:'mornThanOUTenfactory',name:'mornThanOUTenfactory',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTenfactory},
       {path:'mornThanOUTgrossWeight',name:'mornThanOUTgrossWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTgrossWeight},
       {path:'mornThanOUToutFactory',name:'sporadicOUToutFactory',meta:{code:'xtpzgl-yhgl'},component:mornThanOUToutFactory},
       {path:'mornThanOUTtareWeight',name:'sporadicOUTtareWeight',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTtareWeight},
       {path:'mornThanOUTload',name:'mornThanOUTload',meta:{code:'xtpzgl-yhgl'},component:mornThanOUTload},

       //内转零星内转
       {path:'sporadicEnfactoryInward',name:'sporadicEnfactoryInward',meta:{code:'xtpzgl-yhgl'},component:sporadicEnfactoryInward},
       {path:'sporadicgrossWeightInward',name:'sporadicgrossWeightInward',meta:{code:'xtpzgl-yhgl'},component:sporadicgrossWeightInward},
       {path:'sporadicLeavefactoryInward',name:'sporadicLeavefactoryInward',meta:{code:'xtpzgl-yhgl'},component:sporadicLeavefactoryInward},
       {path:'sporadicLoadInward',name:'sporadicLoadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicLoadInward},
       {path:'sporadicTareWeightInward',name:'sporadicTareWeightInward',meta:{code:'xtpzgl-yhgl'},component:sporadicTareWeightInward},
       {path:'sporadicUnloadInward',name:'sporadicUnloadInward',meta:{code:'xtpzgl-yhgl'},component:sporadicUnloadInward},
    ]    
  }
];

const router = new Router({
  routes: constantRouterMap
})
//  before
routerBefore(router, constantRouterMap);

export default router;
//  constantRouterMap
export const routes = constantRouterMap;
