From f4b8acb916468922e4db35a9551eb452cebc7d33 Mon Sep 17 00:00:00 2001 From: dxc Date: Mon, 2 Mar 2026 17:09:25 +0800 Subject: [PATCH] feat: add total_price field and update advanced filter options Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) --- inventory-backend/app/services/inbound/product_service.py | 2 ++ inventory-web/src/views/stock/inbound/product.vue | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inventory-backend/app/services/inbound/product_service.py b/inventory-backend/app/services/inbound/product_service.py index d3bb806..2c99a07 100644 --- a/inventory-backend/app/services/inbound/product_service.py +++ b/inventory-backend/app/services/inbound/product_service.py @@ -343,6 +343,7 @@ class ProductInboundService: 'order_id': StockProduct.order_id, 'sale_price': StockProduct.sale_price, 'production_manager': StockProduct.production_manager, + 'total_price': (StockProduct.manual_cost * StockProduct.in_quantity), } for cond in advanced_filters: field = cond.get('field') @@ -406,6 +407,7 @@ class ProductInboundService: 'order_id': StockProduct.order_id, 'sale_price': StockProduct.sale_price, 'production_manager': StockProduct.production_manager, + 'total_price': (StockProduct.manual_cost * StockProduct.in_quantity), } order_field = order_mapping.get(order_by_column) if order_field is not None: diff --git a/inventory-web/src/views/stock/inbound/product.vue b/inventory-web/src/views/stock/inbound/product.vue index aa3b4c0..89ca792 100644 --- a/inventory-web/src/views/stock/inbound/product.vue +++ b/inventory-web/src/views/stock/inbound/product.vue @@ -580,9 +580,9 @@ const fieldOptions = ref([ { label: '原料成本', value: 'raw_material_cost' }, { label: '单件成本', value: 'unit_total_cost' }, { label: '总成本', value: 'total_price' }, + { label: '订单号', value: 'order_id' }, + { label: '售价', value: 'sale_price' }, { label: '生产负责人', value: 'production_manager' }, - { label: '生产开始', value: 'production_start_time' }, - { label: '生产结束', value: 'production_end_time' }, ]) const operatorOptions = ref([ { label: '等于', value: '=' },