feat: 新增备料(采购下单)功能模块,含清空清单

- 独立采购备料清单:选 BOM + 输入套数一键生成计划(计划数量 = 单套用量 × 套数),可手工增删改、导出 Excel

- 备料与生产订单完全解耦,仅记录计划数量、不记账(不产生任何出入库流水)

- 新增「清空清单」功能(/prepare/clear,JS 二次确认 + 操作日志),按当前工厂范围清空

- 配套:PrepPlan 模型、缺口(计划-库存)实时计算、库存随工厂切换过滤
This commit is contained in:
2026-10-19 15:09:20 +08:00
parent e9b605fca6
commit 5a6f4ea4df
6 changed files with 424 additions and 1 deletions
+7
View File
@@ -79,6 +79,13 @@ button:hover, .btn:hover { filter: brightness(.96); }
.badge.warn { background: #fff7e6; color: #ad6800; }
.badge.danger { background: #fff1f0; color: #cf1322; }
/* 备料: 计划数量差异指示 */
.plan-input { padding: 3px 6px; border: 1px solid #d0d5dd; border-radius: 4px; font-size: 13px; }
.plan-input:focus { outline: none; border-color: #4096ff; box-shadow: 0 0 0 2px rgba(64,150,255,.15); }
.diff { font-variant-numeric: tabular-nums; }
.diff-pos { color: #1a7f47; font-weight: 600; } /* 计划 > 采购(多订) 绿 */
.diff-neg { color: #cf1322; font-weight: 600; } /* 计划 < 采购(少订) 红 */
.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; }