|
|
|
import Vue from 'vue'
|
|
|
|
import VueRouter from 'vue-router'
|
|
|
|
import Home from '../views/Home.vue'
|
|
|
|
import inventoryAndAge from '../views/report/inventoryAndAge.vue'
|
|
|
|
import inventoryERPWMS from '../views/report/inventoryERPWMS.vue'
|
|
|
|
import inventoryTrans from '../views/report/inventoryTrans.vue'
|
|
|
|
import procureHasPOReport from '../views/report/procureHasPOReport.vue'
|
|
|
|
|
|
|
|
Vue.use(VueRouter)
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: '/',
|
|
|
|
name: 'Home',
|
|
|
|
component: Home
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title:"库存库龄报表",
|
|
|
|
path: '/inventoryAndAge',
|
|
|
|
name: 'inventoryAndAge',
|
|
|
|
component: inventoryAndAge
|
|
|
|
},
|
|
|
|
// {
|
|
|
|
// title:"库存余额_ERP-WMS差异报表",
|
|
|
|
// path: '/inventoryERPWMS',
|
|
|
|
// name: 'inventoryERPWMS',
|
|
|
|
// component: inventoryERPWMS
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// title:"库存事务报表",
|
|
|
|
// path: '/inventoryTrans',
|
|
|
|
// name: 'inventoryTrans',
|
|
|
|
// component: inventoryTrans
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
title:"采购收货/采购退货-有PO",
|
|
|
|
path: '/procureHasPOReport',
|
|
|
|
name: 'procureHasPOReport',
|
|
|
|
component: procureHasPOReport
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
|
routes
|
|
|
|
})
|
|
|
|
|
|
|
|
// router.beforeEach((to, from, next) => {
|
|
|
|
// console.log('router.beforeEach',to)
|
|
|
|
// /* 路由发生变化修改页面title */
|
|
|
|
// if (to.meta.title) {
|
|
|
|
// document.title = to.meta.title
|
|
|
|
// }
|
|
|
|
// // if(to.meta.content){
|
|
|
|
// // let head = document.getElementsByTagName('head');
|
|
|
|
// // let metas = document.getElementsByTagName('meta');
|
|
|
|
// // for (let i = 0; i < metas.length; i++) {
|
|
|
|
// // if (metas[i].name === 'viewport') {
|
|
|
|
// // metas[i].content += ', ' + to.meta.content
|
|
|
|
// // }
|
|
|
|
// // }
|
|
|
|
// // }
|
|
|
|
// })
|
|
|
|
|
|
|
|
export default router
|