diff --git a/inventory-backend/app/api/v1/inbound/stock.py b/inventory-backend/app/api/v1/inbound/stock.py index 2efe39c..89fa1b7 100644 --- a/inventory-backend/app/api/v1/inbound/stock.py +++ b/inventory-backend/app/api/v1/inbound/stock.py @@ -329,7 +329,8 @@ def get_drafts(): # 计算真实的去重"已盘数量" counted_items_set = set() for draft_item in items: - if draft_item.get('qty_actual') is not None: + # 兼容判断 quantity 或 qty_actual + if draft_item.get('quantity') is not None or draft_item.get('qty_actual') is not None: unique_key = f"{draft_item.get('source_table', '')}_{draft_item.get('stock_id', '')}" counted_items_set.add(unique_key) total_scanned_unique = len(counted_items_set)