From b377c93e1f3770e2d09b329b322e418cbb229369 Mon Sep 17 00:00:00 2001 From: dxc Date: Mon, 2 Mar 2026 16:28:35 +0800 Subject: [PATCH] feat: support filtering for all table headers in semi-inbound Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) --- .../app/services/inbound/semi_service.py | 22 +++++++++++++++---- .../src/views/stock/inbound/semi.vue | 18 +++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/inventory-backend/app/services/inbound/semi_service.py b/inventory-backend/app/services/inbound/semi_service.py index 8abf6e1..6baee4f 100644 --- a/inventory-backend/app/services/inbound/semi_service.py +++ b/inventory-backend/app/services/inbound/semi_service.py @@ -397,15 +397,29 @@ class SemiInboundService: 'spec_model': MaterialBase.spec_model, 'category': MaterialBase.category, 'material_type': MaterialBase.material_type, + 'unit': MaterialBase.unit, + 'id': StockSemi.id, + 'base_id': StockSemi.base_id, + 'sku': StockSemi.sku, + 'inbound_date': StockSemi.production_date, + 'barcode': StockSemi.barcode, + 'serial_number': StockSemi.serial_number, + 'batch_number': StockSemi.batch_number, 'status': StockSemi.status, 'quality_status': StockSemi.quality_status, - 'warehouse_location': StockSemi.warehouse_location, - 'bom_code': StockSemi.bom_code, - 'work_order_code': StockSemi.work_order_code, + 'qty_inbound': StockSemi.in_quantity, 'qty_stock': StockSemi.stock_quantity, 'qty_available': StockSemi.available_quantity, - 'unit_total_cost': StockSemi.manual_cost, + 'warehouse_location': StockSemi.warehouse_location, + 'bom_code': StockSemi.bom_code, + 'bom_version': StockSemi.bom_version, + 'work_order_code': StockSemi.work_order_code, 'raw_material_cost': StockSemi.raw_material_cost, + 'unit_total_cost': StockSemi.manual_cost, + 'total_price': StockSemi.total_price, + 'production_manager': StockSemi.production_manager, + 'production_start_time': StockSemi.production_start_time, + 'production_end_time': StockSemi.production_end_time, } for cond in advanced_filters: field = cond.get('field') diff --git a/inventory-web/src/views/stock/inbound/semi.vue b/inventory-web/src/views/stock/inbound/semi.vue index fbead64..d756717 100644 --- a/inventory-web/src/views/stock/inbound/semi.vue +++ b/inventory-web/src/views/stock/inbound/semi.vue @@ -621,16 +621,34 @@ const companyOptions = ref([]) // [新增] const advancedFilterVisible = ref(false) const advancedConditions = ref([{ field: '', operator: '', value: '' }]) const fieldOptions = ref([ + { label: 'ID', value: 'id' }, + { label: 'BaseID', value: 'base_id' }, { label: '所属公司', value: 'company_name' }, { label: '名称', value: 'material_name' }, { label: '规格型号', value: 'spec_model' }, { label: '类别', value: 'category' }, { label: '类型', value: 'material_type' }, + { label: '单位', value: 'unit' }, + { label: 'SKU', value: 'sku' }, + { label: '入库日期', value: 'inbound_date' }, + { label: '条码', value: 'barcode' }, + { label: '序列号', value: 'serial_number' }, + { label: '批号', value: 'batch_number' }, { label: '状态', value: 'status' }, { label: '质量状态', value: 'quality_status' }, + { label: '入库量', value: 'qty_inbound' }, + { label: '库存数', value: 'qty_stock' }, + { label: '可用数', value: 'qty_available' }, { label: '库位', value: 'warehouse_location' }, { label: 'BOM编号', value: 'bom_code' }, + { label: 'BOM版本', value: 'bom_version' }, { label: '工单号', value: 'work_order_code' }, + { label: '原料成本', value: 'raw_material_cost' }, + { label: '单件成本', value: 'unit_total_cost' }, + { label: '总成本', value: 'total_price' }, + { label: '生产负责人', value: 'production_manager' }, + { label: '生产开始', value: 'production_start_time' }, + { label: '生产结束', value: 'production_end_time' }, ]) const operatorOptions = ref([ { label: '等于', value: '=' },