Merge Q-CAST-III-MR-239: 물건 목록 / 상세 수정
This commit is contained in:
commit
2fe8bc2a22
@ -190,9 +190,11 @@ export default function Stuff() {
|
||||
})
|
||||
}
|
||||
|
||||
if (stuffSearch.schSelSaleStoreId !== '') {
|
||||
fetchData()
|
||||
}
|
||||
//if (session.storeId === 'T01') {
|
||||
fetchData()
|
||||
//} else if (stuffSearch.schSelSaleStoreId !== '') {
|
||||
//fetchData()
|
||||
//}
|
||||
} else if (stuffSearchParams?.code === 'M') {
|
||||
const params = {
|
||||
saleStoreId: session?.storeId,
|
||||
|
||||
@ -59,7 +59,7 @@ export default function StuffDetail() {
|
||||
standardWindSpeedId: '', //기준풍속
|
||||
verticalSnowCover: '', //수직적설량
|
||||
coldRegionFlg: false, //한랭지대책시행(true : 1 / false : 0)
|
||||
surfaceType: 'III・IV', //면조도구분(III・IV / Ⅱ)
|
||||
surfaceType: 'Ⅲ・Ⅳ', //면조도구분(Ⅲ・Ⅳ / Ⅱ)
|
||||
saltAreaFlg: false, //염해지역용아이템사용 (true : 1 / false : 0)
|
||||
installHeight: '', //설치높이
|
||||
conType: '0', //계약조건(잉여 / 전량)
|
||||
@ -550,7 +550,7 @@ export default function StuffDetail() {
|
||||
|
||||
//면조도구분 surfaceType null로 내려오면 셋팅 안하고 저장할때 필수값 체크하도록
|
||||
// form.setValue('surfaceType', 'Ⅱ')
|
||||
// form.setValue('surfaceType', 'III・IV')
|
||||
// form.setValue('surfaceType', 'Ⅲ・Ⅳ')
|
||||
form.setValue('surfaceType', detailData.surfaceType)
|
||||
//염해지역용아이템사용 saltAreaFlg 1이면 true
|
||||
form.setValue('saltAreaFlg', detailData.saltAreaFlg === '1' ? true : false)
|
||||
@ -872,6 +872,9 @@ export default function StuffDetail() {
|
||||
form.setValue('standardWindSpeedId', `WL_${info.windSpeed}`)
|
||||
form.setValue('verticalSnowCover', info.verticalSnowCover)
|
||||
form.setValue('surfaceType', info.surfaceType)
|
||||
if (info.surfaceType === 'Ⅱ') {
|
||||
form.setValue('saltAreaFlg', true)
|
||||
}
|
||||
form.setValue('installHeight', info.installHeight)
|
||||
form.setValue('remarks', info.remarks)
|
||||
|
||||
@ -893,6 +896,15 @@ export default function StuffDetail() {
|
||||
form.setValue('standardWindSpeedId', info.windSpeed)
|
||||
}
|
||||
|
||||
//면조도구분surfaceType & 염해지역용아이템사용saltAreaFlg 컨트롤
|
||||
const handleRadioChange = (e) => {
|
||||
if (e.target.value === 'Ⅱ') {
|
||||
form.setValue('saltAreaFlg', true)
|
||||
} else {
|
||||
form.setValue('saltAreaFlg', false)
|
||||
}
|
||||
}
|
||||
|
||||
//receiveUser: '', //담당자
|
||||
const _receiveUser = watch('receiveUser')
|
||||
//objectName: '', //물건명
|
||||
@ -1561,7 +1573,7 @@ export default function StuffDetail() {
|
||||
onChange={onSelectionChange2}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isDisabled={otherSaleStoreList.length > 1 ? false : true}
|
||||
isDisabled={otherSaleStoreList.length > 0 ? false : true}
|
||||
isClearable={true}
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSelOptions
|
||||
@ -1715,11 +1727,29 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="d-check-radio light mr10">
|
||||
<input type="radio" name="surfaceType" value="III・IV" id="surfaceType0" {...form.register('surfaceType')} />
|
||||
<label htmlFor="surfaceType0">III・IV</label>
|
||||
<input
|
||||
type="radio"
|
||||
name="surfaceType"
|
||||
value="Ⅲ・Ⅳ"
|
||||
id="surfaceType0"
|
||||
{...form.register('surfaceType')}
|
||||
onChange={(e) => {
|
||||
handleRadioChange(e)
|
||||
}}
|
||||
/>
|
||||
<label htmlFor="surfaceType0">Ⅲ・Ⅳ</label>
|
||||
</div>
|
||||
<div className="d-check-radio light mr10">
|
||||
<input type="radio" name="surfaceType" value="Ⅱ" id="surfaceType1" {...form.register('surfaceType')} />
|
||||
<input
|
||||
type="radio"
|
||||
name="surfaceType"
|
||||
value="Ⅱ"
|
||||
id="surfaceType1"
|
||||
{...form.register('surfaceType')}
|
||||
onChange={(e) => {
|
||||
handleRadioChange(e)
|
||||
}}
|
||||
/>
|
||||
<label htmlFor="surfaceType1">Ⅱ</label>
|
||||
</div>
|
||||
<div className="d-check-box light mr5">
|
||||
@ -2211,11 +2241,29 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="d-check-radio light mr10">
|
||||
<input type="radio" name="surfaceType" value="III・IV" id="surfaceType0" {...form.register('surfaceType')} />
|
||||
<label htmlFor="surfaceType0">III・IV</label>
|
||||
<input
|
||||
type="radio"
|
||||
name="surfaceType"
|
||||
value="Ⅲ・Ⅳ"
|
||||
id="surfaceType0"
|
||||
{...form.register('surfaceType')}
|
||||
onChange={(e) => {
|
||||
handleRadioChange(e)
|
||||
}}
|
||||
/>
|
||||
<label htmlFor="surfaceType0">Ⅲ・Ⅳ</label>
|
||||
</div>
|
||||
<div className="d-check-radio light mr10">
|
||||
<input type="radio" name="surfaceType" value="Ⅱ" id="surfaceType1" {...form.register('surfaceType')} />
|
||||
<input
|
||||
type="radio"
|
||||
name="surfaceType"
|
||||
value="Ⅱ"
|
||||
id="surfaceType1"
|
||||
{...form.register('surfaceType')}
|
||||
onChange={(e) => {
|
||||
handleRadioChange(e)
|
||||
}}
|
||||
/>
|
||||
<label htmlFor="surfaceType1">Ⅱ</label>
|
||||
</div>
|
||||
<div className="d-check-box light mr5">
|
||||
|
||||
@ -184,34 +184,36 @@ export default function StuffSearchCondition() {
|
||||
setSchSelSaleStoreList(allList)
|
||||
setFavoriteStoreList(favList)
|
||||
setShowSaleStoreList(favList)
|
||||
setSchSelSaleStoreId(session?.storeId)
|
||||
// setSchSelSaleStoreId(session?.storeId)
|
||||
setStuffSearch({
|
||||
...stuffSearch,
|
||||
code: 'S',
|
||||
schSelSaleStoreId: session?.storeId,
|
||||
// schSelSaleStoreId: session?.storeId,
|
||||
})
|
||||
|
||||
//T01일때 2차 판매점 호출하기 디폴트로 1차점을 본인으로 셋팅해서 세션storeId사용
|
||||
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=0&userId=${session?.userId}`
|
||||
// 디폴트 셋팅 안하기로
|
||||
// url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=0&userId=${session?.userId}`
|
||||
|
||||
get({ url: url }).then((res) => {
|
||||
if (!isEmptyArray(res)) {
|
||||
res.map((row) => {
|
||||
row.value = row.saleStoreId
|
||||
row.label = row.saleStoreName
|
||||
})
|
||||
// get({ url: url }).then((res) => {
|
||||
// if (!isEmptyArray(res)) {
|
||||
// res.map((row) => {
|
||||
// row.value = row.saleStoreId
|
||||
// row.label = row.saleStoreName
|
||||
// })
|
||||
|
||||
otherList = res
|
||||
setOtherSaleStoreList(otherList)
|
||||
} else {
|
||||
setOtherSaleStoreList([])
|
||||
}
|
||||
})
|
||||
// otherList = res
|
||||
// setOtherSaleStoreList(otherList)
|
||||
// } else {
|
||||
// setOtherSaleStoreList([])
|
||||
// }
|
||||
// })
|
||||
} else {
|
||||
if (session?.storeLvl === '1') {
|
||||
allList = res
|
||||
favList = res.filter((row) => row.priority !== 'B')
|
||||
otherList = res.filter((row) => row.firstAgentYn === 'N')
|
||||
|
||||
setSchSelSaleStoreList(allList)
|
||||
setFavoriteStoreList(allList)
|
||||
setShowSaleStoreList(allList)
|
||||
@ -584,7 +586,7 @@ export default function StuffSearchCondition() {
|
||||
onChange={onSelectionChange2}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isDisabled={otherSaleStoreList.length > 1 ? false : true}
|
||||
isDisabled={otherSaleStoreList.length > 0 ? false : true}
|
||||
isClearable={true}
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSaleStoreId
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user