Compare commits

..

No commits in common. "83f0eef9ebc4aba56c79e15a28d970b7d711e34c" and "11f69a01bb0512467af672c37e28394b92ef67c8" have entirely different histories.

View File

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