물건목록 초기화 수정

This commit is contained in:
basssy 2024-11-13 16:25:54 +09:00
parent bb67e68b95
commit 0f2d99d2aa

View File

@ -151,6 +151,7 @@ export default function StuffSearchCondition() {
setEndDate(dayjs(new Date()).format('YYYY-MM-DD'))
if (session?.storeId === 'T01') {
setSchSelSaleStoreId('')
setOtherSaleStoreId('')
handleClear1() //
resetStuffRecoil()
setStuffSearch({
@ -204,10 +205,8 @@ export default function StuffSearchCondition() {
setSchSelSaleStoreList(allList)
setFavoriteStoreList(favList)
setShowSaleStoreList(favList)
// if (stuffSearch.code === 'FINISH') {
if (stuffSearch.schSelSaleStoreId != '') {
setSchSelSaleStoreId(stuffSearch.schSelSaleStoreId)
// if (stuffSearch.schOtherSelSaleStoreId != '') {
url = `/api/object/saleStore/${stuffSearch.schSelSaleStoreId}/list?firstFlg=1&userId=${session?.userId}`
get({ url: url }).then((res) => {
if (!isEmptyArray(res)) {
@ -223,30 +222,10 @@ export default function StuffSearchCondition() {
setOtherSaleStoreList([])
}
})
// }
}
// }
setStuffSearch({
...stuffSearch,
code: 'S',
})
//T01 2 1 storeId
//
// url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=0&userId=${session?.userId}`
// get({ url: url }).then((res) => {
// if (!isEmptyArray(res)) {
// res.map((row) => {
// row.value = row.saleStoreId
// row.label = row.saleStoreName
// })
// otherList = res
// setOtherSaleStoreList(otherList)
// } else {
// setOtherSaleStoreList([])
// }
// setStuffSearch({
// ...stuffSearch,
// code: 'S',
// })
} else {
if (session?.storeLvl === '1') {
@ -261,11 +240,6 @@ export default function StuffSearchCondition() {
setOtherSaleStoreList(otherList)
setStuffSearch({
...stuffSearch,
code: 'S',
})
if (stuffSearch.schOtherSelSaleStoreId != '') {
setOtherSaleStoreId(stuffSearch.schOtherSelSaleStoreId)
}
@ -369,10 +343,6 @@ export default function StuffSearchCondition() {
} else {
//
setOtherSaleStoreId('')
setStuffSearch({
...stuffSearch,
// schOtherSelSaleStoreId: '',
})
}
} else {
setOtherSaleStoreId('')