diff --git a/config.py b/config.py index 215bff3..ea3c4a3 100644 --- a/config.py +++ b/config.py @@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.658" +SYSTEM_VERSION = "V10.659" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/docs/AI_INTELLIGENCE_MODULE_SOT.md b/docs/AI_INTELLIGENCE_MODULE_SOT.md index 7b4eecb..c86a96e 100644 --- a/docs/AI_INTELLIGENCE_MODULE_SOT.md +++ b/docs/AI_INTELLIGENCE_MODULE_SOT.md @@ -92,6 +92,7 @@ - V10.655 起正式首頁 `/` 必須以 HTTP 200 原地渲染「業績成長指揮台」,不得 302 跳轉到 `/ai_intelligence`;側邊欄第一個主入口必須直連 `/`。`/ai_intelligence` 只作為相容入口保留,不得成為主導流路由。 - V10.656 起正式首頁首屏必須是「PChome 業績成長系統」專業儀表板,而非大段說明型頁首;第一屏需直接呈現近 7 天業績、比價可用率、下滑商品、待補比價、最大分類、下滑商品 TOP 5、PChome/MOMO 價格狀態圓環與處理狀態,且全部使用 `/api/ai/pchome-growth/opportunities` 真資料渲染。 - V10.658 起全站頁面必須回到「提升 PChome 業績」同一產品主線;共用 shell 需提供短流程骨架:評估、分析、建議、解法、治理。頁首、hero、任務卡與提示區不得依賴大段文字讓使用者理解狀況;首屏應以短指標、狀態分流、下一步動作與可執行入口呈現專業評估、分析、建議與解決方案。 +- V10.659 起主要入口頁的首屏文案必須改為流程職責語言,而不是功能說明書。當日業績負責找出下滑與價差壓力,匯入負責資料新鮮度,AI 建議負責把證據轉成銷售建議,比價負責同款與價差決策,缺貨負責避免主推商品斷貨,月結分析負責判斷成長、毛利與品類結構。 ## 零之一、12 Agent 決策信封(2026-05-24) diff --git a/templates/ai_recommend.html b/templates/ai_recommend.html index 9dd8d3d..c9e432f 100644 --- a/templates/ai_recommend.html +++ b/templates/ai_recommend.html @@ -17,7 +17,7 @@

AI 智慧推薦

- 根據資料庫商品分類、即時趨勢與 AI 生成紀錄,產出可追蹤的銷售文案。 + 把價差、商品證據與趨勢轉成可追蹤的銷售建議。
diff --git a/templates/auto_import_index.html b/templates/auto_import_index.html index 182304c..f1d2ab9 100644 --- a/templates/auto_import_index.html +++ b/templates/auto_import_index.html @@ -19,7 +19,7 @@

當日業績報表匯入

- 支援兩種匯入方式:Google Drive 自動匯入(每 30 分鐘檢查)或 手動上傳 + 保持 PChome 業績新鮮,讓評估、分析與建議有可靠資料。

diff --git a/templates/daily_sales.html b/templates/daily_sales.html index cfe4762..4c20dbd 100644 --- a/templates/daily_sales.html +++ b/templates/daily_sales.html @@ -94,7 +94,7 @@ 當日業績看板

- {% if is_month_view %}{{ calendar_data.month_name }} 月度總計{% else %}{{ selected_date }} 單日檢視{% endif %} + {% if is_month_view %}{{ calendar_data.month_name }} 月度總計:確認成長與缺口{% else %}{{ selected_date }}:找出下滑與價差壓力{% endif %}

