2.5 KiB
2.5 KiB
MODIFIED Requirements
Requirement: Unified production material catalog
系统 SHALL 新建 biz_production_material 作为生产侧 唯一 物资目录,字段对齐 biz_qc_material,并 新增:
| 字段 | 说明 |
|---|---|
material_type |
物料类型,必填;reagent(试剂)、consumable(耗材)或 configured_reagent(配置试剂) |
其他字段:material_code、material_name、spec_model、unit、stock_qty、warning_qty、status 及公共字段。
唯一约束:租户 + material_type + material_code(del_flag=0 维度)。
Scenario: Create reagent catalog entry
- WHEN 用户新增物料,material_type=reagent,material_code=R001
- THEN 写入 biz_production_material,stock_qty 初始 0
Scenario: Same code different type allowed
- WHEN 已存在 consumable 编码 C001,再新增 reagent 编码 C001
- THEN 允许创建(类型不同)
Scenario: Create configured reagent catalog entry
- WHEN 用户新增物料,material_type=configured_reagent,material_code=CR001
- THEN 写入 biz_production_material,stock_qty 初始 0
Requirement: Material type dictionary
material_type SHALL 注册数据字典 production_material_type(或等价 dict_type),前端 Tag 展示「试剂」「耗材」及「配置试剂」。
Scenario: List shows type tag
- WHEN 用户查看生产物料库批次列表
- THEN 每行展示 material_type 对应 Tag
Requirement: Production material library menu and page
系统 SHALL 提供 单一 管理入口:
| 项 | 值 |
|---|---|
| 菜单名 | 生产物料库 |
| 父菜单 | 【生产基础信息】(PRB00000000000000000000000000001,已确认) |
| 路由 | production-material → /production/production-material/index |
| menuCode | production:material:list |
页面 SHALL 含 Tab:批次列表 | 变动记录 | 库存盘点 | 配制单(配制单见 configured-reagent-ui);前三个 Tab 布局参照 qc-material/index.vue。
筛选区 SHALL 含 物料类型(全部 / 试剂 / 耗材 / 配置试剂)。
菜单注册 SHALL 同步 sys_menu 迁移脚本、backend/app/api/menu.py、sqxp.ts(挂在 ProductionBase 的 children 下,替代原耗材/试剂管理项)。
Scenario: Single library replaces dual menus
- WHEN 用户打开生产物料库
- THEN 可同时管理试剂、耗材与配置试剂,无需分别进入耗材管理、试剂管理