견적서 화면 상단 메뉴이동 관련 수정

This commit is contained in:
basssy 2025-01-16 17:54:56 +09:00
parent 461709f10d
commit 7c355d6cc4
6 changed files with 19 additions and 33 deletions

View File

@ -203,7 +203,11 @@ export default function CanvasMenu(props) {
setCurrentMenu(menu.title) setCurrentMenu(menu.title)
} }
if (pathname !== '/floor-plan') router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`) if (pathname !== '/floor-plan') {
if (menu.index !== 0) {
router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`)
}
}
} }
const changeSelectedRoofMaterial = (e) => { const changeSelectedRoofMaterial = (e) => {

View File

@ -304,6 +304,7 @@ export default function StuffDetail() {
//mid:5(), /pid: //mid:5(), /pid:
setFloorPlanObjectNo({ floorPlanObjectNo: params.data.objectNo }) setFloorPlanObjectNo({ floorPlanObjectNo: params.data.objectNo })
setIsGlobalLoading(true) setIsGlobalLoading(true)
setMenuNumber(5)
router.push(`/floor-plan/estimate/5?pid=${params.data.planNo}&objectNo=${params.data.objectNo}`) router.push(`/floor-plan/estimate/5?pid=${params.data.planNo}&objectNo=${params.data.objectNo}`)
}} }}
> >

View File

@ -40,8 +40,8 @@ export default function StuffSubHeader({ type }) {
if (isObjectNotEmpty(managementState)) { if (isObjectNotEmpty(managementState)) {
if (managementState.createUser === 'T01') { if (managementState.createUser === 'T01') {
if (session.userId !== 'T01') { if (session.userId !== 'T01') {
// #457 // #457 #474
// setButtonStyle('none') setButtonStyle('none')
} }
} }
} }

View File

@ -8,19 +8,12 @@ import SingleDatePicker from '@/components/common/datepicker/SingleDatePicker'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import PlanRequestPopQGrid from './PlanRequestPopQGrid' import PlanRequestPopQGrid from './PlanRequestPopQGrid'
import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils' import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
import { useCommonCode } from '@/hooks/common/useCommonCode'
import Select from 'react-select'
import QPagination from '@/components/common/pagination/QPagination' import QPagination from '@/components/common/pagination/QPagination'
export default function PlanRequestPop(props) { export default function PlanRequestPop(props) {
const [pageNo, setPageNo] = useState(1) // const [pageNo, setPageNo] = useState(1) //
const [pageSize, setPageSize] = useState(20) // const [pageSize, setPageSize] = useState(20) //
const [totalCount, setTotalCount] = useState(0) // const [totalCount, setTotalCount] = useState(0) //
//
const { commonCode, findCommonCode } = useCommonCode()
// const [planStatCdList, setPlanStatCdList] = useState([])
const globalLocaleState = useRecoilValue(globalLocaleStore) const globalLocaleState = useRecoilValue(globalLocaleStore)
const [planReqObject, setPlanReqObject] = useState({}) const [planReqObject, setPlanReqObject] = useState({})
@ -71,16 +64,6 @@ export default function PlanRequestPop(props) {
} }
} }
//
const onSelectionChange = (key) => {
if (isObjectNotEmpty(key)) {
setSchPlanStatCd(key.clCode)
} else {
//X
setSchPlanStatCd('')
}
}
// //
const onSubmit = (page, type) => { const onSubmit = (page, type) => {
const params = { const params = {
@ -194,7 +177,8 @@ export default function PlanRequestPop(props) {
{ {
field: 'title', field: 'title',
headerName: getMessage('stuff.planReqPopup.gridHeader.title'), headerName: getMessage('stuff.planReqPopup.gridHeader.title'),
minWidth: 150, minWidth: 250,
cellStyle: { textAlign: 'left' },
}, },
{ {
field: 'address1', field: 'address1',
@ -234,13 +218,6 @@ export default function PlanRequestPop(props) {
} }
} }
// useEffect(() => {
// const code1 = findCommonCode(115800) //
// if (code1 != null) {
// setPlanStatCdList(code1)
// }
// }, [commonCode])
useEffect(() => { useEffect(() => {
onSubmit(pageNo, 'S') onSubmit(pageNo, 'S')
}, []) }, [])
@ -431,9 +408,11 @@ export default function PlanRequestPop(props) {
</select> </select>
</div> </div>
</div> </div>
<PlanRequestPopQGrid {...gridProps} getSelectedRowdata={getSelectedRowdata} /> <div className="q-grid">
<div className="pagination-wrap"> <PlanRequestPopQGrid {...gridProps} getSelectedRowdata={getSelectedRowdata} />
<QPagination pageNo={pageNo} pageSize={pageSize} pagePerBlock={10} totalCount={totalCount} handleChangePage={handleChangePage} /> <div className="pagination-wrap">
<QPagination pageNo={pageNo} pageSize={pageSize} pagePerBlock={10} totalCount={totalCount} handleChangePage={handleChangePage} />
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -22,8 +22,8 @@ export default function PlanRequestPopQGrid(props) {
flex: 1, flex: 1,
minWidth: 100, minWidth: 100,
sortable: false, sortable: false,
suppressMovable: false, suppressMovable: true,
resizable: false, resizable: true,
suppressSizeToFit: false, suppressSizeToFit: false,
} }
}, []) }, [])
@ -58,6 +58,7 @@ export default function PlanRequestPopQGrid(props) {
defaultColDef={defaultColDef} defaultColDef={defaultColDef}
pagination={isPageable} pagination={isPageable}
onSelectionChanged={onSelectionChanged} onSelectionChanged={onSelectionChanged}
autoSizeAllColumns={true}
overlayNoRowsTemplate={`<span className="ag-overlay-loading-center">${getMessage('stuff.grid.noData')}</span>`} overlayNoRowsTemplate={`<span className="ag-overlay-loading-center">${getMessage('stuff.grid.noData')}</span>`}
/> />
</div> </div>

View File

@ -80,6 +80,7 @@ export const useEstimateController = (planNo) => {
res.data.pkgAsp = roundedNumber.toString() res.data.pkgAsp = roundedNumber.toString()
} }
setEstimateContextState(res.data) setEstimateContextState(res.data)
} }
} }