diff --git a/WebContent/WEB-INF/view/partMng/structureList.jsp b/WebContent/WEB-INF/view/partMng/structureList.jsp index 888a1fa..d0eb797 100644 --- a/WebContent/WEB-INF/view/partMng/structureList.jsp +++ b/WebContent/WEB-INF/view/partMng/structureList.jsp @@ -199,8 +199,9 @@ var columns = [ formatter: fnc_subInfoValueFormatter, cellClick:function(e, cell){ var objId = fnc_checkNull(cell.getData().OBJID); - // 바로 팝업 열기 (팝업창 내부에서 경고 처리) - fn_openSetStructure(objId); + var STATUS = fnc_checkNull(cell.getData().STATUS); + var viewMode = (STATUS != 'N') ? 'Y' : 'N'; + fn_openSetStructure(objId, viewMode); } }, @@ -496,8 +497,10 @@ function fn_openSetBomCopy(product_code){ /** * 구조등록 팝업 */ -function fn_openSetStructure(objId){ - window.open("/partMng/setStructurePopupMainFS.do?objId="+objId, "", "width=1880, height=900, resizable=yes"); +function fn_openSetStructure(objId, viewMode){ + var url = "/partMng/setStructurePopupMainFS.do?objId="+objId; + if(viewMode == 'Y') url += "&viewMode=Y"; + window.open(url, "", "width=1880, height=900, resizable=yes"); } /** * 배포사유 입력 팝업 diff --git a/WebContent/WEB-INF/view/partMng/structurePopupCenter.jsp b/WebContent/WEB-INF/view/partMng/structurePopupCenter.jsp index b3d943a..718e81c 100644 --- a/WebContent/WEB-INF/view/partMng/structurePopupCenter.jsp +++ b/WebContent/WEB-INF/view/partMng/structurePopupCenter.jsp @@ -323,7 +323,7 @@ $(function(){
-
+

diff --git a/WebContent/WEB-INF/view/partMng/structurePopupFs.jsp b/WebContent/WEB-INF/view/partMng/structurePopupFs.jsp index d8ff67f..ea05627 100644 --- a/WebContent/WEB-INF/view/partMng/structurePopupFs.jsp +++ b/WebContent/WEB-INF/view/partMng/structurePopupFs.jsp @@ -1,6 +1,10 @@ -<%String objId = com.pms.common.utils.CommonUtils.checkNull(request.getParameter("objId"));%> +<% +String objId = com.pms.common.utils.CommonUtils.checkNull(request.getParameter("objId")); +String viewMode = com.pms.common.utils.CommonUtils.checkNull(request.getParameter("viewMode")); +String viewModeParam = "Y".equals(viewMode) ? "&viewMode=Y" : ""; +%> - - - + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/view/partMng/structurePopupHeaderFs.jsp b/WebContent/WEB-INF/view/partMng/structurePopupHeaderFs.jsp index 3984ff5..7557864 100644 --- a/WebContent/WEB-INF/view/partMng/structurePopupHeaderFs.jsp +++ b/WebContent/WEB-INF/view/partMng/structurePopupHeaderFs.jsp @@ -1,8 +1,10 @@ <% java.util.Map map = (java.util.HashMap)request.getAttribute("info"); +String viewMode = com.pms.common.utils.CommonUtils.checkNull(request.getParameter("viewMode")); +String viewModeParam = "Y".equals(viewMode) ? "&viewMode=Y" : ""; %> - "> - "> + <%=viewModeParam%>"> + <%=viewModeParam%>"> \ No newline at end of file diff --git a/WebContent/WEB-INF/view/partMng/structurePopupLeft.jsp b/WebContent/WEB-INF/view/partMng/structurePopupLeft.jsp index f9ad771..5bdac84 100644 --- a/WebContent/WEB-INF/view/partMng/structurePopupLeft.jsp +++ b/WebContent/WEB-INF/view/partMng/structurePopupLeft.jsp @@ -58,10 +58,15 @@ var _tabulGrid; var selectedRowData = null; +var isViewMode = ('${param.viewMode}' == 'Y'); + $(function(){ - if('${param.readonly}' == 'readonly'){ + if('${param.readonly}' == 'readonly' || isViewMode){ $("#structureName2").hide(); } + if(isViewMode){ + $("#btnDrawingUpload").hide(); + } $("#btnExcel").click(function() { fn_excel(); diff --git a/WebContent/WEB-INF/view/partMng/structurePopupTop.jsp b/WebContent/WEB-INF/view/partMng/structurePopupTop.jsp index b6e316d..79c4359 100644 --- a/WebContent/WEB-INF/view/partMng/structurePopupTop.jsp +++ b/WebContent/WEB-INF/view/partMng/structurePopupTop.jsp @@ -162,7 +162,7 @@ function fn_closeEbom() {

- E-BOM 확인/수정 + E-BOM ${param.viewMode == 'Y' ? '조회' : '확인/수정'} 품번: ${partNo} @@ -191,7 +191,9 @@ function fn_closeEbom() { + + 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 {