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