From 20e9a4894b61f2471bb1774c5a224b91cb5f64b7 Mon Sep 17 00:00:00 2001 From: basssy Date: Thu, 24 Oct 2024 12:36:06 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EC=A0=95=EB=B3=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/Stuff.jsx | 13 +++++-------- src/components/management/StuffDetail.jsx | 10 ++++++---- src/components/management/StuffSearchCondition.jsx | 1 - src/locales/ko.json | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/components/management/Stuff.jsx b/src/components/management/Stuff.jsx index 162a64a6..df057d8f 100644 --- a/src/components/management/Stuff.jsx +++ b/src/components/management/Stuff.jsx @@ -228,6 +228,7 @@ export default function Stuff() { //물건 메뉴 눌러서 최초 진입 sessionState if (stuffSearchParams?.code === 'S') { const params = { + saleStoreId: sessionState?.storeId, schObjectNo: stuffSearchParams?.schObjectNo, schAddress: stuffSearchParams?.schAddress, schObjectName: stuffSearchParams?.schObjectName, @@ -244,8 +245,7 @@ export default function Stuff() { } async function fetchData() { - const apiUrl = `/api/object/list?saleStoreId=${sessionState?.storeId}&${queryStringFormatter(params)}` - // const apiUrl = `/api/object/list?saleStoreId=T01&${queryStringFormatter(params)}` + const apiUrl = `/api/object/list?${queryStringFormatter(params)}` await get({ url: apiUrl, }).then((res) => { @@ -259,6 +259,7 @@ export default function Stuff() { } else { //메인화면에서 진입 const params = { + saleStoreId: sessionState?.storeId, schObjectNo: stuffSearchParams.schObjectNo, schAddress: '', schObjectName: '', @@ -275,8 +276,7 @@ export default function Stuff() { } async function fetchData() { - const apiUrl = `/api/object/list?saleStoreId=${sessionState?.storeId}&${queryStringFormatter(params)}` - + const apiUrl = `/api/object/list?${queryStringFormatter(params)}` await get({ url: apiUrl, }).then((res) => { @@ -298,9 +298,8 @@ export default function Stuff() { stuffSearchParams.schSortType = defaultSortType setPageNo(1) - + //조회를 눌렀을때 async function fetchData() { - // const apiUrl = `/api/object/list?saleStoreId=T01&${queryStringFormatter(stuffSearchParams)}` const apiUrl = `/api/object/list?saleStoreId=${sessionState?.storeId}&${queryStringFormatter(stuffSearchParams)}` await get({ url: apiUrl }).then((res) => { if (!isEmptyArray(res)) { @@ -330,7 +329,6 @@ export default function Stuff() { }) setPageNo(1) - // const apiUrl = `/api/object/list?saleStoreId=T01&${queryStringFormatter(stuffSearchParams)}` const apiUrl = `/api/object/list?saleStoreId=${sessionState?.storeId}&${queryStringFormatter(stuffSearchParams)}` get({ url: apiUrl }).then((res) => { if (!isEmptyArray(res)) { @@ -361,7 +359,6 @@ export default function Stuff() { setPageNo(1) - // const apiUrl = `/api/object/list?saleStoreId=T01&${queryStringFormatter(stuffSearchParams)}` const apiUrl = `/api/object/list?saleStoreId=${sessionState?.storeId}&${queryStringFormatter(stuffSearchParams)}` get({ url: apiUrl }).then((res) => { if (!isEmptyArray(res)) { diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index 1e35a0a2..a68771fa 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -893,10 +893,10 @@ export default function StuffDetail() { let height = params.installHeight if (snow === '0') { - alert(getMessage('stuff.detail.save.valierror1')) + return alert(getMessage('stuff.detail.save.valierror1')) } if (height === '0') { - alert(getMessage('stuff.detail.save.valierror2')) + return alert(getMessage('stuff.detail.save.valierror2')) } alert('작업중') @@ -958,10 +958,10 @@ export default function StuffDetail() { let height = params.installHeight if (snow === '0') { - alert(getMessage('stuff.detail.save.valierror1')) + return alert(getMessage('stuff.detail.save.valierror1')) } if (height === '0') { - alert(getMessage('stuff.detail.save.valierror2')) + return alert(getMessage('stuff.detail.save.valierror2')) } alert('작업중') @@ -1129,6 +1129,7 @@ export default function StuffDetail() { getOptionLabel={(x) => x.saleStoreName} getOptionValue={(x) => x.saleStoreId} isClearable={sessionState?.storeLvl === '1' ? true : false} + isDisabled={sessionState?.storeLel !== '1' ? true : false} value={saleStoreList.filter(function (option) { return option.saleStoreId === selOptions })} @@ -1537,6 +1538,7 @@ export default function StuffDetail() { getOptionLabel={(x) => x.saleStoreName} getOptionValue={(x) => x.saleStoreId} isClearable={sessionState?.storeLvl === '1' ? true : false} + isDisabled={sessionState?.storeLel !== '1' ? true : false} value={saleStoreList.filter(function (option) { return option.saleStoreId === selOptions })} diff --git a/src/components/management/StuffSearchCondition.jsx b/src/components/management/StuffSearchCondition.jsx index 0326f28e..1822140e 100644 --- a/src/components/management/StuffSearchCondition.jsx +++ b/src/components/management/StuffSearchCondition.jsx @@ -128,7 +128,6 @@ export default function StuffSearchCondition() { useEffect(() => { if (isObjectNotEmpty(sessionState)) { // storeId가 T01 이거나 1차점일때만 판매대리점 선택 활성화 - // get({ url: `/api/object/saleStore/TEMP02/list` }).then((res) => { get({ url: `/api/object/saleStore/${sessionState?.storeId}/list` }).then((res) => { if (!isEmptyArray(res)) { res.map((row) => { diff --git a/src/locales/ko.json b/src/locales/ko.json index 97d04755..651e8473 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -522,7 +522,7 @@ "stuff.detail.btn.save": "저장", "stuff.detail.btn.tempSave": "임시저장", "stuff.detail.save.valierror1": "수직적설량은 0보다 큰 값을 입력하세요", - "stuff.detail.save.valierror2": "설치높이 0보다 큰 값을 입력하세요", + "stuff.detail.save.valierror2": "설치높이는 0보다 큰 값을 입력하세요", "stuff.planReqPopup.popTitle": "설계 요청 검색", "stuff.planReqPopup.btn1": "검색", "stuff.planReqPopup.btn2": "초기화",