Files
zkxw/openspec/changes/production-material-requisition/tasks.md
T
2026-06-13 19:47:22 +08:00

53 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 生产物料库(统一)— Implementation Tasks
> Phase 0 融合 → A 批次/流水 → B 领用/工单 → C 盘点 → D 废弃 pack/旧菜单
## Phase 0 — 统一物料库 + 迁移
- [ ] 0.1 DDL:`biz_production_material`(含 material_type)+ 字典 `production_material_type`
- [ ] 0.2 迁移脚本:consumable/reagent → production_material + id 映射 + INIT 批次
- [ ] 0.3 Model `production_material.py`;CRUD 目录 list/get/create/update
- [ ] 0.4 API `/production-materials`;旧 consumable/reagent 写接口 410
- [ ] 0.5 菜单:【生产基础信息】下新增【生产物料库】;隐藏耗材管理、试剂管理
- [ ] 0.6 前端:`production-material/index.vue` 骨架(三 Tab 占位 + 类型筛选)
## Phase A — 批次与变动流水
- [ ] A1 DDL:`production_material_stock_batch`、`production_material_usage`(含 step 溯源字段)
- [ ] A2 CRUD batch + usage(参照 qc_material_stock_batch / qc_material_usage)
- [ ] A3 入库/批量入库、领用/批量领用 API + 前端弹窗(对齐 QC)
- [ ] A4 批次列表 Tab 完整实现
- [ ] A5 变动记录 Tab(含 material_type、批次列)
## Phase B — 领用登记 + 生产工单 + 我的领用
- [ ] B1 step 子表 `requisition_usage_id`;usage `parent_usage_id`
- [ ] B2 `register_step_usage_from_requisition()`;替换 step_save 直接扣库
- [ ] B3 API:`production-material-requisition-options?materialType=`、`my-production-material-usages`
- [ ] B4 菜单【我的物料领用记录】+ `my-production-material-usage/index.vue`
- [ ] B5 `StepDetailPanel`:试剂/耗材 Tab 共用领用 API + 类型过滤
## Phase C — 库存盘点
- [ ] C1 DDL:stock_check + batch_line + unused_line(统一三表)
- [ ] C2 CRUD + API(参照 qc_material_stock_check)
- [ ] C3 `ProductionMaterialStockCheckTab.vue`(参照 QC)
## Phase D — 清理
- [ ] D1 耗材包 Tab/菜单/工艺导入下线
- [ ] D2 删除或 redirect 旧 consumable/reagent 路由
- [ ] D3 更新 `production-material-unification` 文档与 field consistency 脚本
## 验证
- [ ] V1 同一页面管理试剂+耗材;类型筛选正确
- [ ] V2 批次领用 → 工单登记 → 【我的物料领用记录】可见
- [ ] V3 月末盘点 Part A+B 完成不调账
- [ ] V4 迁移后旧编码在步骤/工艺中仍可解析
## 评审
- [ ] Q1 生产物料库菜单挂载位置 — **已确认:生产基础信息**
- [ ] Q2 material_type 字典项文案