물건목록화면 수정
This commit is contained in:
parent
408d7fb04b
commit
cda5b1c1dd
@ -218,10 +218,6 @@ export default function Stuff() {
|
|||||||
stuffSearchParams.endRow = 1 * pageSize
|
stuffSearchParams.endRow = 1 * pageSize
|
||||||
stuffSearchParams.schSortType = defaultSortType
|
stuffSearchParams.schSortType = defaultSortType
|
||||||
setPageNo(1)
|
setPageNo(1)
|
||||||
setStuffSearch({
|
|
||||||
...stuffSearch,
|
|
||||||
code: 'FINISH',
|
|
||||||
})
|
|
||||||
|
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
const apiUrl = `/api/object/list?saleStoreId=${session?.storeId}&${queryStringFormatter(stuffSearchParams)}`
|
const apiUrl = `/api/object/list?saleStoreId=${session?.storeId}&${queryStringFormatter(stuffSearchParams)}`
|
||||||
@ -239,6 +235,25 @@ export default function Stuff() {
|
|||||||
fetchData()
|
fetchData()
|
||||||
} else if (stuffSearchParams?.code === 'C') {
|
} else if (stuffSearchParams?.code === 'C') {
|
||||||
resetStuffRecoil()
|
resetStuffRecoil()
|
||||||
|
} else if (stuffSearchParams?.code === 'FINISH') {
|
||||||
|
stuffSearchParams.startRow = 1
|
||||||
|
stuffSearchParams.endRow = 1 * pageSize
|
||||||
|
stuffSearchParams.schSortType = defaultSortType
|
||||||
|
setPageNo(1)
|
||||||
|
async function fetchData() {
|
||||||
|
const apiUrl = `/api/object/list?saleStoreId=${session?.storeId}&${queryStringFormatter(stuffSearchParams)}`
|
||||||
|
await get({ url: apiUrl }).then((res) => {
|
||||||
|
if (!isEmptyArray(res)) {
|
||||||
|
setGridProps({ ...gridProps, gridData: res, count: res[0].totCnt })
|
||||||
|
setTotalCount(res[0].totCnt)
|
||||||
|
} else {
|
||||||
|
setGridProps({ ...gridProps, gridData: [], count: 0 })
|
||||||
|
setTotalCount(0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fetchData()
|
||||||
}
|
}
|
||||||
}, [stuffSearchParams])
|
}, [stuffSearchParams])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user