## 1. 前置与 DDL - [ ] 1.1 确认 `production-material-requisition` 迁移已执行(统一物料库 + 领用 + step_save) - [ ] 1.2 DDL:`biz_production_material_formula`、`biz_production_material_prep`、`biz_production_material_prep_line` - [ ] 1.3 DDL:`biz_production_task_step_configured_reagent` + `requisition_usage_id` - [ ] 1.4 字典 `production_material_type` 新增 `configured_reagent`;菜单无需新增顶级项(物料库 Tab 扩展) - [ ] 1.5 SQL 迁移脚本写入 `docs/sql/migrations/`(含 utf8mb4_unicode_ci) ## 2. 后端 — 目录与配方 - [ ] 2.1 Models:`formula` / `prep` / `prep_line` / `step_configured_reagent` - [ ] 2.2 CRUD:配置试剂目录 CRUD(material_type=configured_reagent);禁止普通 manual_in - [ ] 2.3 CRUD:formula 全量替换;校验子物料仅 reagent/consumable - [ ] 2.4 API:`GET/PUT /production-materials/{id}/formula` ## 3. 后端 — 配制单 - [ ] 3.1 CRUD:prep 创建/更新 draft、complete、cancel - [ ] 3.2 事务:complete 写 prep_consume + stock_batch + prep_in + 更新 stock_qty - [ ] 3.3 API:prep 列表/详情/complete;prep_no 生成规则 - [ ] 3.4 usage 流水:扩展 source_type prep_consume、prep_in 展示与筛选 ## 4. 后端 — 领用与工单 - [ ] 4.1 扩展 `production-material-requisition-options` 支持 materialType=configured_reagent - [ ] 4.2 `replace_step_configured_reagents` + API 路由 - [ ] 4.3 `register_step_usage_from_requisition` 支持 configured_reagent 校验 - [ ] 4.4 `my-production-material-usages` 含 configured_reagent 筛选 ## 5. 前端 — 生产物料库 - [ ] 5.1 类型筛选/Tag 扩展「配置试剂」;`status-tag-registry` - [ ] 5.2 配置试剂新增/编辑弹窗 + 配方 inner-table - [ ] 5.3 第四 Tab「配制单」:列表、新建/编辑、确认配制 - [ ] 5.4 API 模块 `production-material.ts` 扩展 formula/prep 接口 ## 6. 前端 — 生产工单 - [ ] 6.1 `useTaskStepEditor`:配置试剂领用选项、保存 payload - [ ] 6.2 `StepDetailPanel`:配置试剂 Tab(执行态领用列) - [ ] 6.3 任务详情 API 返回 `configuredReagents` 子表 ## 7. 验证与收尾 - [ ] 7.1 联调:BOM → 子物料领用 → 配制入库 → 配置试剂领用 → 工单 step_save - [ ] 7.2 `python scripts/check_field_consistency.py`(若新增 CRUD 行映射) - [ ] 7.3 `./scripts/update-graph.sh backend frontend` - [ ] 7.4 更新本变更 `tasks.md` 勾选状态