견적서 & 발전시뮬레이션 이동 관련 pid 셋팅
This commit is contained in:
parent
5e62a3492f
commit
eac19c7620
@ -44,6 +44,7 @@ import JA from '@/locales/ja.json'
|
||||
import { MENU } from '@/common/common'
|
||||
|
||||
import { QcastContext } from '@/app/QcastProvider'
|
||||
|
||||
export default function CanvasMenu(props) {
|
||||
const { menuNumber, setMenuNumber } = props
|
||||
const pathname = usePathname()
|
||||
@ -101,6 +102,8 @@ export default function CanvasMenu(props) {
|
||||
|
||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||
|
||||
//임시
|
||||
const { selectedPlan } = usePlan()
|
||||
const handleExcelPdfFileDown = async (donwloadType, drawingFlg) => {
|
||||
const url = '/api/estimate/excel-download'
|
||||
|
||||
@ -168,14 +171,14 @@ export default function CanvasMenu(props) {
|
||||
break
|
||||
case 5:
|
||||
// let pid = urlParams.get('pid')
|
||||
promiseGet({ url: `/api/estimate/${objectNo}/${pid}/detail` }).then((res) => {
|
||||
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.ordering}/detail` }).then((res) => {
|
||||
if (res.status === 200) {
|
||||
const estimateDetail = res.data
|
||||
if (estimateDetail.docNo) {
|
||||
if (estimateDetail.tempFlg === '0' && estimateDetail.estimateDate !== null) {
|
||||
setMenuNumber(menu.index)
|
||||
setCurrentMenu(menu.title)
|
||||
setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
|
||||
router.push(`/floor-plan/estimate/5?pid=${pid}&objectNo=${objectNo}`)
|
||||
router.push(`/floor-plan/estimate/${menu.index}?pid=${selectedPlan.ordering}&objectNo=${objectNo}`)
|
||||
} else {
|
||||
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
||||
}
|
||||
@ -183,13 +186,14 @@ export default function CanvasMenu(props) {
|
||||
})
|
||||
break
|
||||
case 6:
|
||||
promiseGet({ url: `/api/estimate/${objectNo}/${pid}/detail` }).then((res) => {
|
||||
promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.ordering}/detail` }).then((res) => {
|
||||
if (res.status === 200) {
|
||||
const estimateDetail = res.data
|
||||
//docno tempFlg0
|
||||
if (estimateDetail.docNo) {
|
||||
setMenuNumber(menu.index)
|
||||
setCurrentMenu(menu.title)
|
||||
router.push(`/floor-plan/simulator/${menu.index}?pid=${pid}&objectNo=${objectNo}`)
|
||||
router.push(`/floor-plan/simulator/${menu.index}?pid=${selectedPlan.ordering}&objectNo=${objectNo}`)
|
||||
} else {
|
||||
swalFire({ text: getMessage('simulator.menu.move.valid1') })
|
||||
}
|
||||
|
||||
@ -215,7 +215,6 @@ export function usePlan(params = {}) {
|
||||
const estimateDetail = res.data
|
||||
if (pathname === '/floor-plan/estimate/5') {
|
||||
if (estimateDetail.tempFlg === '0' && estimateDetail.estimateDate !== null) {
|
||||
console.log('이동')
|
||||
res.data.resetFlag = 'N'
|
||||
|
||||
if (res.data.itemList.length > 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user