풍속팝업 필드명 변경 반영
This commit is contained in:
parent
d6fc1134c1
commit
bf35c1182d
@ -52,7 +52,7 @@ export default function StuffDetail() {
|
||||
prefName: '',
|
||||
address: '', //주소
|
||||
areaId: '', //발전량시뮬레이션지역id
|
||||
windSpeed: '', //기준풍속
|
||||
standardWindSpeedId: '', //기준풍속
|
||||
verticalSnowCover: '', //수직적설량NEW
|
||||
coldRegionFlg: false, //한랭지대책시행(true : 1 / false : 0)
|
||||
surfaceType: 'III・IV', //면조도구분(III・IV / Ⅱ)
|
||||
@ -147,7 +147,7 @@ export default function StuffDetail() {
|
||||
useEffect(() => {
|
||||
const code1 = findCommonCode(200800) //경칭
|
||||
const code2 = findCommonCode(201700) //신축/기축
|
||||
const code3 = findCommonCode(113600) //기준풍속
|
||||
const code3 = findCommonCode(202000) //기준풍속 202000
|
||||
if (code1 != null) {
|
||||
// console.log('경칭공코::::::', code1)
|
||||
setHonorificCodeList(code1)
|
||||
@ -225,8 +225,8 @@ export default function StuffDetail() {
|
||||
//경칭선택 변경 이벤트
|
||||
const onChangeHonorificCode = (key) => {
|
||||
if (isObjectNotEmpty(key)) {
|
||||
setSelHonorificCode(key.clCode)
|
||||
form.setValue('objectNameOmit', key.clCode)
|
||||
setSelHonorificCode(key.clCodeNm)
|
||||
form.setValue('objectNameOmit', key.clCodeNm)
|
||||
} else {
|
||||
setSelHonorificCode('')
|
||||
form.setValue('objectNameOmit', '')
|
||||
@ -236,9 +236,9 @@ export default function StuffDetail() {
|
||||
//기준풍속 변경 이벤트
|
||||
const onChangeWindSpeedCode = (key) => {
|
||||
if (isObjectNotEmpty(key)) {
|
||||
form.setValue('windSpeed', key.clCode)
|
||||
form.setValue('standardWindSpeedId', key.clCode)
|
||||
} else {
|
||||
form.setValue('windSpeed', '')
|
||||
form.setValue('standardWindSpeedId', '')
|
||||
}
|
||||
}
|
||||
|
||||
@ -388,7 +388,9 @@ export default function StuffDetail() {
|
||||
form.setValue('prefName', info.address1)
|
||||
}
|
||||
})
|
||||
form.setValue('windSpeed', info.windSpeed)
|
||||
|
||||
//설계의뢰 팝업에선 WL_안붙어서 옴
|
||||
form.setValue('standardWindSpeedId', `WL_${info.windSpeed}`)
|
||||
form.setValue('verticalSnowCover', info.verticalSnowCover)
|
||||
form.setValue('surfaceType', info.surfaceType)
|
||||
form.setValue('installHeight', info.installHeight)
|
||||
@ -407,9 +409,9 @@ export default function StuffDetail() {
|
||||
}
|
||||
}
|
||||
|
||||
//팝업에서 넘어온 바람정보
|
||||
//풍속선택 팝업에서 넘어온 바람정보
|
||||
const setWindSppedInfo = (info) => {
|
||||
form.setValue('windSpeed', info.windSpeed)
|
||||
form.setValue('standardWindSpeedId', info.windSpeed)
|
||||
}
|
||||
|
||||
//dispCompanyName: '', //담당자
|
||||
@ -428,8 +430,8 @@ export default function StuffDetail() {
|
||||
const _address = watch('address')
|
||||
// areaId: '', //발전량시뮬레이션지역
|
||||
const _areaId = watch('areaId')
|
||||
// windSpeed: '', //기준풍속
|
||||
const _windSpeed = watch('windSpeed')
|
||||
// standardWindSpeedId: '', //기준풍속
|
||||
const _standardWindSpeedId = watch('standardWindSpeedId')
|
||||
// verticalSnowCover: '', //수직적설량
|
||||
const _verticalSnowCover = watch('verticalSnowCover')
|
||||
// installHeight: '', //설치높이
|
||||
@ -464,8 +466,8 @@ export default function StuffDetail() {
|
||||
errors.areaId = true
|
||||
}
|
||||
|
||||
if (!formData.windSpeed) {
|
||||
errors.windSpeed = true
|
||||
if (!formData.standardWindSpeedId) {
|
||||
errors.standardWindSpeedId = true
|
||||
}
|
||||
|
||||
if (!formData.verticalSnowCover) {
|
||||
@ -506,8 +508,8 @@ export default function StuffDetail() {
|
||||
errors.areaId = true
|
||||
}
|
||||
|
||||
if (!formData.windSpeed) {
|
||||
errors.windSpeed = true
|
||||
if (!formData.standardWindSpeedId) {
|
||||
errors.standardWindSpeedId = true
|
||||
}
|
||||
|
||||
if (!formData.verticalSnowCover) {
|
||||
@ -530,7 +532,7 @@ export default function StuffDetail() {
|
||||
_prefId,
|
||||
_address,
|
||||
_areaId,
|
||||
_windSpeed,
|
||||
_standardWindSpeedId,
|
||||
_verticalSnowCover,
|
||||
_installHeight,
|
||||
])
|
||||
@ -575,7 +577,7 @@ export default function StuffDetail() {
|
||||
//필수값 다 입력했을때
|
||||
const onValid = async () => {
|
||||
const formData = form.getValues()
|
||||
console.log('필수값 통과:::', formData)
|
||||
// console.log('필수값 통과:::', formData)
|
||||
const apiUrl = '/api/object/save-object'
|
||||
const params = {
|
||||
saleStoreId: formData.otherSaleStoreId ? formData.otherSaleStoreId : formData.saleStoreId,
|
||||
@ -592,7 +594,7 @@ export default function StuffDetail() {
|
||||
areaId: formData.areaId,
|
||||
receiveUser: formData.dispCompanyName,
|
||||
installHeight: formData.installHeight,
|
||||
windSpeed: formData.windSpeed,
|
||||
standardWindSpeedId: formData.standardWindSpeedId,
|
||||
verticalSnowCover: formData.verticalSnowCover,
|
||||
surfaceType: formData.surfaceType,
|
||||
conType: formData.conType,
|
||||
@ -602,7 +604,7 @@ export default function StuffDetail() {
|
||||
workNo: null,
|
||||
workName: null,
|
||||
}
|
||||
console.log('params::', params)
|
||||
// console.log('params::', params)
|
||||
alert('작업중')
|
||||
return
|
||||
if (editMode === 'NEW') {
|
||||
@ -646,7 +648,7 @@ export default function StuffDetail() {
|
||||
areaId: formData.areaId,
|
||||
receiveUser: formData.dispCompanyName,
|
||||
installHeight: formData.installHeight,
|
||||
windSpeed: formData.windSpeed,
|
||||
standardWindSpeedId: formData.standardWindSpeedId,
|
||||
verticalSnowCover: formData.verticalSnowCover,
|
||||
surfaceType: formData.surfaceType,
|
||||
conType: formData.conType,
|
||||
@ -662,6 +664,7 @@ export default function StuffDetail() {
|
||||
params.saleStoreId = sessionState.storeId
|
||||
params.saleStoreLevel = sessionState.storeLvl
|
||||
}
|
||||
console.log('임시저장파람:::', params)
|
||||
alert('작업중')
|
||||
return
|
||||
await promisePost({ url: '/api/object/save-object', data: params }).then((res) => {
|
||||
@ -716,7 +719,7 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="product-input-wrap mr5">
|
||||
<input type="text" className="product-input" readOnly value={form.watch('planReqNo')} />
|
||||
<input type="text" className="product-input" readOnly value={form.watch('planReqNo') || ''} />
|
||||
{(form.watch('planReqNo') !== '' && (
|
||||
<button
|
||||
type="button"
|
||||
@ -786,7 +789,7 @@ export default function StuffDetail() {
|
||||
isClearable={true}
|
||||
isSearchable={false}
|
||||
value={honorificCodeList.filter(function (option) {
|
||||
return option.clCode === selHonorificCode
|
||||
return option.clCodeNm === selHonorificCode
|
||||
})}
|
||||
></Select>
|
||||
</div>
|
||||
@ -833,7 +836,13 @@ export default function StuffDetail() {
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
<input type="text" className="input-light" value={form.watch('saleStoreId')} {...form.register('saleStoreId')} readOnly />
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
value={form.watch('saleStoreId') || ''}
|
||||
{...form.register('saleStoreId')}
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -887,7 +896,7 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" disabled value={form.watch('zipNo')} />
|
||||
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
|
||||
</div>
|
||||
<Button className="btn-origin grey" onClick={onSearchPostNumberPopOpen}>
|
||||
{getMessage('stuff.detail.btn.addressPop')}
|
||||
@ -923,7 +932,7 @@ export default function StuffDetail() {
|
||||
)}
|
||||
</div>
|
||||
<div className="input-wrap mr5" style={{ width: '580px' }}>
|
||||
<input type="text" className="input-light" value={form.watch('address')} {...form.register('address')} />
|
||||
<input type="text" className="input-light" value={form.watch('address') || ''} {...form.register('address')} />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -962,7 +971,7 @@ export default function StuffDetail() {
|
||||
{/* 기준풍속sel시작 */}
|
||||
<div className="select-wrap mr10" style={{ width: '200px' }}>
|
||||
<Select
|
||||
{...register('windSpeed')}
|
||||
{...register('standardWindSpeedId')}
|
||||
id="long-value-select5"
|
||||
instanceId="long-value-select5"
|
||||
className="react-select-custom"
|
||||
@ -975,7 +984,7 @@ export default function StuffDetail() {
|
||||
isClearable={true}
|
||||
isSearchable={false}
|
||||
value={windSpeedList.filter(function (option) {
|
||||
return option.clCode === watch('windSpeed')
|
||||
return option.clCode === watch('standardWindSpeedId')
|
||||
})}
|
||||
></Select>
|
||||
</div>
|
||||
@ -1115,7 +1124,7 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="product-input-wrap mr5">
|
||||
<input type="text" className="product-input" readOnly value={form.watch('planReqNo')} />
|
||||
<input type="text" className="product-input" readOnly value={form.watch('planReqNo') || ''} />
|
||||
{objectNo.substring(0, 1) === 'T' && form.watch('planReqNo') !== '' ? (
|
||||
<button
|
||||
type="button"
|
||||
@ -1142,7 +1151,12 @@ export default function StuffDetail() {
|
||||
</th>
|
||||
<td>
|
||||
<div className="input-wrap" style={{ width: '500px' }}>
|
||||
<input type="text" className="input-light" {...form.register('dispCompanyName')} value={form.watch('dispCompanyName')} />
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
{...form.register('dispCompanyName')}
|
||||
value={form.watch('dispCompanyName') || ''}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -1188,9 +1202,7 @@ export default function StuffDetail() {
|
||||
isClearable={true}
|
||||
isSearchable={false}
|
||||
value={honorificCodeList.filter(function (option) {
|
||||
console.log('상세 경칭코드결과:::::::::::::::', option.clCode)
|
||||
console.log('상세 셋팅된 경칭코드값:::::::::::::::', selHonorificCode)
|
||||
return option.clCode === selHonorificCode
|
||||
return option.clCodeNm === selHonorificCode
|
||||
})}
|
||||
></Select>
|
||||
</div>
|
||||
@ -1295,7 +1307,7 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" disabled value={form.watch('zipNo')} />
|
||||
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
|
||||
</div>
|
||||
<Button className="btn-origin grey" onClick={onSearchPostNumberPopOpen}>
|
||||
{getMessage('stuff.detail.btn.addressPop')}
|
||||
@ -1304,6 +1316,25 @@ export default function StuffDetail() {
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/* 도도부현 /주소 시작*/}
|
||||
{/* 도도부현 /주소 끝 */}
|
||||
{/* 발전량시뮬레이션지역시작 */}
|
||||
{/* 발전량시뮬레이션지역끝 */}
|
||||
{/* 기준풍속시작 */}
|
||||
{/* 기준풍속끝 */}
|
||||
{/* 수직적설량시작 */}
|
||||
{/* 수직적설량끝 */}
|
||||
{/* 면조도구분시작 */}
|
||||
{/* 면조도구분끝 */}
|
||||
{/* 설치높이싲가 */}
|
||||
{/* 설치높이끝 */}
|
||||
{/* 계약조건시작 */}
|
||||
{/* 계약조건끝 */}
|
||||
{/* 메모시작 */}
|
||||
{/* 메모끝 */}
|
||||
<tr>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -1318,7 +1349,7 @@ export default function StuffDetail() {
|
||||
<ul className="info-wrap">
|
||||
<li>
|
||||
{getMessage('stuff.detail.planList.cnt')}
|
||||
<span className="red">플랜갯수</span>
|
||||
<span className="red">플랜갯수찍어주기</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -81,16 +81,21 @@ export default function WindSelectPop(props) {
|
||||
</thead>
|
||||
<tbody>
|
||||
{windSpeedList.map((row, index) => {
|
||||
// console.log('row:::', row)
|
||||
return (
|
||||
<tr key={index}>
|
||||
<td className="al-c">
|
||||
<div className="d-check-radio light no-text">
|
||||
<input type="radio" value={row.windSpeed} name="windS" id={row.windSpeed} onChange={handleChangeRadio} />
|
||||
<label htmlFor={row.windSpeed}></label>
|
||||
<input
|
||||
type="radio"
|
||||
value={row.standardWindSpeedId}
|
||||
name="windS"
|
||||
id={row.standardWindSpeedId}
|
||||
onChange={handleChangeRadio}
|
||||
/>
|
||||
<label htmlFor={row.standardWindSpeedId}></label>
|
||||
</div>
|
||||
</td>
|
||||
<td className="al-c">{row.windSpeed}</td>
|
||||
<td className="al-c">{row.standardWindSpeedId.slice(3)}</td>
|
||||
<td>{row.remarks}</td>
|
||||
</tr>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user