물건정보
This commit is contained in:
parent
e1a4ccaa08
commit
7d2d32f198
@ -34,7 +34,6 @@ export default function MainContents({ objectList, businessCharger, businessChar
|
||||
startRow: 1,
|
||||
endRow: 1,
|
||||
}
|
||||
// const noticeApiUrl = `api/board/list?schNoticeTpCd=QC&schNoticeClsCd=NOTICE&schTitle=&startRow=1&endRow=1`
|
||||
const noticeApiUrl = `api/board/list?${queryStringFormatter(param)}`
|
||||
const res = await get({ url: noticeApiUrl })
|
||||
//console.log('공지res::', res)
|
||||
@ -57,7 +56,6 @@ export default function MainContents({ objectList, businessCharger, businessChar
|
||||
startRow: 1,
|
||||
endRow: 3,
|
||||
}
|
||||
// const faqApiUrl = `api/board/list?schNoticeTpCd=QC&schNoticeClsCd=FAQ&schTitle=&startRow=1&endRow=1`
|
||||
const faqApiUrl = `api/board/list?${queryStringFormatter(param)}`
|
||||
const res = await get({ url: faqApiUrl })
|
||||
//console.log('FAQres::', res)
|
||||
|
||||
@ -102,7 +102,6 @@ export default function StuffDetail() {
|
||||
// 도도부현API
|
||||
get({ url: '/api/object/prefecture/list' }).then((res) => {
|
||||
if (!isEmptyArray(res)) {
|
||||
// console.log('신규화면 도도부현API 결과:::', res)
|
||||
setPrefCodeList(res)
|
||||
}
|
||||
})
|
||||
@ -348,9 +347,8 @@ export default function StuffDetail() {
|
||||
// 발전량시뮬레이션 지역 목록
|
||||
get({ url: `/api/object/prefecture/${prefValue}/list` }).then((res) => {
|
||||
if (!isEmptyArray(res)) {
|
||||
// console.log('발전량 시뮬레이션::::::::', res)
|
||||
form.setValue('areaId', res[0].areaId)
|
||||
form.setValue('areaName', res[0].prefName)
|
||||
// form.setValue('areaId', res[0].areaId)
|
||||
// form.setValue('areaName', res[0].prefName)
|
||||
setAreaIdList(res)
|
||||
}
|
||||
})
|
||||
@ -359,7 +357,8 @@ export default function StuffDetail() {
|
||||
|
||||
// 발전량 시뮬레이션 변경
|
||||
const handleAreaIdOnChange = (e) => {
|
||||
form.setValue('areaId', e.target.value)
|
||||
form.setValue('areaId', e.areaId)
|
||||
form.setValue('areaName', e.prefName)
|
||||
}
|
||||
|
||||
//필수값 다 입력했을때
|
||||
@ -631,13 +630,28 @@ export default function StuffDetail() {
|
||||
<div className="flx-box">
|
||||
<div className="select-wrap" style={{ width: '200px' }}>
|
||||
{prefCodeList?.length > 0 && (
|
||||
<select className="select-light" name="prefName" {...register('prefId')} disabled>
|
||||
{prefCodeList.map((row) => (
|
||||
<option key={row.prefId} value={row.prefId}>
|
||||
{row.prefName}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
// <select className="select-light" name="prefName" {...register('prefId')} disabled>
|
||||
// {prefCodeList.map((row) => (
|
||||
// <option key={row.prefId} value={row.prefId}>
|
||||
// {row.prefName}
|
||||
// </option>
|
||||
// ))}
|
||||
// </select>
|
||||
<Select
|
||||
id="long-value-select3"
|
||||
instanceId="long-value-select3"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
options={prefCodeList}
|
||||
getOptionLabel={(x) => x.prefName}
|
||||
getOptionValue={(x) => x.prefId}
|
||||
isSearchable={false}
|
||||
value={prefCodeList.filter(function (option) {
|
||||
return option.prefId === prefValue
|
||||
})}
|
||||
isDisabled={true}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="input-wrap mr5" style={{ width: '580px' }}>
|
||||
@ -652,7 +666,7 @@ export default function StuffDetail() {
|
||||
</th>
|
||||
<td>
|
||||
<div className="select-wrap" style={{ width: '200px' }}>
|
||||
<select
|
||||
{/* <select
|
||||
className="select-light"
|
||||
name="areaId"
|
||||
disabled={areaIdList?.length > 0 ? false : true}
|
||||
@ -664,8 +678,25 @@ export default function StuffDetail() {
|
||||
{row.prefName}
|
||||
</option>
|
||||
)
|
||||
})}
|
||||
</select>
|
||||
*/}
|
||||
<Select
|
||||
id="long-value-select4"
|
||||
instanceId="long-value-select4"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
options={areaIdList}
|
||||
placeholder="Select"
|
||||
getOptionLabel={(x) => x.prefName}
|
||||
getOptionValue={(x) => x.areaId}
|
||||
isSearchable={false}
|
||||
onChange={handleAreaIdOnChange}
|
||||
value={areaIdList.filter(function (option) {
|
||||
return option.areaId === form.watch('areaId')
|
||||
})}
|
||||
</select>
|
||||
isDisabled={areaIdList.length > 0 ? false : true}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -794,9 +825,9 @@ export default function StuffDetail() {
|
||||
</Button>
|
||||
)}
|
||||
<Link href="/management/stuff">
|
||||
<Button type="button" className="btn-origin grey">
|
||||
<button type="button" className="btn-origin grey">
|
||||
NEW화면 물건목록이동
|
||||
</Button>
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
@ -911,9 +942,9 @@ export default function StuffDetail() {
|
||||
{objectNo.substring(0, 1) === 'R' ? (
|
||||
<>
|
||||
<Link href="/management/stuff">
|
||||
<Button type="button" className="btn-origin grey mr5">
|
||||
<button type="button" className="btn-origin grey mr5">
|
||||
R상세:물건목록
|
||||
</Button>
|
||||
</button>
|
||||
</Link>
|
||||
<Button type="submit" className="btn-origin navy mr5">
|
||||
R상세:저장
|
||||
@ -934,9 +965,9 @@ export default function StuffDetail() {
|
||||
</Button>
|
||||
)}
|
||||
<Link href="/management/stuff">
|
||||
<Button type="button" className="btn-origin grey">
|
||||
<button type="button" className="btn-origin grey">
|
||||
T상세:물건목록
|
||||
</Button>
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user