From d38a4630ddf3ca74bac90968aed4958e07724a65 Mon Sep 17 00:00:00 2001 From: chenjw28 <792430652@qq.com> Date: Tue, 12 May 2026 18:03:13 +0800 Subject: [PATCH] x --- static/vue-app.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/static/vue-app.js b/static/vue-app.js index 8d26aa6..0977b6d 100644 --- a/static/vue-app.js +++ b/static/vue-app.js @@ -2510,7 +2510,7 @@ const InventoryView = { apiRequest('/api/sales-orders?limit=100'), apiRequest('/api/warehouses') ]); - state.productionOrders = orders || []; + state.productionOrders = orders?.items || []; state.warehouses = warehouses || []; if (!state.productionWarehouseId) { state.productionWarehouseId = state.warehouses.find(w => w.is_default)?.id || state.warehouses[0]?.id || null; @@ -2529,7 +2529,7 @@ const InventoryView = { apiRequest('/api/purchase-orders?limit=100'), apiRequest('/api/warehouses') ]); - state.purchaseOrders = orders || []; + state.purchaseOrders = orders?.items || []; state.warehouses = warehouses || []; if (!state.purchaseWarehouseId) { state.purchaseWarehouseId = state.warehouses.find(w => w.is_default)?.id || state.warehouses[0]?.id || null; @@ -2555,7 +2555,8 @@ const InventoryView = { const loadInventory = async () => { state.loading = true; try { - state.inventory = await apiRequest('/api/inventory'); + const data = await apiRequest('/api/inventory'); + state.inventory = data?.items || []; } catch (e) { handleApiError(e, '加载库存'); } finally { @@ -2566,7 +2567,8 @@ const InventoryView = { const loadMovements = async () => { state.loading = true; try { - state.movements = await apiRequest('/api/stock-movements'); + const data = await apiRequest('/api/stock-movements'); + state.movements = data?.items || []; } catch (e) { handleApiError(e, '加载变动记录'); } finally {