diff --git a/WebContent/WEB-INF/view/productionplanning/mBomHistoryPopup.jsp b/WebContent/WEB-INF/view/productionplanning/mBomHistoryPopup.jsp
new file mode 100644
index 0000000..711b683
--- /dev/null
+++ b/WebContent/WEB-INF/view/productionplanning/mBomHistoryPopup.jsp
@@ -0,0 +1,159 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ page import="com.pms.common.utils.*"%>
+<%@include file="/init_no_login.jsp" %>
+
+
+
+
+ M-BOM 이력
+
+
+
+ M-BOM 이력
+
+
+
+
+
+ 변경 이력
+
+
+
+
+
+ | No |
+ 변경유형 |
+ 변경내용 |
+ 변경자 |
+ 변경일시 |
+
+
+
+
+
+ | ${historyList.size() - status.index} |
+
+
+ 생성
+ 수정
+ 삭제
+ ${history.CHANGE_TYPE}
+
+ |
+ ${history.CHANGE_DESCRIPTION} |
+ ${history.CHANGE_USER_NAME} |
+ ${history.CHANGE_DATE} |
+
+
+
+
+
+
+ 변경 이력이 없습니다.
+
+
+
+
+
+
+
+
+
diff --git a/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp b/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp
index ff4bdd9..edd3122 100644
--- a/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp
+++ b/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp
@@ -140,23 +140,24 @@ var columns = [
field: 'PRODUCT_NAME'
},
+ // 부대표님이 컬럼 삭제하라고하심!(251128 국내/해외, 접수일, 고객사)
// 5. 국내/해외
- {
- headerHozAlign: 'center',
- hozAlign: 'center',
- width: 90,
- title: '국내/해외',
- field: 'AREA_NAME'
- },
+ // {
+ // headerHozAlign: 'center',
+ // hozAlign: 'center',
+ // width: 90,
+ // title: '국내/해외',
+ // field: 'AREA_NAME'
+ // },
// 6. 접수일
- {
- headerHozAlign: 'center',
- hozAlign: 'center',
- width: 80,
- title: '접수일',
- field: 'RECEIPT_DATE'
- },
+ // {
+ // headerHozAlign: 'center',
+ // hozAlign: 'center',
+ // width: 80,
+ // title: '접수일',
+ // field: 'RECEIPT_DATE'
+ // },
// 7. 고객사
{
@@ -168,19 +169,19 @@ var columns = [
},
// 8. 유/무상
- {
- headerHozAlign: 'center',
- hozAlign: 'center',
- width: 80,
- title: '유/무상',
- field: 'PAID_TYPE_NAME'
- },
+ // {
+ // headerHozAlign: 'center',
+ // hozAlign: 'center',
+ // width: 80,
+ // title: '유/무상',
+ // field: 'PAID_TYPE_NAME'
+ // },
// 9. 품번
{
headerHozAlign: 'center',
hozAlign: 'left',
- width: 120,
+ width: 150,
title: '품번',
field: 'PART_NO'
},
@@ -189,7 +190,7 @@ var columns = [
{
headerHozAlign: 'center',
hozAlign: 'left',
- width: 150,
+ width: 180,
title: '품명',
field: 'PART_NAME'
},
@@ -225,7 +226,7 @@ var columns = [
{
headerHozAlign: 'center',
hozAlign: 'left',
- width: 150,
+ // width: 150,
title: '고객사요청사항',
field: 'CUSTOMER_REQUEST'
},
@@ -271,7 +272,22 @@ var columns = [
hozAlign: 'center',
width: 70,
title: '버전',
- field: 'MBOM_VERSION'
+ field: 'MBOM_VERSION',
+ cellClick: function(e, cell) {
+ var data = cell.getRow().getData();
+ if(data.MBOM_HEADER_OBJID) {
+ fn_showMbomHistory(data.MBOM_HEADER_OBJID);
+ } else {
+ alert('M-BOM 이력이 없습니다.');
+ }
+ },
+ formatter: function(cell) {
+ var value = cell.getValue();
+ if(value) {
+ return '' + value + '';
+ }
+ return '-';
+ }
},
// 18. 구매리스트 생성일
@@ -537,6 +553,12 @@ function fn_checkAssignmentAndOpenMbom(projectObjId) {
});
}
+// M-BOM 이력 팝업
+function fn_showMbomHistory(mbomHeaderObjid) {
+ var url = "/productionplanning/mBomHistoryPopup.do?mbomHeaderObjid=" + mbomHeaderObjid;
+ window.open(url, "mbomHistoryPopup", "width=1000,height=700,scrollbars=yes,resizable=yes");
+}
+
// 구매리스트 생성
function fn_openPurchaseListPopup() {
// 체크된 행 가져오기
@@ -632,6 +654,9 @@ function fn_openPurchaseListPopup() {
title: '생성 완료',
text: '구매리스트가 생성되었습니다.\n구매리스트관리 화면에서 확인하세요.',
icon: 'success'
+ }).then(() => {
+ // 그리드 새로고침
+ fn_search();
});
} else {
Swal.fire({
diff --git a/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp b/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp
index a44404d..48ee36d 100644
--- a/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp
+++ b/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp
@@ -913,7 +913,12 @@ function getMbomTreeData() {
// 구매 정보
vendor: row.VENDOR || row.VENDOR_PM, // 공급업체 코드/OBJID (기존 값 유지)
unitPrice: row.UNIT_PRICE, // 원본 값 그대로
- totalPrice: row.TOTAL_PRICE, // 원본 값 그대로
+ // totalPrice 계산: 항목수량 × 단가
+ totalPrice: (function() {
+ var itemQty = parseFloat(row.ITEM_QTY) || 0;
+ var unitPrice = parseFloat(row.UNIT_PRICE) || 0;
+ return itemQty * unitPrice;
+ })(),
currency: row.CURRENCY,
leadTime: row.LEAD_TIME, // 원본 값 그대로
minOrderQty: row.MIN_ORDER_QTY, // 원본 값 그대로
diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_new.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_new.jsp
index 5d012a3..6684211 100644
--- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_new.jsp
+++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_new.jsp
@@ -111,21 +111,23 @@ $(document).ready(function(){
,"품명"
,"품번"
//,"품번2"
- ,"규격","Maker","단위","설계수량","수량","실발주수량"
- ,"공급단가","레이져단가","용접단가","가공단가","후처리단가","공급가","부가세","부가세포함공급가"
+ ,"규격","메이커","단위","설계수량","수량","실발주수량"
+ ,"공급단가"
+ //,"레이져단가","용접단가","가공단가","후처리단가"
+ ,"공급가","부가세","부가세포함공급가"
,"총발주수량","재고수량","재고수량(org)","총실발주수량","실공급가" //sum
]
,colModel: [
{name:"OBJID" , index:"", width: 0, align:"center", hidden: true, sortable:false, editable:false}
,{name:"PART_OBJID" , index:"", width: 0, align:"center", hidden: true, sortable:false, editable:false}
,{name:"LD_PART_OBJID" , index:"", width: 0, align:"center", hidden: true, sortable:false, editable:false}
- ,{name:"PART_NAME" , index:"", width:140, align:"left", hidden:false, sortable:false, editable:false
+ ,{name:"PART_NAME" , index:"", width:200, align:"left", hidden:false, sortable:false, editable:false
,editoptions:{
dataInit: function(e){ e.style.textAlign = "left"; e.style.fontSize = 13; }
,dataEvents: [ {type:"change", fn:function(e) { }} ]
}
}
- ,{name:"PART_NO" , index:"", width:130, align:"left", hidden:false, sortable:false, editable:false
+ ,{name:"PART_NO" , index:"", width:200, align:"left", hidden:false, sortable:false, editable:false
<%--
,formatter:'showlink'
,formatoptions:{baseLinkUrl:'/partMng/partMngDetailPopUp.do', //?OBJID=
@@ -177,7 +179,7 @@ $(document).ready(function(){
,dataEvents: [ {type:"change", fn:function(e) { }} ]
}
}
- ,{name:"MAKER" , index:"", width:90, align:"left", hidden:false, sortable:false, editable:false
+ ,{name:"MAKER" , index:"", width:110, align:"left", hidden:false, sortable:false, editable:false
,editoptions:{
dataInit: function(e){ e.style.textAlign = "left"; e.style.fontSize = 13; }
,dataEvents: [ {type:"change", fn:function(e) { }} ]
@@ -208,7 +210,7 @@ $(document).ready(function(){
,dataEvents: [ {type:"change", fn:function(e) { gridFn.calcRowAll(e); }} ]
}
}
- ,{name:"ORDER_QTY" , index:"", width:53, align: "right", hidden:true, sortable:false, editable: false
+ ,{name:"ORDER_QTY" , index:"", width:53, align: "right", hidden:false, sortable:false, editable: false
//,formatter: "integer", formatoptions:{thousandsSeparator:","}
,editoptions:{
dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
@@ -233,11 +235,11 @@ $(document).ready(function(){
]
}
}
- ,{name:"PRICE1" , index:"", width:70, align: "right", hidden:false, sortable:false, editable: true
- ,formatter: "integer", formatoptions:{thousandsSeparator:","}
- ,editoptions:{
- dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
- ,dataEvents: [ {type:"change", fn:function(e) { gridFn.calcRowAll(e); }}
+ // ,{name:"PRICE1" , index:"", width:70, align: "right", hidden:false, sortable:false, editable: true
+ // ,formatter: "integer", formatoptions:{thousandsSeparator:","}
+ // ,editoptions:{
+ // dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
+ // ,dataEvents: [ {type:"change", fn:function(e) { gridFn.calcRowAll(e); }}
/*
,
{type:"focus", fn:function(e) {
@@ -247,32 +249,32 @@ $(document).ready(function(){
}
}
*/
- ]
- }
- }
- ,{name:"PRICE2" , index:"", width:60, align: "right", hidden:false, sortable:false, editable: true
- ,formatter: "integer", formatoptions:{thousandsSeparator:","}
- ,editoptions:{
- dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
- ,dataEvents: [ {type:"change", fn:function(e) { gridFn.calcRowAll(e); }} ]
- }
- }
- ,{name:"PRICE3" , index:"", width:60, align: "right", hidden:false, sortable:false, editable: true
- ,formatter: "integer", formatoptions:{thousandsSeparator:","}
- ,editoptions:{
- dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
- ,dataEvents: [ {type:"change", fn:function(e) {
- gridFn.calcRowAll(e); }} ]
- }
- }
- ,{name:"PRICE4" , index:"", width:70, align: "right", hidden:false, sortable:false, editable: true
- ,formatter: "integer", formatoptions:{thousandsSeparator:","}
- ,editoptions:{
- dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
- ,dataEvents: [ {type:"change", fn:function(e) {
- gridFn.calcRowAll(e); }} ]
- }
- }
+ // ]
+ // }
+ // }
+ // ,{name:"PRICE2" , index:"", width:60, align: "right", hidden:false, sortable:false, editable: true
+ // ,formatter: "integer", formatoptions:{thousandsSeparator:","}
+ // ,editoptions:{
+ // dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
+ // ,dataEvents: [ {type:"change", fn:function(e) { gridFn.calcRowAll(e); }} ]
+ // }
+ // }
+ // ,{name:"PRICE3" , index:"", width:60, align: "right", hidden:false, sortable:false, editable: true
+ // ,formatter: "integer", formatoptions:{thousandsSeparator:","}
+ // ,editoptions:{
+ // dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
+ // ,dataEvents: [ {type:"change", fn:function(e) {
+ // gridFn.calcRowAll(e); }} ]
+ // }
+ // }
+ // ,{name:"PRICE4" , index:"", width:70, align: "right", hidden:false, sortable:false, editable: true
+ // ,formatter: "integer", formatoptions:{thousandsSeparator:","}
+ // ,editoptions:{
+ // dataInit: function(e){ e.style.textAlign = "right"; e.style.fontSize = 13; }
+ // ,dataEvents: [ {type:"change", fn:function(e) {
+ // gridFn.calcRowAll(e); }} ]
+ // }
+ // }
,{name:"SUPPLY_UNIT_PRICE", index:"", width:100, align: "right", hidden:false, sortable:false, editable: true
,formatter: "integer", formatoptions:{thousandsSeparator:","}
,editoptions:{
diff --git a/src/com/pms/controller/ProductionPlanningController.java b/src/com/pms/controller/ProductionPlanningController.java
index 9aa7fd4..d93297e 100644
--- a/src/com/pms/controller/ProductionPlanningController.java
+++ b/src/com/pms/controller/ProductionPlanningController.java
@@ -1606,4 +1606,28 @@ public class ProductionPlanningController extends BaseService {
}
return resultMap;
}
+
+ /**
+ * M-BOM 이력 팝업
+ */
+ @RequestMapping("/productionplanning/mBomHistoryPopup.do")
+ public String mBomHistoryPopup(HttpServletRequest request, @RequestParam Map paramMap) {
+ try {
+ String mbomHeaderObjid = CommonUtils.checkNull(paramMap.get("mbomHeaderObjid"));
+
+ if(!"".equals(mbomHeaderObjid)) {
+ // M-BOM 헤더 정보 조회
+ paramMap.put("mbomHeaderObjid", mbomHeaderObjid);
+ Map mbomHeader = commonService.selectOne("productionplanning.getMbomHeaderByObjid", request, paramMap);
+ request.setAttribute("mbomHeader", mbomHeader);
+
+ // M-BOM 이력 조회
+ List