You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
232 lines
6.4 KiB
232 lines
6.4 KiB
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
|
|
Vue.use(Router)
|
|
|
|
/* Layout */
|
|
import Layout from '@/layout'
|
|
/* 所有角色可以访问/没有权限要求的基页 */
|
|
|
|
export const constantRoutes = [
|
|
{
|
|
path: '/redirect',
|
|
component: Layout,
|
|
hidden: true,
|
|
children: [{
|
|
path: '/redirect/:path(.*)',
|
|
component: () => import('@/views/redirect/index.vue')
|
|
}]
|
|
},
|
|
{
|
|
path: '/',
|
|
redirect: 'index'
|
|
},
|
|
{
|
|
path: '/index',
|
|
component: Layout,
|
|
redirect: '/index',
|
|
children: [{
|
|
path: '/index',
|
|
component: () =>
|
|
import('@/views/index.vue'),
|
|
name: 'index',
|
|
meta: {
|
|
title: '主页',
|
|
noCache: true,
|
|
affix: true
|
|
}
|
|
}]
|
|
},
|
|
{
|
|
path: '/404',
|
|
component: () =>
|
|
import('@/views/404'),
|
|
hidden: true
|
|
},
|
|
{
|
|
path: '/operation',
|
|
component: Layout,
|
|
redirect: '/operation',
|
|
meta: {
|
|
title: '业务'
|
|
},
|
|
children: [
|
|
{
|
|
path: '/preregistration/preregistration',
|
|
component: () => import('@/views/operation/preregistration/preregistration.vue'),
|
|
name: 'Preregistration',
|
|
meta: { title: '预约登记', noCache: true }
|
|
}
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/storage',
|
|
component: Layout,
|
|
redirect: '/storage',
|
|
meta: {
|
|
title: '仓储'
|
|
},
|
|
children: [
|
|
{
|
|
path: '/inventory/inventory',
|
|
component: () => import('@/views/storage/inventory/inventory.vue'),
|
|
name: 'Inventory',
|
|
meta: { title: '库存查询', noCache: true }
|
|
},
|
|
{
|
|
path: '/stocktaking/index',
|
|
name: 'Stocktaking',
|
|
component: () => import('@/views/storage/stocktaking/index'),
|
|
meta: {
|
|
title: '盘点管理',
|
|
noCache: true
|
|
}
|
|
},
|
|
{
|
|
path: '/allocation/index',
|
|
name: 'Allocation',
|
|
component: () => import('@/views/storage/allocation/index'),
|
|
meta: {
|
|
title: '调拨管理',
|
|
noCache: true
|
|
}
|
|
},
|
|
{
|
|
path: '/deliveryNotice/index',
|
|
name: 'DeliveryNotice',
|
|
component: () => import('@/views/storage/deliveryNotice/index'),
|
|
meta: {
|
|
title: '到货通知单',
|
|
noCache: true
|
|
}
|
|
},
|
|
{
|
|
path: '/receivingGoods/index',
|
|
name: 'ReceivingGoods',
|
|
component: () => import('@/views/storage/receivingGoods/index'),
|
|
meta: {
|
|
title: '收货单',
|
|
noCache: true
|
|
}
|
|
},
|
|
]
|
|
},
|
|
|
|
{
|
|
path: '/statement',
|
|
component: Layout,
|
|
redirect: '/statement',
|
|
meta: {
|
|
title: '报表'
|
|
},
|
|
children: [
|
|
{
|
|
path: '/salesstatement/merchandisesalesdetail',
|
|
component: () => import('@/views/statement/salesstatement/merchandisesalesdetail.vue'),
|
|
name: 'MerchandiseSalesDetail',
|
|
meta: { title: '销售明细商品', noCache: true }
|
|
},
|
|
{
|
|
path: '/salesstatement/merchandisesalessummary',
|
|
component: () => import('@/views/statement/salesstatement/merchandisesalessummary.vue'),
|
|
name: 'MerchandiseSalesSummary',
|
|
meta: { title: '销售汇总商品', noCache: true }
|
|
},
|
|
{
|
|
path: '/salesstatement/salestrendreport',
|
|
component: () => import('@/views/statement/salesstatement/salestrendreport.vue'),
|
|
name: 'SalesTrendReport',
|
|
meta: { title: '销售价趋势报表', noCache: true }
|
|
},
|
|
{
|
|
path: '/warehousereport/inventorystatistics',
|
|
component: () => import('@/views/statement/warehousereport/inventorystatistics.vue'),
|
|
name: 'InventoryStatistics',
|
|
meta: { title: '库存统计', noCache: true }
|
|
},
|
|
{
|
|
path: '/warehousereport/receiptandreceiptrecord',
|
|
component: () => import('@/views/statement/warehousereport/receiptandreceiptrecord.vue'),
|
|
name: 'ReceiptAndReceiptRecord',
|
|
meta: { title: '收发存明细报表', noCache: true }
|
|
},
|
|
{
|
|
path: '/purchasereport/detailedpurchasereport',
|
|
component: () => import('@/views/statement/purchasereport/detailedpurchasereport.vue'),
|
|
name: 'DetailedPurchaseReport',
|
|
meta: { title: '采购明细报表', noCache: true }
|
|
},
|
|
{
|
|
path: '/purchasereport/purchasesummaryreport',
|
|
component: () => import('@/views/statement/purchasereport/purchasesummaryreport.vue'),
|
|
name: 'PurchaseSummaryReport',
|
|
meta: { title: '采购汇总报表', noCache: true }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/basicinformation',
|
|
component: Layout,
|
|
redirect: '/basicinformation',
|
|
meta: {
|
|
title: '基础信息'
|
|
},
|
|
children: [
|
|
{
|
|
path: '/maintenanceitem/maintenanceitem',
|
|
component: () => import('@/views/basicinformation/maintenanceitem/maintenanceitem.vue'),
|
|
name: 'MaintenanceItem',
|
|
meta: { title: '维修项目管理', noCache: true }
|
|
},
|
|
{
|
|
path: '/additionitem/additionitem',
|
|
component: () => import('@/views/basicinformation/additionitem/additionitem.vue'),
|
|
name: 'AdditionItem',
|
|
meta: { title: '附加项目管理', noCache: true }
|
|
},
|
|
{
|
|
path: '/setmeal/setmeal',
|
|
component: () => import('@/views/basicinformation/setmeal/setmeal.vue'),
|
|
name: 'Setmeal',
|
|
meta: { title: '套餐管理', noCache: true }
|
|
},
|
|
{
|
|
path: '/profession/profession',
|
|
component: () => import('@/views/basicinformation/profession/profession.vue'),
|
|
name: 'Profession',
|
|
meta: { title: '工种管理', noCache: true }
|
|
},
|
|
{
|
|
path: '/subjects/subjects',
|
|
component: () => import('@/views/basicinformation/subjects/subjects.vue'),
|
|
name: 'Subjects',
|
|
meta: { title: '科目管理', noCache: true }
|
|
},
|
|
{
|
|
path: '/team/team',
|
|
component: () => import('@/views/basicinformation/team/team.vue'),
|
|
name: 'Team',
|
|
meta: { title: '班组管理', noCache: true }
|
|
}
|
|
]
|
|
},
|
|
// 404 page must be placed at the end !!!
|
|
// { path: '*', redirect: '/404', hidden: true }
|
|
]
|
|
|
|
const createRouter = () => new Router({
|
|
// mode: 'history', // require service support
|
|
scrollBehavior: () => ({ y: 0 }),
|
|
routes: constantRoutes
|
|
})
|
|
|
|
const router = createRouter()
|
|
|
|
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
|
export function resetRouter() {
|
|
const newRouter = createRouter()
|
|
router.matcher = newRouter.matcher // reset router
|
|
}
|
|
|
|
export default router
|
|
|