Files
vexplor/WebContent/WEB-INF/view/ProductionMng/humanInputPlanFormPopup.jsp
2025-08-21 09:41:46 +09:00

528 lines
20 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ page import="java.util.*" %>
<%@include file= "/init.jsp" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
String userId = CommonUtils.checkNull(person.getUserId());
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
</head>
<script type="text/javascript" src="/js/jquery.floatThead.min.js" ></script>
<script>
$(document).ready(function(){
$('#fixTable').floatThead();
/* if(""==${cal}){
Swal.fire('WBS 일정이 존재하지 않습니다. 일정 작성후 다시 시도하시기 바랍니다.');
self.close(0);
} */
$("#btnClose").click(function(){
self.close(0);
});
//수정
$("#btnSave").click(function(){
fn_save();
});
});
</script>
<script>
//저장시 사용하는 카운트
var saveCount = 1;
//수주활동 등록정보 수정
function fn_save(){
if(fnc_valitate("form1")){
var message="저장";
if("${actionType}"=='regist'){
message="등록";
}
if(confirm(message+"하시겠습니까?")){
<%
ArrayList cal = (ArrayList)request.getAttribute("cal");
for(int i=1; i <= cal.size()-1; i++){
//Map resultmap = (HashMap)cal.get(0);
//resultmap.get("WBS_DATE");
/* Map resultmap = (HashMap)cal.get(i);
if(!"total".equals(resultmap.get("WBS_DATE"))){ */
%>
var planIncount = $("#plan_in_count_"+<%=i%>).val();
$("#plan_in_count").val(planIncount);
var planOutcount = $("#plan_out_count_"+<%=i%>).val();
$("#plan_out_count").val(planOutcount);
var planOutcount1 = $("#plan_out_count1_"+<%=i%>).val();
$("#plan_out_count1").val(planOutcount1);
var perIncount = $("#per_in_count_"+<%=i%>).val();
$("#per_in_count").val(perIncount);
var perInOvercount = $("#per_in_over_count_"+<%=i%>).val();
$("#per_in_over_count").val(perInOvercount);
var per_out_count = $("#per_out_count_"+<%=i%>).val();
$("#per_out_count").val(per_out_count);
var per_over_count = $("#per_over_count_"+<%=i%>).val();
$("#per_over_count").val(per_over_count);
var per_out_count1 = $("#per_out_count1_"+<%=i%>).val();
$("#per_out_count1").val(per_out_count1);
var per_over_count1 = $("#per_over_count1_"+<%=i%>).val();
$("#per_over_count1").val(per_over_count1);
var per_out_count2 = $("#per_out_count2_"+<%=i%>).val();
$("#per_out_count2").val(per_out_count2);
var per_over_count2 = $("#per_over_count2_"+<%=i%>).val();
$("#per_over_count2").val(per_over_count2);
var per_out_count3 = $("#per_out_count3_"+<%=i%>).val();
$("#per_out_count3").val(per_out_count3);
var per_over_count3 = $("#per_over_count3_"+<%=i%>).val();
$("#per_over_count3").val(per_over_count3);
var per_out_count4 = $("#per_out_count4_"+<%=i%>).val();
$("#per_out_count4").val(per_out_count4);
var per_over_count4 = $("#per_over_count4_"+<%=i%>).val();
$("#per_over_count4").val(per_over_count4);
var per_out_count5 = $("#per_out_count5_"+<%=i%>).val();
$("#per_out_count5").val(per_out_count5);
var per_over_count5 = $("#per_over_count5_"+<%=i%>).val();
$("#per_over_count5").val(per_over_count5);
var wbs_date = $("#wbs_date_"+<%=i%>).val();
$("#input_date").val(wbs_date);
var assembly_plan_objid = $("#assembly_plan_objid").val();
$("#assembly_plan_objid").val(assembly_plan_objid);
saveProcess(<%=cal.size()-1%>);
<%
//}
}
%>
//saveProcess();
}
}
}
function saveProcess(size){
// 날짜 - 제거
//$("#del_date").val($("#del_date").val().replace(/-/gi,""))
//$("#req_date").val($("#req_date").val().replace(/-/gi,""))
$.ajax({
url:"/Production/saveHumanInputPlan.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
success:function(data){
if(size == saveCount){
Swal.fire("저장 되었습니다.");
location.reload();
} else {
saveCount++;
}
},
error: function(jqxhr, status, error){
}
});
}
</script>
<body>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="assembly_plan_objid" id="assembly_plan_objid" value="${assembly_plan_objid}">
<input type="hidden" name="input_date" id="input_date" value="">
<input type="hidden" name="plan_in_count" id="plan_in_count" value="">
<input type="hidden" name="plan_out_count" id="plan_out_count" value="">
<input type="hidden" name="plan_out_count1" id="plan_out_count1" value="">
<input type="hidden" name="per_in_count" id="per_in_count" value="">
<input type="hidden" name="per_in_over_count" id="per_in_over_count" value="">
<input type="hidden" name="per_out_count" id="per_out_count" value="">
<input type="hidden" name="per_over_count" id="per_over_count" value="">
<input type="hidden" name="per_out_count1" id="per_out_count1" value="">
<input type="hidden" name="per_over_count1" id="per_over_count1" value="">
<input type="hidden" name="per_out_count2" id="per_out_count2" value="">
<input type="hidden" name="per_over_count2" id="per_over_count2" value="">
<input type="hidden" name="per_out_count3" id="per_out_count3" value="">
<input type="hidden" name="per_over_count3" id="per_over_count3" value="">
<input type="hidden" name="per_out_count4" id="per_out_count4" value="">
<input type="hidden" name="per_over_count4" id="per_over_count4" value="">
<input type="hidden" name="per_out_count5" id="per_out_count5" value="">
<input type="hidden" name="per_over_count5" id="per_over_count5" value="">
<section>
<div class="plm_menu_name">
<h2>
<span>설비조립_투입인원_계획 VS 실적</span>
</h2>
</div>
<!-- <div id="businessPopupFormWrap" style="overflow-y:scroll; height:700px;"> -->
<div id="content-box-s" style="overflow-y:auto; height:700px;">
<!-- <div class="form_popup_title">&nbsp;&nbsp;&nbsp;영업활동 등록</div> -->
<table class="plm_table" id="fixTable">
<colgroup>
<col width="5%">
<col width="20%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
</colgroup>
<thead>
<tr class="plm_thead" style="position:relative;top:expression(this.offsetParent.scrollTop);">
<td rowspan="4">순</td>
<td rowspan="4">Date</td>
<td colspan="14">실적</td>
</tr>
<tr class="plm_thead">
<td rowspan="2" colspan="2">자사(일용)</td>
<td colspan="6">기구외주</td>
<td colspan="6">전장외주</td>
</tr>
<tr class="plm_thead">
<%-- <c:choose>
<c:when test="${!empty info}"> --%>
<c:choose>
<c:when test="${info.OUTC1 eq NULL}">
<td colspan="2"> </td>
</c:when>
<c:otherwise>
<td colspan="2">${info.OUTC1}</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${info.OUTC2 eq NULL}">
<td colspan="2"> </td>
</c:when>
<c:otherwise>
<td colspan="2">${info.OUTC2}</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${info.OUTC3 eq NULL}">
<td colspan="2"> </td>
</c:when>
<c:otherwise>
<td colspan="2">${info.OUTC3}</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${info.OUTC4 eq NULL}">
<td colspan="2"> </td>
</c:when>
<c:otherwise>
<td colspan="2">${info.OUTC4}</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${info.OUTC5 eq NULL}">
<td colspan="2"> </td>
</c:when>
<c:otherwise>
<td colspan="2">${info.OUTC5}</td>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${info.OUTC6 eq NULL}">
<td colspan="2"> </td>
</c:when>
<c:otherwise>
<td colspan="2">${info.OUTC6}</td>
</c:otherwise>
</c:choose>
<%-- <td colspan="2">${info.OUTC1}</td>
<td colspan="2">${info.OUTC2}</td>
<td colspan="2">${info.OUTC3}</td>
<td colspan="2">${info.OUTC4}</td>
<td colspan="2">${info.OUTC5}</td>
<td colspan="2">${info.OUTC6}</td> --%>
<%-- </c:when>
</c:choose> --%>
</tr>
<tr class="plm_thead">
<td>일반</td>
<td>잔업</td>
<td>일반</td>
<td>잔업</td>
<td>일반</td>
<td>잔업</td>
<td>일반</td>
<td>잔업</td>
<td>일반</td>
<td>잔업</td>
<td>일반</td>
<td>잔업</td>
<td>일반</td>
<td>잔업</td>
</tr>
</thead>
<c:choose>
<c:when test="${!empty cal}">
<c:forEach var="info" items="${cal}" varStatus="status">
<c:choose>
<c:when test="${info.WBS_DATE eq 'total'}">
<tr>
<td colspan="2">SUM</td>
<td style="color: blue; font-weight: 900;">${info.PER_IN_COUNT}</td>
<td style="color: blue; font-weight: 900;">${info.PER_IN_OVER_COUNT}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OUT_COUNT}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OVER_COUNT}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OUT_COUNT1}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OVER_COUNT1}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OUT_COUNT2}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OVER_COUNT2}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OUT_COUNT3}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OVER_COUNT3}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OUT_COUNT4}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OVER_COUNT4}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OUT_COUNT5}</td>
<td style="color: blue; font-weight: 900;">${info.PER_OVER_COUNT5}</td>
</tr>
</c:when>
<c:otherwise>
<tr>
<td>${status.index}</td>
<td>
<fmt:parseDate value="${info.WBS_DATE}" var="fmtString" pattern="yyyyMMdd"/>
<fmt:formatDate value="${fmtString}" var="fmtWBSDate" pattern="yyyy-MM-dd" />
<c:out value="${fmtWBSDate}"></c:out>
<input type="hidden" id="wbs_date_${status.index}" name="wbs_date_${status.count}" value="${info.WBS_DATE}"/>
<input type="hidden" id="assembly_plan_objid" name="assembly_plan_objid" value="${info.ASSEMBLY_PLAN_OBJID}"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_in_count_${status.index}" name="per_in_count_${status.count}" value="${empty info.PER_IN_COUNT ? '0' : info.PER_IN_COUNT }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_in_over_count_${status.index}" name="per_in_over_count_${status.count}" value="${empty info.PER_IN_OVER_COUNT ? '0' : info.PER_IN_OVER_COUNT }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_out_count_${status.index}" name="per_out_count_${status.count}" value="${empty info.PER_OUT_COUNT ? '0' : info.PER_OUT_COUNT }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_over_count_${status.index}" name="per_over_count_${status.count}" value="${empty info.PER_OVER_COUNT ? '0' : info.PER_OVER_COUNT }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_out_count1_${status.index}" name="per_out_count1_${status.count}" value="${empty info.PER_OUT_COUNT1 ? '0' : info.PER_OUT_COUNT1 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_over_count1_${status.index}" name="per_over_count1_${status.count}" value="${empty info.PER_OVER_COUNT1 ? '0' : info.PER_OVER_COUNT1 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_out_count2_${status.index}" name="per_out_count2_${status.count}" value="${empty info.PER_OUT_COUNT2 ? '0' : info.PER_OUT_COUNT2 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_over_count2_${status.index}" name="per_over_count2_${status.count}" value="${empty info.PER_OVER_COUNT2 ? '0' : info.PER_OVER_COUNT2 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_out_count3_${status.index}" name="per_out_count3_${status.count}" value="${empty info.PER_OUT_COUNT3 ? '0' : info.PER_OUT_COUNT3 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_over_count3_${status.index}" name="per_over_count3_${status.count}" value="${empty info.PER_OVER_COUNT3 ? '0' : info.PER_OVER_COUNT3 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_out_count4_${status.index}" name="per_out_count4_${status.count}" value="${empty info.PER_OUT_COUNT4 ? '0' : info.PER_OUT_COUNT4 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_over_count4_${status.index}" name="per_over_count4_${status.count}" value="${empty info.PER_OVER_COUNT4 ? '0' : info.PER_OVER_COUNT4 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_out_count5_${status.index}" name="per_out_count5_${status.count}" value="${empty info.PER_OUT_COUNT5 ? '0' : info.PER_OUT_COUNT5 }"/>
</td>
<td>
<input type="text" style="text-align:center; color: blue;" id="per_over_count5_${status.index}" name="per_over_count5_${status.count}" value="${empty info.PER_OVER_COUNT5 ? '0' : info.PER_OVER_COUNT5 }"/>
</td>
</tr>
</c:otherwise>
</c:choose>
</c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</table>
<%-- <table class="plm_table">
<colgroup>
<col width="10">
<col width="10">
<col width="10">
<col width="10">
<c:choose>
<c:when test="${!empty cal}">
<c:forEach var="info" items="${cal}" varStatus="status">
<col width="10">
</c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</colgroup>
<tr class="plm_thead">
<td colspan="2">구분</td>
<td>SUM</td>
<c:choose>
<c:when test="${!empty cal}">
<c:forEach var="info" items="${cal}" varStatus="status">
<td>${info.WBS_DATE}</td>
<input type="hidden" id="wbs_date_${status.count}" name="wbs_date_${status.count}" value="${info.WBS_DATE}"/>
<input type="hidden" id="assembly_plan_objid" name="assembly_plan_objid" value="${info.ASSEMBLY_PLAN_OBJID}"/>
</c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</tr>
<tr>
<td rowspan="2">계획</td>
<td>자사</td>
<td>자사sum</td>
<c:choose>
<c:when test="${!empty cal}">
<c:forEach var="info" items="${cal}" varStatus="status">
<td>
<input type="text" id="plan_in_count_${status.count}" name="plan_in_count_${status.count}" value="${empty info.PLAN_IN_COUNT ? '0' : info.PLAN_IN_COUNT }"/>
</td>
<input type="hidden" value="${info.WBS_DATE}"/>
</c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</tr>
<tr>
<td>외주</td>
<td>외주sum</td>
<c:choose>
<c:when test="${!empty cal}">
<c:forEach var="info" items="${cal}" varStatus="status">
<td>
<input type="text" id="plan_out_count_${status.count}" name="plan_out_count_${status.count}" value="${empty info.PLAN_OUT_COUNT ? '0' : info.PLAN_OUT_COUNT }"/>
</td>
<input type="hidden" value="${info.WBS_DATE}"/>
</c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</tr>
<tr>
<td rowspan="2">실적</td>
<td>자사</td>
<td>자사sum</td>
<c:choose>
<c:when test="${!empty cal}">
<c:forEach var="info" items="${cal}" varStatus="status">
<td>
<input type="text" id="per_in_count_${status.count}" name="per_in_count_${status.count}" value="${empty info.PER_IN_COUNT ? '0' : info.PER_IN_COUNT }"/>
</td>
<input type="hidden" value="${info.WBS_DATE}"/>
</c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</tr>
<tr>
<td>외주</td>
<td>외주sum</td>
<c:choose>
<c:when test="${!empty cal}">
<c:forEach var="info" items="${cal}" varStatus="status">
<td>
<input type="text" id="per_out_count_${status.count}" name="per_out_count_${status.count}" value="${empty info.PER_OUT_COUNT ? '0' : info.PER_OUT_COUNT }"/>
</td>
<input type="hidden" value="${info.WBS_DATE}"/>
</c:forEach>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
</tr>
</table> --%>
</div>
<div class="btn_wrap">
<!-- <input type="button" value="Edit" class="plm_btns" onclick=""> -->
<div class="plm_btn_wrap_center">
<c:choose>
<c:when test="${writer eq 'plm_admin' or writer eq PRODUCTION_PM}">
<input type="button" value="저장" id="btnSave" class="plm_btns">
</c:when>
<c:otherwise>
<!-- <input type="button" value="수정" id="btnSave" class="plm_btns"> -->
</c:otherwise>
</c:choose>
<%--
<c:if test="${actionType eq 'regist' or info.WRITER eq connectUserId or 'plm_admin' eq connectUserId}">
<input type="button" value="수정" id="btnSave" class="plm_btns">
</c:if> --%>
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
</section>
</form>
</body>
</html>