diff --git a/templates/ewoooc_base.html b/templates/ewoooc_base.html index c41b054..5854988 100644 --- a/templates/ewoooc_base.html +++ b/templates/ewoooc_base.html @@ -134,11 +134,18 @@ {% elif _page_group == 'ops' %}{% set _growth_stage = 'solve' %} {% else %}{% set _growth_stage = 'govern' %} {% endif %} + {% if _growth_stage == 'evaluate' %}{% set _growth_stage_brief = '現在:評估缺口' %} + {% elif _growth_stage == 'analyze' %}{% set _growth_stage_brief = '現在:分析原因' %} + {% elif _growth_stage == 'recommend' %}{% set _growth_stage_brief = '現在:產生建議' %} + {% elif _growth_stage == 'solve' %}{% set _growth_stage_brief = '現在:執行解法' %} + {% else %}{% set _growth_stage_brief = '現在:守住品質' %} + {% endif %}
@@ -35,7 +35,7 @@ 'variant': 'list', 'icon': 'list-ul', 'title': '缺貨清單', - 'desc': '查看、編輯、篩選已匯入的缺貨商品,支援批次操作、發送郵件與排序', + 'desc': '找出會影響業績的缺貨商品', 'cta': '查看清單', 'cta_icon': 'search', 'href': '/vendor-stockout/list' @@ -44,7 +44,7 @@ 'variant': 'vendor', 'icon': 'building', 'title': '廠商管理', - 'desc': '管理廠商基本資料與聯絡郵件,支援多個郵件地址設定', + 'desc': '維護可聯絡的補貨窗口', 'cta': '管理廠商', 'cta_icon': 'users-cog', 'href': '/vendor-stockout/vendor-management' diff --git a/templates/monthly_summary_analysis.html b/templates/monthly_summary_analysis.html index bb4fca3..f8ab808 100644 --- a/templates/monthly_summary_analysis.html +++ b/templates/monthly_summary_analysis.html @@ -37,7 +37,7 @@ 月份總表數據分析

- 以資料庫 monthly_summary_analysis 的月結資料,檢視業績、毛利、YoY 與品牌/區域/價格帶結構。 + 用月結資料判斷成長、毛利與品類結構。

diff --git a/templates/price_comparison.html b/templates/price_comparison.html index 39f1e2f..d0f9bec 100644 --- a/templates/price_comparison.html +++ b/templates/price_comparison.html @@ -623,7 +623,7 @@

PChome 商品比價決策台

-

用 PChome 業績商品反查 MOMO,先找同款,再判斷售價、活動與曝光下一步。

+

PChome 反查 MOMO:確認同款、判斷價差、決定下一步。

diff --git a/tests/test_pchome_revenue_growth_service.py b/tests/test_pchome_revenue_growth_service.py index b244c40..d038606 100644 --- a/tests/test_pchome_revenue_growth_service.py +++ b/tests/test_pchome_revenue_growth_service.py @@ -541,6 +541,11 @@ def test_sidebar_uses_growth_command_center_as_primary_entry(): assert "{% set _group_monitor = ['ai_intelligence', 'dashboard', 'edm', 'campaigns'] %}" in base assert "momo-growth-rail" in base assert "PChome 業績提升" in base + assert "現在:評估缺口" in base + assert "現在:分析原因" in base + assert "現在:產生建議" in base + assert "現在:執行解法" in base + assert "現在:守住品質" in base assert "評估" in base assert "分析" in base assert "建議" in base @@ -567,3 +572,19 @@ def test_global_ui_guard_keeps_pages_professional_and_responsive(): assert "momo-growth-step.is-active" in shell_css assert ".momo-content .btn:not(.btn-close)" in guard_css assert ":not(.btn-close)" in guard_css + + +def test_primary_pages_use_growth_outcome_copy_instead_of_feature_explaining(): + from pathlib import Path + + expected = { + "templates/daily_sales.html": "找出下滑與價差壓力", + "templates/ai_recommend.html": "把價差、商品證據與趨勢轉成可追蹤的銷售建議", + "templates/auto_import_index.html": "保持 PChome 業績新鮮", + "templates/price_comparison.html": "確認同款、判斷價差、決定下一步", + "templates/index.html": "避免主推商品斷貨", + "templates/monthly_summary_analysis.html": "判斷成長、毛利與品類結構", + } + + for path, marker in expected.items(): + assert marker in Path(path).read_text(encoding="utf-8") diff --git a/web/static/css/ewoooc-shell.css b/web/static/css/ewoooc-shell.css index 66e9efe..ed95453 100644 --- a/web/static/css/ewoooc-shell.css +++ b/web/static/css/ewoooc-shell.css @@ -562,6 +562,7 @@ body.momo-v2-body { } .momo-growth-goal, +.momo-growth-current, .momo-growth-step { display: inline-flex; flex: 0 0 auto; @@ -584,6 +585,15 @@ body.momo-v2-body { color: var(--momo-page-accent-dark); } +.momo-growth-current { + padding: 0 9px; + border-left: 1px solid var(--momo-border-light); + color: var(--momo-page-accent-dark); + font-family: var(--momo-font-display); + font-size: var(--momo-text-label); + font-weight: 800; +} + .momo-growth-step { padding: 0 10px; border: 1px solid var(--momo-border-light);