HANASYS 개선건 #947 #11

Merged
basssy merged 1 commits from feature/qcast-947 into dev 2025-03-28 12:29:14 +09:00

View File

@ -1033,8 +1033,7 @@ export default function StuffDetail() {
const _saleStoreId = watch('saleStoreId') const _saleStoreId = watch('saleStoreId')
// 2 // 2
const _otherSaleStoreId = watch('otherSaleStoreId') const _otherSaleStoreId = watch('otherSaleStoreId')
// zipNo: '', // // zipNo: '', // #947
const _zipNo = watch('zipNo')
// prefId: '', // // prefId: '', //
const _prefId = watch('prefId') const _prefId = watch('prefId')
// address: '', // // address: '', //
@ -1071,10 +1070,6 @@ export default function StuffDetail() {
} }
} }
if (!formData.zipNo) {
errors.zipNo = true
}
if (!formData.prefId) { if (!formData.prefId) {
errors.prefId = true errors.prefId = true
} }
@ -1115,10 +1110,6 @@ export default function StuffDetail() {
} }
} }
if (!formData.zipNo) {
errors.zipNo = true
}
if (!formData.prefId || formData.prefId === '0') { if (!formData.prefId || formData.prefId === '0') {
errors.prefId = true errors.prefId = true
} }
@ -1144,7 +1135,6 @@ export default function StuffDetail() {
_objectName, _objectName,
_saleStoreId, _saleStoreId,
_otherSaleStoreId, _otherSaleStoreId,
_zipNo,
_prefId, _prefId,
_address, _address,
_areaId, _areaId,
@ -1189,6 +1179,14 @@ export default function StuffDetail() {
} }
}, [prefValue]) }, [prefValue])
// / disabled
const onChangePrefCode = (e) => {
setPrefValue(e.prefId)
form.setValue('prefId', e.prefId)
form.setValue('prefName', e.prefName)
}
// //
const handleAreaIdOnChange = (e) => { const handleAreaIdOnChange = (e) => {
form.setValue('areaId', e.areaId) form.setValue('areaId', e.areaId)
@ -1243,12 +1241,6 @@ export default function StuffDetail() {
errors = fieldNm errors = fieldNm
} }
//
if (!formData.zipNo) {
fieldNm = getMessage('stuff.detail.zipNo')
errors = fieldNm
}
//1 //1
if (!formData.saleStoreId) { if (!formData.saleStoreId) {
fieldNm = getMessage('stuff.detail.saleStoreId') fieldNm = getMessage('stuff.detail.saleStoreId')
@ -1558,7 +1550,7 @@ export default function StuffDetail() {
type: 'alert', type: 'alert',
icon: 'error', icon: 'error',
}) })
console.log('error::::::', error) console.error('error::::::', error)
}) })
} }
} }
@ -2004,9 +1996,7 @@ export default function StuffDetail() {
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>{getMessage('stuff.detail.zipNo')}</th>
{getMessage('stuff.detail.zipNo')} <span className="important">*</span>
</th>
<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' }}>
@ -2038,10 +2028,10 @@ export default function StuffDetail() {
getOptionLabel={(x) => x.prefName} getOptionLabel={(x) => x.prefName}
getOptionValue={(x) => x.prefId} getOptionValue={(x) => x.prefId}
isSearchable={false} isSearchable={false}
onChange={onChangePrefCode}
value={prefCodeList.filter(function (option) { value={prefCodeList.filter(function (option) {
return option.prefId === prefValue return option.prefId === prefValue
})} })}
isDisabled={true}
/> />
)} )}
</div> </div>
@ -2571,9 +2561,7 @@ export default function StuffDetail() {
</td> </td>
</tr> </tr>
<tr> <tr>
<th> <th>{getMessage('stuff.detail.zipNo')}</th>
{getMessage('stuff.detail.zipNo')} <span className="important">*</span>
</th>
<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' }}>
@ -2606,10 +2594,10 @@ export default function StuffDetail() {
getOptionLabel={(x) => x.prefName} getOptionLabel={(x) => x.prefName}
getOptionValue={(x) => x.prefId} getOptionValue={(x) => x.prefId}
isSearchable={false} isSearchable={false}
onChange={onChangePrefCode}
value={prefCodeList.filter(function (option) { value={prefCodeList.filter(function (option) {
return option.prefId === prefValue return option.prefId === prefValue
})} })}
isDisabled={true}
/> />
)} )}
</div> </div>