Merge branch 'dev' of ssh://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into qcast-pub

This commit is contained in:
김민식 2025-03-13 17:58:55 +09:00
commit 9104771a46
10 changed files with 2571 additions and 2107 deletions

View File

@ -0,0 +1,7 @@
export default function PopSpinner() {
return (
<div className="pop-spinner">
<span className="loader"></span>
</div>
)
}

View File

@ -58,6 +58,9 @@ export default function Estimate({}) {
const [storePriceList, setStorePriceList] = useState([]) // option
const [cableItemList, setCableItemList] = useState([]) //
const [cableItem, setCableItem] = useState('') //
const [startDate, setStartDate] = useState(new Date())
const singleDatePickerProps = {
startDate,
@ -96,6 +99,7 @@ export default function Estimate({}) {
const initEstimate = (currPid = currentPid) => {
console.log('🚀 ~ initEstimate ~ currPid:', currPid)
setCableItem('')
closeAll()
setObjectNo(objectRecoil.floorPlanObjectNo)
@ -107,6 +111,16 @@ export default function Estimate({}) {
setHonorificCodeList(code1)
}
//
const code2 = findCommonCode(117900)
if (code2 != null) {
code2.map((item) => {
item.value = item.clRefChr1
item.label = item.clRefChr2
})
setCableItemList(code2)
}
//
const param = {
saleStoreId: session.storeId,
@ -551,7 +565,7 @@ export default function Estimate({}) {
}
const getAbledItems = (items) => {
return items.filter((items) => items.paDispOrder === null)
return items.filter((items) => items.dispCableFlg !== '1' && items.paDispOrder === null)
}
const onChangeSelectAll = (e) => {
@ -684,6 +698,22 @@ export default function Estimate({}) {
setItemChangeYn(true)
}
/* 케이블 select 변경시 */
const onChangeDisplayCableItem = (value, itemList) => {
//todo: YJSS swalFire
if (estimateContextState.estimateType === 'YJSS') {
return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' })
}
itemList.map((item, index) => {
if (item.dispCableFlg === '1') {
if (value !== '') {
onChangeDisplayItem(value, item.dispOrder, index)
}
}
})
setCableItem(value)
}
// /
const onChangeDisplayItem = (itemId, dispOrder, index) => {
//todo: YJSS swalFire
@ -782,6 +812,7 @@ export default function Estimate({}) {
bomItem.objectNo = objectNo
bomItem.planNo = planNo
bomItem.addFlg = true // addFlg
bomItem.openFlg = '0' // 0
})
updateList = updateList.filter((item) => item.delFlg === '0')
@ -1678,6 +1709,25 @@ export default function Estimate({}) {
{getMessage('estimate.detail.showPrice.pricingBtn')}
</button>
</div>
<div className="product-price-wrap ml10">
<div className="select-wrap">
<select
className="select-light"
onChange={(e) => {
onChangeDisplayCableItem(e.target.value, estimateContextState.itemList)
}}
value={cableItem}
>
{/* <option value={''}>selected</option> */}
{cableItemList.length > 0 &&
cableItemList.map((row) => (
<option key={row.clRefChr1} value={row.clRefChr1}>
{row.clRefChr2}
</option>
))}
</select>
</div>
</div>
<div className="product-edit-wrap">
<ul className="product-edit-explane">
<li className="explane-item item01">
@ -1757,7 +1807,7 @@ export default function Estimate({}) {
<input
type="checkbox"
id={item?.dispOrder}
disabled={!!item?.paDispOrder}
disabled={!!item?.paDispOrder || item.dispCableFlg === '1'}
onChange={() => onChangeSelect(item.dispOrder)}
checked={!!selection.has(item.dispOrder)}
/>
@ -1768,27 +1818,54 @@ export default function Estimate({}) {
<td>
<div className="form-flex-wrap">
<div className="select-wrap mr5">
<Select
name="long-value-select1"
instanceId="long-value-select1"
className="react-select-custom"
classNamePrefix="custom"
placeholder="Select"
options={originDisplayItemList}
onChange={(e) => {
if (isObjectNotEmpty(e)) {
onChangeDisplayItem(e.itemId, item.dispOrder, index)
}
}}
// defaultInputValue={item.itemName}
getOptionLabel={(x) => x.itemName}
getOptionValue={(x) => x.itemId}
isClearable={false}
isDisabled={!!item?.paDispOrder}
value={displayItemList.filter(function (option) {
return option.itemId === item.itemId
})}
/>
{item.dispCableFlg !== '1' ? (
<Select
name="long-value-select1"
instanceId="long-value-select1"
className="react-select-custom"
classNamePrefix="custom"
placeholder="Select"
options={originDisplayItemList}
onChange={(e) => {
if (isObjectNotEmpty(e)) {
onChangeDisplayItem(e.itemId, item.dispOrder, index)
}
}}
menuPlacement={'auto'}
getOptionLabel={(x) => x.itemName}
getOptionValue={(x) => x.itemNo}
isClearable={false}
isDisabled={!!item?.paDispOrder}
value={displayItemList.filter(function (option) {
if (item.itemNo === '') {
return false
} else {
return option.itemId === item.itemId
}
})}
/>
) : (
<Select
name="long-value-select11"
instanceId="long-value-select11"
className="react-select-custom"
classNamePrefix="custom"
placeholder="Select"
options={cableItemList}
onChange={(e) => {
if (isObjectNotEmpty(e)) {
onChangeDisplayItem(e.clRefChr1, item.dispOrder, index)
}
}}
menuPlacement={'auto'}
getOptionLabel={(x) => x.clRefChr2}
getOptionValue={(x) => x.clRefChr1}
isClearable={false}
value={cableItemList.filter(function (option) {
return option.clRefChr1 === item.itemId
})}
/>
)}
</div>
{item?.itemChangeFlg === '1' && (
<div className="btn-area">

View File

@ -111,7 +111,7 @@ export default function CanvasMenu(props) {
//
const { selectedPlan } = usePlan()
const handleExcelPdfFileDown = async (donwloadType, drawingFlg) => {
const url = '/api/estimate/excel-download'
const url = '/api/pwrGnrSimulation/excel-download'
const params = {
objectNo: objectNo,

View File

@ -199,7 +199,7 @@ export default function MainContents({ setFaqOpen, setFaqModalNoticeNo }) {
</div>
)}
</ProductItem>
<ProductItem num={4} name={'Data Download'}>
<ProductItem num={4} name={getMessage('main.archive')}>
{fileList.length > 0 ? (
<div className="data-download-wrap">
{fileList?.map((file) => (

View File

@ -33,6 +33,8 @@ export const useCommonCode = () => {
clCode: code.clCode,
clCodeNm: globalLocale === 'ko' ? code.clCodeNm : code.clCodeJp,
clPriority: code.clPriority,
clRefChr1: code.clRefChr1,
clRefChr2: code.clRefChr2,
}
return result
})

View File

@ -129,6 +129,7 @@ export const useEstimateController = (planNo, flag) => {
delFlg: '0', //삭제 플래그 0 삭제하면 1
addFlg: true,
paDispOrder: null,
dispCableFlg: '0',
},
],
})
@ -298,6 +299,9 @@ export const useEstimateController = (planNo, flag) => {
}
}
}
} else {
//봄 컴포넌트 제품은 0으로
item.openFlg = '0'
}
}
})

View File

@ -619,6 +619,9 @@ export const useTrestle = () => {
//module Rack 정보를 얻기위한 데이터 가공
function moduleTransformData(arr) {
//arr의 moduleTpCd를 이용하여 정렬
arr = arr.sort((a, b) => a.moduleTpCd.localeCompare(b.moduleTpCd))
let counts = {}
arr.forEach((item) => {
@ -1649,10 +1652,29 @@ export const useTrestle = () => {
}
}
switch (direction) {
case 'south': {
startPointY -= 5
break
}
case 'east': {
startPointX -= 5
break
}
case 'west': {
startPointX -= 5
break
}
case 'north': {
startPointY -= 5
break
}
}
for (let i = 0; i < count; i++) {
const bracket = new fabric.Rect({
left: startPointX - 5,
top: startPointY - 5,
left: startPointX,
top: startPointY,
fill: 'green',
name: TRESTLE_MATERIAL.BRACKET,
parentId: module.id,
@ -1664,14 +1686,15 @@ export const useTrestle = () => {
})
canvas.add(bracket)
canvas.renderAll()
const maxIntvl = Math.max(moduleIntvlHor, moduleIntvlVer)
if (direction === 'south') {
startPointY -= height - moduleIntvlVer / 10
startPointY -= height + maxIntvl / 10
} else if (direction === 'north') {
startPointY += height + moduleIntvlVer / 10
startPointY += height + maxIntvl / 10
} else if (direction === 'east') {
startPointX -= width - moduleIntvlHor / 10
startPointX -= width + maxIntvl / 10
} else if (direction === 'west') {
startPointX += width + moduleIntvlHor / 10
startPointX += width + maxIntvl / 10
}
}
}
@ -1730,7 +1753,7 @@ export const useTrestle = () => {
const { width, height } = { ...module }
widthArr.push(width)
heightArr.push(height)
centerPoints.push({ x, y, width: Math.floor(width), height: Math.floor(height), index, moduleInfo: module.moduleInfo })
centerPoints.push({ x, y, width: Math.floor(width), height: Math.floor(height), index, moduleInfo: module.moduleInfo, module })
})
//widthArr 중복 제거 1이상 차이가 나지 않으면 같은 너비로 간주
@ -1804,7 +1827,13 @@ export const useTrestle = () => {
let rightExposedHalfTopPoints = []
centerPoints.forEach((centerPoint, index) => {
let { x, y, width, height, widthArr, heightArr } = { ...centerPoint }
let { x, y, width, height, widthArr, heightArr, module } = { ...centerPoint }
/*
const originFill = module.fill
module.set('fill', 'red')
canvas.renderAll()*/
// centerPoints중에 현재 centerPoint와 x값이 같고, y값이 y-height값과 같은 centerPoint가 있는지 확인
let bottomCell
let bottomLeftPoint
@ -1894,7 +1923,12 @@ export const useTrestle = () => {
break
}
/**
* 디버깅용
module.set('fill', originFill)
canvas.renderAll()
*/
if (bottomCell) {
return
}
@ -1911,13 +1945,18 @@ export const useTrestle = () => {
}
} else if (leftBottomCnt + rightBottomCnt === 0) {
exposedBottomPoints.push(centerPoint)
} else if (leftBottomCnt + rightBottomCnt === 2) {
touchDimension++
}
})
// 노출상면 및 접면 체크
centerPoints.forEach((centerPoint, index) => {
let { x, y, width, height, widthArr, heightArr } = { ...centerPoint }
let { x, y, width, height, widthArr, heightArr, module } = { ...centerPoint }
const originFill = module.fill
/*
module.set('fill', 'blue')
canvas.renderAll()*/
let topCell
let topLeftPoint
let topRightPoint
@ -1930,7 +1969,8 @@ export const useTrestle = () => {
height = height + vertical
heightArr.forEach((h) => {
if (topCell) return
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - x) < maxX && Math.abs(centerPoint.y - (y + h)) < maxY)
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - x) < maxX && Math.abs(centerPoint.y - (y - h)) < maxY)
if (leftTopCnt === 0) {
topLeftPoint = { x: x - width / 2, y: y - h }
leftTopCnt = centerPoints.filter(
@ -1949,7 +1989,7 @@ export const useTrestle = () => {
height = height + vertical
heightArr.forEach((h) => {
if (topCell) return
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - x) < maxX && Math.abs(centerPoint.y - (y - h)) < maxY)
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - x) < maxX && Math.abs(centerPoint.y - (y + h)) < maxY)
if (leftTopCnt === 0) {
topLeftPoint = { x: x + width / 2, y: y + h }
leftTopCnt = centerPoints.filter(
@ -1968,7 +2008,7 @@ export const useTrestle = () => {
width = width + horizontal
widthArr.forEach((w) => {
if (topCell) return
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - (x + w)) < maxX && Math.abs(centerPoint.y - y) < maxY)
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - (x - w)) < maxX && Math.abs(centerPoint.y - y) < maxY)
if (leftTopCnt === 0) {
topLeftPoint = { x: x - w, y: y + height / 2 }
leftTopCnt = centerPoints.filter(
@ -1988,7 +2028,7 @@ export const useTrestle = () => {
width = width + horizontal
widthArr.forEach((w) => {
if (topCell) return
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - (x - w)) < maxX && Math.abs(centerPoint.y - y) < maxY)
topCell = centerPoints.find((centerPoint) => Math.abs(centerPoint.x - (x + w)) < maxX && Math.abs(centerPoint.y - y) < maxY)
if (leftTopCnt === 0) {
topLeftPoint = { x: x + w, y: y - height / 2 }
leftTopCnt = centerPoints.filter(
@ -2010,6 +2050,13 @@ export const useTrestle = () => {
return
}
/**
* 디버깅
module.set('fill', originFill)
canvas.renderAll()
*/
if (leftTopCnt + rightTopCnt === 2) {
touchDimension++
return
@ -2157,6 +2204,18 @@ export const useTrestle = () => {
rackRows: rack.rackRowsCd,
}
})
let smartRackParams = Object.values(smartRackGroup).map((smartRack, index) => {
return {
seq: index,
itemId: smartRack[0].rackId,
rackFittingCnt: smartRack[0].supFitQty,
rackRows: smartRack[0].rackRowsCd,
}
})
rackParams = [...rackParams, ...smartRackParams]
const parent = canvas.getObjects().find((obj) => obj.id === surface.parentId)
const roofMaterialIndex = parent.roofMaterial.index
const moduleSelection = moduleSelectionData?.roofConstructions?.find((construction) => construction.roofIndex === roofMaterialIndex)

View File

@ -9,7 +9,7 @@
"header.menus.community": "コミュニティ",
"header.menus.community.notice": "お知らせ",
"header.menus.community.faq": "FAQ",
"header.menus.community.archive": "見積書出力",
"header.menus.community.archive": "各種資料ダウンロード",
"header.logout": "ログアウト",
"header.go": "移動",
"header.online.warranty.system": "オンライン保証システム",
@ -178,7 +178,7 @@
"modal.roof.alloc.select.parallel": "筋配置",
"modal.roof.alloc.select.stairs": "千鳥配置",
"modal.roof.alloc.apply": "選択した屋根材として割り当て",
"plan.menu.estimate.docDown": "見積書出力",
"plan.menu.estimate.docDown": "各種資料ダウンロード",
"plan.menu.estimate.save": "保存",
"plan.menu.estimate.reset": "初期化",
"plan.menu.estimate.copy": "見積書のコピー",
@ -229,7 +229,7 @@
"modal.dormer.offset.info": "移動する距離と方向を入力してください。",
"modal.common.save": "保存",
"modal.common.add": "追加",
"modal.common.prev": "前",
"modal.common.prev": "に戻る",
"modal.common.next": "次",
"modal.canvas.setting.font.plan.edit": "フォントとサイズの変更",
"modal.canvas.setting.font.plan.edit.word": "文字フォントの変更",
@ -557,7 +557,7 @@
"board.notice.sub.title": "お知らせ一覧",
"board.faq.title": "FAQ",
"board.faq.sub.title": "FAQリスト",
"board.archive.title": "資料ダウンロード",
"board.archive.title": "各種資料ダウンロード",
"board.archive.sub.title": "見積書一覧",
"board.list.header.rownum": "番号",
"board.list.header.title": "タイトル",
@ -849,9 +849,10 @@
"main.storeName": "販売店名",
"main.objectNo": "物件番号",
"main.faq": "FAQ",
"main.archive": "各種資料ダウンロード",
"main.content.objectList.noData1": "登録された商品情報はありません。",
"main.content.objectList.noData2": "下のボタンをクリックして商品情報を登録してください。",
"main.content.objectList": "最近の更新物件一覧",
"main.content.objectList": "直近の見積書一覧",
"main.content.notice": "お知らせ",
"main.content.download1": "操作マニュアル",
"main.content.download2": "屋根の説明書",
@ -907,7 +908,7 @@
"estimate.detail.header.specialEstimateProductInfo": "製品情報",
"estimate.detail.sepcialEstimateProductInfo.totAmount": "数量PCS",
"estimate.detail.sepcialEstimateProductInfo.totVolKw": "容量(kW)",
"estimate.detail.sepcialEstimateProductInfo.supplyPrice": "供給価格",
"estimate.detail.sepcialEstimateProductInfo.supplyPrice": "見積価格",
"estimate.detail.sepcialEstimateProductInfo.vatPrice": "税10",
"estimate.detail.sepcialEstimateProductInfo.totPrice": "総額",
"estimate.detail.sepcialEstimateProductInfo.pkgUnitPrice": "住宅PKG単価W",
@ -920,7 +921,7 @@
"estimate.detail.showPrice.description1": "製品価格OPEN",
"estimate.detail.showPrice.description2": "追加の変更品目",
"estimate.detail.showPrice.description3": "添付必須",
"estimate.detail.showPrice.description4": "クリックして製品の特異性を確認する",
"estimate.detail.showPrice.description4": "クリックで製品特記事項を確認できます",
"estimate.detail.showPrice.addItem": "製品追加",
"estimate.detail.showPrice.delItem": "製品の削除",
"estimate.detail.itemTableHeader.dispOrder": "アイテム",

View File

@ -9,7 +9,7 @@
"header.menus.community": "커뮤니티",
"header.menus.community.notice": "공지사항",
"header.menus.community.faq": "FAQ",
"header.menus.community.archive": "문서다운로드",
"header.menus.community.archive": "각종 자료 다운로드",
"header.logout": "로그아웃",
"header.go": "이동",
"header.online.warranty.system": "온라인보증시스템",
@ -557,7 +557,7 @@
"board.notice.sub.title": "공지사항 목록",
"board.faq.title": "FAQ",
"board.faq.sub.title": "FAQ 목록",
"board.archive.title": "자료 다운로드",
"board.archive.title": "각종 자료 다운로드",
"board.archive.sub.title": "문서 목록",
"board.list.header.rownum": "번호",
"board.list.header.title": "제목",
@ -849,6 +849,7 @@
"main.storeName": "판매점명",
"main.objectNo": "물건번호",
"main.faq": "FAQ",
"main.archive": "각종 자료 다운로드",
"main.content.objectList.noData1": "등록된 물건정보가 없습니다.",
"main.content.objectList.noData2": "아래 버튼을 클릭하여 물건정보를 등록하십시오.",
"main.content.objectList": "최근 갱신 물건목록",

File diff suppressed because it is too large Load Diff