| @@ -257,7 +257,14 @@ export const getStockTakeRecords = async () => { | |||||
| export const getStockTakeRecordsPaged = async ( | export const getStockTakeRecordsPaged = async ( | ||||
| pageNum: number, | pageNum: number, | ||||
| pageSize: number, | pageSize: number, | ||||
| params?: { sectionDescription?: string; stockTakeSections?: string; status?: string; area?: string; storeId?: string } | |||||
| params?: { | |||||
| sectionDescription?: string; | |||||
| stockTakeSections?: string; | |||||
| status?: string; | |||||
| area?: string; | |||||
| storeId?: string; | |||||
| onlyLatestRound?: boolean; | |||||
| } | |||||
| ) => { | ) => { | ||||
| const searchParams = new URLSearchParams(); | const searchParams = new URLSearchParams(); | ||||
| searchParams.set("pageNum", String(pageNum)); | searchParams.set("pageNum", String(pageNum)); | ||||
| @@ -277,6 +284,9 @@ export const getStockTakeRecordsPaged = async ( | |||||
| if (params?.storeId && params.storeId !== "All") { | if (params?.storeId && params.storeId !== "All") { | ||||
| searchParams.set("storeId", params.storeId); | searchParams.set("storeId", params.storeId); | ||||
| } | } | ||||
| if (params?.onlyLatestRound != null) { | |||||
| searchParams.set("onlyLatestRound", String(params.onlyLatestRound)); | |||||
| } | |||||
| const url = `${BASE_API_URL}/stockTakeRecord/AllPickedStockOutRecordList?${searchParams.toString()}`; | const url = `${BASE_API_URL}/stockTakeRecord/AllPickedStockOutRecordList?${searchParams.toString()}`; | ||||
| const res = await serverFetchJson<RecordsRes<AllPickedStockTakeListReponse>>(url, { method: "GET" }); | const res = await serverFetchJson<RecordsRes<AllPickedStockTakeListReponse>>(url, { method: "GET" }); | ||||
| return res; | return res; | ||||