물건 상세 가대 필드 변경
This commit is contained in:
parent
d91c2c8ef5
commit
96006188e8
@ -69,9 +69,9 @@ export default function Estimate({}) {
|
|||||||
* objectNo 셋팅
|
* objectNo 셋팅
|
||||||
* url로 넘어온 objectNo을 리코일에 세팅
|
* url로 넘어온 objectNo을 리코일에 세팅
|
||||||
*/
|
*/
|
||||||
const setCurrentObjectNo = useSetRecoilState(correntObjectNoState)
|
|
||||||
const searchParams = useSearchParams()
|
const searchParams = useSearchParams()
|
||||||
const objectRecoil = useRecoilValue(floorPlanObjectState)
|
const objectRecoil = useRecoilValue(floorPlanObjectState)
|
||||||
|
const currentObjectNo = searchParams.get('objectNo')
|
||||||
const currentPid = searchParams.get('pid')
|
const currentPid = searchParams.get('pid')
|
||||||
//견적서 상세데이터
|
//견적서 상세데이터
|
||||||
const { estimateContextState, setEstimateContextState, addItem, handleEstimateFileDownload } = useEstimateController(currentPid, false)
|
const { estimateContextState, setEstimateContextState, addItem, handleEstimateFileDownload } = useEstimateController(currentPid, false)
|
||||||
@ -92,9 +92,6 @@ export default function Estimate({}) {
|
|||||||
|
|
||||||
const { closeAll } = usePopup()
|
const { closeAll } = usePopup()
|
||||||
|
|
||||||
const currentObjectNo = searchParams.get('objectNo')
|
|
||||||
setCurrentObjectNo(currentObjectNo)
|
|
||||||
|
|
||||||
//새로 추가한 첨부파일 props
|
//새로 추가한 첨부파일 props
|
||||||
const fileUploadProps = {
|
const fileUploadProps = {
|
||||||
uploadFiles: files,
|
uploadFiles: files,
|
||||||
|
|||||||
@ -76,7 +76,7 @@ export default function StuffDetail() {
|
|||||||
standardWindSpeedId: '', //기준풍속
|
standardWindSpeedId: '', //기준풍속
|
||||||
verticalSnowCover: '', //수직적설량
|
verticalSnowCover: '', //수직적설량
|
||||||
coldRegionFlg: false, //한랭지대책시행(true : 1 / false : 0)
|
coldRegionFlg: false, //한랭지대책시행(true : 1 / false : 0)
|
||||||
surfaceType: 'Ⅲ・Ⅳ', //면조도구분(Ⅲ・Ⅳ / Ⅱ)
|
surfaceType: '', //면조도구분(Ⅲ・Ⅳ / Ⅱ)
|
||||||
saltAreaFlg: false, //염해지역용아이템사용 (true : 1 / false : 0)
|
saltAreaFlg: false, //염해지역용아이템사용 (true : 1 / false : 0)
|
||||||
installHeight: '', //설치높이
|
installHeight: '', //설치높이
|
||||||
conType: '0', //계약조건(잉여 / 전량)
|
conType: '0', //계약조건(잉여 / 전량)
|
||||||
@ -95,6 +95,7 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
const [selectObjectStatusId, setSelectObjectStatusId] = useState('0') //신축기축 선택값
|
const [selectObjectStatusId, setSelectObjectStatusId] = useState('0') //신축기축 선택값
|
||||||
const [windSpeedList, setWindSpeedList] = useState([]) //기준 풍속 공통코드 리스트
|
const [windSpeedList, setWindSpeedList] = useState([]) //기준 풍속 공통코드 리스트
|
||||||
|
const [surfaceTypeList, setSurfaceTypeList] = useState([]) //면조도도 공통코드 리스트
|
||||||
const [prefCodeList, setPrefCodeList] = useState([]) //도도부현 코트 리스트
|
const [prefCodeList, setPrefCodeList] = useState([]) //도도부현 코트 리스트
|
||||||
const [prefValue, setPrefValue] = useState('')
|
const [prefValue, setPrefValue] = useState('')
|
||||||
const [saleStoreList, setSaleStoreList] = useState([]) // 판매점 리스트
|
const [saleStoreList, setSaleStoreList] = useState([]) // 판매점 리스트
|
||||||
@ -493,6 +494,7 @@ export default function StuffDetail() {
|
|||||||
const code1 = findCommonCode(200800) //경칭
|
const code1 = findCommonCode(200800) //경칭
|
||||||
const code2 = findCommonCode(201700) //신축/기축
|
const code2 = findCommonCode(201700) //신축/기축
|
||||||
const code3 = findCommonCode(202000) //기준풍속 202000
|
const code3 = findCommonCode(202000) //기준풍속 202000
|
||||||
|
const code4 = findCommonCode(113700) //면조도
|
||||||
if (code1 != null) {
|
if (code1 != null) {
|
||||||
setHonorificCodeList(code1)
|
setHonorificCodeList(code1)
|
||||||
}
|
}
|
||||||
@ -502,6 +504,9 @@ export default function StuffDetail() {
|
|||||||
if (code3 != null) {
|
if (code3 != null) {
|
||||||
setWindSpeedList(code3)
|
setWindSpeedList(code3)
|
||||||
}
|
}
|
||||||
|
if (code4 != null) {
|
||||||
|
setSurfaceTypeList(code4)
|
||||||
|
}
|
||||||
}, [commonCode])
|
}, [commonCode])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -1434,6 +1439,21 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkLength = (value) => {
|
||||||
|
let str = new String(value)
|
||||||
|
let _byte = 0
|
||||||
|
if (str.length !== 0) {
|
||||||
|
for (let i = 0; i < str.length; i++) {
|
||||||
|
let str2 = str.charAt(i)
|
||||||
|
if (encodeURIComponent(str2).length > 4) {
|
||||||
|
_byte += 2
|
||||||
|
} else {
|
||||||
|
_byte++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _byte
|
||||||
|
}
|
||||||
// 임시저장
|
// 임시저장
|
||||||
const onTempSave = async () => {
|
const onTempSave = async () => {
|
||||||
const formData = form.getValues()
|
const formData = form.getValues()
|
||||||
@ -1482,7 +1502,7 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
// 담당자 자리수 체크
|
// 담당자 자리수 체크
|
||||||
if (params?.receiveUser !== '') {
|
if (params?.receiveUser !== '') {
|
||||||
if (params?.receiveUser.trim().length > 10) {
|
if (checkLength(params?.receiveUser.trim()) > 10) {
|
||||||
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2101,34 +2121,26 @@ export default function StuffDetail() {
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="radio-wrap flx-box" style={{ width: '239px' }}>
|
{surfaceTypeList.length > 0 && (
|
||||||
<div className="d-check-radio light mr10">
|
<div className="radio-wrap flx-box" style={{ width: '239px' }}>
|
||||||
<input
|
{surfaceTypeList.map((option, index) => (
|
||||||
type="radio"
|
<div className={`d-check-radio light ${index === surfaceTypeList.length - 1 ? '' : 'mr10'}`} key={index}>
|
||||||
name="surfaceType"
|
<input
|
||||||
value="Ⅲ・Ⅳ"
|
type="radio"
|
||||||
id="surfaceType0"
|
name="surfaceType"
|
||||||
{...form.register('surfaceType')}
|
value={option.clCodeNm}
|
||||||
onChange={(e) => {
|
id={`surfaceType${index}`}
|
||||||
handleRadioChange(e)
|
defaultChecked={option.clCodeNm === 'Ⅲ・Ⅳ'}
|
||||||
}}
|
{...form.register('surfaceType')}
|
||||||
/>
|
onChange={(e) => {
|
||||||
<label htmlFor="surfaceType0">Ⅲ・Ⅳ</label>
|
handleRadioChange(e)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<label htmlFor={`surfaceType${index}`}>{option.clCodeNm}</label>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="d-check-radio light">
|
)}
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
name="surfaceType"
|
|
||||||
value="Ⅱ"
|
|
||||||
id="surfaceType1"
|
|
||||||
{...form.register('surfaceType')}
|
|
||||||
onChange={(e) => {
|
|
||||||
handleRadioChange(e)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<label htmlFor="surfaceType1">Ⅱ</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="d-check-box light mr5">
|
<div className="d-check-box light mr5">
|
||||||
<input type="checkbox" id="saltAreaFlg" {...form.register('saltAreaFlg')} />
|
<input type="checkbox" id="saltAreaFlg" {...form.register('saltAreaFlg')} />
|
||||||
<label htmlFor="saltAreaFlg">{getMessage('stuff.detail.saltAreaFlg')}</label>
|
<label htmlFor="saltAreaFlg">{getMessage('stuff.detail.saltAreaFlg')}</label>
|
||||||
@ -2689,35 +2701,25 @@ export default function StuffDetail() {
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="radio-wrap flx-box" style={{ width: '239px' }}>
|
{surfaceTypeList.length > 0 && (
|
||||||
<div className="d-check-radio light mr10">
|
<div className="radio-wrap flx-box" style={{ width: '239px' }}>
|
||||||
<input
|
{surfaceTypeList.map((option, index) => (
|
||||||
type="radio"
|
<div className={`d-check-radio light ${index === surfaceTypeList.length - 1 ? '' : 'mr10'}`} key={index}>
|
||||||
name="surfaceType"
|
<input
|
||||||
value="Ⅲ・Ⅳ"
|
type="radio"
|
||||||
id="surfaceType0"
|
name="surfaceType"
|
||||||
{...form.register('surfaceType')}
|
value={option.clCodeNm}
|
||||||
onChange={(e) => {
|
id={`surfaceType${index}`}
|
||||||
handleRadioChange(e)
|
{...form.register('surfaceType')}
|
||||||
}}
|
onChange={(e) => {
|
||||||
/>
|
handleRadioChange(e)
|
||||||
<label htmlFor="surfaceType0">Ⅲ・Ⅳ</label>
|
}}
|
||||||
|
/>
|
||||||
|
<label htmlFor={`surfaceType${index}`}>{option.clCodeNm}</label>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="d-check-radio light">
|
)}
|
||||||
<input
|
|
||||||
type="radio"
|
|
||||||
name="surfaceType"
|
|
||||||
value="Ⅱ"
|
|
||||||
id="surfaceType1"
|
|
||||||
{...form.register('surfaceType')}
|
|
||||||
onChange={(e) => {
|
|
||||||
handleRadioChange(e)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<label htmlFor="surfaceType1">Ⅱ</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="d-check-box light mr5">
|
<div className="d-check-box light mr5">
|
||||||
<input type="checkbox" id="saltAreaFlg" {...form.register('saltAreaFlg')} />
|
<input type="checkbox" id="saltAreaFlg" {...form.register('saltAreaFlg')} />
|
||||||
<label htmlFor="saltAreaFlg">{getMessage('stuff.detail.saltAreaFlg')}</label>
|
<label htmlFor="saltAreaFlg">{getMessage('stuff.detail.saltAreaFlg')}</label>
|
||||||
|
|||||||
@ -14,19 +14,6 @@ export const useMainContentsController = () => {
|
|||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
/**
|
|
||||||
* main search area
|
|
||||||
*/
|
|
||||||
// const [saleStoreId, setSaleStoreId] = useState('')
|
|
||||||
// const [saleStoreName, setSaleStoreName] = useState('')
|
|
||||||
|
|
||||||
/**
|
|
||||||
* main contents area
|
|
||||||
*/
|
|
||||||
// const [objectList, setObjectList] = useState([])
|
|
||||||
// const [businessCharger, setBusinessCharger] = useState(null)
|
|
||||||
// const [businessChargerMail, setBusinessChargerMail] = useState(null)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 최근 물건 목록 조회
|
* 최근 물건 목록 조회
|
||||||
*/
|
*/
|
||||||
@ -37,12 +24,6 @@ export const useMainContentsController = () => {
|
|||||||
url: apiUrl,
|
url: apiUrl,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
// setSaleStoreId(res.data.saleStoreId)
|
|
||||||
// setSaleStoreName(res.data.saleStoreName)
|
|
||||||
|
|
||||||
// setObjectList(res.data.objectList)
|
|
||||||
// setBusinessCharger(res.data.businessCharger)
|
|
||||||
// setBusinessChargerMail(res.data.businessChargerMail)
|
|
||||||
setQcastState({
|
setQcastState({
|
||||||
saleStoreId: res.data.saleStoreId,
|
saleStoreId: res.data.saleStoreId,
|
||||||
saleStoreName: res.data.saleStoreName,
|
saleStoreName: res.data.saleStoreName,
|
||||||
@ -52,12 +33,6 @@ export const useMainContentsController = () => {
|
|||||||
})
|
})
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
} else {
|
} else {
|
||||||
// setSaleStoreId('')
|
|
||||||
// setSaleStoreName('')
|
|
||||||
|
|
||||||
// setObjectList([])
|
|
||||||
// setBusinessCharger(null)
|
|
||||||
// setBusinessChargerMail(null)
|
|
||||||
setQcastState({
|
setQcastState({
|
||||||
saleStoreId: '',
|
saleStoreId: '',
|
||||||
saleStoreName: '',
|
saleStoreName: '',
|
||||||
@ -65,9 +40,11 @@ export const useMainContentsController = () => {
|
|||||||
businessCharger: null,
|
businessCharger: null,
|
||||||
businessChargerMail: null,
|
businessChargerMail: null,
|
||||||
})
|
})
|
||||||
|
setIsGlobalLoading(false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
setIsGlobalLoading(false)
|
||||||
console.error('MAIN API fetching error:', error)
|
console.error('MAIN API fetching error:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,11 +60,6 @@ export const useMainContentsController = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// saleStoreId,
|
|
||||||
// saleStoreName,
|
|
||||||
// objectList,
|
|
||||||
// businessCharger,
|
|
||||||
// businessChargerMail,
|
|
||||||
fetchObjectList,
|
fetchObjectList,
|
||||||
initObjectList,
|
initObjectList,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -783,7 +783,7 @@
|
|||||||
"stuff.detail.planGridHeader.capacity": "システム容量",
|
"stuff.detail.planGridHeader.capacity": "システム容量",
|
||||||
"stuff.detail.planGridHeader.roofMaterialIdMulti": "屋根材",
|
"stuff.detail.planGridHeader.roofMaterialIdMulti": "屋根材",
|
||||||
"stuff.detail.planGridHeader.constructSpecificationMulti": "施工方法",
|
"stuff.detail.planGridHeader.constructSpecificationMulti": "施工方法",
|
||||||
"stuff.detail.planGridHeader.standTypeNo": "架台",
|
"stuff.detail.planGridHeader.supprotMethodIdMulti": "架台",
|
||||||
"stuff.detail.planGridHeader.pcTypeNo": "パワーコンディショナー",
|
"stuff.detail.planGridHeader.pcTypeNo": "パワーコンディショナー",
|
||||||
"stuff.detail.planGridHeader.management": "管理",
|
"stuff.detail.planGridHeader.management": "管理",
|
||||||
"stuff.detail.planGrid.btn1": "見積書の照会",
|
"stuff.detail.planGrid.btn1": "見積書の照会",
|
||||||
|
|||||||
@ -783,7 +783,7 @@
|
|||||||
"stuff.detail.planGridHeader.capacity": "시스템용량",
|
"stuff.detail.planGridHeader.capacity": "시스템용량",
|
||||||
"stuff.detail.planGridHeader.roofMaterialIdMulti": "지붕재",
|
"stuff.detail.planGridHeader.roofMaterialIdMulti": "지붕재",
|
||||||
"stuff.detail.planGridHeader.constructSpecificationMulti": "시공방법",
|
"stuff.detail.planGridHeader.constructSpecificationMulti": "시공방법",
|
||||||
"stuff.detail.planGridHeader.standTypeNo": "가대",
|
"stuff.detail.planGridHeader.supprotMethodIdMulti": "가대",
|
||||||
"stuff.detail.planGridHeader.pcTypeNo": "파워컨디셔너",
|
"stuff.detail.planGridHeader.pcTypeNo": "파워컨디셔너",
|
||||||
"stuff.detail.planGridHeader.management": "관리",
|
"stuff.detail.planGridHeader.management": "관리",
|
||||||
"stuff.detail.planGrid.btn1": "견적서 조회",
|
"stuff.detail.planGrid.btn1": "견적서 조회",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user