feat(fulfillment): 队列筛选增加全部并默认全部
- 直接兑换/预售/未分类/历史任务的队列默认全部 - 全部展示包含未映射、已完成、已取消任务 - 保留当前待办/待映射/可履约/需要人工等筛选 - 后端 all 队列不再套映射过滤
This commit is contained in:
@@ -223,8 +223,8 @@ def list_tasks(
|
||||
# 历史任务不受订单起算时间限制,否则很多旧单在工作台里永远看不到。
|
||||
if flow_version != 1:
|
||||
query = _apply_order_match_cutoff(query, cutoff)
|
||||
# 待映射队列本身就是要展示“还没有映射”的任务,不能再套映射存在条件。
|
||||
if queue_bucket != "pending_mapping":
|
||||
# “全部”和“待映射”都要展示未映射任务,不能再套映射存在条件。
|
||||
if queue_bucket not in {"all", "pending_mapping"}:
|
||||
query = query.filter(
|
||||
or_(
|
||||
PlatformFulfillmentTask.commodity_mapping_id.isnot(None),
|
||||
@@ -236,7 +236,7 @@ def list_tasks(
|
||||
query = query.filter(PlatformFulfillmentTask.sale_mode == mode_filter)
|
||||
elif sale_mode == "unknown":
|
||||
query = query.filter(PlatformFulfillmentTask.sale_mode == "unknown")
|
||||
if queue_bucket:
|
||||
if queue_bucket and queue_bucket != "all":
|
||||
now = datetime.now(UTC)
|
||||
if queue_bucket == classification.QUEUE_CANCELLED:
|
||||
query = query.filter(
|
||||
|
||||
Reference in New Issue
Block a user