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

@@ -69,7 +69,7 @@ export default function GoodsReceiptIndex({ receipts, filters, warehouses }: Pro
date_start: dateStart || undefined,
date_end: dateEnd || undefined,
per_page: perPage,
}, { preserveState: true, replace: true });
}, { preserveState: true, replace: true, preserveScroll: true });
};
const handleReset = () => {
@@ -80,7 +80,7 @@ export default function GoodsReceiptIndex({ receipts, filters, warehouses }: Pro
setDateEnd('');
setDateRangeType('custom');
setPerPage('10');
router.get(route('goods-receipts.index'), {}, { preserveState: false });
router.get(route('goods-receipts.index'), {}, { preserveState: false, preserveScroll: true });
};
const handleDateRangeChange = (type: string) => {