물건수정
This commit is contained in:
parent
1ceaebfa60
commit
e5c84aa13a
@ -563,7 +563,8 @@ export default function Estimate({}) {
|
|||||||
//주택PKG input 변경
|
//주택PKG input 변경
|
||||||
const onChangePkgAsp = (value) => {
|
const onChangePkgAsp = (value) => {
|
||||||
if (estimateContextState.estimateType === 'YJSS') {
|
if (estimateContextState.estimateType === 'YJSS') {
|
||||||
let newValue = value.replace(/[^0-9.]/g, '')
|
// let newValue = value.replace(/[^0-9.]/g, '')
|
||||||
|
let newValue = (value || '0').replace(/[^0-9.]/g, '')
|
||||||
if (newValue.length > 1) {
|
if (newValue.length > 1) {
|
||||||
newValue = newValue.replace(/(^0+)/, '')
|
newValue = newValue.replace(/(^0+)/, '')
|
||||||
if (newValue.length === 0) {
|
if (newValue.length === 0) {
|
||||||
|
|||||||
@ -195,7 +195,7 @@ export default function CanvasMenu(props) {
|
|||||||
setCurrentMenu(menu.title)
|
setCurrentMenu(menu.title)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathname !== '/floor-plan' && pathname !== '/floor-plan/estimate/5') {
|
if (pathname !== '/floor-plan' && pathname !== '/floor-plan/estimate/5' && pathname !== '/floor-plan/simulator/6') {
|
||||||
router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)
|
router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { globalLocaleStore } from '@/store/localeAtom'
|
|||||||
import { isEmptyArray, isNotEmptyArray, isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
|
import { isEmptyArray, isNotEmptyArray, isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { useForm } from 'react-hook-form'
|
import { useForm } from 'react-hook-form'
|
||||||
import { useRecoilValue, useSetRecoilState, useResetRecoilState } from 'recoil'
|
import { useRecoilValue, useSetRecoilState, useResetRecoilState, useRecoilState } from 'recoil'
|
||||||
import { SessionContext } from '@/app/SessionProvider'
|
import { SessionContext } from '@/app/SessionProvider'
|
||||||
import FindAddressPop from './popup/FindAddressPop'
|
import FindAddressPop from './popup/FindAddressPop'
|
||||||
import PlanRequestPop from './popup/PlanRequestPop'
|
import PlanRequestPop from './popup/PlanRequestPop'
|
||||||
@ -23,7 +23,12 @@ import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
|||||||
import DocDownOptionPop from '../estimate/popup/DocDownOptionPop'
|
import DocDownOptionPop from '../estimate/popup/DocDownOptionPop'
|
||||||
import { stuffSearchState } from '@/store/stuffAtom'
|
import { stuffSearchState } from '@/store/stuffAtom'
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
|
||||||
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
|
||||||
export default function StuffDetail() {
|
export default function StuffDetail() {
|
||||||
|
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
|
||||||
|
const { swalFire } = useSwal()
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
const resetStuffRecoil = useResetRecoilState(stuffSearchState)
|
const resetStuffRecoil = useResetRecoilState(stuffSearchState)
|
||||||
const stuffSearchParams = useRecoilValue(stuffSearchState)
|
const stuffSearchParams = useRecoilValue(stuffSearchState)
|
||||||
@ -118,13 +123,13 @@ export default function StuffDetail() {
|
|||||||
field: 'planNo',
|
field: 'planNo',
|
||||||
headerName: getMessage('stuff.detail.planGridHeader.planNo'),
|
headerName: getMessage('stuff.detail.planGridHeader.planNo'),
|
||||||
width: 100,
|
width: 100,
|
||||||
cellStyle: { justifyContent: 'center' },
|
cellStyle: { justifyContent: 'center', cursor: 'pointer' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'orderFlg',
|
field: 'orderFlg',
|
||||||
headerName: getMessage('stuff.detail.planGridHeader.orderFlg'),
|
headerName: getMessage('stuff.detail.planGridHeader.orderFlg'),
|
||||||
width: 80,
|
width: 80,
|
||||||
cellStyle: { justifyContent: 'center' },
|
cellStyle: { justifyContent: 'center', cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
//1일때만 동그라미
|
//1일때만 동그라미
|
||||||
let orderFlg
|
let orderFlg
|
||||||
@ -137,13 +142,31 @@ export default function StuffDetail() {
|
|||||||
headerName: getMessage('stuff.detail.planGridHeader.moduleModel'),
|
headerName: getMessage('stuff.detail.planGridHeader.moduleModel'),
|
||||||
flex: 1,
|
flex: 1,
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/ },
|
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
|
// cellRenderer: (params) => {
|
||||||
|
// let origin = params.value
|
||||||
|
// console.log('모듈:::', origin)
|
||||||
|
// if (origin !== null) {
|
||||||
|
// return (
|
||||||
|
// <>
|
||||||
|
// {origin?.split('、').map((it, idx) => (
|
||||||
|
// <span key={idx} className="block">
|
||||||
|
// {it}
|
||||||
|
// <br />
|
||||||
|
// </span>
|
||||||
|
// ))}
|
||||||
|
// </>
|
||||||
|
// )
|
||||||
|
// } else {
|
||||||
|
// return null
|
||||||
|
// }
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'capacity',
|
field: 'capacity',
|
||||||
headerName: getMessage('stuff.detail.planGridHeader.capacity'),
|
headerName: getMessage('stuff.detail.planGridHeader.capacity'),
|
||||||
width: 120,
|
width: 120,
|
||||||
cellStyle: { justifyContent: 'flex-end' /* 우측정렬*/ },
|
cellStyle: { justifyContent: 'flex-end' /* 우측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
let capacity
|
let capacity
|
||||||
@ -162,9 +185,8 @@ export default function StuffDetail() {
|
|||||||
width: 140,
|
width: 140,
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/ },
|
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
//콤마가 아니라 、.. 일본콤마?
|
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
return (
|
return (
|
||||||
@ -187,7 +209,7 @@ export default function StuffDetail() {
|
|||||||
headerName: getMessage('stuff.detail.planGridHeader.constructSpecificationMulti'),
|
headerName: getMessage('stuff.detail.planGridHeader.constructSpecificationMulti'),
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/ },
|
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
@ -211,7 +233,7 @@ export default function StuffDetail() {
|
|||||||
headerName: getMessage('stuff.detail.planGridHeader.supportMethodIdMulti'),
|
headerName: getMessage('stuff.detail.planGridHeader.supportMethodIdMulti'),
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/ },
|
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
@ -236,7 +258,7 @@ export default function StuffDetail() {
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/ },
|
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
@ -325,13 +347,10 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
// console.log(res.data.createUser)
|
|
||||||
// console.log(session)
|
|
||||||
if (res?.data?.createUser === 'T01' && session?.userId !== 'T01') {
|
if (res?.data?.createUser === 'T01' && session?.userId !== 'T01') {
|
||||||
//createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기
|
//createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기
|
||||||
setShowButton('none')
|
setShowButton('none')
|
||||||
}
|
}
|
||||||
// console.log('상세::', res.data)
|
|
||||||
if (isObjectNotEmpty(res.data)) {
|
if (isObjectNotEmpty(res.data)) {
|
||||||
let surfaceTypeValue
|
let surfaceTypeValue
|
||||||
if (res.data.surfaceType === 'Ⅲ・Ⅳ') {
|
if (res.data.surfaceType === 'Ⅲ・Ⅳ') {
|
||||||
@ -342,8 +361,13 @@ export default function StuffDetail() {
|
|||||||
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
|
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
|
||||||
} else {
|
} else {
|
||||||
setManagementState({})
|
setManagementState({})
|
||||||
alert(getMessage('stuff.detail.header.notExistObjectNo'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.header.notExistObjectNo'),
|
||||||
|
type: 'alert',
|
||||||
|
confirmFn: () => {
|
||||||
router.push('/management/stuff', { scroll: false })
|
router.push('/management/stuff', { scroll: false })
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (isNotEmptyArray(res.data.planList)) {
|
if (isNotEmptyArray(res.data.planList)) {
|
||||||
setPlanGridProps({ ...planGridProps, planGridData: res.data.planList })
|
setPlanGridProps({ ...planGridProps, planGridData: res.data.planList })
|
||||||
@ -354,8 +378,13 @@ export default function StuffDetail() {
|
|||||||
setManagementState({})
|
setManagementState({})
|
||||||
setPlanGridProps({ ...planGridProps, planGridData: [] })
|
setPlanGridProps({ ...planGridProps, planGridData: [] })
|
||||||
|
|
||||||
alert(getMessage('stuff.detail.header.notExistObjectNo'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.header.notExistObjectNo'),
|
||||||
|
type: 'alert',
|
||||||
|
confirmFn: () => {
|
||||||
router.push('/management/stuff', { scroll: false })
|
router.push('/management/stuff', { scroll: false })
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -923,9 +952,6 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
//팝업에서 넘어온 설계의뢰 정보로 바꾸기
|
//팝업에서 넘어온 설계의뢰 정보로 바꾸기
|
||||||
const setPlanReqInfo = (info) => {
|
const setPlanReqInfo = (info) => {
|
||||||
// console.log('session 정보:::::::', session)
|
|
||||||
// console.log('설계의뢰에서 넘어온 정보:::::::', info)
|
|
||||||
|
|
||||||
form.setValue('planReqNo', info.planReqNo)
|
form.setValue('planReqNo', info.planReqNo)
|
||||||
|
|
||||||
form.setValue('objectStatusId', info.building)
|
form.setValue('objectStatusId', info.building)
|
||||||
@ -1118,7 +1144,7 @@ export default function StuffDetail() {
|
|||||||
const onSearchDesignRequestPopOpen = () => {
|
const onSearchDesignRequestPopOpen = () => {
|
||||||
const saleStoreId = form.watch('saleStoreId')
|
const saleStoreId = form.watch('saleStoreId')
|
||||||
if (saleStoreId === '') {
|
if (saleStoreId === '') {
|
||||||
alert(getMessage('stuff.planReqPopup.error.message2'))
|
swalFire({ text: getMessage('stuff.planReqPopup.error.message2'), type: 'alert' })
|
||||||
} else {
|
} else {
|
||||||
setShowDesignRequestButtonValid(true)
|
setShowDesignRequestButtonValid(true)
|
||||||
}
|
}
|
||||||
@ -1128,7 +1154,7 @@ export default function StuffDetail() {
|
|||||||
const onSearchWindSpeedPopOpen = () => {
|
const onSearchWindSpeedPopOpen = () => {
|
||||||
const prefName = form.watch('prefName')
|
const prefName = form.watch('prefName')
|
||||||
if (prefName === '') {
|
if (prefName === '') {
|
||||||
alert(getMessage('stuff.windSelectPopup.error.message1'))
|
swalFire({ text: getMessage('stuff.windSelectPopup.error.message1'), type: 'alert' })
|
||||||
} else {
|
} else {
|
||||||
setShowWindSpeedButtonValid(true)
|
setShowWindSpeedButtonValid(true)
|
||||||
}
|
}
|
||||||
@ -1219,7 +1245,7 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Object.keys(errors).length > 0) {
|
if (Object.keys(errors).length > 0) {
|
||||||
return alert(getMessage('stuff.detail.save.valierror3', [errors]))
|
return swalFire({ text: getMessage('stuff.detail.save.valierror3', [errors]), type: 'alert' })
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiUrl = '/api/object/save-object'
|
const apiUrl = '/api/object/save-object'
|
||||||
@ -1259,10 +1285,10 @@ export default function StuffDetail() {
|
|||||||
let height = params.installHeight
|
let height = params.installHeight
|
||||||
|
|
||||||
if (snow === '0') {
|
if (snow === '0') {
|
||||||
return alert(getMessage('stuff.detail.save.valierror1'))
|
return swalFire({ text: getMessage('stuff.detail.save.valierror1'), type: 'alert' })
|
||||||
}
|
}
|
||||||
if (height === '0') {
|
if (height === '0') {
|
||||||
return alert(getMessage('stuff.detail.save.valierror2'))
|
return swalFire({ text: getMessage('stuff.detail.save.valierror2'), type: 'alert' })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (managementState) {
|
if (managementState) {
|
||||||
@ -1316,50 +1342,65 @@ export default function StuffDetail() {
|
|||||||
delete params_sort.workName
|
delete params_sort.workName
|
||||||
|
|
||||||
if (Object.entries(detail_sort).toString() === Object.entries(params_sort).toString()) {
|
if (Object.entries(detail_sort).toString() === Object.entries(params_sort).toString()) {
|
||||||
return alert(getMessage('stuff.detail.noChgData'))
|
return swalFire({ text: getMessage('stuff.detail.noChgData'), type: 'alert' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params?.receiveUser !== '') {
|
if (params?.receiveUser !== '') {
|
||||||
if (params?.receiveUser.trim().length > 10) {
|
if (params?.receiveUser.trim().length > 10) {
|
||||||
return alert(getMessage('stuff.detail.tempSave.message2'))
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//로그인이 2차점인데 otherSaleStoreId가 없으면 알럿
|
//로그인이 2차점인데 otherSaleStoreId가 없으면 알럿
|
||||||
if (session.storeLvl !== '1') {
|
if (session.storeLvl !== '1') {
|
||||||
if (params.saleStoreLevel === '1') {
|
if (params.saleStoreLevel === '1') {
|
||||||
return alert(getMessage('stuff.detail.tempSave.message4'))
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message4'), type: 'alert' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editMode === 'NEW') {
|
if (editMode === 'NEW') {
|
||||||
await promisePost({ url: apiUrl, data: params })
|
await promisePost({ url: apiUrl, data: params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
setIsGlobalLoading(true)
|
||||||
//상세화면으로 전환
|
//상세화면으로 전환
|
||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
alert(getMessage('stuff.detail.save'))
|
|
||||||
setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
|
setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
|
||||||
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.save'),
|
||||||
|
type: 'alert',
|
||||||
|
confirmFn: () => {
|
||||||
|
setIsGlobalLoading(false)
|
||||||
|
|
||||||
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('error::::::', error)
|
console.log('error::::::', error)
|
||||||
alert(error?.response.data.message)
|
setIsGlobalLoading(false)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// 수정모드일때는 PUT
|
// 수정모드일때는 PUT
|
||||||
// await promisePut({ url: apiUrl, data: params }).then((res) => {
|
|
||||||
await promisePut({ url: apiUrl, data: params })
|
await promisePut({ url: apiUrl, data: params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
setIsGlobalLoading(true)
|
||||||
|
|
||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
|
setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
|
||||||
alert(getMessage('stuff.detail.save'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.save'),
|
||||||
|
type: 'alert',
|
||||||
|
confirmFn: () => {
|
||||||
|
setIsGlobalLoading(false)
|
||||||
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('error::::::', error)
|
console.log('error::::::', error)
|
||||||
alert(error?.response.data.message)
|
setIsGlobalLoading(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1406,7 +1447,7 @@ export default function StuffDetail() {
|
|||||||
// 담당자 자리수 체크
|
// 담당자 자리수 체크
|
||||||
if (params?.receiveUser !== '') {
|
if (params?.receiveUser !== '') {
|
||||||
if (params?.receiveUser.trim().length > 10) {
|
if (params?.receiveUser.trim().length > 10) {
|
||||||
return alert(getMessage('stuff.detail.tempSave.message2'))
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1414,26 +1455,40 @@ export default function StuffDetail() {
|
|||||||
if (objectNo) {
|
if (objectNo) {
|
||||||
await promisePut({ url: apiUrl, data: params })
|
await promisePut({ url: apiUrl, data: params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
setIsGlobalLoading(true)
|
||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
alert(getMessage('stuff.detail.tempSave.message1'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.tempSave.message1'),
|
||||||
|
type: 'alert',
|
||||||
|
confirmFn: () => {
|
||||||
|
setIsGlobalLoading(false)
|
||||||
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
setIsGlobalLoading(false)
|
||||||
console.log('error::::::', error)
|
console.log('error::::::', error)
|
||||||
alert(error?.response.data.message)
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await promisePost({ url: apiUrl, data: params })
|
await promisePost({ url: apiUrl, data: params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
setIsGlobalLoading(true)
|
||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
alert(getMessage('stuff.detail.tempSave.message1'))
|
swalFire({
|
||||||
|
text: getMessage('stuff.detail.tempSave.message1'),
|
||||||
|
type: 'alert',
|
||||||
|
confirmFn: () => {
|
||||||
|
setIsGlobalLoading(false)
|
||||||
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('error::::::', error)
|
console.log('error::::::', error)
|
||||||
alert(error?.response.data.message)
|
setIsGlobalLoading(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1445,25 +1500,63 @@ export default function StuffDetail() {
|
|||||||
userId: session.userId,
|
userId: session.userId,
|
||||||
}
|
}
|
||||||
if (specificationConfirmDate != null) {
|
if (specificationConfirmDate != null) {
|
||||||
alert(getMessage('stuff.detail.delete.message1'))
|
swalFire({ text: getMessage('stuff.detail.delete.message1'), type: 'alert' })
|
||||||
} else {
|
} else {
|
||||||
if (confirm(getMessage('common.message.data.delete'))) {
|
swalFire({
|
||||||
// setIsGlobalLoading(true)
|
text: getMessage('common.message.data.delete'),
|
||||||
|
type: 'confirm',
|
||||||
|
confirmFn: () => {
|
||||||
|
setFloorPlanObjectNo({ floorPlanObjectNo: '' })
|
||||||
del({ url: `/api/object/${objectNo}?${queryStringFormatter(delParams)}` })
|
del({ url: `/api/object/${objectNo}?${queryStringFormatter(delParams)}` })
|
||||||
.then(() => {
|
.then((res) => {
|
||||||
|
setIsGlobalLoading(true)
|
||||||
setFloorPlanObjectNo({ floorPlanObjectNo: '' })
|
setFloorPlanObjectNo({ floorPlanObjectNo: '' })
|
||||||
if (session.storeId === 'T01') {
|
if (session.storeId === 'T01') {
|
||||||
stuffSearchParams.code = 'DELETE'
|
stuffSearchParams.code = 'DELETE'
|
||||||
} else {
|
} else {
|
||||||
resetStuffRecoil()
|
if (session.storeLvl === '1') {
|
||||||
|
stuffSearch.schObjectNo = ''
|
||||||
|
stuffSearch.schAddress = ''
|
||||||
|
stuffSearch.schObjectName = ''
|
||||||
|
stuffSearch.schSaleStoreName = ''
|
||||||
|
stuffSearch.schReceiveUser = ''
|
||||||
|
stuffSearch.schDispCompanyName = ''
|
||||||
|
stuffSearch.schDateType = 'U'
|
||||||
|
stuffSearch.schTempFlg = ''
|
||||||
|
stuffSearch.schMyDataCheck = false
|
||||||
|
stuffSearch.startRow = 1
|
||||||
|
stuffSearch.endRow = 100
|
||||||
|
stuffSearch.schSortType = 'U'
|
||||||
|
stuffSearch.pageNo = 1
|
||||||
|
stuffSearch.pageSize = 100
|
||||||
|
stuffSearch.code = 'S'
|
||||||
|
} else {
|
||||||
|
stuffSearch.schObjectNo = ''
|
||||||
|
stuffSearch.schAddress = ''
|
||||||
|
stuffSearch.schObjectName = ''
|
||||||
|
stuffSearch.schSaleStoreName = ''
|
||||||
|
stuffSearch.schReceiveUser = ''
|
||||||
|
stuffSearch.schDispCompanyName = ''
|
||||||
|
stuffSearch.schDateType = 'U'
|
||||||
|
stuffSearch.schTempFlg = ''
|
||||||
|
stuffSearch.schMyDataCheck = false
|
||||||
|
stuffSearch.startRow = 1
|
||||||
|
stuffSearch.endRow = 100
|
||||||
|
stuffSearch.schSortType = 'U'
|
||||||
|
stuffSearch.pageNo = 1
|
||||||
|
stuffSearch.pageSize = 100
|
||||||
|
stuffSearch.code = 'S'
|
||||||
}
|
}
|
||||||
// setIsGlobalLoading(false)
|
}
|
||||||
|
setIsGlobalLoading(false)
|
||||||
router.push('/management/stuff', { scroll: false })
|
router.push('/management/stuff', { scroll: false })
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch((error) => {
|
||||||
// setIsGlobalLoading(false)
|
console.log('error::::::', error)
|
||||||
|
setIsGlobalLoading(false)
|
||||||
|
})
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1491,15 +1584,17 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
// 그리드 더블 클릭
|
// 그리드 더블 클릭
|
||||||
const getCellDoubleClicked = (params) => {
|
const getCellDoubleClicked = (params) => {
|
||||||
|
if (params.data.estimateDate != null) {
|
||||||
if (params?.column?.colId !== 'estimateDate') {
|
if (params?.column?.colId !== 'estimateDate') {
|
||||||
setIsGlobalLoading(true)
|
|
||||||
if (params?.data?.planNo && params?.data?.objectNo) {
|
if (params?.data?.planNo && params?.data?.objectNo) {
|
||||||
|
setIsGlobalLoading(true)
|
||||||
let objectNo = params?.data?.objectNo
|
let objectNo = params?.data?.objectNo
|
||||||
let planNo = params?.data?.planNo
|
let planNo = params?.data?.planNo
|
||||||
router.push(`/floor-plan/estimate/5?pid=${planNo}&objectNo=${objectNo}`)
|
router.push(`/floor-plan/estimate/5?pid=${planNo}&objectNo=${objectNo}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -343,7 +343,6 @@ export default function StuffSearchCondition() {
|
|||||||
} else {
|
} else {
|
||||||
if (session?.storeLvl === '2') {
|
if (session?.storeLvl === '2') {
|
||||||
if (otherSaleStoreList.length > 1) {
|
if (otherSaleStoreList.length > 1) {
|
||||||
// handleClear2()
|
|
||||||
setOtherSaleStoreId(session.storeId)
|
setOtherSaleStoreId(session.storeId)
|
||||||
stuffSearch.schOtherSelSaleStoreId = session.storeId
|
stuffSearch.schOtherSelSaleStoreId = session.storeId
|
||||||
stuffSearch.schObjectNo = ''
|
stuffSearch.schObjectNo = ''
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user