選單與功能對應

概述

此文件列出 Flutter App 儀表板上所有可顯示的功能,以及驅動它們的機制。儀表板網格(DashboardGridTab)從兩個獨立來源合併功能:

  1. App Modulesapp_modules.dart)— 硬編碼的非 ERP 功能,透過 BrandingConfig 的 Feature Flag 控制可見度
  2. Enhanced Menu Items — 從 iDempiere 伺服器選單樹載入(menuTreeProvider),透過 findEnhancedModule() 匹配:
    • 首先檢查 DocumentRegistry(設定驅動的 DocumentConfig
    • 回退到 Enhanced Module Registry(傳統硬編碼條目)

若 AD_Menu 項目未被任何 Registry 匹配,它會顯示在底部可折疊的 ERP Menu 區段(通用瀏覽器)。

儀表板分類

Category Key 中文標籤 Icon
core 核心工具 grid_view
sales 銷售與收款 point_of_sale
purchasing 採購與付款 shopping_cart
production 生產循環 precision_manufacturing
payroll 薪工循環 badge
financing 融資循環 account_balance
assets 固定資產 domain
investment 投資循環 trending_up
rd 研發循環 science
analytics 分析 bar_chart
resource 資源 business_center
inventory 庫存工具 inventory_2
social 社群 people_alt
amoeba 阿米巴組織 hub

1. App Modules(非 ERP,硬編碼)

來源:lib/core/config/app_modules.dart
這些功能不論伺服器選單樹如何都會顯示。

# Title Key Route Category Feature Flag
1 moduleInbound /dashboard/select-route?type=inbound inventory featureInboundOutbound
2 moduleOutbound /dashboard/select-route?type=outbound inventory featureInboundOutbound
3 moduleInventory /dashboard/inventory inventory
4 moduleScanner /dashboard/scanner inventory featureScanner
5 moduleBooking /dashboard/booking resource featureBooking
6 moduleChat /dashboard/chat social featureChat
7 moduleApproval /dashboard/approval core
8 moduleOrgInventory /dashboard/org-inventory core
9 moduleReport /dashboard/report core
10 moduleWindow /dashboard/window core
11 moduleInfoWindow /dashboard/info-window core
12 moduleWorkflow /dashboard/workflow core
13 moduleAmoeba /dashboard/amoeba amoeba

2. Config-Driven Features(DocumentRegistry)

來源:lib/core/document_framework/config/standard_configs.dartregisterStandardConfigs()
路由由 generateDocumentRoutes() 自動產生。透過 findEnhancedModule()DocumentRegistry.find(action, targetId) 匹配 AD_Menu 項目。

2.1 銷售與收款(Sales & Collection)

# Window Name AD_Window_ID Route
1 Sales Order 143 /dashboard/sales-order
2 Invoice (Customer) 167 /dashboard/invoice
3 Shipment (Customer) 169 /dashboard/shipment
4 Business Partner 123 /dashboard/business-partner
5 Product 140 /dashboard/product
6 Price List 146 /dashboard/price-list
7 Price List Schema 337 /dashboard/price-list-schema
8 Product Category 144 /dashboard/product-category
9 Payment Term 141 /dashboard/payment-term
10 Discount Schema 233 /dashboard/discount-schema
11 Customer RMA 320 /dashboard/customer-rma
12 Sales Opportunity 53155 /dashboard/sales-opportunity
13 Sales Stage 53154 /dashboard/sales-stage
14 Commission 207 /dashboard/commission
15 Commission Run 210 /dashboard/commission-run
16 Shipment/Receipt Confirm 330 /dashboard/ship-receipt-confirm
17 Dunning 159 /dashboard/dunning
18 Dunning Run 321 /dashboard/dunning-run
19 Invoice Schedule 147 /dashboard/invoice-schedule
20 Invoice Payment Schedule 275 /dashboard/invoice-payment-schedule
21 Partner Relation 313 /dashboard/partner-relation
22 BP Group 192 /dashboard/bp-group
23 Sales Region 152 /dashboard/sales-region

2.2 採購與付款(Purchasing & Payment)

# Window Name AD_Window_ID Route
1 Purchase Order 181 /dashboard/purchase-order
2 Vendor Invoice 183 /dashboard/vendor-invoice
3 Payment 195 /dashboard/payment
4 Allocation 203 /dashboard/allocation
5 RfQ Topic 314 /dashboard/rfq-topic
6 RfQ 315 /dashboard/rfq
7 RfQ Response 324 /dashboard/rfq-response
8 Vendor Details 176 /dashboard/vendor-details
9 Matched Invoices 107 /dashboard/matched-invoices
10 Matched POs 228 /dashboard/matched-pos
11 Payment Selection 206 /dashboard/payment-selection

2.3 融資循環(Financing)

# Window Name AD_Window_ID Route
1 Bank Statement 392 /dashboard/bank-statement
2 Cash Journal 136 /dashboard/cash-journal
3 Bank / Cash 158 /dashboard/bank
4 Bank Transfer 200105 /dashboard/bank-transfer
5 Currency 115 /dashboard/currency
6 Currency Rate 116 /dashboard/currency-rate
7 Tax Rate 137 /dashboard/tax-rate
8 Tax Category 138 /dashboard/tax-category
9 Charge 161 /dashboard/charge
10 GL Budget 154 /dashboard/gl-budget
11 GL Category 131 /dashboard/gl-category
12 GL Distribution 323 /dashboard/gl-distribution
13 Accounting Fact 162 /dashboard/accounting-fact
14 Financial Report 216 /dashboard/financial-report
15 GL Journal 200005 /dashboard/gl-journal
16 GL Journal Batch 132 /dashboard/gl-journal-batch
17 Account Element 118 /dashboard/account-element

2.4 固定資產(Fixed Assets)

# Window Name AD_Window_ID Route
1 Asset 284 /dashboard/asset
2 Asset Addition 53113 /dashboard/asset-addition
3 Asset Disposal 53114 /dashboard/asset-disposal
4 Asset Improvement 1000061 /dashboard/asset-improvement
5 Asset Transfer 53050 /dashboard/asset-transfer
6 Asset Reassignment 1000070 /dashboard/asset-reassignment
7 Asset Group 252 /dashboard/asset-group
8 Depreciation Method 53058 /dashboard/depreciation-method
9 Depreciation Workfile 53052 /dashboard/depreciation-workfile
10 Post Depreciation Entry 53053 /dashboard/post-depreciation-entry
11 Disposed Asset Entry 53047 /dashboard/disposed-asset-entry
12 Transfer Asset Entry 53046 /dashboard/transfer-asset-entry

2.5 生產循環(Production)

# Window Name AD_Window_ID Route
1 Production Order 191 /dashboard/production-order
2 Bill of Materials 53128 /dashboard/bom
3 Quality Test 53149 /dashboard/quality-test
4 BOM Change Notice 355 /dashboard/bom-change-notice
5 Product Costs 344 /dashboard/product-costs

2.6 投資循環(Investment)

# Window Name AD_Window_ID Route
1 Project 130 /dashboard/project
2 Project Type 265 /dashboard/project-type
3 Project Lines 286 /dashboard/project-lines
4 Marketing Campaign 149 /dashboard/marketing-campaign

3. Enhanced Module Registry(傳統自訂功能)

來源:lib/core/config/enhanced_module_registry.dart
這些功能擁有自己的自訂畫面和路由檔案。在 DocumentRegistry 中註冊。透過 findEnhancedModule() 回退機制匹配 AD_Menu 項目。

3.1 採購 — 自訂表單

# Window Name AD_Window_ID Route
1 Requisition W:322 /dashboard/requisition
2 Material Receipt W:184 /dashboard/material-receipt

3.2 庫存

# Window Name AD_Window_ID Route
1 Inventory Count W:168 /dashboard/inventory-count

3.3 生產 — 自訂表單

# Window Name AD_Window_ID Route
1 Quality Specifications W:53013 /dashboard/quality

3.4 工作管理

# Window Name AD_Window_ID Route
1 Work Request (R_Request) W:209 /dashboard/r-request

3.5 薪工 / HR(Payroll)

# Window Name Action:ID Route
1 Leave Request W:1000066 /dashboard/leave-request
2 Overtime W:1000083 /dashboard/overtime
3 Attendance Dashboard X:1000017 /dashboard/attendance-dashboard
4 Employee Profile W:1000438 /dashboard/employee
5 Certificate W:1000144 /dashboard/certificate
6 Personnel Change W:1000437 /dashboard/personnel-change
7 Resignation W:1000430 /dashboard/resignation
8 Job Opening W:1000439 /dashboard/job-opening
9 Applicant W:1000440 /dashboard/applicant
10 Big Five Personality X:1000018 /dashboard/bigfive

3.6 研發循環(R&D)

# Window Name Action:ID Route
1 RND Project W:1000904 /dashboard/rnd/project
2 RND Experiment W:1000905 /dashboard/rnd/experiment-list/0
3 Test Trend W:1000911 /dashboard/rnd/test-trend
4 Knowledge Base W:1000912 /dashboard/rnd/kb
5 AI Recommendation W:1000913 /dashboard/rnd/recommendation
6 Work Orders (Dispatch) W:1000914 /dashboard/rnd/work-orders
7 Workload Dashboard W:1000915 /dashboard/rnd/workload
8 Performance W:1000916 /dashboard/rnd/performance
9 Project Cost Report R:1000917 /dashboard/rnd/cost/0

3.7 融資 — 自訂

# Window Name Action:ID Route
1 Cash Position (Aging) R:238 /dashboard/cash-position

4. RND 模組 — 完整路由對應

來源:lib/features/rnd/rnd_routes.dart
所有路由位於 /dashboard/rnd/... 下。RND 模組有 9 個選單入口(第 3.6 節)加上多個子路由:

Phase 1:配方研發

Route Screen 存取方式
rnd/formula-list/:projectId FormulaListScreen 從 RND Project 詳情
rnd/formula/:id FormulaDetailScreen 從配方列表
rnd/formula/:id/edit FormulaEditorScreen 從配方詳情
rnd/formula/:id/compare FormulaCompareScreen 從配方詳情
rnd/dispensing DispensingScreen 從配方列表

Phase 2:實驗與測試

Route Screen 存取方式
rnd/experiment-list/:projectId ExperimentListScreen 選單 (W:1000905)
rnd/experiment/:id ExperimentDetailScreen 從實驗列表
rnd/test-result/new?experimentId= TestResultEntryScreen 從實驗詳情
rnd/test-result/:id TestResultEntryScreen (edit) 從實驗詳情
rnd/test-trends TestTrendScreen 選單 (W:1000911)

Phase 3:知識庫與 AI

Route Screen 存取方式
rnd/kb KBSearchScreen 選單 (W:1000912)
rnd/kb/article/new ArticleEditorScreen 從 KB 搜尋
rnd/kb/article/:id ArticleViewerScreen 從 KB 搜尋
rnd/kb/article/:id/edit ArticleEditorScreen 從文章檢視
rnd/formula-compare?ids=1,2,3 FormulaComparisonScreen 從 KB
rnd/recommendation RecommendationWizardScreen 選單 (W:1000913)

Phase 4:實驗室、派工、績效、成本

Route Screen 存取方式
rnd/calibration CalibrationScreen 從設備詳情
rnd/calibration/:equipmentId CalibrationScreen 從設備詳情
rnd/work-orders?projectId= WorkOrderListScreen 選單 (W:1000914)
rnd/work-order/:id WorkOrderDetailScreen 從工單列表
rnd/my-assignments/:userId MyAssignmentsScreen 從工單
rnd/workload WorkloadDashboardScreen 選單 (W:1000915)
rnd/performance?userId= PerformanceDashboardScreen 選單 (W:1000916)
rnd/cost/:projectId CostDashboardScreen 選單 (R:1000917)

5. 未註冊在 DocumentRegistry 的 Config 檔案

這些 Config 檔案存在但透過 registerStandardConfigs() 註冊。它們使用自己的路由檔案,透過 Enhanced Module Registry 匹配。

Config File targetId 未註冊原因
requisition/requisition_config.dart 322 自訂表單/建立路由
material_receipt/material_receipt_config.dart 184 自訂表單/建立路由
inventory_count/inventory_count_config.dart 168 自訂表單/建立路由
quality/quality_config.dart 53013 自訂表單/建立路由
hr_leave/hr_leave_config.dart 1000066 自訂非同步基礎篩選
overtime/overtime_config.dart 1000083 自訂薪工功能
resignation/resignation_config.dart 1000430 自訂薪工功能
personnel_change/personnel_change_config.dart 1000437 自訂薪工功能
job_opening/job_opening_config.dart 1000439 自訂薪工功能
certificate/certificate_config.dart 1000144 自訂薪工功能
rnd/project/rnd_project_config.dart 1000904 RND 自訂路由
rnd/lab/equipment_config.dart 1000920 RND 自訂路由
rnd/test_spec/test_spec_config.dart 1000910 RND 自訂路由

6. 功能可見性要求

ERP 功能要顯示在儀表板上,必須同時滿足以下所有條件:

  1. 伺服器:AD_Menu 項目必須存在於使用者角色的 iDempiere 選單中
  2. 網路:選單樹必須成功從 iDempiere REST API 載入(menuTreeProvider
  3. 用戶端匹配findEnhancedModule(action, targetId) 必須從以下之一找到匹配:
    • DocumentRegistry(第 2 節),或
    • Enhanced Module Registry(第 3 節)
  4. 路由:匹配的路由必須存在於 app_router.dart

若選單樹載入失敗,只有 App Modules(第 1 節)會顯示 — 所有 ERP 功能都不會出現。

除錯檢查清單

  • 所有 ERP 功能都沒顯示:檢查選單樹載入(網路、伺服器狀態、角色權限)
  • 部分功能缺失:檢查該使用者的角色在 iDempiere 中是否有對應的 AD_Menu 條目
  • 功能顯示但畫面錯誤:檢查 DocumentRegistry 是否有衝突的設定(它優先於 Enhanced Module Registry)
  • 功能顯示但崩潰:檢查路由是否存在於 app_router.dart

統計摘要

來源 數量 類型
App Modules 13 硬編碼(Feature Flag 控制)
DocumentRegistry configs 72 設定驅動(自動產生路由)
Enhanced Module Registry 20 傳統自訂(獨立路由)
RND 子路由 23 巢狀於 RND 模組下
總計獨立功能 105+

按 Enter 搜尋,ESC 關閉