* { box-sizing: border-box; } body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; background: #f4f6f8; color: #1f2733; font-size: 15px; } .topbar { display: flex; align-items: center; justify-content: space-between; background: #1f3a5f; color: #fff; padding: 0 20px; height: 52px; } .topbar .brand { font-weight: 700; font-size: 17px; } .topbar .ver { background: #2e8b57; border-radius: 4px; padding: 1px 6px; font-size: 12px; margin-left: 6px; } .topbar nav a { color: #dce6f2; text-decoration: none; margin-left: 18px; font-size: 14px; } .topbar nav a:hover { color: #fff; } .topbar .who { margin-left: 18px; color: #9fb3cc; font-size: 13px; } .topbar .factory-switch { display: flex; align-items: center; margin-left: 18px; } .topbar .factory-switch label { color: #9fb3cc; font-size: 13px; margin-right: 6px; } .topbar .factory-switch select { background: #2a4a73; color: #fff; border: 1px solid #3d5d88; border-radius: 5px; padding: 4px 8px; font-size: 13px; max-width: 200px; } .topbar .factory-switch select:focus { outline: none; border-color: #6fa8ff; } main { max-width: 1100px; margin: 18px auto; padding: 0 16px; } .scope-banner { background: #eef4fb; border: 1px solid #cfe0f3; color: #1f3a5f; border-radius: 6px; padding: 8px 14px; margin-bottom: 14px; font-size: 14px; } .scope-banner b { color: #1f6feb; } .stats { display: flex; gap: 14px; margin-bottom: 16px; } .stat { flex: 1; background: #fff; border-radius: 8px; padding: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); } .stat .num { font-size: 30px; font-weight: 700; } .stat .lbl { color: #6b7785; font-size: 13px; margin-top: 4px; } .stat.warn .num { color: #d48806; } .stat.danger .num { color: #d4380d; } h3 { margin: 18px 0 10px; } .card { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.08); } .login-wrap { display: flex; justify-content: center; margin-top: 60px; } .login-card { width: 320px; } .login-card h2 { margin-top: 0; } label { display: block; margin: 10px 0 4px; font-size: 13px; color: #44525f; } input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid #cdd5df; border-radius: 6px; font-size: 14px; } button, .btn { display: inline-block; cursor: pointer; border: none; border-radius: 6px; padding: 9px 16px; font-size: 14px; text-decoration: none; background: #eef1f5; color: #1f2733; } button.primary, .btn.primary { background: #1f3a5f; color: #fff; } button.secondary, .btn.secondary { background: #2f7d5b; color: #fff; } button:hover, .btn:hover { filter: brightness(.96); } .link-danger { background: none; border: none; color: #c0392b; cursor: pointer; padding: 0 4px; font-size: 14px; } .link-danger:hover { text-decoration: underline; } .row-actions { margin-top: 14px; display: flex; gap: 10px; } .row-in { background: #eafaf1; } .row-out { background: #fdecea; } .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .search input { width: 280px; } .search button { margin-left: 8px; } .tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); } .tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #eef1f5; } .tbl th { background: #f0f3f7; font-size: 13px; color: #44525f; } .tbl td.num, .stat .num { text-align: right; font-variant-numeric: tabular-nums; } .tbl a { color: #1f3a5f; text-decoration: none; } .row-danger { background: #fff1f0; } .row-warn { background: #fffbe6; } .badge { padding: 2px 8px; border-radius: 10px; font-size: 12px; } .badge.ok { background: #e6f7ed; color: #1a7f47; } .badge.warn { background: #fff7e6; color: #ad6800; } .badge.danger { background: #fff1f0; color: #cf1322; } .flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 14px; } .flash.ok { background: #e6f7ed; color: #1a7f47; } .flash.error { background: #fff1f0; color: #cf1322; } .muted { color: #8a96a3; } .small { font-size: 12px; } .txn-form { max-width: 520px; margin-bottom: 22px; } /* 看板标签切换 */ .tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; } .tabs .tab { background: #eef1f5; color: #44525f; border: 1px solid #d7dde5; padding: 8px 16px; font-size: 14px; cursor: pointer; border-radius: 6px; } .tabs .tab.active { background: #1f3a5f; color: #fff; border-color: #1f3a5f; } .tab-pane { animation: fade .15s ease; } @keyframes fade { from { opacity: .4; } to { opacity: 1; } } /* 工厂工作台: 统计行 / BOM 卡片 */ .stat-row { display: flex; gap: 14px; } .stat-row .stat { flex: 1; background: #fff; border-radius: 8px; padding: 12px 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); } .stat-row .stat .num { font-size: 26px; font-weight: 700; } .stat-row .stat .lbl { color: #6b7785; font-size: 13px; margin-top: 2px; } .bom-issue-card { border-left: 4px solid #7c3aed; } .card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15px; } .card-head strong { font-size: 16px; } /* BOM 看板: 下拉选择器 */ .bom-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .bom-filter label { margin: 0; white-space: nowrap; } .bom-filter select { width: auto; min-width: 260px; } /* 入库/出库: 物料编码输入框(输入或扫码自动定位) */ .pn-lookup { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; } .pn-lookup input { width: 280px; } .pn-hint { font-size: 13px; white-space: nowrap; } .pn-hint.ok { color: #1a7f47; } .pn-hint.warn { color: #ad6800; } .pn-hint.danger { color: #cf1322; } /* BOM 模拟齐套模式 */ .sim-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; padding: 10px 12px; background: #f7f9fc; border: 1px solid #e3e8ef; border-radius: 8px; } .sim-bar label { margin: 0; white-space: nowrap; } .sim-bar input[type=number] { width: 130px; } .badge.sim-badge { margin-left: auto; } tr.row-sim-danger { background: #fff1f0 !important; } tr.row-sim-danger td { color: #cf1322; } /* 批量导入窗口(模态) */ .modal-mask { position: fixed; inset: 0; background: rgba(15,23,35,.5); display: flex; align-items: center; justify-content: center; z-index: 50; } .modal { background: #fff; border-radius: 10px; width: 720px; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.25); } .modal-head { background: #1f3a5f; color: #fff; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; } .modal-head .x { background: transparent; color: #fff; font-size: 18px; padding: 0 6px; } .modal-body { padding: 16px; overflow: auto; } .modal-body textarea { font-family: Consolas, "Courier New", monospace; font-size: 13px; } .modal-body label.btn { margin: 0; } /* 批量导入窗口: 多 BOM 卡片 */ .bom-card { border: 1px solid #e3e8ef; border-radius: 8px; margin-bottom: 10px; overflow: hidden; } .bom-card.card-danger { border-color: #ffccc7; } .bom-card .bom-head { background: #f0f3f7; padding: 8px 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; } .bom-card.card-danger .bom-head { background: #fff1f0; } .bom-card .tbl { box-shadow: none; border-radius: 0; margin: 0; }