Files
wace_plm/WebContent/WEB-INF/view/salesMng/salesLongDeliveryList.jsp
chpark da06c4684c Initial commit: WACE PLM with database initialization features
- Add Docker Compose configurations for dev, prod, and standalone environments
- Add database initialization scripts (init-db.sh, init-db-docker.sh)
- Add enhanced start-docker-linux.sh with DB init support
- Add comprehensive database initialization guide
- Support for automatic dbexport.pgsql import on first run
- Include safety checks for production environment
2025-08-29 15:46:08 +09:00

408 lines
17 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ page import="java.util.*" %>
<%@include file="/init.jsp"%>
<%
//부품선택팝업
boolean isSelectPopup = (CommonUtils.checkNull(request.getParameter("actionType"))).equals("SelectPopup");
%>
<c:set var="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
</head>
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
<c:set var="nPage" value="${empty param.page?1:param.page}" />
<c:set var="pageIndex" value="${(nPage-1)/10}" />
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
<c:set var="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<style>
#gridDiv {
height: 690px;
}
</style>
<script type="text/javascript">
/*
$(window).bind('resize', function () {
var gridHeight = window.innerHeight - utobj.conf.grid.height;
var gridWidth = window.innerWidth - utobj.conf.grid.resizeWidth;
$('#grid1').setGridHeight( gridHeight );
$("#grid1").setGridWidth( gridWidth);
$(".ui-jqgrid-htable").css("width",gridWidth);
$(".ui-jqgrid-btable").css("width",gridWidth);
//table-layout : auto
}).trigger('resize');
*/
$(document).ready(function(){
//fnc_changePaginationAndTotalCountArea();
$("input").keyup(function(e){
if(e.keyCode == 13){
$("#page").val("1");
fn_search();
}
});
$('.select2').select2();
fnc_datepick();
//조회
$("#btnSearch").click(function(){
$("#page").val("1");
fn_search();
});
//삭제
$("#btnDel").click(function(){
var selectedRowIds = _tabulGrid.getSelectedData();
if(selectedRowIds.length==0){
Swal.fire("삭제할 행을 선택해주십시오.");
return false;
}
let objIds = selectedRowIds.map(function(o,i){
return fnc_checkNull(selectedRowIds[i].OBJID);
});
$.ajax({
url:"/salesMng/deleteSalesLongDeliveryInfo.do"
,type:"POST"
,data: "objIds="+objIds.join(",")
,dataType:"json"
,async:false
,success:function(data){
Swal.fire(data.message);
fn_search();
self.close();
}
,error: function(jqxhr, status, error){
}
});
});
//등록
$("#btnReg").click(function(){
fn_popupStandard("");
});
//자제투입
$("#btnInput").click(function(){
var selectedRowIds = _tabulGrid.getSelectedData();
if(selectedRowIds.length==0){
Swal.fire("자제투입할 행을 선택해주십시오.");
return false;
}else if(selectedRowIds.length>1){
Swal.fire("한번에 한개의 행만 가능합니다.");
return false;
}else{
var objid = fnc_checkNull(selectedRowIds[0].OBJID);
fn_popupInput(objid);
}
});
//장납기예측수량등록
$("#btnPredict").click(function(){
var selectedRowIds = _tabulGrid.getSelectedData();
if(selectedRowIds.length==0){
Swal.fire("예측수량등록할 행을 선택해주십시오.");
return false;
}else if(selectedRowIds.length>1){
Swal.fire("한번에 한개의 행만 가능합니다.");
return false;
}else{
var objid = fnc_checkNull(selectedRowIds[0].OBJID);
fn_popupPredict(objid, "");
}
});
//추가 : 장납기부품 선택 팝업으로 사용시
$("#btnAdd").click(function(){
//var selectedRowIds = fn_jqGrid_selarrrow($("#grid1"));
var selectedData = _tabulGrid.getSelectedData();
if(selectedData.length==0){
Swal.fire("추가할 행을 선택해주십시오.");
return false;
}
/* jqgrid
$.each(selectedRowIds, function(i,o){
var rowData = new Map();
rowData.put("LD_PART_OBJID", $("#grid1").getRowData(o).OBJID );
rowData.put("PART_NAME" , $("#grid1").getRowData(o).LD_PART_NAME );
rowData.put("SPEC" , $("#grid1").getRowData(o).SPEC );
rowData.put("FORM_NO" , $("#grid1").getRowData(o).FORM_NO );
rowData.put("MAKER" , $("#grid1").getRowData(o).MAKER );
rowData.put("MATERIAL_CODE", $("#grid1").getRowData(o).MATERIAL_CODE);
rowData.put("SUPPLY_NAME" , $("#grid1").getRowData(o).SUPPLY_NAME );
opener.fn_addRow(rowData, true);
});
*/
//tabulator
$.each(selectedData, function(i,o){
var rowData = new Map();
rowData.put("LD_PART_OBJID", selectedData[i].OBJID );
rowData.put("PART_NAME" , selectedData[i].LD_PART_NAME );
rowData.put("SPEC" , selectedData[i].SPEC );
rowData.put("FORM_NO" , selectedData[i].FORM_NO );
rowData.put("MAKER" , selectedData[i].MAKER );
rowData.put("MATERIAL_CODE", selectedData[i].MATERIAL_CODE);
rowData.put("SUPPLY_NAME" , selectedData[i].SUPPLY_NAME );
rowData.put("STOCK_QTY" , selectedData[i].INPUT_QTY );
opener.fn_addRow(rowData, true);
});
self.close();
});
fn_search();
setTimeout(() => fnc_calculateContentHeight("gridDiv", 15), 50);
$("#gridDiv").off("fnc_calculateContentHeight");
$(window).resize(function() {
fnc_calculateContentHeight("gridDiv", 15);
});
});
var columns = [
{title:"자재정보", headerHozAlign:'center', //고객정보
columns:[
{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '품명', field : 'LD_PART_NAME' ,
formatter:fnc_createGridAnchorTag ,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().OBJID);
fn_popupStandard(objid);
}
},
{headerHozAlign : 'center', hozAlign : 'left', width : '350', title : '사양(규격)', field : 'SPEC' },
{headerHozAlign : 'center', hozAlign : 'left', width : '100', title : 'Location', field : 'LOCATION_NAME' },
{headerHozAlign : 'center', hozAlign : 'left', width : '120', title : '내자/외자', field : 'FORM_NO' },
{headerHozAlign : 'center', hozAlign : 'left', width : '100', title : '메이커', field : 'MAKER' },
{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '자재코드', field : 'MATERIAL_CODE' },
{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '공급업체', field : 'SUPPLY_NAME' }
],
},
{title:"재고관리", headerHozAlign:'center', //고객정보
columns:[
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '재고수량', field : 'INPUT_QTY' },
{headerHozAlign : 'center', hozAlign : 'center', width : '110', title : '자재투입이력', field : 'INPUT_CNT',
formatter:fnc_subInfoValueFormatter,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().OBJID);
fn_popupInput(objid);
}
},
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '단가', field : 'PRICE' ,
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
},
{headerHozAlign : 'center', hozAlign : 'right', width : '150', title : '보유금액', field : 'PRICE_SUM' ,
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
},
],
},
/* {title:"소요량예측", headerHozAlign:'center', //고객정보
columns:[
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '계', field : 'M_TOTAL',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
},
{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '1월', field : 'M01',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
},
{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '2월', field : 'M02',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '3월', field : 'M03',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '4월', field : 'M04',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '5월', field : 'M05',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '6월', field : 'M06',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '7월', field : 'M07',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '8월', field : 'M08',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '9월', field : 'M09',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '10월', field : 'M10',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '11월', field : 'M11',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}, {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '12월', field : 'M12',
formatter:fnc_createGridAnchorTagAndComma,
cellClick:function(e, cell){
var objid = fnc_checkNull(cell.getData().RELEASE_OBJID);
var month = ''
fn_popupPredict(objid, month);
}
}
],
} */
];
//var grid;
function fn_search(){
_tabulGrid = fnc_tabul_search(_tabul_layout_fitDataStretch, _tabulGrid, "/salesMng/salesLongDeliveryGridList.do", columns, true);
}
function fn_formPopUp(width, heigth, url, target, objId, month, actionType){
var hiddenForm = document.hiddenForm;
fn_centerPopup(width, heigth, "", target);
hiddenForm.objId.value = objId;
hiddenForm.actionType.value = actionType;
hiddenForm.month.value = month;
hiddenForm.action = url;
hiddenForm.target = target;
hiddenForm.submit();
}
function fn_popupStandard(objid){
fn_formPopUp(600,300, "/salesMng/salesLongDeliveryFormPopup.do", "salesLongDeliveryFormPopup", objid, "", "STANDARD");
}
function fn_popupInput(objid){
fn_formPopUp(600,590, "/salesMng/salesLongDeliveryFormPopup.do", "salesLongDeliveryFormPopup", objid, "", "INPUT");
}
function fn_popupPredict(objid, month){
fn_formPopUp(900,590, "/salesMng/salesLongDeliveryFormPopup.do", "salesLongDeliveryFormPopup", objid, month, "PREDICT");
}
</script>
<body>
<form name="hiddenForm" id="hiddenForm" method="post">
<input type="hidden" name="objId" />
<input type="hidden" name="actionType" />
<input type="hidden" name="month" />
</form>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="actionType" value="${param.actionType }"/>
<input type="hidden" name="callbackFnc" value="${param.callbackFnc }"/>
<input type="hidden" name="callType" value="${param.callType }"/>
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name_gdnsi">
<h2>
<span>재고 리스트</span>
</h2>
<div class="btnArea">
<% if(isSelectPopup){ %>
<input type="button" class="plm_btns" value="추가" id="btnAdd">
<% }else{ %>
<input type="button" class="plm_btns" value="삭제" id="btnDel">
<input type="button" class="plm_btns" value="등록" id="btnReg">
<input type="button" class="plm_btns" value="자재투입" id="btnInput">
<input type="button" class="plm_btns" value="예측수량등록" id="btnPredict">
<% } %>
<input type="button" class="plm_btns" value="조회" id="btnSearch">
</div>
</div>
<div id="plmSearchZon" style="min-height:40px;">
<table>
<tr>
<td><label for="">품명</label></td>
<td><input type="text" name="ld_part_name" id="ld_part_name" autocomplete="off" value="${param.ld_part_name}" /></td>
<td><label for="">사양(규격)</label></td>
<td><input type="text" name="spec" id="spec" style="width:250px;" autocomplete="off" value="${param.spec}" /></td>
<td><label for="">Location</label></td>
<td><select name="Location" id="Location" class="select2" autocomplete="off" style=""><option value="">선택</option>${code_map.location}</select></td>
<td><label for="">메이커</label></td>
<td><input type="text" name="maker" id="maker" autocomplete="off" value="${param.maker}" /></td>
<td><label for="">자재코드</label></td>
<td><input type="text" name="material_code" id="material_code" autocomplete="off" value="${param.material_code}" /></td>
<td><label for="">공급업체</label></td>
<td><select name="admin_supply" id="admin_supply" class="select2" autocomplete="off" style="width:280px"><option value="">선택</option>${code_map.admin_supply}</select></td>
</tr>
</table>
</div>
<div>
<!-- <div class="ascendig_text" style="width:50px;float:left;">
<font size="2px" id="totalCnt"></font>
</div> -->
<% if(!isSelectPopup){ %>
<div style="width:50%;float:left; color: RED; ">
<h5><span>※ 장남기품 비용(원): </span><fmt:formatNumber pattern="#,###" value="${resultMap.TOTAL_PRICE_SUM}" /></h2>
</div>
<% } %>
</div>
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>
</form>
</body>
</html>