[1423]설계 가져오기 기능에 대해 #745

Merged
ysCha merged 1 commits from dev into dev-deploy 2026-04-01 15:17:21 +09:00
2 changed files with 29 additions and 1 deletions

View File

@ -1046,6 +1046,33 @@ export default function StuffDetail() {
form.setValue('otherSaleStoreId', info.saleStoreId)
form.setValue('otherSaleStoreName', info.saleStoreName)
form.setValue('otherSaleStoreLevel', info.saleStoreLevel)
get({ url: `/api/object/saleStore/${info.saleStoreId}/firstAgent` }).then((res) => {
if (res?.firstAgentId) {
const firstAgent = { saleStoreId: res.firstAgentId, saleStoreName: res.firstAgentName }
setSaleStoreList((prev) => {
const exists = prev.some((s) => s.saleStoreId === res.firstAgentId)
return exists ? prev : [...prev, firstAgent]
})
setShowSaleStoreList((prev) => {
const exists = prev.some((s) => s.saleStoreId === res.firstAgentId)
return exists ? prev : [...prev, firstAgent]
})
setSelOptions(res.firstAgentId)
form.setValue('saleStoreId', res.firstAgentId)
form.setValue('saleStoreName', res.firstAgentName)
form.setValue('saleStoreLevel', '1')
} else {
setSelOptions('')
form.setValue('saleStoreId', '')
form.setValue('saleStoreName', '')
form.setValue('saleStoreLevel', '')
}
}).catch(() => {
setSelOptions('')
form.setValue('saleStoreId', '')
form.setValue('saleStoreName', '')
form.setValue('saleStoreLevel', '')
})
}
}

View File

@ -11,7 +11,7 @@ import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
import QPagination from '@/components/common/pagination/QPagination'
import { useSwal } from '@/hooks/useSwal'
import { QcastContext } from '@/app/QcastProvider'
import { sanitizeDecimalInputEvent } from '@/util/input-utils'
import { sanitizeDecimalInputEvent, sanitizeIntegerInputEvent } from '@/util/input-utils'
export default function PlanRequestPop(props) {
const [pageNo, setPageNo] = useState(1) //
@ -212,6 +212,7 @@ export default function PlanRequestPop(props) {
//
const getSelectedRowdata = (data) => {
if (isNotEmptyArray(data)) {
console.log('planReqObject fields:', data[0])
setPlanReqObject(data[0])
} else {
setPlanReqObject({})