견적서 버튼
This commit is contained in:
parent
434637251a
commit
eae1a48d05
@ -85,6 +85,7 @@ export default function CanvasMenu(props) {
|
|||||||
const selectedRoofMaterial = useRecoilValue(selectedRoofMaterialSelector)
|
const selectedRoofMaterial = useRecoilValue(selectedRoofMaterialSelector)
|
||||||
|
|
||||||
//견적서버튼 노출용
|
//견적서버튼 노출용
|
||||||
|
const [buttonStyle, setButtonStyle] = useState('') //시연용 원복
|
||||||
const [buttonStyle1, setButtonStyle1] = useState('') //문서 다운로드 버튼
|
const [buttonStyle1, setButtonStyle1] = useState('') //문서 다운로드 버튼
|
||||||
const [buttonStyle2, setButtonStyle2] = useState('') //저장 버튼
|
const [buttonStyle2, setButtonStyle2] = useState('') //저장 버튼
|
||||||
const [buttonStyle3, setButtonStyle3] = useState('') //초기화 버튼
|
const [buttonStyle3, setButtonStyle3] = useState('') //초기화 버튼
|
||||||
@ -318,32 +319,33 @@ export default function CanvasMenu(props) {
|
|||||||
if (isObjectNotEmpty(estimateRecoilState)) {
|
if (isObjectNotEmpty(estimateRecoilState)) {
|
||||||
if (estimateRecoilState?.createUser === 'T01') {
|
if (estimateRecoilState?.createUser === 'T01') {
|
||||||
if (sessionState.userId !== 'T01') {
|
if (sessionState.userId !== 'T01') {
|
||||||
setButtonStyle1('none')
|
setButtonStyle('none')
|
||||||
setButtonStyle2('none')
|
// setButtonStyle1('none')
|
||||||
setButtonStyle3('none')
|
// setButtonStyle2('none')
|
||||||
setButtonStyle4('none')
|
// setButtonStyle3('none')
|
||||||
setButtonStyle5('none')
|
// setButtonStyle4('none')
|
||||||
|
// setButtonStyle5('none')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (estimateRecoilState?.tempFlg === '1') {
|
if (estimateRecoilState?.tempFlg === '1') {
|
||||||
setButtonStyle1('none')
|
// setButtonStyle1('none')
|
||||||
setButtonStyle2('')
|
// setButtonStyle2('')
|
||||||
setButtonStyle3('none')
|
// setButtonStyle3('none')
|
||||||
setButtonStyle4('none')
|
// setButtonStyle4('none')
|
||||||
setButtonStyle5('none')
|
// setButtonStyle5('none')
|
||||||
} else {
|
} else {
|
||||||
if (estimateRecoilState?.tempFlg === '0' && estimateRecoilState?.lockFlg === '0') {
|
if (estimateRecoilState?.tempFlg === '0' && estimateRecoilState?.lockFlg === '0') {
|
||||||
setButtonStyle1('')
|
// setButtonStyle1('')
|
||||||
setButtonStyle2('')
|
// setButtonStyle2('')
|
||||||
setButtonStyle3('')
|
// setButtonStyle3('')
|
||||||
setButtonStyle4('')
|
// setButtonStyle4('')
|
||||||
setButtonStyle5('')
|
// setButtonStyle5('')
|
||||||
} else {
|
} else {
|
||||||
setButtonStyle1('')
|
// setButtonStyle1('')
|
||||||
setButtonStyle2('none')
|
// setButtonStyle2('none')
|
||||||
setButtonStyle3('none')
|
// setButtonStyle3('none')
|
||||||
setButtonStyle4('')
|
// setButtonStyle4('')
|
||||||
setButtonStyle5('')
|
// setButtonStyle5('')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -417,11 +419,11 @@ export default function CanvasMenu(props) {
|
|||||||
|
|
||||||
// 문서다운로드 팝업에서 다운로드 하면 문서 잠금
|
// 문서다운로드 팝업에서 다운로드 하면 문서 잠금
|
||||||
const docDownPopLockFlg = () => {
|
const docDownPopLockFlg = () => {
|
||||||
setButtonStyle1('')
|
// setButtonStyle1('')
|
||||||
setButtonStyle2('none')
|
// setButtonStyle2('none')
|
||||||
setButtonStyle3('none')
|
// setButtonStyle3('none')
|
||||||
setButtonStyle4('')
|
// setButtonStyle4('')
|
||||||
setButtonStyle5('')
|
// setButtonStyle5('')
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -510,17 +512,20 @@ export default function CanvasMenu(props) {
|
|||||||
{menuNumber === 5 && (
|
{menuNumber === 5 && (
|
||||||
<>
|
<>
|
||||||
<div className="ico-btn-from">
|
<div className="ico-btn-from">
|
||||||
<button type="button" style={{ display: buttonStyle1 }} className="btn-frame gray ico-flx" onClick={() => setEstimatePopupOpen(true)}>
|
<button className="btn-frame gray ico-flx" onClick={() => setEstimatePopupOpen(true)}>
|
||||||
|
{/* <button type="button" style={{ display: buttonStyle1 }} className="btn-frame gray ico-flx" onClick={() => setEstimatePopupOpen(true)}> */}
|
||||||
<span className="ico ico01"></span>
|
<span className="ico ico01"></span>
|
||||||
<span className="name">{getMessage('plan.menu.estimate.docDown')}</span>
|
<span className="name">{getMessage('plan.menu.estimate.docDown')}</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" style={{ display: buttonStyle2 }} className="btn-frame gray ico-flx" onClick={handleEstimateSubmit}>
|
{/* <button type="button" style={{ display: buttonStyle2 }} className="btn-frame gray ico-flx" onClick={handleEstimateSubmit}> */}
|
||||||
|
<button type="button" style={{ display: buttonStyle }} className="btn-frame gray ico-flx" onClick={handleEstimateSubmit}>
|
||||||
<span className="ico ico02"></span>
|
<span className="ico ico02"></span>
|
||||||
<span className="name">{getMessage('plan.menu.estimate.save')}</span>
|
<span className="name">{getMessage('plan.menu.estimate.save')}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
style={{ display: buttonStyle3 }}
|
// style={{ display: buttonStyle3 }}
|
||||||
|
style={{ display: buttonStyle }}
|
||||||
className="btn-frame gray ico-flx"
|
className="btn-frame gray ico-flx"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
handleEstimateReset()
|
handleEstimateReset()
|
||||||
@ -533,7 +538,8 @@ export default function CanvasMenu(props) {
|
|||||||
{estimateRecoilState?.docNo !== null && (sessionState.storeId === 'T01' || sessionState.storeLvl === '1') && (
|
{estimateRecoilState?.docNo !== null && (sessionState.storeId === 'T01' || sessionState.storeLvl === '1') && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
style={{ display: buttonStyle4 }}
|
// style={{ display: buttonStyle4 }}
|
||||||
|
style={{ display: buttonStyle }}
|
||||||
className="btn-frame gray ico-flx"
|
className="btn-frame gray ico-flx"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setEstimateCopyPopupOpen(true)
|
setEstimateCopyPopupOpen(true)
|
||||||
@ -545,7 +551,8 @@ export default function CanvasMenu(props) {
|
|||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
style={{ display: buttonStyle5 }}
|
// style={{ display: buttonStyle5 }}
|
||||||
|
style={{ display: buttonStyle }}
|
||||||
className="btn-frame gray ico-flx"
|
className="btn-frame gray ico-flx"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
//시연준비
|
//시연준비
|
||||||
|
|||||||
@ -123,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', cursor: 'pointer' },
|
cellStyle: { alignItems: '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', cursor: 'pointer' },
|
cellStyle: { alignItems: 'center', cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
//1일때만 동그라미
|
//1일때만 동그라미
|
||||||
let orderFlg
|
let orderFlg
|
||||||
@ -142,31 +142,30 @@ 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' /* 좌측정렬*/, cursor: 'pointer' },
|
cellStyle: { alignItems: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
// cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
// let origin = params.value
|
let origin = params.value
|
||||||
// console.log('모듈:::', origin)
|
if (origin !== null) {
|
||||||
// if (origin !== null) {
|
return (
|
||||||
// return (
|
<>
|
||||||
// <>
|
{origin?.split('、').map((it, idx) => (
|
||||||
// {origin?.split('、').map((it, idx) => (
|
<span key={idx} className="block">
|
||||||
// <span key={idx} className="block">
|
{it}
|
||||||
// {it}
|
<br />
|
||||||
// <br />
|
</span>
|
||||||
// </span>
|
))}
|
||||||
// ))}
|
</>
|
||||||
// </>
|
)
|
||||||
// )
|
} else {
|
||||||
// } else {
|
return null
|
||||||
// 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' /* 우측정렬*/, cursor: 'pointer' },
|
cellStyle: { alignItems: 'flex-end' /* 우측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
let capacity
|
let capacity
|
||||||
@ -185,7 +184,7 @@ export default function StuffDetail() {
|
|||||||
width: 140,
|
width: 140,
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
cellStyle: { alignItems: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
@ -209,7 +208,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' /* 좌측정렬*/, cursor: 'pointer' },
|
cellStyle: { alignItems: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
@ -233,7 +232,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' /* 좌측정렬*/, cursor: 'pointer' },
|
cellStyle: { alignItems: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
@ -258,7 +257,7 @@ export default function StuffDetail() {
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
wrapText: true,
|
wrapText: true,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
cellStyle: { alignItems: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let origin = params.value
|
let origin = params.value
|
||||||
if (origin !== null) {
|
if (origin !== null) {
|
||||||
@ -1586,16 +1585,22 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
// 그리드 더블 클릭
|
// 그리드 더블 클릭
|
||||||
const getCellDoubleClicked = (params) => {
|
const getCellDoubleClicked = (params) => {
|
||||||
if (params.data.estimateDate != null) {
|
// if (params.data.estimateDate != null) {
|
||||||
if (params?.column?.colId !== 'estimateDate') {
|
if (params?.column?.colId !== 'estimateDate') {
|
||||||
if (params?.data?.planNo && params?.data?.objectNo) {
|
if (params?.data?.planNo && params?.data?.objectNo) {
|
||||||
setIsGlobalLoading(true)
|
// 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}`)
|
|
||||||
|
const param = {
|
||||||
|
pid: planNo,
|
||||||
|
objectNo: objectNo,
|
||||||
}
|
}
|
||||||
|
const url = `/floor-plan?${queryStringFormatter(param)}`
|
||||||
|
router.push(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user