提交
This commit is contained in:
1 parent
df53d05193
commit
f90726927e
50 files changed
+16281
-12780
No files matched your search
@@ -0,0 +1,38 @@
|
||||
# 设计:从任务执行派发临时生产工单
|
||||
|
||||
## 流程
|
||||
|
||||
1. 用户在任务执行弹窗进入「产出(细胞产品)」。
|
||||
2. 点击「派发临时工单」→ 校验原材料完整且已保存(`input` scope 无脏数据)。
|
||||
3. 弹出「新增临时工单」弹窗(仅备注,与生产工单临时 Tab 一致)。
|
||||
4. 确认 → 调用 `spawn-temporary-work-order` API 创建 LSSC 工单。
|
||||
5. 打开 `DispatchTaskDialog`,用户填写任务名称/工艺路线并生成任务。
|
||||
6. 任务创建成功 → 前端调用 `set_task_inputs` 写入 API 返回的 `inputItems`(仅原材料,不含产出)。
|
||||
|
||||
## 约束
|
||||
|
||||
- 来源任务须至少一条已持久化原材料,且每条具备 `inputType` 与编码/名称/id(**含临时生产工单来源任务**)。
|
||||
- **SHALL NOT** 复制当前任务产出(细胞产品)。
|
||||
- 按钮在只读下不展示(**已完成 `ywc` 任务除外:只读查看时仍展示派发**)。
|
||||
|
||||
## API
|
||||
|
||||
`POST /web/admin/production-tasks/{task_id}/spawn-temporary-work-order`
|
||||
|
||||
Body: `{ remark?: string }`
|
||||
|
||||
Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"workOrder": { "id", "workOrderNo", "workOrderStatus", ... },
|
||||
"sourceTaskId": "...",
|
||||
"sourceTaskNo": "...",
|
||||
"inputItems": [{ "inputType", "inputId", "inputCode", "inputName", "remark" }]
|
||||
}
|
||||
```
|
||||
|
||||
## UI
|
||||
|
||||
- 按钮:`btn-ghost` + `Position` 图标,文案「派发临时工单」,位于产出底栏「保存」左侧。
|
||||
- 不可用时 `disabled` + tooltip 说明需先保存原材料。
|
||||
Reference in new issue
Block a user