fix: 修正全系統側邊欄捲軸重置問題

在所有報表與管理頁面的 router.get 調用中加入 preserveScroll: true。
受影響模組包括:
- 財務管理 (會計報表、公用事業費)
- 庫存管理 (庫存查詢、倉庫管理、進貨、調整、調撥)
- 生產管理 (工單管理、配方管理)
- 採購管理 (採購單)
- 銷售與發貨管理 (銷售單、發貨單、匯入管理)
- 系統管理 (使用者、角色、操作紀錄)
This commit is contained in:
2026-02-25 14:04:22 +08:00
parent 5668e17e61
commit 299cf37054
17 changed files with 32 additions and 30 deletions

View File

@@ -82,7 +82,7 @@ export default function PurchaseOrderIndex({ orders, filters, warehouses }: Prop
sort_field: filters.sort_field,
sort_direction: filters.sort_direction,
},
{ preserveState: true, replace: true }
{ preserveState: true, replace: true, preserveScroll: true }
);
};
@@ -94,7 +94,7 @@ export default function PurchaseOrderIndex({ orders, filters, warehouses }: Prop
setDateEnd("");
setDateRangeType("custom");
router.get(route('purchase-orders.index'));
router.get(route('purchase-orders.index'), {}, { preserveScroll: true });
};
const handleDateRangeChange = (type: string) => {