import type { RouteRecordRaw } from 'vue-router' /** * 销售预测管理路由模块 * * 共 5 个页面: * - 预测单列表 (ForecastOrderList) → 注册为 /forecast-order/list * - 预测参数配置 (SystemConfig) → 注册为 /forecast-order/config * - 编辑页 (ForecastOrderEdit) → 模态弹窗,不注册独立路由 * - 详情页 (ForecastOrderDetail) → 抽屉/弹窗,不注册独立路由 * - 变更单编辑 (ChangeOrderEdit) → 抽屉/弹窗,不注册独立路由 * * 编辑/详情/变更单编辑由列表页通过 query 参数或 store 状态控制显隐。 */ const forecastOrderRoutes: RouteRecordRaw = { path: '/forecast-order', name: 'forecast-order', meta: { title: '销售预测管理', enTitle: '{"zh-tw":"銷售預測管理","en-us":"Sales Forecast Management","hu-hu":"Értékesítési előrejelzés","vi-vn":"Quản lý dự báo bán hàng"}', icon: 'menu', noCache: true, isBootstrap: true, permissions: [ 'crm:forecast:query', 'crm:forecast:create', 'crm:forecast:submit', 'crm:forecast:update', 'crm:forecast:detail', 'crm:forecast:review', 'crm:forecast:change:create', 'crm:forecast:change:approve', 'crm:forecast:convert-order', 'crm:forecast:config', ], }, children: [ { path: 'list', name: 'forecastOrderList', component: () => import('@/views/forecast-order/index.vue'), meta: { title: '预测单列表', enTitle: '{"zh-tw":"預測單列表","en-us":"Forecast Order List"}', permissions: ['crm:forecast:query'], noCache: true, isBootstrap: true, }, }, { path: 'config', name: 'forecastConfig', component: () => import('@/views/forecast-order/config/index.vue'), meta: { title: '预测参数配置', enTitle: '{"zh-tw":"預測參數配置","en-us":"Forecast Parameter Config"}', permissions: ['crm:forecast:config'], noCache: true, isBootstrap: true, }, }, ], } export default forecastOrderRoutes