diff --git a/apps/wpm/services.py b/apps/wpm/services.py index 9b0f3dc2..0f694c4b 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -771,6 +771,7 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime, BatchLog.g_create(source=source, target=target_b, handover=handover, relation_type="merge") elif mtype == Handover.H_DIV: batch = handover_or_b.batch + batches.append(batch) if batch in batches_to_limit: raise ParseError(f'{batch} 不在可拆批次中') else: @@ -780,7 +781,7 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime, BatchLog.g_create(source=source_b, target=target, handover=handover, relation_type="split") else: batch = wm_from.batch - batches.append(batch) + batches.append(batch) if wm_from is None: raise ParseError(f'{wm_from.batch} 找不到车间库存')