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.
 
 
 
 
 
 

513 lines
14 KiB

import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'
// import codemenu from './codemenu.js'
Vue.use(Router)
/* 所有角色可以访问/没有权限要求的基页 */
export const constantRoutes = [
{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue')
},
]
},
{
path: '/',
redirect: 'index'
},
{
path: '/login',
component: () => import('@/views/login/login.vue')
},
{
path: '/home',
component: () => import('@/views/Home/Home.vue'),
name: 'home'
},
{
path: '/index',
component: Layout,
redirect: '/index',
meta: {
title: '首页',
},
children: [
{
path: '/index',
component: () => import('@/views/index.vue'),
name: 'index',
meta: {
title: '主页',
noCache: true,
affix: true,
}
},
]
},
// 客户中心
{
path: '1',
component: Layout,
meta: { title: '客户中心' },
children: [
{
path: 'cgsq/PurchaseApplicationManagement',
component: () => import('@/views/supervise/purchaseapplicationmanagement/purchaseapplicationmanagement.vue'),
name: 'PurchaseApplicationManagement',
meta: {title: '采购申请管理',noCache: true,}
},
{
path: 'xzgys',
component: () => import('@/views/supervise/supplierbankinfo/supplierbankinfo.vue'),
name: 'supplierManagement',
meta: {title: '供应商管理',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '厂商扣点汇总表',noCache: true}
},
{
path: 'cgsq',
component: Layout,
meta: {title: '数据上报'},
children: [
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '综合数据上报',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '入库上报',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '出库上报',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '库存上报',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '销售上报',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '仓库调拨上报',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '配送批发上报',noCache: true}
}
],
},
{
path: 'cgsq',
component: Layout,
meta: {title: '信息查询'},
children: [
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '库存信息查询',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '订单查询',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '订单商品查询',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '出入库查询',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '供应商查询',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '仓库调拨查询',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '配送批发查询',noCache: true}
}
]
}
]
},
// 审批中心
{
path: '',
component: Layout,
meta: { title: '审批中心' },
children: [
{
path: '/404',
component: () => import('@/views/404'),
name: 'readWork',
meta: {title: '已阅工作',noCache: true,}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'waitingWork',
meta: {title: '待阅工作',noCache: true}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'alreadyHandledWork',
meta: {title: '已办工作',noCache: true,}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'handledWork',
meta: {title: '待办工作',noCache: true}
}
]
},
{
path: '',
component: Layout,
meta: { title: '消息中心' },
children: [
{
path: 'cgsq/PurchaseApplicationManagement',
component: () => import('@/views/404'),
name: 'PurchaseApplicationManagement',
meta: {title: '未读消息',noCache: true,}
},
{
path: 'xzgys',
component: () => import('@/views/404'),
name: 'supplierManagement',
meta: {title: '已读消息',noCache: true}
}
]
},
{
path: '',
component: Layout,
meta: { title: '报表中心' },
children: [
{
path: 'reportCenter/salesReport',
component: () => import('@/views/reportCenter/salesReport.vue'),
name: 'salesReport',
meta: {title: '销售报表',noCache: true,}
},
{
path: 'reportCenter/goodsOnWay',
component: () => import('@/views/reportCenter/goodsOnWay.vue'),
name: 'goodsOnWay',
meta: {title: '在途商品管理表',noCache: true}
}
]
},
{
path: '',
component: Layout,
meta: { title: '风控管理' },
children: [
{
path: 'risk/thresholdAnalysis',
component: () => import('@/views/risk/thresholdAnalysis.vue'),
name: 'thresholdAnalysis',
meta: {title: '阀值分析',noCache: true,}
}
]
},
{
path: '',
component: Layout,
meta: { title: '系统管理' },
children: [
{
path: 'risk/thresholdAnalysis',
component: () => import('@/views/risk/thresholdAnalysis.vue'),
name: 'thresholdAnalysis',
meta: {title: '阀值分析',noCache: true,}
}
]
},
{
path: '/customer',
component: Layout,
meta: {
title: '客户中心(以下为原菜单)'
},
children: [{
path: 'cgsq',
component: () => import('@/views/customer/index.vue'),
meta: {
title: '采购申请'
},
children: [{
path: 'PurchaseApplicationManagement',
component: () => import('@/views/supervise/purchaseapplicationmanagement/purchaseapplicationmanagement.vue'),
name: 'PurchaseApplicationManagement',
meta: { title: '采购申请管理', noCache: true }
}, {
path: 'kfpurchaserequisitionAdd',
component: () => import('@/views/supervise/kfpurchaserequisition/kfpurchaserequisitionAdd.vue'),
name: 'KfPurchaseRequisitionAdd',
meta: {
title: '采购订单上传',
noCache: true
}
}, {
path: 'kfpurchaserequisitionInfo',
component: () => import('@/views/supervise/kfpurchaserequisition/kfpurchaserequisitionInfo.vue'),
name: 'KfPurchaseRequisitionInfo',
meta: {
title: '采购申请回执',
noCache: true
}
}]
}, {
path: 'crksq',
component: () => import('@/views/customer/index.vue'),
meta: { title: '出入库申请' },
children: [{
path: 'rksq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionAdd',
meta: {
title: '入库申请',
noCache: true
}
}, {
path: 'cksq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionInfo',
meta: {
title: '出库申请',
noCache: true
}
}]
}, {
path: 'sjsb',
component: () => import('@/views/customer/index.vue'),
meta: { title: '数据上报' },
children: [{
path: 'rkmxsq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionAdd',
meta: {
title: '入库明细上传',
noCache: true
}
}, {
path: 'xsbbsq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionInfo',
meta: {
title: '销售报表上传',
noCache: true
}
}
// {
// path: 'xssb',
// component: () => import('@/views/xiaoshou/salesreport/salesreport.vue'),
// name: 'SalesReport',
// meta: { title: '销售上报', noCache: true }
// }, {
// path: 'ckdbsb',
// component: () => import('@/views/xiaoshou/warehousetransferreport/warehousetransferreport.vue'),
// name: 'WarehouseTransferReport',
// meta: { title: '仓库调拨上报', noCache: true }
// }, {
// path: 'pssb',
// component: () => import('@/views/xiaoshou/distributionreport/distributionreport.vue'),
// name: 'DistributionReport',
// meta: { title: '配送上报', noCache: true }
// }
]
}, {
path: 'gysgl',
component: () => import('@/views/customer/index.vue'),
meta: { title: '供应商管理' },
children: [{
path: 'xzgys',
component: () => import('@/views/supervise/supplierbankinfo/supplierbankinfo.vue'),
name: 'SupplierBankInfoIndex',
meta: {
title: '供应商管理',
noCache: true
}
}, {
path: 'htsq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionInfo',
meta: {
title: '合同上传',
noCache: true
}
}]
}]
},
// 1销售统计
{
path: '/xiaoshou',
component: Layout,
meta: {
title: '销售统计'
},
children: [{
path: 'xstj/index',
component: () => import('@/views/xiaoshou/xstj/index.vue'),
name: 'XiaoshouXstjIndex',
meta: {
title: '销售数据导入',
noCache: true
}
}, {
path: 'xstj/tj',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'XiaoshouXstjTj',
meta: {
title: '销售数据统计',
noCache: true
}
}]
},
// 2库存信息
{
path: '/kucun',
component: Layout,
meta: {
title: '库存信息'
},
children: [{
path: 'kcxxcx',
component: () => import('@/views/kucun/kcxxcx/index.vue'),
name: 'KucunKcxxcxIndex',
meta: {
title: '库存数据导入',
noCache: true
}
}, {
path: 'rkmx',
component: () => import('@/views/kucun/rkmx/index.vue'),
name: 'KucunRkmxIndex',
meta: {
title: '入库明细',
noCache: true
}
}, {
path: 'ckmx',
component: () => import('@/views/kucun/ckmx/index.vue'),
name: 'KucunCkmxIndex',
meta: {
title: '出库明细',
noCache: true
}
}, {
path: 'xssjgl',
component: () => import('@/views/kucun/xssjgl/index.vue'),
name: 'KucunXssjglIndex',
meta: {
title: '销售数据管理',
noCache: true
}
}, {
path: 'pfsjgl',
component: () => import('@/views/kucun/pfsjgl/index.vue'),
name: 'KucunPfsjglIndex',
meta: {
title: '批发数据管理',
noCache: true
}
}]
},
// // 3库存信息
// {
// path: '/report',
// component: Layout,
// meta: {
// title: '报表中心'
// },
// children: [{
// path: 'xsbb',
// component: () => import('@/views/report/salesreport/index.vue'),
// meta: { title: '销售报表' },
// children: [{
// path: 'xsmx',
// component: () => import('@/views/report/xsmx/index.vue'),
// name: 'ReportXsmxIndex',
// meta: { title: '销售明细', noCache: true }
// }]
// }]
// },
// codemenu,
{
path: '/404',
component: () =>
import('@/views/404'),
hidden: 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