diff --git a/src/components/StockRecord/SearchPage.tsx b/src/components/StockRecord/SearchPage.tsx index ac9d791..096a265 100644 --- a/src/components/StockRecord/SearchPage.tsx +++ b/src/components/StockRecord/SearchPage.tsx @@ -41,7 +41,7 @@ const SearchPage: React.FC = ({ dataList: initialDataList }) => { // 添加分页状态 const [page, setPage] = useState(0); const [pageSize, setPageSize] = useState(10); - const [pagingController, setPagingController] = useState({ pageNum: 1, pageSize: 10 }); + const [pagingController, setPagingController] = useState({ pageNum: 1, pageSize: 100 }); const [hasSearchQuery, setHasSearchQuery] = useState(false); const [totalCount, setTotalCount] = useState(initialDataList.length); @@ -261,7 +261,16 @@ const SearchPage: React.FC = ({ dataList: initialDataList }) => { { label: t("Type"), paramName: "type", - type: "text", + type: "select-labelled", + options: [ + { value: "tke", label: t("tke") }, // 盤點 + { value: "ADJ", label: t("adj") }, + { value: "Nor", label: t("nor") }, + { value: "TRF", label: t("trf") }, + { value: "OPEN", label: t("open") }, // 開倉 + { value: "miss", label: t("miss") }, + { value: "bad", label: t("bad") }, + ], }, { label: t("Start Date"), @@ -392,9 +401,10 @@ const SearchPage: React.FC = ({ dataList: initialDataList }) => { if (pageSize === "all") { return filteredList; } - - return filteredList; - }, [filteredList, pageSize]); + const size = typeof pageSize === 'number' ? pageSize : 10; + const start = page * size; + return filteredList.slice(start, start + size); + }, [filteredList, pageSize, page]); // 计算传递给 SearchResults 的 pageSize(确保在选项中) const actualPageSizeForTable = useMemo(() => { diff --git a/src/components/StockRecord/index.tsx b/src/components/StockRecord/index.tsx index e5b59a6..cecacef 100644 --- a/src/components/StockRecord/index.tsx +++ b/src/components/StockRecord/index.tsx @@ -18,7 +18,7 @@ const Wrapper: React.FC & SubComponents = async () => { pageSize: 100, }); - return ; + return ; }; Wrapper.Loading = GeneralLoading; diff --git a/src/i18n/zh/inventory.json b/src/i18n/zh/inventory.json index a796223..a2a2fd8 100644 --- a/src/i18n/zh/inventory.json +++ b/src/i18n/zh/inventory.json @@ -15,11 +15,14 @@ "Stock take record status updated to not match": "盤點記錄狀態更新為數值不符", "available": "可用", "Issue Qty": "問題數量", + "tke": "盤點", "Submit Bad Item": "提交不良品", "Remain available Quantity": "剩餘可用數量", "Submitting...": "提交中...", "Item-lotNo-ExpiryDate": "貨品-批號-到期日", "Submit Miss Item": "提交缺貨", + "Confirm": "確認", + "Confirm create stock take for all sections?": "確認為所有區域創建盤點?", "Item-lotNo-ExpiryDate": "貨品-批號-到期日", "not available": "不可用", "Book Qty": "帳面庫存",