wms_client_kate_suzhou/src/router/index.js
liangzhou 872d5eafd7 代码更新:
1.完善打印标签界面
2.增加一些报表界面
2024-08-14 22:35:32 +08:00

64 lines
2.7 KiB
JavaScript

import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import stock from '@/layout/stock.vue'
import login from '@/views/login.vue'
import systemCenter from'@/views/SystemCenter.vue'
const routes = [
{
path: '/home',
name: 'home',
component: HomeView,
redirect: '/stock',
children: [
{ path: '/stock', component: stock },// 库存
{ path: '/goodsIn', component: () => import('@/layout/goodsIn.vue') },// 入库
{ path: '/goodsOut', component: () => import('@/layout/goodsOut.vue') },// 出库
{ path: '/inTaskRecord', component: () => import('@/layout/inTaskRecord.vue') },// 入库记录
{ path: '/outTaskRecord', component: () => import('@/layout/outTaskRecord.vue') },// 出库记录
{ path: '/location', component: () => import('@/layout/locationsTable.vue') },// 库位
{ path: '/goods', component: () => import('@/layout/goods.vue') },// 物料
{ path: '/standSettings', component: () => import('@/layout/standSettings.vue') },// 站台(库口)设置
{ path: '/config', component: () => import('@/layout/wmsConfig.vue') },// 系统配置
{ path: '/taskMonitor', component: () => import('@/layout/taskMonitor.vue') },// 任务监控
{ path: '/vehicles', component: () => import('@/layout/vehicle.vue') },// 料箱监控
{ path: '/inventory', component: () => import('@/layout/inventory.vue') },// 盘点
{ path: '/inventoryRecord', component: () => import('@/layout/inventoryRecord.vue') },// 盘点记录
{ path: '/wmsLog', component: () => import('@/layout/wmsLog.vue') },// 日志
{ path: '/testDoKitting', component: () => import('@/layout/doKitting.vue') },// 备料执行
{ path: '/testFinishKitting', component: () => import('@/layout/finishKitting.vue') },// 备料完成
{ path: '/testCallEmptyVehicle', component: () => import('@/layout/callEmptyVehicle.vue') },// 呼叫空箱
{ path: '/testSortBoxs', component: () => import('@/layout/sortBoxs.vue') },// 整理盒子
{ path: '/uploadDbs', component: () => import('@/layout/dbsTable.vue') },// 上传DBS
{ path: '/uploadOrders', component: () => import('@/layout/kateOrdersTable.vue') },// 上传工单
]
},
{
path: '/',
name: 'login',
component: login
},
{
path: '/systemCenter',
name: 'systemCenter',
component: systemCenter
}
]
const router = createRouter({
base: '/',
history: createWebHashHistory(),
routes
})
// 挂载路由导航守卫
router.beforeEach((to, from, next) => {
if (to.path === '/') return next()
// 获取token
const user = sessionStorage.getItem('user')
if (!user) return next('/')
next()
})
export default router