물건정보 신규등록&수정화면
This commit is contained in:
parent
5d8bd03e0c
commit
d6fc1134c1
@ -674,19 +674,27 @@ export default function StuffDetail() {
|
||||
|
||||
// 물건삭제
|
||||
const onDelete = () => {
|
||||
//http://localhost:8080/api/object/R201TES01240910023
|
||||
// console.log('물건번호::::::::', objectNo)
|
||||
alert('사양확정일이 있으면 삭제 불가')
|
||||
if (confirm(getMessage('common.message.data.delete'))) {
|
||||
let testobj = '10'
|
||||
|
||||
del({ url: `/api/object/${testobj}` }).then((res) => {
|
||||
console.log('삭제 결과:::', res)
|
||||
router.push('/management/stuff')
|
||||
})
|
||||
// console.log('detailData:::::::::', detailData)
|
||||
const specificationConfirmDate = detailData.specificationConfirmDate
|
||||
if (specificationConfirmDate != null) {
|
||||
alert(getMessage('stuff.detail.delete.message1'))
|
||||
} else {
|
||||
if (confirm(getMessage('common.message.data.delete'))) {
|
||||
del({ url: `/api/object/${objectNo}` }).then((res) => {
|
||||
console.log('삭제결과:::::::', res)
|
||||
router.push('/management/stuff')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 숫자만 입력 가능
|
||||
const handleKeyUp = (e) => {
|
||||
let input = e.target
|
||||
input.value = input.value.replace(/[^0-9]/g, '')
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{(editMode === 'NEW' && (
|
||||
@ -707,8 +715,18 @@ export default function StuffDetail() {
|
||||
<th>{getMessage('stuff.detail.planReqNo')}</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" readOnly value={form.watch('planReqNo')} />
|
||||
<div className="product-input-wrap mr5">
|
||||
<input type="text" className="product-input" readOnly value={form.watch('planReqNo')} />
|
||||
{(form.watch('planReqNo') !== '' && (
|
||||
<button
|
||||
type="button"
|
||||
className="product-delete"
|
||||
onClick={() => {
|
||||
form.setValue('planReqNo', '')
|
||||
}}
|
||||
></button>
|
||||
)) ||
|
||||
null}
|
||||
</div>
|
||||
<Button className="btn-origin grey" onClick={onSearchDesignRequestPopOpen}>
|
||||
{getMessage('stuff.planReqPopup.title')}
|
||||
@ -976,7 +994,13 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" value={form.watch('verticalSnowCover')} {...register('verticalSnowCover')} />
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
onKeyUp={handleKeyUp}
|
||||
value={form.watch('verticalSnowCover')}
|
||||
{...register('verticalSnowCover')}
|
||||
/>
|
||||
</div>
|
||||
<span className="mr10">cm</span>
|
||||
<div className="d-check-box light">
|
||||
@ -1015,7 +1039,13 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" value={form.watch('installHeight')} {...register('installHeight')} />
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
onKeyUp={handleKeyUp}
|
||||
value={form.watch('installHeight')}
|
||||
{...register('installHeight')}
|
||||
/>
|
||||
</div>
|
||||
<span>m</span>
|
||||
</div>
|
||||
@ -1047,19 +1077,19 @@ export default function StuffDetail() {
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="sub-table-footer">
|
||||
<div className="sub-right-footer">
|
||||
{!isFormValid ? (
|
||||
<Button className="btn-origin grey mr5" onClick={onTempSave}>
|
||||
New화면 임시저장
|
||||
New화면 {getMessage('stuff.detail.btn.tempSave')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button type="submit" className="btn-origin navy mr5">
|
||||
NEW화면 저장
|
||||
NEW화면 {getMessage('stuff.detail.btn.save')}
|
||||
</Button>
|
||||
)}
|
||||
<Link href="/management/stuff" scroll={false}>
|
||||
<button type="button" className="btn-origin grey">
|
||||
NEW화면 물건목록이동
|
||||
NEW화면 {getMessage('stuff.detail.btn.moveList')}
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
@ -1072,229 +1102,281 @@ export default function StuffDetail() {
|
||||
<div className="promise-gudie">
|
||||
<span className="important">*</span> {getMessage('stuff.detail.required')}
|
||||
</div>
|
||||
<div className="infomation-table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style={{ width: '200px' }} />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{getMessage('stuff.detail.planReqNo')}</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" readOnly value={form.watch('planReqNo')} />
|
||||
<div className="infomation-wrap">
|
||||
<div className="infomation-table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style={{ width: '200px' }} />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{getMessage('stuff.detail.planReqNo')}</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="product-input-wrap mr5">
|
||||
<input type="text" className="product-input" readOnly value={form.watch('planReqNo')} />
|
||||
{objectNo.substring(0, 1) === 'T' && form.watch('planReqNo') !== '' ? (
|
||||
<button
|
||||
type="button"
|
||||
className="product-delete"
|
||||
onClick={() => {
|
||||
form.setValue('planReqNo', '')
|
||||
}}
|
||||
></button>
|
||||
) : null}
|
||||
</div>
|
||||
{objectNo.substring(0, 1) === 'T' ? (
|
||||
<>
|
||||
<Button className="btn-origin grey" onClick={onSearchDesignRequestPopOpen}>
|
||||
{getMessage('stuff.planReqPopup.title')}
|
||||
</Button>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
{objectNo.substring(0, 1) === 'T' ? (
|
||||
<>
|
||||
<Button className="btn-origin grey" onClick={onSearchDesignRequestPopOpen}>
|
||||
{getMessage('stuff.planReqPopup.title')}
|
||||
</Button>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{getMessage('stuff.detail.dispCompanyName')} <span className="important">*</span>
|
||||
</th>
|
||||
<td>
|
||||
<div className="input-wrap" style={{ width: '500px' }}>
|
||||
<input type="text" className="input-light" {...form.register('dispCompanyName')} value={form.watch('dispCompanyName')} />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{getMessage('stuff.detail.objectStatusId')} <span className="importatn">*</span>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
{/* 상세라디오시작 */}
|
||||
{objectStatusList.map((row) => {
|
||||
return (
|
||||
<div className="d-check-radio light mr10" key={`objectStatusId_${row.clCode}`}>
|
||||
<input
|
||||
type="radio"
|
||||
name="objectStatusId"
|
||||
value={row.clCode}
|
||||
id={`objectStatus${row.clCode}`}
|
||||
{...register('objectStatusId')}
|
||||
onChange={onRadioChange}
|
||||
checked={row.clCode === selectObjectStatusId}
|
||||
/>
|
||||
<label htmlFor={`objectStatus${row.clCode}`}>{row.clCodeNm}</label>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
{/* 상세라디오끝 */}
|
||||
<div className="input-wrap mr5" style={{ width: '545px' }}>
|
||||
<input type="text" className="input-light" {...form.register('objectName')} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{getMessage('stuff.detail.dispCompanyName')} <span className="important">*</span>
|
||||
</th>
|
||||
<td>
|
||||
<div className="input-wrap" style={{ width: '500px' }}>
|
||||
<input type="text" className="input-light" {...form.register('dispCompanyName')} value={form.watch('dispCompanyName')} />
|
||||
</div>
|
||||
<div className="select-wrap" style={{ width: '120px' }}>
|
||||
<Select
|
||||
{...register('objectNameOmit')}
|
||||
id="long-value-select0"
|
||||
instanceId="long-value-select0"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
options={honorificCodeList}
|
||||
onChange={onChangeHonorificCode}
|
||||
getOptionLabel={(x) => x.clCodeNm}
|
||||
getOptionValue={(x) => x.clCode}
|
||||
isClearable={true}
|
||||
isSearchable={false}
|
||||
value={honorificCodeList.filter(function (option) {
|
||||
console.log('상세 경칭코드결과:::::::::::::::', option.clCode)
|
||||
console.log('상세 셋팅된 경칭코드값:::::::::::::::', selHonorificCode)
|
||||
return option.clCode === selHonorificCode
|
||||
})}
|
||||
></Select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{getMessage('stuff.detail.objectStatusId')} <span className="importatn">*</span>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
{/* 상세라디오시작 */}
|
||||
{objectStatusList.map((row) => {
|
||||
return (
|
||||
<div className="d-check-radio light mr10" key={`objectStatusId_${row.clCode}`}>
|
||||
<input
|
||||
type="radio"
|
||||
name="objectStatusId"
|
||||
value={row.clCode}
|
||||
id={`objectStatus${row.clCode}`}
|
||||
{...register('objectStatusId')}
|
||||
onChange={onRadioChange}
|
||||
checked={row.clCode === selectObjectStatusId}
|
||||
/>
|
||||
<label htmlFor={`objectStatus${row.clCode}`}>{row.clCodeNm}</label>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
{/* 상세라디오끝 */}
|
||||
<div className="input-wrap mr5" style={{ width: '545px' }}>
|
||||
<input type="text" className="input-light" {...form.register('objectName')} />
|
||||
</div>
|
||||
<div className="select-wrap" style={{ width: '120px' }}>
|
||||
<Select
|
||||
{...register('objectNameOmit')}
|
||||
id="long-value-select0"
|
||||
instanceId="long-value-select0"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
options={honorificCodeList}
|
||||
onChange={onChangeHonorificCode}
|
||||
getOptionLabel={(x) => x.clCodeNm}
|
||||
getOptionValue={(x) => x.clCode}
|
||||
isClearable={true}
|
||||
isSearchable={false}
|
||||
value={honorificCodeList.filter(function (option) {
|
||||
console.log('상세 경칭코드결과:::::::::::::::', option.clCode)
|
||||
console.log('상세 셋팅된 경칭코드값:::::::::::::::', selHonorificCode)
|
||||
return option.clCode === selHonorificCode
|
||||
})}
|
||||
></Select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{getMessage('stuff.detail.objectNameKana')}</th>
|
||||
<td>
|
||||
<div className="input-wrap" style={{ width: '789px' }}>
|
||||
<input type="text" className="input-light" {...form.register('objectNameKana')} />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div className="flx-box">
|
||||
<div className="title">
|
||||
{getMessage('stuff.detail.saleStoreId')}
|
||||
<span className="important">*</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{getMessage('stuff.detail.objectNameKana')}</th>
|
||||
<td>
|
||||
<div className="input-wrap" style={{ width: '789px' }}>
|
||||
<input type="text" className="input-light" {...form.register('objectNameKana')} />
|
||||
</div>
|
||||
<div className="tooltips"></div>
|
||||
</div>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
<Select
|
||||
id="long-value-select1"
|
||||
instanceId="long-value-select1"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
options={saleStoreList}
|
||||
onChange={onSelectionChange}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isClearable={sessionState?.storeLvl === '1' ? true : false}
|
||||
value={saleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div className="flx-box">
|
||||
<div className="title">
|
||||
{getMessage('stuff.detail.saleStoreId')}
|
||||
<span className="important">*</span>
|
||||
</div>
|
||||
<div className="tooltips"></div>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
<input type="text" className="input-light" value={form.watch('saleStoreId')} {...form.register('saleStoreId')} readOnly />
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
<Select
|
||||
id="long-value-select1"
|
||||
instanceId="long-value-select1"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
options={saleStoreList}
|
||||
onChange={onSelectionChange}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isClearable={sessionState?.storeLvl === '1' ? true : false}
|
||||
value={saleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
value={form.watch('saleStoreId')}
|
||||
{...form.register('saleStoreId')}
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div className="flx-box">
|
||||
<div className="title">{getMessage('stuff.detail.otherSaleStoreId')}</div>
|
||||
<div className="tooltips">
|
||||
<span>{getMessage('stuff.detail.tooltip.saleStoreId')}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div className="flx-box">
|
||||
<div className="title">{getMessage('stuff.detail.otherSaleStoreId')}</div>
|
||||
<div className="tooltips">
|
||||
<span>{getMessage('stuff.detail.tooltip.saleStoreId')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
<Select
|
||||
id="long-value-select2"
|
||||
instanceId="long-value-select2"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
ref={ref}
|
||||
options={otherSaleStoreList}
|
||||
onChange={onSelectionChange2}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isDisabled={sessionState?.storeLvl === '1' && form.watch('saleStoreId') != '' ? false : true}
|
||||
isClearable={sessionState?.storeLvl === '1' ? true : false}
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSelOptions
|
||||
})}
|
||||
/>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
<Select
|
||||
id="long-value-select2"
|
||||
instanceId="long-value-select2"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
ref={ref}
|
||||
options={otherSaleStoreList}
|
||||
onChange={onSelectionChange2}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isDisabled={sessionState?.storeLvl === '1' && form.watch('saleStoreId') != '' ? false : true}
|
||||
isClearable={sessionState?.storeLvl === '1' ? true : false}
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSelOptions
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
value={form.watch('otherSaleStoreId')}
|
||||
{...form.register('otherSaleStoreId')}
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
value={form.watch('otherSaleStoreId')}
|
||||
{...form.register('otherSaleStoreId')}
|
||||
readOnly
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{getMessage('stuff.detail.zipNo')} <span className="important">*</span>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" disabled value={form.watch('zipNo')} />
|
||||
</div>
|
||||
<Button className="btn-origin grey" onClick={onSearchPostNumberPopOpen}>
|
||||
{getMessage('stuff.detail.btn.addressPop')}
|
||||
</Button>
|
||||
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{getMessage('stuff.detail.zipNo')} <span className="important">*</span>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" disabled value={form.watch('zipNo')} />
|
||||
</div>
|
||||
<Button className="btn-origin grey" onClick={onSearchPostNumberPopOpen}>
|
||||
{getMessage('stuff.detail.btn.addressPop')}
|
||||
</Button>
|
||||
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{objectNo.substring(0, 1) === 'R' ? (
|
||||
<>
|
||||
{/* 진짜R 플랜시작 */}
|
||||
<div className="table-box-title-wrap">
|
||||
<div className="title-wrap">
|
||||
<h3>{getMessage('stuff.detail.planList.title')}</h3>
|
||||
<ul className="info-wrap">
|
||||
<li>
|
||||
{getMessage('stuff.detail.planList.cnt')}
|
||||
<span className="red">플랜갯수</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className="information-help-wrap">
|
||||
<div className="information-help-tit-wrap">
|
||||
<div className="help-tit-icon"></div>
|
||||
<div className="help-tit">{getMessage('stuff.detail.planList.help')}</div>
|
||||
</div>
|
||||
<div className="information-help-guide">
|
||||
<span>{getMessage('stuff.detail.planList.guide1')}</span>
|
||||
<span>{getMessage('stuff.detail.planList.guide2')}</span>
|
||||
<span>{getMessage('stuff.detail.planList.guide3')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="information-grid">
|
||||
<div className="q-grid no-cols">
|
||||
그리드영역
|
||||
<div className="pagination-wrap">페이징영역</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* 진짜R 플랜끝 */}
|
||||
<div className="sub-right-footer">
|
||||
<Link href="/management/stuff">
|
||||
<button type="button" className="btn-origin grey mr5">
|
||||
R상세: {getMessage('stuff.detail.btn.moveList')}
|
||||
</button>
|
||||
</Link>
|
||||
<Button type="submit" className="btn-origin navy mr5">
|
||||
R상세:{getMessage('stuff.detail.btn.save')}
|
||||
</Button>
|
||||
<Button type="button" className="btn-origin grey" onClick={onDelete}>
|
||||
{getMessage('stuff.detail.btn.delete')}
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<div className="sub-right-footer">
|
||||
{!isFormValid ? (
|
||||
<Button type="submit" className="btn-origin grey mr5" onClick={onTempSave}>
|
||||
TEMP상세:{getMessage('stuff.detail.btn.tempSave')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button type="submit" className="btn-origin navy mr5">
|
||||
TEMP상세:{getMessage('stuff.detail.btn.save')}
|
||||
</Button>
|
||||
)}
|
||||
<Link href="/management/stuff">
|
||||
<button type="button" className="btn-origin grey">
|
||||
TEMP상세:{getMessage('stuff.detail.btn.moveList')}
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</form>
|
||||
{objectNo.substring(0, 1) === 'R' ? (
|
||||
<>
|
||||
<Link href="/management/stuff">
|
||||
<button type="button" className="btn-origin grey mr5">
|
||||
R상세:물건목록
|
||||
</button>
|
||||
</Link>
|
||||
<Button type="submit" className="btn-origin navy mr5">
|
||||
R상세:저장
|
||||
</Button>
|
||||
<Button type="submit" className="btn-origin navy" onClick={onDelete}>
|
||||
R상세:물건삭제
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{!isFormValid ? (
|
||||
<Button type="submit" className="btn-origin navy mr5" onClick={onTempSave}>
|
||||
TEMP상세:임시저장
|
||||
</Button>
|
||||
) : (
|
||||
<Button type="submit" className="btn-origin navy mr5">
|
||||
TEMP상세:저장
|
||||
</Button>
|
||||
)}
|
||||
<Link href="/management/stuff">
|
||||
<button type="button" className="btn-origin grey">
|
||||
T상세:물건목록
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{showAddressButtonValid && <FindAddressPop setShowAddressButtonValid={setShowAddressButtonValid} zipInfo={setZipInfo} />}
|
||||
|
||||
@ -5,7 +5,10 @@ import { useAxios } from '@/hooks/useAxios'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { globalLocaleStore } from '@/store/localeAtom'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { useMessage } from '@/hooks/useMessage'
|
||||
|
||||
export default function StuffHeader() {
|
||||
const { getMessage } = useMessage()
|
||||
const router = useRouter()
|
||||
const searchParams = useSearchParams()
|
||||
const objectNo = searchParams.get('objectNo') //url에서 물건번호 꺼내서 바로 set
|
||||
@ -15,35 +18,49 @@ export default function StuffHeader() {
|
||||
|
||||
useEffect(() => {
|
||||
get({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
||||
//console.log('res::', res)
|
||||
if (res != null && res != '') {
|
||||
console.log('헤더상세::::::::::', res)
|
||||
setHeaderData(res)
|
||||
} else {
|
||||
alert('삭제된 물건입니다')
|
||||
alert(getMessage('stuff.detail.header.message1'))
|
||||
router.push('/management/stuff')
|
||||
}
|
||||
})
|
||||
}, [objectNo])
|
||||
|
||||
//물건번호 복사
|
||||
const copyObjectNo = async (objectNo) => {
|
||||
await navigator.clipboard.writeText(objectNo)
|
||||
alert(getMessage('stuff.detail.header.message2'))
|
||||
try {
|
||||
} catch (error) {
|
||||
alert(getMessage('stuff.detail.header.message3'))
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="infomation-box-wrap">
|
||||
<div className="sub-table-box">
|
||||
<div className="info-title">물건번호</div>
|
||||
<div className="info-title">{getMessage('stuff.detail.header.objectNo')}</div>
|
||||
<div className="info-inner">
|
||||
{headerData.objectNo} <button className="copy-ico"></button>
|
||||
{headerData.objectNo}{' '}
|
||||
<button
|
||||
className="copy-ico"
|
||||
onClick={() => {
|
||||
copyObjectNo(headerData.objectNo)
|
||||
}}
|
||||
></button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sub-table-box">
|
||||
<div className="info-title">사양확정일</div>
|
||||
<div className="info-title">{getMessage('stuff.detail.header.specificationConfirmDate')}</div>
|
||||
<div className="info-inner">{headerData.specificationConfirmDate}</div>
|
||||
</div>
|
||||
<div className="sub-table-box">
|
||||
<div className="info-title">갱신일시</div>
|
||||
<div className="info-title">{getMessage('stuff.detail.header.lastEditDatetime')}</div>
|
||||
<div className="info-inner">{headerData.lastEditDatetime}</div>
|
||||
</div>
|
||||
<div className="sub-table-box">
|
||||
<div className="info-title">등록일</div>
|
||||
<div className="info-title">{getMessage('stuff.detail.header.createDatetime')}</div>
|
||||
<div className="info-inner">{headerData.createDatetime}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -468,6 +468,13 @@
|
||||
"stuff.addressPopup.btn2": "住所適用",
|
||||
"stuff.planReqPopup.title": "設計依頼のインポート",
|
||||
"stuff.temp.subTitle": "商品情報",
|
||||
"stuff.detail.header.message1": "存在しないものです。",
|
||||
"stuff.detail.header.message2": "商品番号がコピーされました。",
|
||||
"stuff.detail.header.message3": "存在しないものです。",
|
||||
"stuff.detail.header.objectNo": "商品番号のコピーに失敗しました。",
|
||||
"stuff.detail.header.specificationConfirmDate": "仕様拡張日",
|
||||
"stuff.detail.header.lastEditDatetime": "更新日時",
|
||||
"stuff.detail.header.createDatetime": "登録日",
|
||||
"stuff.detail.required": "必須入力項目",
|
||||
"stuff.detail.planReqNo": "設計依頼No.",
|
||||
"stuff.detail.dispCompanyName": "担当者",
|
||||
@ -497,6 +504,17 @@
|
||||
"stuff.detail.tooltip.saleStoreId": "販売代理店または販売代理店IDを1文字以上入力してください",
|
||||
"stuff.detail.tempSave.message1": "一時保存されました。商品番号を取得するには、必須項目をすべて入力してください。",
|
||||
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
||||
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
|
||||
"stuff.detail.planList.title": "プランリスト",
|
||||
"stuff.detail.planList.cnt": "全体",
|
||||
"stuff.detail.planList.help": "ヘルプ",
|
||||
"stuff.detail.planList.guide1": "1.発注は同一品番基準1件のみ可能です。",
|
||||
"stuff.detail.planList.guide2": "2.[Excelダウンロード]は見積書、図面、シミュレーション結果をExcelファイルで一度にダウンロードします。",
|
||||
"stuff.detail.planList.guide3": "3. プラン情報をダブルクリックすると図面作成画面に移動します。",
|
||||
"stuff.detail.btn.delete": "物の削除",
|
||||
"stuff.detail.btn.moveList": "商品リスト",
|
||||
"stuff.detail.btn.save": "保存",
|
||||
"stuff.detail.btn.tempSave": "一時保存",
|
||||
"stuff.planReqPopup.popTitle": "設計依頼検索",
|
||||
"stuff.planReqPopup.btn1": "検索",
|
||||
"stuff.planReqPopup.btn2": "初期化",
|
||||
|
||||
@ -473,6 +473,13 @@
|
||||
"stuff.addressPopup.btn2": "주소적용",
|
||||
"stuff.planReqPopup.title": "설계의뢰 불러오기",
|
||||
"stuff.temp.subTitle": "물건정보",
|
||||
"stuff.detail.header.message1": "존재하지 않는 물건입니다.",
|
||||
"stuff.detail.header.message2": "물건번호가 복사되었습니다.",
|
||||
"stuff.detail.header.message3": "물건번호 복사에 실패했습니다.",
|
||||
"stuff.detail.header.objectNo": "물건번호",
|
||||
"stuff.detail.header.specificationConfirmDate": "사양확장일",
|
||||
"stuff.detail.header.lastEditDatetime": "갱신일시",
|
||||
"stuff.detail.header.createDatetime": "등록일",
|
||||
"stuff.detail.required": "필수 입력항목",
|
||||
"stuff.detail.planReqNo": "설계의뢰No.",
|
||||
"stuff.detail.dispCompanyName": "담당자",
|
||||
@ -502,6 +509,17 @@
|
||||
"stuff.detail.tooltip.saleStoreId": "판매대리점 또는 판매대리점ID를 1자 이상 입력하세요",
|
||||
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
||||
"stuff.detail.confirm.message1": "판매점 정보를 변경하면, 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
||||
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
|
||||
"stuff.detail.planList.title": "플랜리스트",
|
||||
"stuff.detail.planList.cnt": "전체",
|
||||
"stuff.detail.planList.help": "도움말",
|
||||
"stuff.detail.planList.guide1": "1.발주는 동일 물건번호 기준 1건만 가능합니다.",
|
||||
"stuff.detail.planList.guide2": "2.[Excel 다운로드]는 견적서, 도면, 시뮬레이션 결과를 엑셀파일로 한번에 다운로드 합니다.",
|
||||
"stuff.detail.planList.guide3": "3.플랜정보를 더블 클릭하면 도면작성 화면으로 이동합니다.",
|
||||
"stuff.detail.btn.delete": "물건삭제",
|
||||
"stuff.detail.btn.moveList": "물건목록",
|
||||
"stuff.detail.btn.save": "저장",
|
||||
"stuff.detail.btn.tempSave": "임시저장",
|
||||
"stuff.planReqPopup.popTitle": "설계 요청 검색",
|
||||
"stuff.planReqPopup.btn1": "검색",
|
||||
"stuff.planReqPopup.btn2": "초기화",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user