diff --git a/WebContent/WEB-INF/view/partMng/structureList.jsp b/WebContent/WEB-INF/view/partMng/structureList.jsp
index 0d2006f..14ef481 100644
--- a/WebContent/WEB-INF/view/partMng/structureList.jsp
+++ b/WebContent/WEB-INF/view/partMng/structureList.jsp
@@ -66,6 +66,11 @@ $(document).ready(function(){
});
//end of 상세 팝업
+ //상태변경 버튼
+ $("#btnStatusChange").click(function(){
+ fn_openStatusChange();
+ });
+
//조회
$("#btnSearch").click(function(){
$("#page").val("1");
@@ -152,11 +157,11 @@ var columns = [
{headerHozAlign : 'center', hozAlign : 'left', width : '270', title : '유닛명', field : 'UNIT_NAME' },*/
- {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '제품구분', field : 'PRODUCT_NAME' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '품번', field : 'PART_NO' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '품명', field : 'PART_NAME' },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '제품구분', field : 'PRODUCT_NAME' },
+ {headerHozAlign : 'center', hozAlign : 'left', width : '250', title : '품번', field : 'PART_NO' },
+ {headerHozAlign : 'center', hozAlign : 'left', width : '250', title : '품명', field : 'PART_NAME' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : 'E-BOM', field : 'BOM_CNT',
+ {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : 'E-BOM', field : 'BOM_CNT',
formatter: fnc_subInfoValueFormatter,
cellClick:function(e, cell){
var objId = fnc_checkNull(cell.getData().OBJID);
@@ -166,12 +171,12 @@ var columns = [
},
// {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '등록자', field : 'DEPT_USER_NAME' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '등록일', field : 'REG_DATE' },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '등록일', field : 'REG_DATE' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '배포일', field : 'DEPLOY_DATE' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '85', title : 'Version', field : 'REVISION' },
- {headerHozAlign : 'center', hozAlign : 'left', /* width : '200', */ title : '배포사유', field : 'NOTE' },
- {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '상태', field : 'STATUS_TITLE' }
+ {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : 'Version', field : 'REVISION' },
+ {headerHozAlign : 'center', hozAlign : 'left', /* width : '200', */ title : '배포사유', field : 'NOTE' },
+ {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '상태', field : 'STATUS' }
];
//var grid;
@@ -466,6 +471,28 @@ function fn_openChangeDesignNote(objId){
window.open("/partMng/changeDesignNotePopUp.do?objId="+objId, "", "width=1000, height=200, resizable=no");
}
+/**
+ * 상태변경 팝업
+ */
+function fn_openStatusChange() {
+ var selectedStructure = _tabulGrid.getSelectedData();
+
+ if(selectedStructure.length == 0){
+ Swal.fire("선택된 내용이 없습니다.");
+ return false;
+ }
+
+ if(selectedStructure.length > 1){
+ Swal.fire('단건만 선택 가능합니다.');
+ return;
+ }
+
+ var selectedData = selectedStructure[0];
+ var objId = fnc_checkNull(selectedData.OBJID);
+
+ window.open("/partMng/structureStatusChangePopup.do?objId=" + objId, "structureStatusChangePopup", "width=500, height=300, resizable=no");
+}
+
function saveexcelpop() {
var selectedStructure = _tabulGrid.getSelectedData();
@@ -536,10 +563,12 @@ function saveexcelpop() {
E-BOM List
-
-
-
-
+
+
+
+
+
+
@@ -593,7 +622,7 @@ function saveexcelpop() {
- |
+ |
|
diff --git a/WebContent/WEB-INF/view/partMng/structureStatusChangePopup.jsp b/WebContent/WEB-INF/view/partMng/structureStatusChangePopup.jsp
new file mode 100644
index 0000000..90d94bd
--- /dev/null
+++ b/WebContent/WEB-INF/view/partMng/structureStatusChangePopup.jsp
@@ -0,0 +1,140 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ page import="com.pms.common.utils.*"%>
+<%@ page import="java.util.*" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@include file= "/init.jsp" %>
+
+
+
+
+<%=Constants.SYSTEM_NAME%>
+
+
+
+
+
+
diff --git a/src/com/pms/controller/PartMngController.java b/src/com/pms/controller/PartMngController.java
index d56b199..4202030 100644
--- a/src/com/pms/controller/PartMngController.java
+++ b/src/com/pms/controller/PartMngController.java
@@ -1323,6 +1323,63 @@ public class PartMngController {
return "/ajax/ajaxResult";
}
+ /**
+ * 상태변경 팝업
+ * @param request
+ * @param paramMap
+ * @return
+ */
+ @RequestMapping("/partMng/structureStatusChangePopup.do")
+ public String structureStatusChangePopup(HttpServletRequest request, @RequestParam Map paramMap){
+ Map code_map = new HashMap();
+ Map structureInfo = new HashMap();
+
+ try{
+ // 구조 정보 조회
+ structureInfo = partMngService.getStructureInfo(paramMap);
+
+ // 제품구분 코드 목록 (structureList와 동일하게)
+ code_map.put("product_cd", commonService.bizMakeOptionList("0000001", CommonUtils.checkNull(structureInfo.get("PRODUCT_CD")), "common.getCodeselect"));
+
+ request.setAttribute("STRUCTURE_INFO", structureInfo);
+ request.setAttribute("code_map", code_map);
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return "/partMng/structureStatusChangePopup";
+ }
+
+ /**
+ * 상태변경 저장
+ * @param request
+ * @param paramMap
+ * @return
+ */
+ @RequestMapping("/partMng/updateStructureStatus.do")
+ public String updateStructureStatus(HttpServletRequest request, @RequestParam Map paramMap){
+ Map resultMap = new HashMap<>();
+
+ try{
+ boolean result = partMngService.updateStructureStatus(request, paramMap);
+
+ if(result){
+ resultMap.put("result", "success");
+ resultMap.put("msg", "저장되었습니다.");
+ }else{
+ resultMap.put("result", "fail");
+ resultMap.put("msg", "저장에 실패했습니다.");
+ }
+ }catch(Exception e){
+ e.printStackTrace();
+ resultMap.put("result", "error");
+ resultMap.put("msg", "오류가 발생했습니다.");
+ }
+
+ request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
+ return "/ajax/ajaxResult";
+ }
+
/**
* 제품 사양 리스트
* @param request
diff --git a/src/com/pms/mapper/partMng.xml b/src/com/pms/mapper/partMng.xml
index 9fb121b..90d9e45 100644
--- a/src/com/pms/mapper/partMng.xml
+++ b/src/com/pms/mapper/partMng.xml
@@ -2744,6 +2744,9 @@ SELECT T1.LEV, T1.BOM_REPORT_OBJID, T1.ROOT_PART_NO, T1.PATH, T1.LEAF, T2.*
,T.MULTI_BREAK_YN
,T.MULTI_MASTER_OBJID
,(SELECT COUNT(*) FROM BOM_PART_QTY AS A WHERE A.BOM_REPORT_OBJID = T.OBJID) AS BOM_CNT
+ ,CODE_NAME(PRODUCT_CD) as PRODUCT_NAME
+ ,PART_NO
+ ,PART_NAME
FROM
PART_BOM_REPORT AS T
WHERE 1=1
@@ -7222,6 +7225,36 @@ SELECT PM.OBJID
WHERE 0 ]]>
+
+
+
+
+
+ UPDATE PART_BOM_REPORT
+ SET
+ PRODUCT_CD = #{product_cd},
+ PART_NO = #{part_no},
+ PART_NAME = #{part_name},
+ REVISION = #{version},
+ STATUS = #{status},
+ EDITER = #{EDITER},
+ EDIT_DATE = NOW()
+ WHERE
+ OBJID = #{objId}
+
+