From a520c33e857698bb5c1499e9543897df15d489d5 Mon Sep 17 00:00:00 2001 From: hjjeong Date: Wed, 4 Mar 2026 15:27:12 +0900 Subject: [PATCH] =?UTF-8?q?mbom=20=EC=9C=84=EC=B9=98=20=EC=9D=B4=EB=8F=99?= =?UTF-8?q?=20=EC=8B=9C=20=ED=95=98=EC=9C=84=20=ED=8C=8C=ED=8A=B8=EA=B9=8C?= =?UTF-8?q?=EC=A7=80=20=EA=B0=99=EC=9D=B4=20=EC=98=AE=EA=B2=A8=EC=A7=80?= =?UTF-8?q?=EB=8F=84=EB=A1=9D(=EC=A0=80=EC=9E=A5=EC=A0=84=EC=97=90?= =?UTF-8?q?=EB=8F=84=20=ED=99=95=EC=9D=B8=20=EA=B0=80=EB=8A=A5=ED=95=98?= =?UTF-8?q?=EA=B2=8C=20=EB=B0=94=EB=A1=9C=20=EB=B0=98=EC=98=81=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D),=20=ED=8C=8C=ED=8A=B8=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20=EC=8B=9C=20=EC=88=98=EB=9F=89=20=EB=B3=80=EA=B2=BD=EA=B0=80?= =?UTF-8?q?=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productionplanning/mBomHeaderPopup.jsp | 19 +++++++- .../view/productionplanning/mBomPopupLeft.jsp | 47 +++++++++++++++++-- src/com/pms/mapper/productionplanning.xml | 14 +++--- 3 files changed, 70 insertions(+), 10 deletions(-) diff --git a/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp b/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp index a543f83..156659f 100644 --- a/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp +++ b/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp @@ -292,6 +292,7 @@ function fn_loadMbomTemplate() { if(leftFrame && leftFrame._tabulGrid) { leftFrame._tabulGrid.setData(templateDetails); + if(leftFrame.fn_syncLastValidData) leftFrame.fn_syncLastValidData(); console.log("템플릿 데이터 로드 완료"); } else { console.error("왼쪽 프레임 또는 그리드를 찾을 수 없습니다."); @@ -1031,6 +1032,7 @@ function buildSubTreeFlatList(subTree, parentObjid, baseLevel) { REVISION: item.REVISION || item.revision || '', SUPPLY_TYPE: '사급', STATUS: 'ACTIVE', + _IS_ADDED: true, _IS_SUB_PART: true }); } @@ -1140,7 +1142,8 @@ function fn_mbomAddPart() { SPEC: rowData.SPEC, REVISION: rowData.REVISION, SUPPLY_TYPE: '사급', - STATUS: 'ACTIVE' + STATUS: 'ACTIVE', + _IS_ADDED: true }; newParts.push(newPart); @@ -1158,6 +1161,13 @@ function fn_mbomAddPart() { } } + // 수준(LEVEL_X) 필드 설정 + for(var i = 0; i < newParts.length; i++) { + if(leftFrame && leftFrame.fn_setLevelFields) { + leftFrame.fn_setLevelFields(newParts[i]); + } + } + // 왼쪽 프레임의 Tabulator에 추가 if(leftFrame && leftFrame._tabulGrid) { if(parentObjid) { @@ -1180,6 +1190,11 @@ function fn_mbomAddPart() { } } + // 드래그 이동용 데이터 동기화 + if(leftFrame && leftFrame.fn_syncLastValidData) { + leftFrame.fn_syncLastValidData(); + } + var message = rightSelectedRows.length + '개 파트가 추가되었습니다.'; if(subPartCount > 0) { message += '\n(반제품 하위 ' + subPartCount + '개 품목 포함)'; @@ -1253,6 +1268,7 @@ function fn_mbomDeletePart() { // 선택한 행 + 하위 품목 일괄 삭제 allData.splice(foundIndex, deleteCount); leftFrame._tabulGrid.setData(allData); + if(leftFrame.fn_syncLastValidData) leftFrame.fn_syncLastValidData(); var message = '파트가 삭제되었습니다.'; if(deleteCount > 1) { @@ -1463,6 +1479,7 @@ function fn_changeTopProduct() { // 왼쪽 트리에 새 데이터 설정 if(leftFrame && leftFrame._tabulGrid) { leftFrame._tabulGrid.setData(newTreeData); + if(leftFrame.fn_syncLastValidData) leftFrame.fn_syncLastValidData(); } // M-BOM 품번을 변경된 최상위 제품의 품번으로 설정 diff --git a/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp b/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp index 82c85a1..224b40c 100644 --- a/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp +++ b/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp @@ -78,6 +78,7 @@ body {