물건현황
This commit is contained in:
parent
7e598bcc13
commit
a63edd0249
@ -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('')
|
||||
|
||||
@ -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,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user