diff --git a/TODO_NEXT_STEPS.txt b/TODO_NEXT_STEPS.txt index e8b4152..76a310f 100644 --- a/TODO_NEXT_STEPS.txt +++ b/TODO_NEXT_STEPS.txt @@ -4,6 +4,10 @@ ================================================================================ 【已完成】 + - V10.151 接續前端 V3 全站 UI/UX:廠商缺貨 `/vendor-stockout/vendor-management`、`/vendor-stockout/send-email`、`/vendor-stockout/history` 改走新版 `ewoooc_base.html` shell 與 `page-vendor-tools.css`,移除舊紫藍 navbar/live route。 + - V10.151 補 `/abc_analysis/detail` 新版 ABC 詳情頁與安全 loading state,移除 raw HTML fallback,資料表維持正式快取資料來源與匯出連結。 + - V10.151 補 `/login` 新版登入頁:暖紙背景、點陣視覺、EwoooC 品牌、手機版 390px 無水平 overflow。 + - V10.151 本機全站 responsive overflow guard 通過 147/147;`?ui=legacy` 入口已不再回到舊 `dashboard.html` / `edm_dashboard.html` / vendor legacy templates。 - 新版設計系統資產已落到正式 Flask static path:`web/static/css/ewoooc-tokens.css`、`web/static/css/ewoooc-shell.css`、`web/static/css/ewoooc-dotmatrix.css`、`web/static/css/page-*.css` 與對應 `web/static/js/page-*.js`。 - V3 page-level 資產已補做設計規範清理:移除 UI 表面殘留 radial-gradient / pure-white rgba / `bg-white` header,AI 推薦頁 keyword 狀態改用語意 class。 - `ewoooc_base.html` 補 `extra_head` / `content` / `extra_scripts` 相容 block,支援新版包混用 block 命名,避免頁面空白或互動 JS 不輸出。 diff --git a/config.py b/config.py index fae4a76..8a116db 100644 --- a/config.py +++ b/config.py @@ -320,7 +320,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.150" +SYSTEM_VERSION = "V10.151" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/routes/dashboard_routes.py b/routes/dashboard_routes.py index 62e9823..89f0b5c 100644 --- a/routes/dashboard_routes.py +++ b/routes/dashboard_routes.py @@ -1461,7 +1461,7 @@ def index(): data['competitor_overview'] = competitor_overview _DASHBOARD_DATA_CACHE['full_data'] = data _write_shared_full_dashboard_cache(data) - template_name = 'dashboard.html' if request.args.get('ui') == 'legacy' else 'dashboard_v2.html' + template_name = 'dashboard_v2.html' return render_template(template_name, total_products=total_products_history, diff --git a/routes/edm_routes.py b/routes/edm_routes.py index 6d8bf6f..beb93d8 100644 --- a/routes/edm_routes.py +++ b/routes/edm_routes.py @@ -374,7 +374,7 @@ def edm_dashboard(): scheduler_stats = load_scheduler_stats() now_taipei = datetime.now(TAIPEI_TZ) - template_name = 'edm_dashboard.html' if request.args.get('ui') == 'legacy' else 'edm_dashboard_v2.html' + template_name = 'edm_dashboard_v2.html' return render_template(template_name, promo_pages=promo_pages, @@ -429,7 +429,7 @@ def festival_dashboard(): scheduler_stats = load_scheduler_stats() - template_name = 'edm_dashboard.html' if request.args.get('ui') == 'legacy' else 'edm_dashboard_v2.html' + template_name = 'edm_dashboard_v2.html' return render_template(template_name, promo_pages=promo_pages, @@ -482,7 +482,7 @@ def mothers_day_dashboard(): scheduler_stats = load_scheduler_stats() - template_name = 'edm_dashboard.html' if request.args.get('ui') == 'legacy' else 'edm_dashboard_v2.html' + template_name = 'edm_dashboard_v2.html' return render_template(template_name, promo_pages=promo_pages, @@ -535,7 +535,7 @@ def valentine_520_dashboard(): scheduler_stats = load_scheduler_stats() - template_name = 'edm_dashboard.html' if request.args.get('ui') == 'legacy' else 'edm_dashboard_v2.html' + template_name = 'edm_dashboard_v2.html' return render_template(template_name, promo_pages=promo_pages, @@ -588,7 +588,7 @@ def labor_day_dashboard(): scheduler_stats = load_scheduler_stats() - template_name = 'edm_dashboard.html' if request.args.get('ui') == 'legacy' else 'edm_dashboard_v2.html' + template_name = 'edm_dashboard_v2.html' return render_template(template_name, promo_pages=promo_pages, diff --git a/routes/sales_routes.py b/routes/sales_routes.py index 627291d..c5658af 100644 --- a/routes/sales_routes.py +++ b/routes/sales_routes.py @@ -1938,45 +1938,19 @@ def abc_analysis_detail(): target_df, cols_map, err = _get_filtered_sales_data(table_name) if err: - # V-Fix: 如果自動重載也失敗,則顯示稍後再試,並引導回主頁面 - return f''' - - -
- -正在自動重新加載數據,請稍後...
- -| 排名 | - {% if cols.pid %}商品ID | {% endif %} -商品名稱 | - {% if cols.brand %}品牌 | {% endif %} - {% if cols.vendor %}廠商名稱 | {% endif %} - {% if cols.cat %}分類 | {% endif %} - {% if cols.cost or cols.profit %}毛利率 | {% endif %} - {% if cols.qty %}平均單價 | {% endif %} - {% if cols.qty %}銷售數量 | {% endif %} - {% if cols.qty %}建議補貨 (x{{ current_factor }}) | {% endif %} -銷售金額 | -累積營收佔比 | -
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ loop.index }} | - {% if cols.pid %} -{{ item[cols.pid] }} | - {% endif %} -
-
- {{ item[cols.name] | e }}
-
- |
- {% if cols.brand %}
- {{ item[cols.brand] }} | - {% endif %} - {% if cols.vendor %} -{{ item[cols.vendor] }} | - {% endif %} - {% if cols.cat %} -{{ item[cols.cat] }} | - {% endif %} - {% if cols.cost or cols.profit %} -- {% set margin = item['calculated_margin_rate'] %} - - {{ "{:.1f}%".format(margin) }} - - | - {% endif %} - {% if cols.qty %} -${{ "{:,.0f}".format(item['avg_unit_price']) }} | - {% endif %} - {% if cols.qty %} -{{ "{:,.0f}".format(item[cols.qty]) }} | - {% endif %} - {% if cols.qty %} -- {% if item['suggested_restock'] > 0 %} - {{ "{:,.0f}".format(item['suggested_restock']) }} - {% else %} - 建議清倉 - {% endif %} - | - {% endif %} -- ${{ "{:,.0f}".format(item[cols.amount]) }} - | -- {{ "{:.2f}%".format(item['cumulative_pct']) }} - | -
正在重新載入業績分析快取,稍後會自動重試。
+{{ info.desc }}
+請輸入密碼以繼續
-