From 83f0e54dc5cbfe7a411c6f517870ebf9f674a573 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 10 Feb 2025 16:21:18 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EA=B7=B8=EB=A6=AC=EB=93=9C=20=EC=85=80=20=ED=81=B4=EB=A6=AD=20?= =?UTF-8?q?=EB=93=9C=EB=9E=98=EA=B7=B8=20=EB=B3=B5=EC=82=AC=20=EC=98=B5?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80=20&?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/Stuff.jsx | 11 ++++++++++- src/components/management/StuffSearchCondition.jsx | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/management/Stuff.jsx b/src/components/management/Stuff.jsx index 51154e92..ee0a1930 100644 --- a/src/components/management/Stuff.jsx +++ b/src/components/management/Stuff.jsx @@ -241,6 +241,10 @@ export default function Stuff() { params.saleStoreId = session.storeId } + if (params.saleStoreId !== session.storeId) { + params.saleStoreId = session.storeId + } + async function fetchData() { const apiUrl = `/api/object/list?${queryStringFormatter(params)}` await get({ @@ -296,6 +300,11 @@ export default function Stuff() { if (!stuffSearchParams.saleStoreId) { stuffSearchParams.saleStoreId = session.storeId } + + if (stuffSearchParams.saleStoreId !== session.storeId) { + stuffSearchParams.saleStoreId = session.storeId + } + if (stuffSearchParams.schMyDataCheck) { //0203 내물건보기 체크시 schSaleStoreId에 storeId셋팅 schSelSaleStoreId, schOtherSelSaleStoreId 비우기 stuffSearchParams.schSaleStoreId = session.storeId @@ -358,7 +367,7 @@ export default function Stuff() { fetchData() } else if (stuffSearchParams?.code === 'DELETE') { const newParams = { - saleStoreId: session.storeId, + saleStoreId: '', schObjectNo: '', schAddress: '', schObjectName: '', diff --git a/src/components/management/StuffSearchCondition.jsx b/src/components/management/StuffSearchCondition.jsx index c5862641..d259e573 100644 --- a/src/components/management/StuffSearchCondition.jsx +++ b/src/components/management/StuffSearchCondition.jsx @@ -188,7 +188,7 @@ export default function StuffSearchCondition() { schAddress: address ? address.trim() : '', schObjectName: objectName ? objectName.trim() : '', schDispCompanyName: dispCompanyName ? dispCompanyName.trim() : '', - schSelSaleStoreId: schSelSaleStoreId ? schSelSaleStoreId : stuffSearch.schSelSaleStoreId, + schSelSaleStoreId: stuffSearch?.schSelSaleStoreId ? stuffSearch.schSelSaleStoreId : '', schOtherSelSaleStoreId: otherSaleStoreId ? otherSaleStoreId : stuffSearch.schOtherSelSaleStoreId, schReceiveUser: receiveUser ? receiveUser.trim() : '', schDateType: dateType, @@ -673,11 +673,11 @@ export default function StuffSearchCondition() { } } else { //X누르면 검색조건에 1차점으로 셋팅 - if (session.storeLvl === '1') { if (stuffSearch.schOtherSelSaleStoreId === '') { // 화면에선 지우는데 조회누르기 전이면 리코일은 남김 setSchSelSaleStoreId(session.storeId) + setOtherSaleStoreId('') } else { // 화면에선 지우는데 조회누르기 전이면 리코일은 남김 setOtherSaleStoreId('')