diff --git a/.env.example b/.env.example old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/charts.csv b/.shared/ui-ux-pro-max/data/charts.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/colors.csv b/.shared/ui-ux-pro-max/data/colors.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/landing.csv b/.shared/ui-ux-pro-max/data/landing.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/products.csv b/.shared/ui-ux-pro-max/data/products.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/prompts.csv b/.shared/ui-ux-pro-max/data/prompts.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/flutter.csv b/.shared/ui-ux-pro-max/data/stacks/flutter.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv b/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/nextjs.csv b/.shared/ui-ux-pro-max/data/stacks/nextjs.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/react-native.csv b/.shared/ui-ux-pro-max/data/stacks/react-native.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/react.csv b/.shared/ui-ux-pro-max/data/stacks/react.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/svelte.csv b/.shared/ui-ux-pro-max/data/stacks/svelte.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/swiftui.csv b/.shared/ui-ux-pro-max/data/stacks/swiftui.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/stacks/vue.csv b/.shared/ui-ux-pro-max/data/stacks/vue.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/styles.csv b/.shared/ui-ux-pro-max/data/styles.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/typography.csv b/.shared/ui-ux-pro-max/data/typography.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/data/ux-guidelines.csv b/.shared/ui-ux-pro-max/data/ux-guidelines.csv old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/scripts/core.py b/.shared/ui-ux-pro-max/scripts/core.py old mode 100644 new mode 100755 diff --git a/.shared/ui-ux-pro-max/scripts/search.py b/.shared/ui-ux-pro-max/scripts/search.py old mode 100644 new mode 100755 diff --git a/.windsurf/workflows/ui-ux-pro-max.md b/.windsurf/workflows/ui-ux-pro-max.md old mode 100644 new mode 100755 diff --git a/AI_ANALYSIS_README.md b/AI_ANALYSIS_README.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/add_customer_name_column.py b/add_customer_name_column.py old mode 100644 new mode 100755 diff --git a/backend/.env.example b/backend/.env.example old mode 100644 new mode 100755 diff --git a/backend/ai_service.py b/backend/ai_service.py old mode 100644 new mode 100755 diff --git a/backend/api_ai.py b/backend/api_ai.py old mode 100644 new mode 100755 diff --git a/backend/requirements_ai.txt b/backend/requirements_ai.txt old mode 100644 new mode 100755 diff --git a/backend/test_ai.py b/backend/test_ai.py old mode 100644 new mode 100755 diff --git a/check_reconciliations.py b/check_reconciliations.py old mode 100644 new mode 100755 diff --git a/cookies.txt b/cookies.txt old mode 100644 new mode 100755 diff --git a/dashboard.svg b/dashboard.svg old mode 100644 new mode 100755 diff --git a/date-dark.svg b/date-dark.svg old mode 100644 new mode 100755 diff --git a/date.svg b/date.svg old mode 100644 new mode 100755 diff --git a/deploy/nginx/prod-mgmt.conf b/deploy/nginx/prod-mgmt.conf old mode 100644 new mode 100755 diff --git a/deploy/systemd/prod-mgmt.service b/deploy/systemd/prod-mgmt.service old mode 100644 new mode 100755 index 24d461e..6208b62 --- a/deploy/systemd/prod-mgmt.service +++ b/deploy/systemd/prod-mgmt.service @@ -3,9 +3,9 @@ Description=Production Management Flask App After=network.target [Service] -WorkingDirectory=/home/hyx/work/生产管理系统 +WorkingDirectory=/opt/生产管理系统 # 使用Flask但启用多线程和Keep-Alive -ExecStart=/home/hyx/work/.venv/bin/python server/app.py +ExecStart=/usr/bin/python3 server/app.py Restart=always Environment=APP_SECRET=please-change-to-strong ADMIN_PASSWORD=change-this SUPERADMIN_USERNAME=zzh SUPERADMIN_PASSWORD=Zzh08165511 REDIS_HOST=127.0.0.1 REDIS_PORT=6379 REDIS_DB=0 REDIS_PASSWORD=Zzh08165511 diff --git a/frontend/assets/ai-icon.svg b/frontend/assets/ai-icon.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/avatars/.gitignore b/frontend/assets/avatars/.gitignore old mode 100644 new mode 100755 diff --git a/frontend/assets/calendar-dark.svg b/frontend/assets/calendar-dark.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/calendar.svg b/frontend/assets/calendar.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/dashboard-enhancements.css b/frontend/assets/dashboard-enhancements.css old mode 100644 new mode 100755 diff --git a/frontend/assets/dashboard.svg b/frontend/assets/dashboard.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/favicon.svg b/frontend/assets/favicon.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/icon-tuxi.png b/frontend/assets/icon-tuxi.png old mode 100644 new mode 100755 diff --git a/frontend/assets/login.css b/frontend/assets/login.css old mode 100644 new mode 100755 index 5491b52..67c32df --- a/frontend/assets/login.css +++ b/frontend/assets/login.css @@ -262,6 +262,10 @@ body { z-index: 1; } +.input-block:has(.password-toggle) { + position: relative; +} + .input, button { background: rgba(255, 255, 255, 0.1); @@ -304,11 +308,58 @@ button { box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2); } +.input-block:has(.password-toggle) .input { + padding-right: 45px; +} + .input { box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2), 2px 2px 4px rgba(138, 43, 226, 0.1); } +/* 密码显示/隐藏按钮 */ +.password-toggle { + position: absolute; + right: 12px; + top: 50%; + transform: translateY(-50%); + background: transparent; + border: none; + padding: 8px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: rgba(255, 255, 255, 0.6); + transition: all 0.3s ease; + z-index: 10; + margin: 0; + width: auto; + height: auto; + box-shadow: none; +} + +.password-toggle:hover { + color: rgba(255, 255, 255, 0.9); + background: transparent; + transform: translateY(-50%) scale(1.1); + box-shadow: none; +} + +.password-toggle:active { + transform: translateY(-50%) scale(0.95); +} + +.password-toggle::before { + display: none; +} + +.eye-icon { + width: 20px; + height: 20px; + pointer-events: none; +} + /* 验证码区域 */ .captcha-block { display: flex; @@ -526,6 +577,46 @@ button:disabled { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1)); } +/* 角色容器 */ +.character-container { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + padding: 20px; +} + +.character { + width: 200px; + height: 200px; + filter: drop-shadow(0 4px 12px rgba(138, 43, 226, 0.3)); + transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); +} + +#char-head, +#char-body, +#char-hands ellipse, +#char-eyes ellipse { + transition: all 0.3s ease; +} + +#char-mouth { + transition: d 0.3s ease; +} + +#hand-left, +#hand-right { + transition: cx 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), + cy 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), + transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); +} + +#eye-left, +#eye-right { + transition: ry 0.15s ease, cx 0.3s ease; +} + /* 响应式设计 */ @media (max-width: 768px) { .container { diff --git a/frontend/assets/meituan-test.css b/frontend/assets/meituan-test.css old mode 100644 new mode 100755 diff --git a/frontend/assets/mod.css b/frontend/assets/mod.css old mode 100644 new mode 100755 diff --git a/frontend/assets/mod.html b/frontend/assets/mod.html old mode 100644 new mode 100755 diff --git a/frontend/assets/moon.svg b/frontend/assets/moon.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/pdd.svg b/frontend/assets/pdd.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/sun.svg b/frontend/assets/sun.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/tuxi-station.png b/frontend/assets/tuxi-station.png old mode 100644 new mode 100755 diff --git a/frontend/assets/user-avatar.svg b/frontend/assets/user-avatar.svg old mode 100644 new mode 100755 diff --git a/frontend/assets/xlsx.min.js b/frontend/assets/xlsx.min.js old mode 100644 new mode 100755 diff --git a/frontend/assets/yt.svg b/frontend/assets/yt.svg old mode 100644 new mode 100755 diff --git a/frontend/js/api.js b/frontend/js/api.js old mode 100644 new mode 100755 diff --git a/frontend/js/app.js b/frontend/js/app.js old mode 100644 new mode 100755 diff --git a/frontend/js/bundle.js b/frontend/js/bundle.js old mode 100644 new mode 100755 diff --git a/frontend/js/components/ai-report.js b/frontend/js/components/ai-report.js old mode 100644 new mode 100755 diff --git a/frontend/js/components/bom.js b/frontend/js/components/bom.js old mode 100644 new mode 100755 diff --git a/frontend/js/components/customer-order.js b/frontend/js/components/customer-order.js old mode 100644 new mode 100755 diff --git a/frontend/js/components/dashboard.js b/frontend/js/components/dashboard.js old mode 100644 new mode 100755 index f2e3f01..81102ad --- a/frontend/js/components/dashboard.js +++ b/frontend/js/components/dashboard.js @@ -642,12 +642,8 @@ const Dashboard = (() => { const txCounts = countByTime(txData); const mtCounts = countByTime(mtData); const actualMax = Math.max(...pddCounts, ...ytCounts, ...txCounts, ...mtCounts, 0); - // 动态调整Y轴:让小数据更明显 - let maxCount; - if (actualMax <= 2) maxCount = 3; // 数据是1-2时,Y轴最大值设为3,让数据占据1/3到2/3的高度 - else if (actualMax <= 5) maxCount = 8; // 数据是3-5时,Y轴最大值设为8 - else if (actualMax <= 10) maxCount = 15; // 数据是6-10时,Y轴最大值设为15 - else maxCount = actualMax; + // 根据最高数据点动态调整Y轴最大值(增加10%的上边距) + const maxCount = actualMax === 0 ? 5 : Math.ceil(actualMax * 1.1); const maxDigits = Math.max(maxCount.toString().length, 2); const dynamicLeftPadding = Math.max(50, 25 + maxDigits * 10); const padding = {left: dynamicLeftPadding, right: 20, top: 20, bottom: 30}; @@ -1946,6 +1942,52 @@ const Dashboard = (() => { productionFillEl.style.width = fillWidth + '%'; productionFillEl.style.backgroundColor = color; } + + // 更新期初库存数据 + if(dashRes.inventory) { + const invTotal = document.getElementById('inventory-total'); + const invZero = document.getElementById('inventory-zero'); + const invLow = document.getElementById('inventory-low'); + const invQty = document.getElementById('inventory-qty'); + + if(invTotal) invTotal.textContent = dashRes.inventory.total_items || 0; + if(invZero) invZero.textContent = dashRes.inventory.zero_stock || 0; + if(invLow) invLow.textContent = dashRes.inventory.low_stock || 0; + if(invQty) invQty.textContent = dashRes.inventory.total_qty || 0; + } + + // 更新采购需求数据 + if(dashRes.purchase) { + const purTotal = document.getElementById('purchase-total'); + const purPending = document.getElementById('purchase-pending'); + const purUrgent = document.getElementById('purchase-urgent'); + const purRate = document.getElementById('purchase-rate'); + + if(purTotal) purTotal.textContent = dashRes.purchase.total_demands || 0; + if(purPending) purPending.textContent = dashRes.purchase.pending || 0; + if(purUrgent) purUrgent.textContent = dashRes.purchase.urgent || 0; + if(purRate) purRate.textContent = (dashRes.purchase.completion_rate || 0) + '%'; + } + + // 更新智能建议 + if(dashRes.smartSuggestions) { + const suggestionsEl = document.getElementById('smart-suggestions'); + if(suggestionsEl) { + if(dashRes.smartSuggestions.length > 0) { + suggestionsEl.innerHTML = dashRes.smartSuggestions.map(s => ` +
+
+ ${s.icon} + ${s.title} +
+
${s.message}
+
+ `).join(''); + } else { + suggestionsEl.innerHTML = '
暂无建议
一切正常运行中
'; + } + } + } } clearTimeout(timeoutId); @@ -2055,6 +2097,8 @@ const Dashboard = (() => { ${metricsCard('发货数量', data.shipments, 'warning')} ${todayProductionCard(data.todayPdd || 0, data.todayYt || 0, data.activePlatform || 'pdd')} + +
@@ -2135,15 +2179,15 @@ const Dashboard = (() => {
-
+
产量占比
-
-
+
+
审计(本月)
-
+
-
+
0%
@@ -2160,19 +2204,19 @@ const Dashboard = (() => {
-
+
发货(按机种)
-
+
-
+
-
+
审计看板 点击查看完整数据
@@ -2197,8 +2241,117 @@ const Dashboard = (() => {
- - ${AIReport.generateAICard()} + +
+ +
+
+
+
📦 库存管理
+
期初库存
+
+
+ + + + + +
+
+ +
+
+ ${data.inventory?.total_items || 0} + 种物料 +
+
+ +
+
+
零库存
+
${data.inventory?.zero_stock || 0}
+
+
+
低库存
+
${data.inventory?.low_stock || 0}
+
+
+
总库存
+
${data.inventory?.total_qty || 0}
+
+
+
+ + +
+
+
+
🛒 采购管理
+
采购需求
+
+
+ + + + + +
+
+ +
+
+ ${data.purchase?.total_demands || 0} + 个需求 +
+
+ +
+
+
待处理
+
${data.purchase?.pending || 0}
+
+
+
紧急
+
${data.purchase?.urgent || 0}
+
+
+
完成率
+
${data.purchase?.completion_rate || 0}%
+
+
+
+ + +
+
+
+
💡 AI助手
+
智能建议
+
+
+ + + + +
+
+ +
+ ${(data.smartSuggestions || []).length > 0 ? + data.smartSuggestions.map(s => ` +
+
+ ${s.icon} + ${s.title} +
+
${s.message}
+
+ `).join('') : + '
暂无建议
一切正常运行中
' + } +
+
+