router.config.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. // eslint-disable-next-line
  2. import {
  3. UserLayout,
  4. BasicLayout,
  5. MobileLayout,
  6. MobilePageLayout,
  7. BlankLayout,
  8. BigScreen,
  9. PageView
  10. } from '@/layouts'
  11. // 菜单模块
  12. import home from './home' // 首页
  13. import salesManageService from './salesManageService' // 销售管理
  14. import salesReturnManage from './salesReturnManage' // 销售退货
  15. import purchasingManagement from './purchasingManagement' // 采购管理
  16. import financialManagement from './financialManagement' // 财务管理
  17. import expenseManagement from './expenseManagement' // 费用报销
  18. import inventoryManagement from './inventoryManagement' // 库存管理
  19. import allocationManagement from './allocationManagement' // 调拨管理
  20. import salesReport from './report/salesReport' // 销售报表
  21. import purchasingReport from './report/purchasingReport' // 采购报表
  22. import transferReport from './report/transferReport' // 调拨报表
  23. import spreadReport from './report/spreadReport' // 差价报表
  24. import otherReport from './report/otherReport' // 其他报表
  25. import dealerManagement from './dealerManagement' // 经销商管理
  26. import productManagement from './productManagement' // 产品管理
  27. import supplierManagement from './supplierManagement' // 供应商管理
  28. // import promotionRulesManagement from './promotionRulesManagement' // 促销管理
  29. import easyPassManagement from './easyPassManagement' // 易码通管理
  30. import bigStatistics from './bigStatistics' // 大屏统计
  31. import sysSetting from './sysSetting' // 系统设置
  32. export const asyncRouterMap = [
  33. {
  34. path: '/',
  35. name: 'index',
  36. component: BasicLayout,
  37. meta: {
  38. title: '首页'
  39. },
  40. redirect: '/home',
  41. children: [
  42. // 首页
  43. home,
  44. // 销售管理
  45. salesManageService,
  46. // 销售退货
  47. salesReturnManage,
  48. // 采购管理
  49. purchasingManagement,
  50. // 财务管理
  51. financialManagement,
  52. // 费用报销
  53. expenseManagement,
  54. // 库存管理
  55. inventoryManagement,
  56. // 调拨管理
  57. allocationManagement,
  58. // 报表
  59. salesReport,
  60. purchasingReport,
  61. spreadReport,
  62. transferReport,
  63. otherReport,
  64. // 产品管理
  65. productManagement,
  66. // 经销商管理
  67. dealerManagement,
  68. // 供应商管理
  69. supplierManagement,
  70. // 易码通
  71. easyPassManagement,
  72. // 大屏数据
  73. bigStatistics,
  74. // 系统设置
  75. sysSetting
  76. ]
  77. },
  78. {
  79. path: '*',
  80. redirect: '/404',
  81. hidden: true
  82. }
  83. ]
  84. /**
  85. * 移动端路由
  86. * @type { *[] }
  87. */
  88. export const asyncMobileRouterMap = [
  89. {
  90. path: '/',
  91. name: 'index',
  92. component: MobileLayout,
  93. meta: {
  94. title: '首页'
  95. },
  96. redirect: '/home',
  97. children: [
  98. {
  99. path: '/home',
  100. name: 'home',
  101. component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/Home'),
  102. meta: {
  103. title: '首页',
  104. icon: 'home',
  105. hidden: true
  106. }
  107. }
  108. ]
  109. },
  110. {
  111. path: '/page',
  112. name: 'page',
  113. component: MobilePageLayout,
  114. redirect: '/inventoryQuery',
  115. children: [
  116. {
  117. path: '/inventoryQuery',
  118. name: 'inventoryQuery',
  119. component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/inventoryManagement/inventoryQuery/list.vue'),
  120. meta: {
  121. title: '库存查询',
  122. icon: 'monitor',
  123. permission: 'M_inventoryQueryList'
  124. }
  125. },
  126. {
  127. path: '/warehouseDetail/:sn/:warehouseSn',
  128. name: 'inventoryQueryWarehouseDetail',
  129. component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/inventoryManagement/inventoryQuery/warehouseDetail.vue'),
  130. meta: {
  131. title: '出入库明细',
  132. icon: 'monitor',
  133. permission: 'B_inventoryQuery_rkDetail'
  134. }
  135. },
  136. {
  137. path: '/productPricing',
  138. name: 'productPricing',
  139. component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/productManagement/productPricing/list.vue'),
  140. meta: {
  141. title: '产品定价',
  142. icon: 'transaction',
  143. permission: 'M_productPricingList'
  144. }
  145. }
  146. ]
  147. },
  148. {
  149. path: '*',
  150. redirect: '/404',
  151. hidden: true
  152. }
  153. ]
  154. /**
  155. * 基础路由
  156. * @type { *[] }
  157. */
  158. export const constantRouterMap = [
  159. {
  160. path: '/user',
  161. component: UserLayout,
  162. redirect: '/user/login',
  163. hidden: true,
  164. children: [
  165. {
  166. path: 'login',
  167. name: 'login',
  168. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
  169. },
  170. {
  171. path: 'register',
  172. name: 'register',
  173. component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
  174. },
  175. {
  176. path: 'register-result',
  177. name: 'registerResult',
  178. component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
  179. },
  180. {
  181. path: 'recover',
  182. name: 'recover',
  183. component: undefined
  184. }
  185. ]
  186. },
  187. {
  188. path: '/bigScreen',
  189. component: BigScreen,
  190. redirect: '/bigScreen/realTimeSalesReport',
  191. hidden: true,
  192. children: [
  193. {
  194. path: 'realTimeSalesReport',
  195. name: 'realTimeSalesReport',
  196. component: () => import(/* webpackChunkName: "bigScreen" */ '@/views/bigScreen/realTimeSalesReport/index'),
  197. meta: {
  198. title: '实时销售看板'
  199. }
  200. },
  201. {
  202. path: 'fPanalysisReport',
  203. name: 'fPanalysisReport',
  204. component: () => import(/* webpackChunkName: "bigScreen" */ '@/views/bigScreen/fPanalysisReport/index'),
  205. meta: {
  206. title: '加盟商/产品分析'
  207. }
  208. }
  209. ]
  210. },
  211. {
  212. path: '/404',
  213. component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  214. }
  215. ]