물건목록 페이징갯수, 정렬기준 유지하도록 수정6
This commit is contained in:
parent
1e7e0ffb64
commit
3e8a57f3a7
@ -173,7 +173,8 @@ export default function Stuff() {
|
|||||||
schFromDt: dayjs(new Date()).add(-1, 'year').format('YYYY-MM-DD'),
|
schFromDt: dayjs(new Date()).add(-1, 'year').format('YYYY-MM-DD'),
|
||||||
schToDt: dayjs(new Date()).format('YYYY-MM-DD'),
|
schToDt: dayjs(new Date()).format('YYYY-MM-DD'),
|
||||||
startRow: (pageNo - 1) * pageSize + 1,
|
startRow: (pageNo - 1) * pageSize + 1,
|
||||||
endRow: pageNo * pageSize,
|
// endRow: pageNo * pageSize,
|
||||||
|
endRow: stuffSearchParams?.endRow,
|
||||||
schSelSaleStoreId: stuffSearchParams?.schSelSaleStoreId ? stuffSearchParams.schSelSaleStoreId : '',
|
schSelSaleStoreId: stuffSearchParams?.schSelSaleStoreId ? stuffSearchParams.schSelSaleStoreId : '',
|
||||||
schOtherSelSaleStoreId: stuffSearchParams?.schOtherSelSaleStoreId ? stuffSearchParams.schOtherSelSaleStoreId : '',
|
schOtherSelSaleStoreId: stuffSearchParams?.schOtherSelSaleStoreId ? stuffSearchParams.schOtherSelSaleStoreId : '',
|
||||||
schSortType: stuffSearchParams.schSortType,
|
schSortType: stuffSearchParams.schSortType,
|
||||||
@ -191,11 +192,7 @@ export default function Stuff() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (session.storeId === 'T01') {
|
|
||||||
fetchData()
|
fetchData()
|
||||||
//} else if (stuffSearch.schSelSaleStoreId !== '') {
|
|
||||||
//fetchData()
|
|
||||||
//}
|
|
||||||
} else if (stuffSearchParams?.code === 'M') {
|
} else if (stuffSearchParams?.code === 'M') {
|
||||||
const params = {
|
const params = {
|
||||||
saleStoreId: session?.storeId,
|
saleStoreId: session?.storeId,
|
||||||
@ -255,12 +252,15 @@ export default function Stuff() {
|
|||||||
: stuffSearchParams.schSelSaleStoreId
|
: stuffSearchParams.schSelSaleStoreId
|
||||||
setPageSize(e.target.value)
|
setPageSize(e.target.value)
|
||||||
setStuffSearch({
|
setStuffSearch({
|
||||||
...stuffSearchParams,
|
// ...stuffSearchParams,
|
||||||
|
...stuffSearch,
|
||||||
|
code: 'S',
|
||||||
startRow: startRow,
|
startRow: startRow,
|
||||||
endRow: 1 * e.target.value,
|
endRow: 1 * e.target.value,
|
||||||
})
|
})
|
||||||
|
|
||||||
setPageNo(1)
|
setPageNo(1)
|
||||||
|
|
||||||
const apiUrl = `/api/object/list?saleStoreId=${session?.storeId}&${queryStringFormatter(stuffSearchParams)}`
|
const apiUrl = `/api/object/list?saleStoreId=${session?.storeId}&${queryStringFormatter(stuffSearchParams)}`
|
||||||
get({ url: apiUrl }).then((res) => {
|
get({ url: apiUrl }).then((res) => {
|
||||||
if (!isEmptyArray(res)) {
|
if (!isEmptyArray(res)) {
|
||||||
@ -346,13 +346,13 @@ export default function Stuff() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="left-unit-box">
|
<div className="left-unit-box">
|
||||||
<div className="select-box mr5" style={{ width: '110px' }}>
|
<div className="select-box mr5" style={{ width: '110px' }}>
|
||||||
<select className="select-light black" name="" id="" onChange={onChangeSortType}>
|
<select className="select-light black" onChange={onChangeSortType} defaultValue={stuffSearch.schSortType}>
|
||||||
<option value="R">{getMessage('stuff.search.grid.schSortTypeR')}</option>
|
<option value="R">{getMessage('stuff.search.grid.schSortTypeR')}</option>
|
||||||
<option value="U">{getMessage('stuff.search.grid.schSortTypeU')}</option>
|
<option value="U">{getMessage('stuff.search.grid.schSortTypeU')}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className="select-box" style={{ width: '80px' }}>
|
<div className="select-box" style={{ width: '80px' }}>
|
||||||
<select className="select-light black" name="" id="" onChange={onChangePerPage}>
|
<select className="select-light black" onChange={onChangePerPage} defaultValue={stuffSearch.endRow}>
|
||||||
<option value="100">100</option>
|
<option value="100">100</option>
|
||||||
<option value="200">200</option>
|
<option value="200">200</option>
|
||||||
<option value="300">300</option>
|
<option value="300">300</option>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user