Compare commits
17 Commits
cf900c3e92
...
29ccf72c5e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29ccf72c5e | ||
|
|
4c219ddce9 | ||
|
|
ed721f36d0 | ||
|
|
30414568e0 | ||
| 06812b77af | |||
| bcc91e7609 | |||
| bdcacd5542 | |||
| 51e1f70c24 | |||
| 3c14f5de52 | |||
| 8f4e53c759 | |||
| a1871e105f | |||
| ed69943dc6 | |||
|
|
2897dc26e3 | ||
| 61f1036a24 | |||
|
|
08a29aec26 | ||
|
|
a742fc1f9c | ||
|
|
e2b8bc19b1 |
@ -717,7 +717,7 @@ export default function Estimate({}) {
|
||||
/* 케이블 select 변경시 */
|
||||
const onChangeDisplayCableItem = (value, itemList) => {
|
||||
itemList.map((item, index) => {
|
||||
if (item.dispCableFlg === '1') {
|
||||
if (item.dispCableFlg === '1' && item.itemTpCd !== 'M12') {
|
||||
if (value !== '') {
|
||||
onChangeDisplayItem(value, item.dispOrder, index, true)
|
||||
}
|
||||
@ -1146,7 +1146,7 @@ export default function Estimate({}) {
|
||||
dispCableFlgCnt++
|
||||
}
|
||||
|
||||
if (item.dispCableFlg === '1') {
|
||||
if (item.dispCableFlg === '1' && item.itemTpCd !== 'M12') {
|
||||
setCableItem(item.itemId)
|
||||
}
|
||||
}
|
||||
@ -1968,13 +1968,13 @@ export default function Estimate({}) {
|
||||
getOptionValue={(x) => x.clRefChr1}
|
||||
components={{
|
||||
SingleValue: ({ children, ...props }) => {
|
||||
return <components.SingleValue {...props}>{props.data.clRefChr3}</components.SingleValue>
|
||||
return <components.SingleValue {...props}>{(item.itemTpCd === 'M12')? item.itemName : props.data.clRefChr3}</components.SingleValue>
|
||||
},
|
||||
}}
|
||||
isClearable={false}
|
||||
isDisabled={true}
|
||||
value={cableItemList.filter(function (option) {
|
||||
return option.clRefChr1 === item.itemId
|
||||
return (item.itemTpCd === 'M12')? item.itemId : option.clRefChr1 === item.itemId
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -186,15 +186,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||
// return
|
||||
// }
|
||||
trestleRef.current.isComplete().then((res) => {
|
||||
if (!res) {
|
||||
Swal.fire({
|
||||
title: getMessage('construction.length.difference'),
|
||||
icon: 'warning',
|
||||
})
|
||||
return
|
||||
} else {
|
||||
// setTabNum(tabNum + 1)
|
||||
}
|
||||
if (!res) return
|
||||
})
|
||||
//물건정보 갱신일 수정
|
||||
} else {
|
||||
|
||||
@ -125,7 +125,7 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
setVerticalSnowCover(inputVerticalSnowCover)
|
||||
setSelectedSurfaceType(inputRoughness)
|
||||
setStandardWindSpeed(inputStandardWindSpeed)
|
||||
nextStep()
|
||||
nextStep(inputCompasDeg)
|
||||
setManagementState({
|
||||
...managementState,
|
||||
installHeight: inputInstallHeight,
|
||||
@ -175,15 +175,15 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
return
|
||||
}
|
||||
if (e === '0-') {
|
||||
setCompasDeg('-0')
|
||||
setInputCompasDeg('-0')
|
||||
return
|
||||
}
|
||||
if (Number(e) >= -180 && Number(e) <= 180) {
|
||||
if (numberCheck(Number(e))) {
|
||||
setCompasDeg(Number(e))
|
||||
setInputCompasDeg(Number(e))
|
||||
}
|
||||
} else {
|
||||
setCompasDeg(compasDeg)
|
||||
setInputCompasDeg(compasDeg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import { roofsState } from '@/store/roofAtom'
|
||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||
import { forwardRef, useContext, useEffect, useImperativeHandle, useRef, useState } from 'react'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import Swal from 'sweetalert2'
|
||||
|
||||
const Trestle = forwardRef((props, ref) => {
|
||||
const { tabNum, setTabNum, trestleTrigger, roofs, setRoofs, moduleSelectionData, setModuleSelectionData, setRoofsStore } = props
|
||||
@ -303,30 +304,122 @@ const Trestle = forwardRef((props, ref) => {
|
||||
})
|
||||
|
||||
let result = true
|
||||
newAddedRoofs.forEach((roof) => {
|
||||
if (!roof?.eavesMargin || !roof?.ridgeMargin || !roof?.kerabaMargin) result = false
|
||||
if (!roof.trestle?.trestleMkrCd) result = false
|
||||
if (!roof.trestle?.constMthdCd) result = false
|
||||
if (!roof.trestle?.roofBaseCd) result = false
|
||||
if (!roof.construction?.constTp) result = false
|
||||
console.log(newAddedRoofs)
|
||||
for (let i = 0; i < newAddedRoofs.length; i++) {
|
||||
const roof = newAddedRoofs[i]
|
||||
|
||||
if (!roof.trestle?.trestleMkrCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error1', [roof.nameJp]), // 가대메이커를 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (!roof.trestle?.constMthdCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error2', [roof.nameJp]), // 공법을 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
if (!roof.trestle?.roofBaseCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error3', [roof.nameJp]), // 지붕밑바탕탕을 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
if (!roof.construction?.constTp) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error4', [roof.nameJp]), // 시공법법을 선택해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (roof.lenAuth === 'C') {
|
||||
if (!roof.trestle?.length) result = false
|
||||
if (!roof.trestle?.length) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error5', [roof.nameJp]), // L 값을 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
}
|
||||
if (['C', 'R'].includes(roof.raftAuth)) {
|
||||
if (!roof?.raftBaseCd) result = false
|
||||
if (!roof?.raftBaseCd) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error6', [roof.nameJp]), // 서까래 간격을 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if (['C', 'R'].includes(roof.roofPchAuth)) {
|
||||
if (!roof?.roofPchBase) result = false
|
||||
if (!roof?.roofPchBase) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error7', [roof.nameJp]), // 하제비치를 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const newRoofs = newAddedRoofs.map((roof) => {
|
||||
const { addRoof, construction, trestle, trestleDetail, roofConstructions, ...rest } = roof
|
||||
return rest
|
||||
})
|
||||
if (!roof?.eavesMargin || !roof?.ridgeMargin || !roof?.kerabaMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error8', [roof.nameJp]), // 모듈 배치 영영 값을 입력해주세요.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (roof.trestle.trestleMkrCd !== 'NO_DATA') {
|
||||
// 가매 없음이 아닐때는 가대 정보보다 작을 수 없음
|
||||
if (roof.trestleDetail?.eaveIntvl > roof.eavesMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error9', [roof.trestleDetail?.eaveIntvl, roof.nameJp]), // 모듈 배치 영역은 {0}mm 이상이어야 합니다.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (roof.trestleDetail?.ridgeIntvl > roof.ridgeMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error10', [roof.trestleDetail?.ridgeIntvl, roof.nameJp]), // 모듈 배치 영역은 {0}mm 이상이어야 합니다.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
|
||||
if (roof.trestleDetail?.kerabaIntvl > roof.kerabaMargin) {
|
||||
Swal.fire({
|
||||
title: getMessage('modal.module.basic.settting.module.error11', [roof.trestleDetail?.kerabaIntvl, roof.nameJp]), // 모듈 배치 영역은 {0}mm 이상이어야 합니다.
|
||||
icon: 'warning',
|
||||
})
|
||||
result = false
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (result) {
|
||||
const newRoofs = newAddedRoofs.map((roof) => {
|
||||
const { addRoof, construction, trestle, trestleDetail, roofConstructions, ...rest } = roof
|
||||
return rest
|
||||
})
|
||||
|
||||
setModuleSelectionData({
|
||||
...moduleSelectionData,
|
||||
roofConstructions: newAddedRoofs.map((roof, index) => ({
|
||||
@ -369,8 +462,6 @@ const Trestle = forwardRef((props, ref) => {
|
||||
// ...constructionList.find((construction) => newAddedRoofs[index].construction.constTp === construction.constTp),
|
||||
...roof.construction,
|
||||
roofIndex: roof.index,
|
||||
setupCover: cvrChecked,
|
||||
setupSnowCover: snowGdChecked,
|
||||
selectedIndex: roof.index,
|
||||
},
|
||||
trestleDetail: roof.trestleDetail,
|
||||
@ -390,6 +481,8 @@ const Trestle = forwardRef((props, ref) => {
|
||||
return false
|
||||
}
|
||||
|
||||
const onMarginCheck = (target, data) => {}
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
isComplete,
|
||||
}))
|
||||
@ -582,7 +675,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={eavesMargin ?? 0}
|
||||
// onChange={(e) => dispatch({ type: 'SET_TRESTLE_DETAIL', roof: { ...trestleState, eavesMargin: e.target.value } })}
|
||||
onChange={(e) => setEavesMargin(e.target.value)}
|
||||
onChange={(e) => setEavesMargin(+e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<span className="thin">mm</span>
|
||||
@ -595,7 +688,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={ridgeMargin ?? 0}
|
||||
// onChange={(e) => dispatch({ type: 'SET_TRESTLE_DETAIL', roof: { ...trestleState, ridgeMargin: e.target.value } })}
|
||||
onChange={(e) => setRidgeMargin(e.target.value)}
|
||||
onChange={(e) => setRidgeMargin(+e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<span className="thin">mm</span>
|
||||
@ -608,7 +701,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={kerabaMargin ?? 0}
|
||||
// onChange={(e) => dispatch({ type: 'SET_TRESTLE_DETAIL', roof: { ...trestleState, kerabaMargin: e.target.value } })}
|
||||
onChange={(e) => setKerabaMargin(e.target.value)}
|
||||
onChange={(e) => setKerabaMargin(+e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<span className="thin">mm</span>
|
||||
|
||||
@ -130,6 +130,7 @@ export const useEstimateController = (planNo, flag) => {
|
||||
addFlg: true,
|
||||
paDispOrder: null,
|
||||
dispCableFlg: '0',
|
||||
itemTpCd: '',
|
||||
},
|
||||
],
|
||||
})
|
||||
@ -321,6 +322,7 @@ export const useEstimateController = (planNo, flag) => {
|
||||
}
|
||||
})
|
||||
if (delCnt === estimateData.itemList.length) {
|
||||
itemFlg = false
|
||||
setIsGlobalLoading(false)
|
||||
return swalFire({ text: getMessage('estimate.detail.save.requiredItem'), type: 'alert', icon: 'warning' })
|
||||
}
|
||||
|
||||
@ -409,7 +409,7 @@ export function useModuleBasicSetting(tabNum) {
|
||||
|
||||
useEffect(() => {
|
||||
if (canvasSetting.roofSizeSet != '3') {
|
||||
if (isObjectNotEmpty(moduleSelectionData) && moduleSelectionData.common.saleStoreNorthFlg === '1') {
|
||||
if (isObjectNotEmpty(moduleSelectionData) && moduleSelectionData?.common?.saleStoreNorthFlg === '1') {
|
||||
setSaleStoreNorthFlg(true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,8 +22,8 @@ export function useOrientation() {
|
||||
})
|
||||
}, [])*/
|
||||
|
||||
const nextStep = () => {
|
||||
if (isNaN(compasDeg)) {
|
||||
const nextStep = (compas = compasDeg) => {
|
||||
if (isNaN(compas)) {
|
||||
setCompasDeg(0)
|
||||
}
|
||||
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||
@ -36,7 +36,7 @@ export function useOrientation() {
|
||||
|
||||
roofs.forEach((roof) => {
|
||||
roof.set({
|
||||
moduleCompass: isNaN(compasDeg) ? 0 : compasDeg,
|
||||
moduleCompass: isNaN(compas) ? 0 : compas,
|
||||
})
|
||||
drawDirectionArrow(roof)
|
||||
})
|
||||
|
||||
@ -231,6 +231,21 @@ export function useRoofShapeSetting(id) {
|
||||
pitch: pitchRef.current,
|
||||
onlyOffset: true,
|
||||
}
|
||||
|
||||
switch (line.direction) {
|
||||
case 'bottom':
|
||||
direction = 'east'
|
||||
break
|
||||
case 'top':
|
||||
direction = 'west'
|
||||
break
|
||||
case 'left':
|
||||
direction = 'south'
|
||||
break
|
||||
case 'right':
|
||||
direction = 'north'
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -716,6 +731,7 @@ export function useRoofShapeSetting(id) {
|
||||
type: LINE_TYPE.WALLLINE.SHED,
|
||||
pitch: shedPitchRef.current,
|
||||
width: shedWidth / 10,
|
||||
offset: shedWidth / 10,
|
||||
}
|
||||
selectedLine.attributes = { ...attributes, isFixed: true }
|
||||
addPitchText(currentObject)
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
"modal.roof.shape.setting.ridge": "棟",
|
||||
"modal.roof.shape.setting.patten.a": "Aパターン",
|
||||
"modal.roof.shape.setting.patten.b": "Bパターン",
|
||||
"modal.roof.shape.setting.side": "別に設定",
|
||||
"modal.roof.shape.setting.side": "個別に設定",
|
||||
"plan.menu.roof.cover": "伏せ図入力",
|
||||
"plan.menu.roof.cover.outline.drawing": "外壁線を描く",
|
||||
"plan.menu.roof.cover.roof.shape.setting": "屋根形状の設定",
|
||||
@ -114,6 +114,17 @@
|
||||
"modal.module.basic.setting.module.eaves.bar.fitting": "軒カバーの設置",
|
||||
"modal.module.basic.setting.module.blind.metal.fitting": "落雪防止金具設置",
|
||||
"modal.module.basic.setting.module.select": "モジュール/架台選択",
|
||||
"modal.module.basic.settting.module.error1": "가대메이커를 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error2": "공법를 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error3": "지붕밑바탕을 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error4": "시공법을 선택해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error5": "L 을 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error6": "서까래 간격을 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error7": "하제비치를 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error8": "모듈 배치 영영 값을 입력해주세요.(지붕재: {0})(JA)",
|
||||
"modal.module.basic.settting.module.error9": "처마쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})(JA)",
|
||||
"modal.module.basic.settting.module.error10": "용마루쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})(JA)",
|
||||
"modal.module.basic.settting.module.error11": "케라바쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})(JA)",
|
||||
"modal.module.basic.setting.module.placement": "モジュールの配置",
|
||||
"modal.module.basic.setting.module.placement.select.fitting.type": "設置形態を選択してください。",
|
||||
"modal.module.basic.setting.module.placement.waterfowl.arrangement": "千鳥配置",
|
||||
@ -125,8 +136,8 @@
|
||||
"modal.module.basic.setting.module.placement.do.not": "しない",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard": "配置基準",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.center": "中央",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.eaves": "軒の側",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.ridge": "龍丸側",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.eaves": "軒側",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.ridge": "棟側",
|
||||
"modal.module.basic.setting.module.placement.maximum": "最大配置",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting": "配置基準の設定",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting.south": "南向きに設置す",
|
||||
@ -852,7 +863,7 @@
|
||||
"has.not.sleeve": "袖なし",
|
||||
"jerkinhead.width": "半切妻幅",
|
||||
"jerkinhead.slope": "半切妻傾斜",
|
||||
"shed.width": "片流幅",
|
||||
"shed.width": "片流れの出幅",
|
||||
"windage": "片流れ",
|
||||
"windage.width": "片流れの出幅",
|
||||
"write": "作成",
|
||||
|
||||
@ -114,6 +114,17 @@
|
||||
"modal.module.basic.setting.module.eaves.bar.fitting": "처마커버설치",
|
||||
"modal.module.basic.setting.module.blind.metal.fitting": "적설방지금구설치",
|
||||
"modal.module.basic.setting.module.select": "모듈/가대 선택",
|
||||
"modal.module.basic.settting.module.error1": "가대메이커를 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error2": "공법를 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error3": "지붕밑바탕을 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error4": "시공법을 선택해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error5": "L 을 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error6": "서까래 간격을 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error7": "하제비치를 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error8": "모듈 배치 영영 값을 입력해주세요.(지붕재: {0})",
|
||||
"modal.module.basic.settting.module.error9": "처마쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})",
|
||||
"modal.module.basic.settting.module.error10": "용마루쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})",
|
||||
"modal.module.basic.settting.module.error11": "케라바쪽 값은 {0}mm 이상이어야 합니다.(지붕재: {1})",
|
||||
"modal.module.basic.setting.module.placement": "모듈 배치",
|
||||
"modal.module.basic.setting.module.placement.select.fitting.type": "설치형태를 선택합니다.",
|
||||
"modal.module.basic.setting.module.placement.waterfowl.arrangement": "물떼새 배치",
|
||||
@ -128,6 +139,7 @@
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.eaves": "처마쪽",
|
||||
"modal.module.basic.setting.module.placement.arrangement.standard.ridge": "용마루쪽",
|
||||
"modal.module.basic.setting.module.placement.maximum": "최대배치",
|
||||
"modal.module.basic.setting.module.placement.margin.check1": "가대메이커를 선택해주세요.",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting": "배치기준 설정",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting.south": "남향설치",
|
||||
"modal.module.basic.setting.pitch.module.placement.standard.setting.select": "지정한 변을 기준으로 설치",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user