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

import routerBefore from '@/config/routerBefore.js'
// 主要
import main from '@/components/main.vue'
// 系统配置管理
import addSaleOrder from '../components/sale_contract/addSaleOrder.vue'
import addSalePlan from '../components/sale_contract/addSalePlan.vue'
import addSalePlanDetail from '../components/sale_contract/addSalePlanDetail.vue'
import addTransportPrice from '../components/sale_contract/addTransportPrice.vue'
import addTruckNoDetail from '../components/sale_contract/addTruckNoDetail.vue'
import editaddress from '../components/sale_contract/editaddress.vue'
import editSaleOrder from '../components/sale_contract/editSaleOrder.vue'
import editSaleOrderDetail from '../components/sale_contract/editSaleOrderDetail.vue'
import editSalePalnDetail from '../components/sale_contract/editSalePalnDetail.vue'
import editSalePlan from '../components/sale_contract/editSalePlan.vue'
import editTransportPrice from '../components/sale_contract/editTransportPrice.vue'
import editTruckNoDetail from '../components/sale_contract/editTruckNoDetail.vue'
import saleOrder from '../components/sale_contract/saleOrder.vue'
import saleOrderDetail from '../components/sale_contract/saleOrderDetail.vue'
import saleOrderDetailApproved from '../components/sale_contract/saleOrderDetailApproved.vue'
import saleOrderUpdateLog from '../components/sale_contract/saleOrderUpdateLog.vue'
import salePlan from '../components/sale_contract/salePlan.vue'
import transportPrice from '../components/sale_contract/transportPrice.vue'
import addlading from '../components/saleSelfMachine/addlading.vue'
import printLading from '../components/saleSelfMachine/printLading.vue'
import printReceipt from '../components/saleSelfMachine/printReceipt.vue'
import printScan from '../components/saleSelfMachine/printScan.vue'
import printWarranty from '../components/saleSelfMachine/printWarranty.vue'
import saleSelfMachine from '../components/saleSelfMachine/saleSelfMachine.vue'
import addCokeRailPlan from '../components/transport_appointment/railPlan/addCokeRailPlan.vue'
import addSlagRailPlan from '../components/transport_appointment/railPlan/addSlagRailPlan.vue'
import addSteelRailPlan from '../components/transport_appointment/railPlan/addSteelRailPlan.vue'
import cokeRailPlan from '../components/transport_appointment/railPlan/cokeRailPlan.vue'
import slagRailPlan from '../components/transport_appointment/railPlan/slagRailPlan.vue'
import steelRailPlan from '../components/transport_appointment/railPlan/steelRailPlan.vue'
import updateCokeRailPlan from '../components/transport_appointment/railPlan/updateCokeRailPlan.vue'
import updateSlagRailPlan from '../components/transport_appointment/railPlan/updateSlagRailPlan.vue'
import updateSteelRailPlan from '../components/transport_appointment/railPlan/updateSteelRailPlan.vue'
import addOpenDistribution from '../components/transport_appointment/addOpenDistribution.vue'
import directionalDispatch from '../components/transport_appointment/directionalDispatch.vue'
import openDistribution from '../components/transport_appointment/openDistribution.vue'
import openDistributionSection from '../components/transport_appointment/openDistributionSection.vue'
import orderGrabbing from '../components/transport_appointment/orderGrabbing.vue'

import add_sale_dilNotice from '../components/dilNotice/add_sale_dilNotice.vue'
import Carrier_dilNotice from '../components/dilNotice/Carrier_dilNotice.vue'
import sale_dilNotice from '../components/dilNotice/sale_dilNotice.vue'
import addNotice from '../components/dilNotice/addNotice.vue'
import carrierNotice from '../components/dilNotice/carrierNotice.vue'
import clientNotice from '../components/dilNotice/clientNotice.vue'
import editNotice from '../components/dilNotice/editNotice.vue'
import getNoticeById from '../components/dilNotice/getNoticeById.vue'
import marketingNotice from '../components/dilNotice/marketingNotice.vue'
import newNotice from '../components/dilNotice/newNotice.vue'

