From 8dc94a5fcb3b3f740b99f6dbdfe8f67aeab92ff3 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 20 Oct 2026 14:39:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=BA=93=E5=AD=98):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=AF=AF=E6=8F=92=E5=85=A5=E5=88=B0=20adjustItem=20=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E5=89=8D=E7=9A=84=E9=87=8D=E5=A4=8D=20effect=EF=BC=88?= =?UTF-8?q?=E4=BF=AE=20a24ff11=20=E7=9A=84=20TS2448=EF=BC=8Ctypecheck=20?= =?UTF-8?q?=E5=B7=B2=E9=80=9A=E8=BF=87=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/inventory/InventoryManagement.tsx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/pages/inventory/InventoryManagement.tsx b/src/pages/inventory/InventoryManagement.tsx index 9742e74..d40e150 100644 --- a/src/pages/inventory/InventoryManagement.tsx +++ b/src/pages/inventory/InventoryManagement.tsx @@ -222,23 +222,6 @@ export const InventoryManagement: React.FC = () => { created_at: string | null; }> >([]); - useEffect(() => { - if (!adjustItem?.id) { - setAdjustReports([]); - return; - } - let alive = true; - void fetchInventoryBatchReportsByInventoryApi(String(adjustItem.id)) - .then((rows) => { - if (alive) setAdjustReports(Array.isArray(rows) ? rows : []); - }) - .catch(() => { - if (alive) setAdjustReports([]); - }); - return () => { - alive = false; - }; - }, [adjustItem?.id]); const [holdingLoading, setHoldingLoading] = useState(false); const [searchQuery, setSearchQuery] = useState(''); const [expiryFilter, setExpiryFilter] = useState('');