Files
wace_plm/WebContent/WEB-INF/view/inventoryMng/materialMoveFormPopUp.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

453 lines
14 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"%>
<!DOCTYPE html>
<html>
<head>
<c:set var="now" value="<%=new java.util.Date() %>" />
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<title><%=Constants.SYSTEM_NAME%></title>
<script type="text/javascript"></script>
<script>
$(document).ready(function() {
$(".WRITER").val('<%=connectUserName%>');
/* $(".select2").each(function(i,o){
$(this).val( $(this).attr("data-value") ).trigger("change");
}); */
selectSetVal("data-select", true);
$('.select2').select2();
fnc_datepick2(); //달력
$("input:text[numberOnly]").on("keyup", function() {
$(this).val(fnc_addComma($(this).val().replace(/[^0-9]/g,"")));
});
$("input[name*=QTY]").each(function(){
$(this).val(fnc_addComma($(this).val()));
});
//닫기
$("#btnClose").click(function(){
self.close(0);
});
//자재불출
$("#btnAccept").click(function(){
fn_accept();
});
$("#btnSave").click(function(){
/* if(fnc_valitate("form1")){ */
if(fn_checkInputData()){
if(confirm("저장하시겠습니까?")){
$("input[name*='_QTY']").each(function(){
$(this).val($(this).val().replace(/,/gi,""));
});
$.ajax({
url:"/inventoryMng/saveInventoryMove.do"
,type:"POST"
,data: $("#form1").serialize()
,dataType:"json"
,async:false
,success:function(data){
alert(data.message);
opener.fn_search();
self.close();
}
,error: function(jqxhr, status, error){
}
});
}
/* } */
}
});
//취소
$("#btnCancel").click(function(){
var objId = $(this).attr("data-OBJID");
var params = "?objId="+objId;
document.form1.action ="/project/wbs/wbsTaskListDetailPopUp.do"+params;
document.form1.target ="_self";
document.form1.submit();
});
//체크박스 전체선택/전체해제
$("#allCheck").click(function(){
if($("#allCheck").prop("checked")) {
$("input[type=checkbox]").prop("checked",true);
} else {
$("input[type=checkbox]").prop("checked",false);
}
});
$("#btnDelete").click(function(){
fn_deleteWBSTask2();
});
});
</script>
<script>
/* function fn_reload(){
location.reload();
} */
function chageLangSelect(objId, subLocation){
var location = $("#LOCATION_"+objId).val();
fnc_getCodeListAppend(location, "SUB_LOCATION_"+objId, subLocation);
}
function fn_deleteWBSTask2(){
var checkArr = new Array();
$("input[name=CHK_OBJID]:checked").each(function(){
var objId = fnc_checkNull($(this).val().replace(" ",""));
checkArr.push(objId);
});
if(0 < checkArr.length){
if(confirm("삭제하시겠습니까?")){
$.ajax({
type : "POST",
url:"/project/deleteWBSTask.do",
data: {"checkArr":checkArr.join()},
dataType:"json",
success:function(data){
Swal.fire(data.msg);
if(data.result =="true"){
fn_reload();
}
}
,error: function(jqxhr, status, error){
}
});
}
}else{
Swal.fire("선택된 대상이 없습니다.");
return false;
}
}
function deleteUpdate(){
//확정
// name을 가지는 checkbox 중 체크표시된 항목의 전체 개수
if($("input:checkbox[name=chk]:checked").length > 0){
// 현재 체크된 체크박스의 li 정보 얻기
var checkObjId = '';
$("input:checkbox[name=chk]:checked").each(function(index, val) {
if (this.checked)
{
if(index == 0 ){
checkObjId = $(this).attr("data-OBJID");
}else{
checkObjId += ','+$(this).attr("data-OBJID");
}
}
});
deleteProcess(checkObjId);
} else {
Swal.fire("삭제 항목을 선택해주세요.");
}
}
function completeProcess(checkObjId){
if(confirm("확정 하시겠습니까?")){
$.ajax({
url:"/project/completeWBSTask.do",
type:"POST",
data:{"ObjId":checkObjId},
dataType:"json",
success:function(data){
Swal.fire("확정 되었습니다.");
complete_load();
},
error: function(jqxhr, status, error){
}
});
}
}
function deleteProcess(checkObjId){
if(confirm("삭제 하시겠습니까?")){
$.ajax({
url:"/project/wbs/deleteWBSTask.do",
type:"POST",
data:{"ObjId":checkObjId},
dataType:"json",
success:function(data){
Swal.fire("삭제 되었습니다.");
complete_load();
},
error: function(jqxhr, status, error){
}
});
}
}
function fn_checkInputData(){
var returnFlag = true;
var totalMoveQty = 0;
$("input[name=IN_OBJID]").each(function(i) {
var targetObjId = $(this).val();
var MOVE_QTY = $("#MOVE_QTY_"+targetObjId).val()
var LOCATION = $("#LOCATION_"+targetObjId).val();
var SUB_LOCATION = $("#SUB_LOCATION_"+targetObjId).val();
var MOVE_DATE = $("#MOVE_DATE_"+targetObjId).val();
var MOVE_USER = $("#MOVE_USER_"+targetObjId).val();
totalMoveQty += MOVE_QTY;
if(0 < MOVE_QTY){
if("" == LOCATION){
Swal.fire("입력된 Location이 없습니다.");
returnFlag = false;
return false;
}
/* if("" == SUB_LOCATION){
Swal.fire("입력된 SubLocation이 없습니다.");
returnFlag = false;
return false;
} */
if("" == MOVE_DATE){
Swal.fire("입력된 인계일이 없습니다.");
returnFlag = false;
return false;
}
if("" == MOVE_USER){
Swal.fire("입력된 인수자가 없습니다.");
returnFlag = false;
return false;
}
}
});
// MOVE_QTY의 합이 0인 경우 체크
if(totalMoveQty == 0){
Swal.fire("이동수량을 입력해주세요.");
return false;
}
return returnFlag;
}
//자재불출
function fn_accept() {
Swal.fire({
title: '불출하시겠습니까?',
text: '',
icon: 'warning',
showCancelButton: true, // cancel버튼 보이기. 기본은 원래 없음
confirmButtonColor: '#3085d6', // confrim 버튼 색깔 지정
cancelButtonColor: '#d33', // cancel 버튼 색깔 지정
confirmButtonText: '확인', // confirm 버튼 텍스트 지정
cancelButtonText: '취소', // cancel 버튼 텍스트 지정
reverseButtons: false, // 버튼 순서 거꾸로
}).then(result => {
// 만약 Promise리턴을 받으면,
if (result.isConfirmed) { // 만약 모달창에서 confirm 버튼을 눌렀다면
$.ajax({
url:"/inventoryMng/acceptInventoryRequestInfo.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
success:function(data){
alert(data.message);
opener.fn_search();
self.close();
},
error: function(jqxhr, status, error){
}
});
}
});
}
//자동계산
/* function fn_calc(objid){
var value = $("#REQUEST_QTY_"+objid).val();
$("#OUT_QTY_"+objid).val(value);
} */
</script>
</head>
<body class="bodyNoScrollX">
<form name="hiddenForm" id="hiddenForm" method="post">
<!-- <input type="hidden" name="OBJID" id="OBJID"> -->
<input type="hidden" name="PARENT_OBJID" id="PARENT_OBJID" value="${param.OBJID}">
</form>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="INVENTORY_REQUEST_MASTER_OBJID" id="INVENTORY_REQUEST_MASTER_OBJID" value="${resultMap.OBJID}">
<input type="hidden" name="projectObjId" value="${param.OBJID}">
<input type="hidden" name="parentObjId">
<input type="hidden" name="taskObjId">
<input type="hidden" name="projStep">
<input type="hidden" name="status">
<%-- <input type="hidden" name="OBJID" value="${param.OBJID}"> --%>
<div class="plm_menu_name">
</div>
<section class="contents_page_basic_margin" style="margin: 10px; height: calc(100% - 100px);;">
<div>
<table class="pmsPopupForm" style="z-index:99; height:50px; left-margin: 0;">
<colgroup>
<col width="10%">
<col width="10%">
<col width="20%">
<col width="80%">
</colgroup>
<%-- <tr>
<td class="input_title"><label for="">프로젝트번호</label></td>
<td><select name="project_no" id="project_no" required reqTitle="프로젝트번호" type="select" class="select2" autocomplete="off" ><option value="">선택</option>${code_map.project_no}</select></td>
<td class="input_title"><label for="">비고</label></td>
<td class="input_sub_title"><input type="text" name="REMARK" value="${resultMap.REMARK}"style="height:99%"/></td>
</tr> --%>
</table>
</div>
<div class="plm_table_wrap" style="height: auto;">
<div class="in_table_scroll_wrap _table1" style="height:26px; width: 98%;">
<table class="plm_table" style="position:absolute; border-Spacing:0; border-Collapse: separate; width: 99%;">
<colgroup>
<col width="90px">
<col width="150px">
<col width="70px">
<col width="70px">
<col width="70px">
<col width="60px">
<col width="60px">
<col width="50px">
<col width="70px">
<col width="70px">
<col width="50px">
<col width="80px">
<col width="85px">
<col width="60px">
<col width="60px">
<col width="60px">
</colgroup>
<thead>
<tr class="plm_thead">
<td>품번</td>
<td>품명</td>
<td>재질</td>
<td>사양(규격)</td>
<td>MAKER</td>
<td>PART구분</td>
<td>수입검사자</td>
<td>보유수량</td>
<td>Location</td>
<td>SubLocation</td>
<td class="editableHeader">이동수량</td>
<td>이동Location</td>
<td>이동SubLocation</td>
<td>인계일</td>
<td>인계자</td>
<td>인수자</td>
</tr>
</thead>
</table>
</div>
<div class="plm_scroll_table" style="height:auto;">
<table id="dataTable" class="plm_table" style="width:99.4%; ">
<colgroup>
<col width="90px">
<col width="150px">
<col width="70px">
<col width="70px">
<col width="70px">
<col width="60px">
<col width="60px">
<col width="50px">
<col width="70px">
<col width="70px">
<col width="50px">
<col width="80px">
<col width="85px">
<col width="60px">
<col width="60px">
<col width="60px">
</colgroup>
<tbody class="font_white">
<c:choose>
<c:when test="${empty inventoryMngList}">
<tr style="text-align:center;">
<td align="center" colspan="16">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${inventoryMngList}" varStatus="varStatus">
<tr>
<input type="hidden" name="OBJID" value="${item.OBJID }" />
<input type="hidden" name="IN_OBJID" value="${item.IN_OBJID }" />
<td title="${item.PART_NO}" class="align_l">${item.PART_NO}</td>
<td title="${item.PART_NAME}"class="align_l">${item.PART_NAME}</td>
<td title="${item.MATERIAL}"class="align_l">${item.MATERIAL}</td>
<td title="${item.SPEC}"class="align_l">${item.SPEC}</td>
<td title="${item.MAKER}"class="align_l">${item.MAKER}</td>
<td title="${item.PART_TYPE_NAME}">${item.PART_TYPE_NAME}</td>
<td title="${item.WRITER_NAME}">${item.WRITER_NAME}</td>
<td title="${item.USE_CNT}">${item.USE_CNT}</td>
<td title="${item.LOCATION_NAME }">${item.LOCATION_NAME}</td>
<td title="${item.SUB_LOCATION_NAME }">${item.SUB_LOCATION_NAME}</td>
<td title="${item.MOVE_QTY}">
<%-- <c:choose>
<c:when test="${item.REQUEST_QTY eq null}"> --%>
<input type="text" name="MOVE_QTY" id="MOVE_QTY_${item.IN_OBJID}" value="<fmt:formatNumber value="${item.MOVE_QTY}" pattern="#,###" />" numberOnly />
<%-- </c:when>
<c:otherwise>
<input type="text" name="MOVE_QTY" id="MOVE_QTY_${item.OBJID}" value="<fmt:formatNumber value="${item.REQUEST_QTY}" pattern="#,###" />" numberOnly onchange="fn_calc('${item.OBJID}');"/>
</c:otherwise>
</c:choose> --%>
</td>
<td>
<select name="LOCATION" id="LOCATION_${item.IN_OBJID}" data-select="${item.LOCATION_2}" class="select2" onchange="chageLangSelect('${item.IN_OBJID}','${item.SUB_LOCATION_2}')"><option value="">선택</option>${code_map.location}</select>
</td>
<td>
<select name="SUB_LOCATION" id="SUB_LOCATION_${item.IN_OBJID}" data-select="${item.SUB_LOCATION_2}" class="select2"><option value="">선택</option></select>
</td>
<td title="${item.MOVE_DATE}"><input type="text" name="MOVE_DATE" id="MOVE_DATE_${item.IN_OBJID}" class="date" required reqTitle="인계일" value="${item.MOVE_DATE}"/></td>
<td title="${item.WRITER}"><input type="text" name="WRITER" class="WRITER" id="WRITER_${item.IN_OBJID}" value="${item.WRITER}" /></td>
<td title="${item.MOVE_USER}">
<select name="MOVE_USER" id="MOVE_USER_${item.IN_OBJID}" required reqTitle="인수자" data-select="${item.MOVE_USER}" type="select" class="select2" autocomplete="off" >
<option value="">선택</option>
${code_map.user_id}
</select>
</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<div class="btn_wrap" style="top:20px">
<div class="plm_btn_wrap_center">
<c:if test="${param.action ne 'view'}">
<input type="button" value="저장" id="btnSave" class="plm_btns">
<!-- <input type="button" value="자재불출" class="plm_btns" id="btnAccept"> -->
</c:if>
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
</div>
</section>
</form>
</body>
</html>