import outFactoryResult from '../components/transport_excute/outFactory/outFactoryResult.vue'
import smsResult from '../components/transport_excute/outFactory/smsResult.vue'
import arrivalPhoto from '../components/transport_excute/tms-offsite/arrivalPhoto.vue'
import arrivalResult from '../components/transport_excute/tms-offsite/arrivalResult.vue'
import distance from '../components/transport_excute/tms-offsite/distance.vue'
import inTransit from '../components/transport_excute/tms-offsite/inTransit.vue'
import inTransitAbnormal from '../components/transport_excute/tms-offsite/inTransitAbnormal.vue'
import inTransitAlarm from '../components/transport_excute/tms-offsite/inTransitAlarm.vue'
import inTransitOrderMileage from '../components/transport_excute/tms-offsite/inTransitOrderMileage.vue'
import pathView from '../components/transport_excute/tms-offsite/pathView.vue'
import receiptChildPhoto from '../components/transport_excute/tms-offsite/receiptChildPhoto.vue'
import receiptPhoto from '../components/transport_excute/tms-offsite/receiptPhoto.vue'
import receiptResult from '../components/transport_excute/tms-offsite/receiptResult.vue'
import transportInfo from '../components/transport_excute/tms-offsite/transportInfo.vue'
import enFactoryResult from '../components/transport_excute/enFactoryResult.vue'
import grossWeightResult from '../components/transport_excute/grossWeightResult.vue'
import loadTruckResult from '../components/transport_excute/loadTruckResult.vue'
import qualityResult from '../components/transport_excute/qualityResult.vue'
import returnResult from '../components/transport_excute/returnResult.vue'
import tareWeightResult from '../components/transport_excute/tareWeightResult.vue'
import disatchSteelSaleOrderAdd from '../components/transport_order/disatchSteelSaleOrderAdd.vue'
import dispatchCokeRailPlan from '../components/transport_order/dispatchCokeRailPlan.vue'
import dispatchCokeRailPlanAdd from '../components/transport_order/dispatchCokeRailPlanAdd.vue'
import dispatchCokeRailPlanCheck from '../components/transport_order/dispatchCokeRailPlanCheck.vue'
import dispatchOrder from '../components/transport_order/dispatchOrder.vue'
import dispatchSlagDayPlanAdd from '../components/transport_order/dispatchSlagDayPlanAdd.vue'
import dispatchSlagDayPlanCheck from '../components/transport_order/dispatchSlagDayPlanCheck.vue'
import dispatchSlagRailPlan from '../components/transport_order/dispatchSlagRailPlan.vue'
import dispatchSteelSaleOrder from '../components/transport_order/dispatchSteelSaleOrder.vue'
import dispatchSteelSaleOrderCheck from '../components/transport_order/dispatchSteelSaleOrderCheck.vue'
import receiveOrder from '../components/transport_order/receiveOrder.vue'
import addBmsTrainFreight from '../components/transportFreight/saleTrainSettlement/addBmsTrainFreight.vue'
import bmsTrainFreight from '../components/transportFreight/saleTrainSettlement/bmsTrainFreight.vue'
import updateBmsTrainFreight from '../components/transportFreight/saleTrainSettlement/updateBmsTrainFreight.vue'
import addBmsTruckInvoice from '../components/transportFreight/saleTruckSettlement/addBmsTruckInvoice.vue'
import addBmsTruckStatement from '../components/transportFreight/saleTruckSettlement/addBmsTruckStatement.vue'
import bmsTruckAudit from '../components/transportFreight/saleTruckSettlement/bmsTruckAudit.vue'
import bmsTruckDetailOrder from '../components/transportFreight/saleTruckSettlement/bmsTruckDetailOrder.vue'
import bmsTruckFormula from '../components/transportFreight/saleTruckSettlement/bmsTruckFormula.vue'
import bmsTruckInvoice from '../components/transportFreight/saleTruckSettlement/bmsTruckInvoice.vue'
import bmsTruckStatement from '../components/transportFreight/saleTruckSettlement/bmsTruckStatement.vue'
import getBmsTruckStatementOrder from '../components/transportFreight/saleTruckSettlement/getBmsTruckStatementOrder.vue'
import getTransportResult from '../components/transportFreight/saleTruckSettlement/getTransportResult.vue'
Vue.use(Router)
const constantRouterMap = [
	{
	  path: '/',
	  name: 'main',
	  meta: {title: '首页', code: 'xtpzgl'},
	  component: main,
	  redirect: {name: 'addSaleOrder'},
	  children: [
		{path: 'addSaleOrder', name: 'addSaleOrder', meta: {code: 'xtpzgl-jggl'}, component: addSaleOrder},
		{path: 'addSalePlan', name: 'addSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlan},
		{path: 'addSalePlanDetail/:planId', name: 'addSalePlanDetail', meta: {code: 'xtpzgl-yhgl'}, component: addSalePlanDetail},
		{path: 'addTransportPrice', name: 'addTransportPrice', meta: {code: 'xtpzgl-yhgl'}, component: addTransportPrice},
		{path: 'addTruckNoDetail/:saleOrderMaterialId', name: 'addTruckNoDetail', meta: {code: 'xtpzgl-yhgl'}, component: addTruckNoDetail},
		{path: 'editaddress/:saleOrderMaterialId', name: 'editaddress', meta: {code: 'xtpzgl-yhgl'}, component: editaddress},
		{path: 'editSaleOrder/:saleOrderId', name: 'editSaleOrder', meta: {code: 'xtpzgl-yhgl'}, component: editSaleOrder},
		{path: 'editSaleOrderDetail/:saleOrderMaterialId', name: 'editSaleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: editSaleOrderDetail},
		{path: 'editSalePalnDetail/:planMaterialId', name: 'editSalePalnDetail', meta: {code: 'xtpzgl-yhgl'}, component: editSalePalnDetail},
		{path: 'editSalePlan/:planId', name: 'editSalePlan', meta: {code: 'xtpzgl-yhgl'}, component: editSalePlan},
		{path: 'editTransportPrice/:priceId', name: 'editTransportPrice', meta: {code: 'xtpzgl-yhgl'}, component: editTransportPrice},
		{path: 'editTruckNoDetail/:trucknoMaterialId', name: 'editTruckNoDetail', meta: {code: 'xtpzgl-yhgl'}, component: editTruckNoDetail},
		{path: 'saleOrder', name: 'saleOrder', meta: {code: 'xtpzgl-yhgl'}, component: saleOrder},
		{path: 'saleOrderDetail/:saleOrderId', name: 'saleOrderDetail', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetail},
		{path: 'saleOrderDetailApproved/:saleOrderId', name: 'saleOrderDetailApproved', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderDetailApproved},
		{path: 'saleOrderUpdateLog/:saleOrderId', name: 'saleOrderUpdateLog', meta: {code: 'xtpzgl-yhgl'}, component: saleOrderUpdateLog},
		{path: 'salePlan', name: 'salePlan', meta: {code: 'xtpzgl-yhgl'}, component: salePlan},
		{path: 'transportPrice', name: 'transportPrice', meta: {code: 'xtpzgl-yhgl'}, component: transportPrice},
		{path: 'addlading', name: 'addlading', meta: {code: 'xtpzgl-yhgl'}, component: addlading},
		{path: 'printLading', name: 'printLading', meta: {code: 'xtpzgl-yhgl'}, component: printLading},
		{path: 'printReceipt', name: 'printReceipt', meta: {code: 'xtpzgl-yhgl'}, component: printReceipt},
		{path: 'printScan', name: 'printScan', meta: {code: 'xtpzgl-yhgl'}, component: printScan},
		{path: 'printWarranty', name: 'printWarranty', meta: {code: 'xtpzgl-yhgl'}, component: printWarranty},
		{path: 'saleSelfMachine', name: 'saleSelfMachine', meta: {code: 'xtpzgl-yhgl'}, component: saleSelfMachine},
		{path: 'addCokeRailPlan', name: 'addCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addCokeRailPlan},
		{path: 'addSlagRailPlan', name: 'addSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addSlagRailPlan},
		{path: 'addSteelRailPlan', name: 'addSteelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: addSteelRailPlan},
		{path: 'cokeRailPlan', name: 'cokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: cokeRailPlan},
		{path: 'slagRailPlan', name: 'slagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: slagRailPlan},
		{path: 'steelRailPlan', name: 'steelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: steelRailPlan},
		{path: 'updateCokeRailPlan/:dayPlanId', name: 'updateCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateCokeRailPlan},
		{path: 'updateSlagRailPlan/:dayPlanId', name: 'updateSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateSlagRailPlan},
		{path: 'updateSteelRailPlan/:dayPlanId', name: 'updateSteelRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: updateSteelRailPlan},
		{path: 'addOpenDistribution', name: 'addOpenDistribution', meta: {code: 'xtpzgl-yhgl'}, component: addOpenDistribution},
		{path: 'directionalDispatch', name: 'directionalDispatch', meta: {code: 'xtpzgl-yhgl'}, component: directionalDispatch},
		{path: 'openDistribution', name: 'openDistribution', meta: {code: 'xtpzgl-yhgl'}, component: openDistribution},
		{path: 'openDistributionSection/:dispatchId', name: 'openDistributionSection', meta: {code: 'xtpzgl-yhgl'}, component: openDistributionSection},
		{path: 'orderGrabbing', name: 'orderGrabbing', meta: {code: 'xtpzgl-yhgl'}, component: orderGrabbing},

		{path: 'add_sale_dilNotice', name: 'add_sale_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: add_sale_dilNotice},
		{path: 'Carrier_dilNotice', name: 'Carrier_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: Carrier_dilNotice},
		{path: 'sale_dilNotice', name: 'sale_dilNotice', meta: {code: 'xtpzgl-yhgl'}, component: sale_dilNotice},
		{path: 'addNotice', name: 'addNotice', meta: {code: 'xtpzgl-yhgl'}, component: addNotice},
		{path: 'carrierNotice', name: 'carrierNotice', meta: {code: 'xtpzgl-yhgl'}, component: carrierNotice},
		{path: 'clientNotice', name: 'clientNotice', meta: {code: 'xtpzgl-yhgl'}, component: clientNotice},
		{path: 'editNotice/:noticeId', name: 'editNotice', meta: {code: 'xtpzgl-yhgl'}, component: editNotice},
		{path: 'getNoticeById/:noticeId', name: 'getNoticeById', meta: {code: 'xtpzgl-yhgl'}, component: getNoticeById},
		{path: 'marketingNotice', name: 'marketingNotice', meta: {code: 'xtpzgl-yhgl'}, component: marketingNotice},
		{path: 'newNotice', name: 'newNotice', meta: {code: 'xtpzgl-yhgl'}, component: newNotice},

		{path: 'outFactoryResult', name: 'outFactoryResult', meta: {code: 'xtpzgl-yhgl'}, component: outFactoryResult},
		{path: 'smsResult', name: 'smsResult', meta: {code: 'xtpzgl-jggl'}, component: smsResult},
		{path: 'arrivalPhoto', name: 'arrivalPhoto', meta: {code: 'xtpzgl-yhgl'}, component: arrivalPhoto},
		{path: 'arrivalResult', name: 'arrivalResult', meta: {code: 'xtpzgl-yhgl'}, component: arrivalResult},
		{path: 'distance', name: 'distance', meta: {code: 'xtpzgl-yhgl'}, component: distance},
		{path: 'inTransit', name: 'inTransit', meta: {code: 'xtpzgl-yhgl'}, component: inTransit},
		{path: 'inTransitAbnormal', name: 'inTransitAbnormal', meta: {code: 'xtpzgl-yhgl'}, component: inTransitAbnormal},
		{path: 'inTransitAlarm', name: 'inTransitAlarm', meta: {code: 'xtpzgl-yhgl'}, component: inTransitAlarm},
		{path: 'inTransitOrderMileage', name: 'inTransitOrderMileage', meta: {code: 'xtpzgl-yhgl'}, component: inTransitOrderMileage},
		{path: 'pathView', name: 'pathView', meta: {code: 'xtpzgl-yhgl'}, component: pathView},
		{path: 'receiptChildPhoto', name: 'receiptChildPhoto', meta: {code: 'xtpzgl-yhgl'}, component: receiptChildPhoto},
		{path: 'receiptPhoto', name: 'receiptPhoto', meta: {code: 'xtpzgl-yhgl'}, component: receiptPhoto},
		{path: 'receiptResult', name: 'receiptResult', meta: {code: 'xtpzgl-yhgl'}, component: receiptResult},
		{path: 'transportInfo', name: 'transportInfo', meta: {code: 'xtpzgl-yhgl'}, component: transportInfo},
		{path: 'enFactoryResult', name: 'enFactoryResult', meta: {code: 'xtpzgl-yhgl'}, component: enFactoryResult},
		{path: 'grossWeightResult', name: 'grossWeightResult', meta: {code: 'xtpzgl-jggl'}, component: grossWeightResult},
		{path: 'loadTruckResult', name: 'loadTruckResult', meta: {code: 'xtpzgl-yhgl'}, component: loadTruckResult},
		{path: 'qualityResult', name: 'qualityResult', meta: {code: 'xtpzgl-yhgl'}, component: qualityResult},
		{path: 'returnResult', name: 'returnResult', meta: {code: 'xtpzgl-yhgl'}, component: returnResult},
		{path: 'tareWeightResult', name: 'tareWeightResult', meta: {code: 'xtpzgl-yhgl'}, component: tareWeightResult},
		{path: 'disatchSteelSaleOrderAdd', name: 'disatchSteelSaleOrderAdd', meta: {code: 'xtpzgl-yhgl'}, component: disatchSteelSaleOrderAdd},
		{path: 'dispatchCokeRailPlan', name: 'dispatchCokeRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlan},
		{path: 'dispatchCokeRailPlanAdd', name: 'dispatchCokeRailPlanAdd', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlanAdd},
		{path: 'dispatchCokeRailPlanCheck', name: 'dispatchCokeRailPlanCheck', meta: {code: 'xtpzgl-yhgl'}, component: dispatchCokeRailPlanCheck},
		{path: 'dispatchOrder', name: 'dispatchOrder', meta: {code: 'xtpzgl-yhgl'}, component: dispatchOrder},
		{path: 'dispatchSlagDayPlanAdd', name: 'dispatchSlagDayPlanAdd', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagDayPlanAdd},
		{path: 'dispatchSlagDayPlanCheck', name: 'dispatchSlagDayPlanCheck', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagDayPlanCheck},
		{path: 'dispatchSlagRailPlan', name: 'dispatchSlagRailPlan', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSlagRailPlan},
		{path: 'dispatchSteelSaleOrder', name: 'dispatchSteelSaleOrder', meta: {code: 'xtpzgl-yhgl'}, component: dispatchSteelSaleOrder},
		{path: 'dispatchSteelSaleOrderCheck', name: 'dispatchSteelSaleOrderCheck', meta: {code: 'xtpzgl-jggl'}, component: dispatchSteelSaleOrderCheck},
		{path: 'receiveOrder', name: 'receiveOrder', meta: {code: 'xtpzgl-yhgl'}, component: receiveOrder},
		{path: 'addBmsTrainFreight', name: 'addBmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTrainFreight},
		{path: 'bmsTrainFreight', name: 'bmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: bmsTrainFreight},
		{path: 'updateBmsTrainFreight/:settlementId', name: 'updateBmsTrainFreight', meta: {code: 'xtpzgl-yhgl'}, component: updateBmsTrainFreight},
		{path: 'addBmsTruckInvoice', name: 'addBmsTruckInvoice', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTruckInvoice},
		{path: 'addBmsTruckStatement', name: 'addBmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: addBmsTruckStatement},
		{path: 'bmsTruckAudit/:statementId', name: 'bmsTruckAudit', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckAudit},
		{path: 'bmsTruckDetailOrder', name: 'bmsTruckDetailOrder', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckDetailOrder},
		{path: 'bmsTruckFormula', name: 'bmsTruckFormula', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckFormula},
		{path: 'bmsTruckInvoice', name: 'bmsTruckInvoice', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckInvoice},
		{path: 'bmsTruckStatement', name: 'bmsTruckStatement', meta: {code: 'xtpzgl-yhgl'}, component: bmsTruckStatement},
		{path: 'getBmsTruckStatementOrder/:statementId', name: 'getBmsTruckStatementOrder', meta: {code: 'xtpzgl-yhgl'}, component: getBmsTruckStatementOrder},
		{path: 'getTransportResult/:orderId', name: 'getTransportResult', meta: {code: 'xtpzgl-yhgl'}, component: getTransportResult},
	  ]
	}
  ];
  
  const router = new Router({
	routes: constantRouterMap
  })
  //  before
  routerBefore(router, constantRouterMap);
  
  export default router;
  //  constantRouterMap
  export const routes = constantRouterMap;
  