- BOM 物料齐套标签页新增模拟齐套工具条: 输入计划生产数量(套/PCS), 点模拟即按 单套用量×数量 算出每颗料总需求用量, 与当前在库对比, 缺口为正的行整行标红并显示缺多少 - 每行新增「需求用量」「缺口」两列(默认隐藏, 模拟时显示); 每棵 BOM 标题出现模拟结论徽章 (模拟齐套 / 模拟缺料 M/N 种); 选"全部 BOM"时对所有 BOM 同时模拟 - 提供「重置」清除模拟结果, 纯前端计算、不改动任何库存数据 - 新增 .sim-bar / .row-sim-danger / .sim-badge 样式 - 教程同步补充模拟齐套章节
114 lines
5.5 KiB
CSS
114 lines
5.5 KiB
CSS
* { 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; }
|
|
main { max-width: 1100px; margin: 18px auto; padding: 0 16px; }
|
|
|
|
.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:hover, .btn:hover { filter: brightness(.96); }
|
|
.row-actions { margin-top: 14px; display: flex; gap: 10px; }
|
|
|
|
.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; }
|
|
.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; }
|
|
|
|
/* 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; }
|