feat: 庫存紀錄顯示儲位並優化返回狀態保持
This commit is contained in:
@@ -42,7 +42,7 @@ export default function TransactionTable({ transactions, showBatchNumber = false
|
||||
<th className="px-4 py-3">類型</th>
|
||||
<th className="px-4 py-3 text-right">變動數量</th>
|
||||
<th className="px-4 py-3 text-right">結餘</th>
|
||||
{shouldShowSlot && <th className="px-4 py-3">貨道</th>}
|
||||
{shouldShowSlot && <th className="px-4 py-3">儲位</th>}
|
||||
<th className="px-4 py-3">經手人</th>
|
||||
<th className="px-4 py-3">原因/備註</th>
|
||||
</tr>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import { Head, router } from "@inertiajs/react";
|
||||
import { Head, router, useRemember } from "@inertiajs/react";
|
||||
import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
|
||||
import {
|
||||
Search,
|
||||
@@ -121,9 +120,10 @@ export default function StockQueryIndex({
|
||||
warehouses,
|
||||
categories,
|
||||
}: Props) {
|
||||
const [search, setSearch] = useState(filters.search || "");
|
||||
const [perPage, setPerPage] = useState<string>(
|
||||
filters.per_page || "10"
|
||||
const [search, setSearch] = useRemember(filters.search || "", "StockQuery/search");
|
||||
const [perPage, setPerPage] = useRemember(
|
||||
filters.per_page || "10",
|
||||
"StockQuery/perPage"
|
||||
);
|
||||
|
||||
// 執行篩選
|
||||
|
||||
Reference in New Issue
Block a user