m-bom 버전 이력 팝업 & 총단가 저장 안되는 오류 수정 등...
This commit is contained in:
159
WebContent/WEB-INF/view/productionplanning/mBomHistoryPopup.jsp
Normal file
159
WebContent/WEB-INF/view/productionplanning/mBomHistoryPopup.jsp
Normal file
@@ -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" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>M-BOM 이력</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
body {
|
||||
padding: 20px;
|
||||
}
|
||||
.header-info {
|
||||
background-color: #f5f5f5;
|
||||
padding: 15px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.header-info table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
.header-info th {
|
||||
text-align: left;
|
||||
padding: 5px 10px;
|
||||
background-color: #e0e0e0;
|
||||
width: 120px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.header-info td {
|
||||
padding: 5px 10px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.history-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 10px;
|
||||
table-layout: fixed;
|
||||
}
|
||||
.history-table th {
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.history-table td {
|
||||
padding: 8px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.history-table tr:nth-child(even) {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.history-table tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.no-data {
|
||||
text-align: center;
|
||||
padding: 30px;
|
||||
color: #999;
|
||||
}
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>M-BOM 이력</h3>
|
||||
|
||||
<!-- M-BOM 헤더 정보 -->
|
||||
<div class="header-info">
|
||||
<table>
|
||||
<tr>
|
||||
<th>M-BOM 품번</th>
|
||||
<td>${mbomHeader.MBOM_NO}</td>
|
||||
<th>품번</th>
|
||||
<td>${mbomHeader.PART_NO}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>품명</th>
|
||||
<td colspan="3">${mbomHeader.PART_NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>최초 작성자</th>
|
||||
<td>${mbomHeader.WRITER}</td>
|
||||
<th>최초 작성일</th>
|
||||
<td>${mbomHeader.REGDATE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>최종 수정자</th>
|
||||
<td>${mbomHeader.EDITER}</td>
|
||||
<th>최종 수정일</th>
|
||||
<td>${mbomHeader.EDIT_DATE}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 이력 테이블 -->
|
||||
<h3>변경 이력</h3>
|
||||
<c:choose>
|
||||
<c:when test="${not empty historyList}">
|
||||
<table class="history-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 60px;">No</th>
|
||||
<th style="width: 100px;">변경유형</th>
|
||||
<th style="width: auto;">변경내용</th>
|
||||
<th style="width: 120px;">변경자</th>
|
||||
<th style="width: 180px;">변경일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${historyList}" var="history" varStatus="status">
|
||||
<tr>
|
||||
<td>${historyList.size() - status.index}</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${history.CHANGE_TYPE == 'CREATE'}">생성</c:when>
|
||||
<c:when test="${history.CHANGE_TYPE == 'UPDATE'}">수정</c:when>
|
||||
<c:when test="${history.CHANGE_TYPE == 'DELETE'}">삭제</c:when>
|
||||
<c:otherwise>${history.CHANGE_TYPE}</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td style="text-align: left;">${history.CHANGE_DESCRIPTION}</td>
|
||||
<td>${history.CHANGE_USER_NAME}</td>
|
||||
<td>${history.CHANGE_DATE}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="no-data">변경 이력이 없습니다.</div>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<div style="text-align: center; margin-top: 20px;">
|
||||
<button type="button" onclick="window.close();" style="padding: 8px 20px; cursor: pointer;">닫기</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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 '<span style="color: #0066cc; cursor: pointer; text-decoration: underline;">' + value + '</span>';
|
||||
}
|
||||
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({
|
||||
|
||||
@@ -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, // 원본 값 그대로
|
||||
|
||||
@@ -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:{
|
||||
|
||||
Reference in New Issue
Block a user