Files
zkxw/openspec/changes/qc-inspection-batch/proposal.md
T
2026-06-26 00:50:04 +08:00

32 lines
1.6 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.
## Why
质检工单配置检测时,每个检测主数据项目在同一工单内只能选一次,负责人需按项目逐一指派,列表平铺展示任务,无法满足客户「多批次、跨批重复项目、批次级负责人」的质检组织方式。
## What Changes
- 新增 **检测批次** 实体:工单下可配置多个批次,`ypz` 后可追加批次
- 批次内可选 lab + 第三方项目(批次内不重复,跨批次可重复同一主数据项目)
- **批次级多人负责人**,同步至批次内全部任务的 `biz_qc_task_assignee`
- **BREAKING**:配置检测 API 请求体改为 `batches[]`(保留扁平字段短期兼容转单批次)
- 新增 `GET /qc-work-orders/{id}/inspection-batches` 供列表展开
- 配置/调整检测弹窗改为批次卡片 UI
- 质检工单、我的质检任务:列表先展示批次,展开后展示检测项目/任务
- DDL + 历史数据迁移(默认批次 1)
## Capabilities
### New Capabilities
- `qc-inspection-batch`: 检测批次数据模型、配置/调整 API、批次列表 API、迁移与任务 assignee 同步
### Modified Capabilities
(无 `openspec/specs/` 基线;行为变更记录于本变更 spec)
## Impact
- **后端**:`models.py`、`qc_work_order.py`、`qc.py` API;新 `qc_inspection_batch.py` CRUD
- **SQL**:`docs/sql/` 新表 + alter + 迁移脚本
- **前端**:`qc-work-order/index.vue` 配置弹窗、`QcWorkOrderTaskSubList` / 新 `QcWorkOrderBatchSubList`、`qc-mine-task-groups.ts`、`qc-work-order.ts` API
- **文档**:`docs/superpowers/specs/2026-06-25-qc-inspection-batch-design.md` 为实现权威