diff --git a/src/components/management/Stuff.jsx b/src/components/management/Stuff.jsx
index 5a1bee40..999ea900 100644
--- a/src/components/management/Stuff.jsx
+++ b/src/components/management/Stuff.jsx
@@ -50,12 +50,11 @@ export default function Stuff() {
}
//물건번호 복사버튼 옆에 영역
- const onDoubleClick = (e) => {
- let objectNo = e.target.innerText
- if (objectNo.substring(0, 1) === 'R') {
- router.push(`${pathname}/detail?objectNo=${objectNo.toString()}`, { scroll: false })
+ const onDoubleClick = (data) => {
+ if (data.tempFlg === '0') {
+ router.push(`${pathname}/detail?objectNo=${data.objectNo.toString()}`, { scroll: false })
} else {
- router.push(`${pathname}/tempdetail?objectNo=${objectNo.toString()}`, { scroll: false })
+ router.push(`${pathname}/tempdetail?objectNo=${data.objectNo.toString()}`, { scroll: false })
}
}
@@ -85,20 +84,21 @@ export default function Stuff() {
minWidth: 230,
headerName: getMessage('stuff.gridHeader.objectNo'),
cellRenderer: function (params) {
- let objectNo = params.value.substring(0, 1)
if (params.data.objectNo) {
return (
-
- {params.value.toLocaleString()}
- {objectNo === 'R' && (
-
- )}
+
onDoubleClick(params.data)}>
+ {(params.data.tempFlg === '0' && (
+ <>
+ {params.value.toLocaleString()}
+
+ >
+ )) || <>{getMessage('stuff.gridData.tempObjectNo')}>}
)
}
@@ -157,7 +157,7 @@ export default function Stuff() {
} else {
//T 면 임시 R은 진짜
if (event.data.objectNo) {
- if (event.data.objectNo.substring(0, 1) === 'R') {
+ if (event.data.tempFlg === '0') {
router.push(`${pathname}/detail?objectNo=${event.data.objectNo.toString()}`, { scroll: false })
} else {
router.push(`${pathname}/tempdetail?objectNo=${event.data.objectNo.toString()}`, { scroll: false })
diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx
index 21dc5d17..6d3a83ee 100644
--- a/src/components/management/StuffDetail.jsx
+++ b/src/components/management/StuffDetail.jsx
@@ -22,12 +22,12 @@ import { floorPlanObjectState } from '@/store/floorPlanObjectAtom'
export default function StuffDetail() {
const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState) //견적서 화면용 물건번호리코일
- const inputReceiveUserEl = useRef(null) //담당자ref
- const inputObjectNameEl = useRef(null) //물건명ref
- const inputZipNoEl = useRef(null) //우편번호ref
- const inputAddressEl = useRef(null) //주소ref
- const inputVerticalSnowCoverEl = useRef(null) //수직적설량ref
- const inputInstallHeightEl = useRef(null) //설치높이ref
+ // const inputReceiveUserEl = useRef(null) //담당자ref
+ // const inputObjectNameEl = useRef(null) //물건명ref
+ // const inputZipNoEl = useRef(null) //우편번호ref
+ // const inputAddressEl = useRef(null) //주소ref
+ // const inputVerticalSnowCoverEl = useRef(null) //수직적설량ref
+ // const inputInstallHeightEl = useRef(null) //설치높이ref
//공통코드
const { commonCode, findCommonCode } = useCommonCode()
@@ -1128,9 +1128,10 @@ export default function StuffDetail() {
// 수정모드일때는 PUT
await promisePut({ url: apiUrl, data: params }).then((res) => {
if (res.status === 201) {
+ setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
alert(getMessage('stuff.detail.save'))
- setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
- router.refresh()
+ // router.refresh()
+ router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`)
}
})
}
@@ -1173,16 +1174,15 @@ export default function StuffDetail() {
params.saleStoreLevel = sessionState.storeLvl
}
//수직적설량, 설치높이 0인지 체크
- let snow = params.verticalSnowCover
- let height = params.installHeight
-
- if (snow === '0') {
- return alert(getMessage('stuff.detail.save.valierror1'))
- }
- if (height === '0') {
- return alert(getMessage('stuff.detail.save.valierror2'))
- }
+ // let snow = params.verticalSnowCover
+ // let height = params.installHeight
+ // if (snow === '0') {
+ // return alert(getMessage('stuff.detail.save.valierror1'))
+ // }
+ // if (height === '0') {
+ // return alert(getMessage('stuff.detail.save.valierror2'))
+ // }
await promisePost({ url: '/api/object/save-object', data: params }).then((res) => {
if (res.status === 201) {
alert(getMessage('stuff.detail.tempSave.message1'))
@@ -1268,7 +1268,7 @@ export default function StuffDetail() {
-
+
|
@@ -1297,7 +1297,7 @@ export default function StuffDetail() {
})}
{/* 라디오끝 */}
-
+
@@ -1575,7 +1569,6 @@ export default function StuffDetail() {
onKeyUp={handleKeyUp}
value={form.watch('verticalSnowCover') || ''}
{...register('verticalSnowCover')}
- ref={inputVerticalSnowCoverEl}
/>
cm
@@ -1623,7 +1616,6 @@ export default function StuffDetail() {
onKeyUp={handleKeyUp}
value={form.watch('installHeight') || ''}
{...register('installHeight')}
- ref={inputInstallHeightEl}
/>
diff --git a/src/components/management/StuffSearchCondition.jsx b/src/components/management/StuffSearchCondition.jsx
index 3e5b07f6..421f806f 100644
--- a/src/components/management/StuffSearchCondition.jsx
+++ b/src/components/management/StuffSearchCondition.jsx
@@ -144,6 +144,7 @@ export default function StuffSearchCondition() {
})
const allList = res
const favList = res.filter((row) => row.priority !== 'B')
+
setSchSelSaleStoreList(allList)
setFavoriteStoreList(favList)
setShowSaleStoreList(favList)
@@ -263,6 +264,7 @@ export default function StuffSearchCondition() {
onChange={(e) => {
setSaleStoreName(saleStoreNameRef.current.value)
}}
+ onKeyUp={handleByOnKeyUp}
/>