From 8245e58ef4f0b4b16bb687a85098611ba552ece6 Mon Sep 17 00:00:00 2001 From: basssy Date: Wed, 8 Jan 2025 17:18:42 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/StuffDetail.jsx | 50 +++++++++++++++-------- src/locales/ja.json | 1 + src/locales/ko.json | 1 + 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index f8cf0aab..8c50525f 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -269,8 +269,8 @@ export default function StuffDetail() { } } if (managementState?.createUser === 'T01' && session?.userId !== 'T01') { - //createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기 - buttonStyle = { display: 'none' } + //createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기 적용할지 미정!!!!!!!! + //buttonStyle = { display: 'none' } } return ( <> @@ -282,8 +282,6 @@ export default function StuffDetail() { onClick={() => { //mid:5(견적서), /pid:플랜번호 setFloorPlanObjectNo({ floorPlanObjectNo: params.data.objectNo }) - // router.push(`/floor-plan/estimate/5/${params.data.planNo}`) - // /floor-plan/estimate/5?pid=플랜번호&objectNo=물건번호 router.push(`/floor-plan/estimate/5?pid=${params.data.planNo}&objectNo=${objectNo}`) }} > @@ -332,7 +330,7 @@ export default function StuffDetail() { //createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기 setShowButton('none') } - // console.log('상세::', res.data) + console.log('상세::', res.data) if (isObjectNotEmpty(res.data)) { let surfaceTypeValue if (res.data.surfaceType === 'Ⅲ・Ⅳ') { @@ -482,8 +480,6 @@ export default function StuffDetail() { } }) - //1차점 : X167 T01 - //2차점 : 10X22, 201X112 let url let firstList let otherList @@ -1323,6 +1319,12 @@ export default function StuffDetail() { return alert(getMessage('stuff.detail.tempSave.message2')) } } + //로그인이 2차점인데 otherSaleStoreId가 없으면 알럿 + if (session.storeLvl !== '1') { + if (params.saleStoreLevel === '1') { + return alert(getMessage('stuff.detail.tempSave.message4')) + } + } if (editMode === 'NEW') { await promisePost({ url: apiUrl, data: params }) @@ -1731,7 +1733,10 @@ export default function StuffDetail() {
-
{getMessage('stuff.detail.otherSaleStoreId')}
+
+ {getMessage('stuff.detail.otherSaleStoreId')} + {session.storeLvl !== '1' && *} +
{getMessage('stuff.detail.tooltip.saleStoreId')}
@@ -1752,7 +1757,16 @@ export default function StuffDetail() { onChange={onSelectionChange2} getOptionLabel={(x) => x.saleStoreName} getOptionValue={(x) => x.saleStoreId} - isDisabled={otherSaleStoreList != null && otherSaleStoreList.length === 1 ? true : false} + isDisabled={ + session?.storeLvl === '1' + ? otherSaleStoreList.length > 0 + ? false + : true + : otherSaleStoreList.length === 1 + ? true + : false + } + // isDisabled={otherSaleStoreList != null && otherSaleStoreList.length === 1 ? true : false} isClearable={true} value={otherSaleStoreList.filter(function (option) { return option.saleStoreId === otherSelOptions @@ -2302,14 +2316,16 @@ export default function StuffDetail() { onChange={onSelectionChange2} getOptionLabel={(x) => x.saleStoreName} getOptionValue={(x) => x.saleStoreId} - isDisabled={ - managementState?.tempFlg === '0' - ? true - : session?.storeLvl === '1' && form.watch('saleStoreId') != '' - ? false - : true - } - isClearable={managementState?.tempFlg === '0' ? false : session?.storeLvl === '1' ? true : false} + // isDisabled={ + // managementState?.tempFlg === '0' + // ? true + // : session?.storeLvl === '1' && form.watch('saleStoreId') != '' + // ? false + // : false + // } + isDisabled={managementState?.tempFlg === '0' ? true : false} + isClearable={managementState?.tempFlg === '0' ? false : true} + // isClearable={managementState?.tempFlg === '0' ? false : session?.storeLvl === '1' ? true : true} value={otherSaleStoreList.filter(function (option) { return option.saleStoreId === otherSelOptions })} diff --git a/src/locales/ja.json b/src/locales/ja.json index dce33100..8a9eb01a 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -685,6 +685,7 @@ "stuff.detail.save.valierror1": "垂直説説は0より大きい値を入力してください", "stuff.detail.save.valierror2": "設置高さ0より大きい値を入力してください", "stuff.detail.save.valierror3": "{0} 必須入力項目です.", + "stuff.detail.save.valierror4": "二次販売店名は必須オプションです.", "stuff.planReqPopup.popTitle": "設計依頼検索", "stuff.planReqPopup.btn1": "検索", "stuff.planReqPopup.btn2": "初期化", diff --git a/src/locales/ko.json b/src/locales/ko.json index cbd263c7..e8320632 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -695,6 +695,7 @@ "stuff.detail.save.valierror1": "수직적설량은 0보다 큰 값을 입력하세요", "stuff.detail.save.valierror2": "설치높이는 0보다 큰 값을 입력하세요", "stuff.detail.save.valierror3": "{0} 필수 입력 항목입니다.", + "stuff.detail.save.valierror4": "2차 판매점명은 필수 선택사항입니다.", "stuff.planReqPopup.popTitle": "설계 요청 검색", "stuff.planReqPopup.btn1": "검색", "stuff.planReqPopup.btn2": "초기화",