물건현황

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

View File

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