물건현황

This commit is contained in:
basssy 2024-11-01 10:47:55 +09:00
parent 7e598bcc13
commit a63edd0249
2 changed files with 42 additions and 20 deletions

View File

@ -420,7 +420,7 @@ export default function StuffDetail() {
useEffect(() => {
if (isObjectNotEmpty(detailData)) {
console.log('상세데이타세팅:::::', detailData)
// console.log(':::::', detailData)
// API
get({ url: '/api/object/prefecture/list' }).then((res) => {
if (!isEmptyArray(res)) {
@ -459,6 +459,11 @@ export default function StuffDetail() {
setFavoriteStoreList(favList)
setShowSaleStoreList(favList)
form.setValue('saleStoreId', firstList[0].saleStoreId)
form.setValue('saleStoreName', firstList[0].saleStoreName)
form.setValue('saleStoreLevel', firstList[0].saleStoreLevel)
setSelOptions(firstList[0].saleStoreId)
// 1 2
// url = `/api/object/saleStore/${detailData?.saleStoreId}/list?firstFlg=0&userId=${sessionState?.userId}`
url = `/api/object/saleStore/${detailData?.saleStoreId}/list?firstFlg=0&userId=${session?.userId}`
@ -617,7 +622,6 @@ export default function StuffDetail() {
if (editMode === 'NEW') {
if (planReqNo !== '') {
// console.log('1111111111111')
if (confirm(getMessage('stuff.detail.confirm.message1'))) {
delFlg = true
} else {
@ -627,7 +631,6 @@ export default function StuffDetail() {
} else {
// EDIT
if (planReqNo !== null && planReqNo !== '') {
// console.log('2222222222222')
if (confirm(getMessage('stuff.detail.confirm.message1'))) {
delFlg = true
} else {
@ -641,7 +644,6 @@ export default function StuffDetail() {
tempObjectNo = objectNo.substring(0, 1)
}
// console.log(' 1 ::::::::::tempObjectNo:::::::', tempObjectNo, planReqNo, delFlg)
if (tempObjectNo === 'T') {
if (planReqNo) {
if (delFlg) {
@ -652,11 +654,21 @@ export default function StuffDetail() {
form.setValue('saleStoreName', key.saleStoreName)
form.setValue('saleStoreLevel', key.saleStoreLevel)
setSelOptions(key.saleStoreId)
// 1 2 list
// 
console.log('111111??????111???????????????')
// let newOtherSaleStoreList = originOtherSaleStoreList.filter((row) => row.firstAgentId === key.saleStoreId)
// setOtherSaleStoreList(newOtherSaleStoreList)
let url = `/api/object/saleStore/${key.saleStoreId}/list?firstFlg=0&userId=${session?.userId}`
let otherList
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([])
}
})
} else {
//X
setSelOptions('')
@ -722,11 +734,21 @@ export default function StuffDetail() {
form.setValue('saleStoreName', key.saleStoreName)
form.setValue('saleStoreLevel', key.saleStoreLevel)
setSelOptions(key.saleStoreId)
// 1 2 list
// 
console.log('3333333333333')
// let newOtherSaleStoreList = originOtherSaleStoreList.filter((row) => row.firstAgentId === key.saleStoreId)
// setOtherSaleStoreList(newOtherSaleStoreList)
let url = `/api/object/saleStore/${key.saleStoreId}/list?firstFlg=0&userId=${session?.userId}`
let otherList
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([])
}
})
} else {
//X
setSelOptions('')

View File

@ -87,10 +87,10 @@ export default function PlanRequestPop(props) {
const onSubmit = (page, type) => {
//2 201X112
const params = {
saleStoreId: 'T100',
saleStoreLevel: '1',
// saleStoreId: props?.otherSaleStoreId ? props.otherSaleStoreId : props.saleStoreId,
// saleStoreLevel: props?.otherSaleStoreLevel ? props.otherSaleStoreLevel : props.saleStoreLevel,
// saleStoreId: 'T100',
// saleStoreLevel: '1',
saleStoreId: props?.otherSaleStoreId ? props.otherSaleStoreId : props.saleStoreId,
saleStoreLevel: props?.otherSaleStoreLevel ? props.otherSaleStoreLevel : props.saleStoreLevel,
schPlanReqNo: schPlanReqNo,
schTitle: schTitle,
schAddress: schAddress,
@ -98,8 +98,8 @@ export default function PlanRequestPop(props) {
schPlanReqName: schPlanReqName,
schPlanStatCd: schPlanStatCd,
schDateGbn: schDateGbn,
// schStartDt: dayjs(startDate).format('YYYY-MM-DD'),
// schEndDt: dayjs(endDate).format('YYYY-MM-DD'),
schStartDt: dayjs(startDate).format('YYYY-MM-DD'),
schEndDt: dayjs(endDate).format('YYYY-MM-DD'),
startRow: type === 'S' ? (1 - 1) * pageSize + 1 : (page - 1) * pageSize + 1,
endRow: type === 'S' ? 1 * pageSize : page * pageSize,
}