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