- 入库登记「所属工厂」默认选中总部(SELF),出库不变 - 编辑生产订单改为仅更新字段:改单号同步关联出入库 order_ref、保留已录入调入数量与已入账流水(移除冲销逻辑) - 生产订单列表/详情按最终订单号(WO+YYYYMMDD+序号)降序排序 - 生产订单详情库存/缺口改用「下单前库存快照」(按下单时间截断),缺口=库存-需求,升序使缺料排前 - 生产工厂列显示「编号 · 公司名称」 - 详情列表列序调整:下单前库存置需求左边、调入数量置缺口右边;状态右侧新增「工厂库存」列(=缺口+调入数量) - 状态「缺料/充足」徽标强制单行显示(.badge white-space:nowrap) - 已调入(已入账)数量可编辑:保存/确认后按新值自动撤销原流水并从原来源厂重新入账,源厂库存不足判定缺料保留原入账,系统总库存不变
157 lines
8.1 KiB
CSS
157 lines
8.1 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; }
|
|
.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;
|
|
}
|
|
.cell-inp { width: 100%; box-sizing: border-box; padding: 4px 6px; border: 1px solid #c9d2dc; border-radius: 4px; font-size: 13px; }
|
|
.cell-inp.num { text-align: right; }
|
|
.readonly-field { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #dfe3e8; border-radius: 6px; background: #f1f3f6; color: #6b7280; font-size: 14px; }
|
|
.btn.small, button.small { padding: 5px 10px; font-size: 12px; border-radius: 5px; }
|
|
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.danger, .btn.danger { background: #e6453c; color: #fff; border-color: #d23b32; }
|
|
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 { display: inline-block; white-space: nowrap; 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; flex-wrap: wrap; }
|
|
.bom-card.card-danger .bom-head { background: #fff1f0; }
|
|
.bom-card .bom-head label.bh-lbl { margin: 0; white-space: nowrap; color: #44525f; font-size: 12px; }
|
|
.bom-card .bom-head input.bom-code-inp { width: 160px; flex: 0 0 auto; padding: 5px 8px; font-size: 13px; }
|
|
.bom-card .bom-head input.bom-name-inp { flex: 1 1 220px; min-width: 180px; padding: 5px 8px; font-size: 13px; }
|
|
.bom-card .tbl { box-shadow: none; border-radius: 0; margin: 0; }
|