fix(qc): 调整检测清空重配不再误标工单已完成

try_complete 在无活跃任务时也会把已配置打成已完成;清空全部后再添加会踩中。
现要求至少有一条活跃任务且全部完成后才自动完成,并强制全量重建时清理旧批次,前后端均校验批次须含检测项目。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-11-05 12:18:30 +08:00
1 parent ebaab7d210
commit 9e3a67a8e4
5 files changed
+170 -31

No files matched your search

@@ -576,6 +576,10 @@
ElMessage.warning(`${label}:请指定负责人`)
return false
}
if (!(b.labItemIds?.length || 0) && !(b.thirdPartyItemIds?.length || 0)) {
ElMessage.warning(`${label}:请至少选择一个检测项目`)
return false
}
const labSet = new Set(b.labItemIds)
if (labSet.size !== b.labItemIds.length) {
ElMessage.warning(`${label}:实验室项目不能重复`)