ERP-node/WebContent/WEB-INF/view/eoMng/partMngListPopUp.jsp

478 lines
20 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page import="java.util.*"%>
<%@include file="/init.jsp"%>
<%
PersonBean person = (PersonBean) session.getAttribute(Constants.PERSON_BEAN);
String connector = person.getUserId();
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<c:set var="now" value="<%=new java.util.Date() %>"/>
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
<c:set var="connector" value="<%=connector%>" />
<style type="text/css">
.content-box-s {min-height: 98%;}
</style>
<script type="text/javascript">
$(function() {
$(document).ready(function() {
fnc_datepick();
$("input[type=text]").keyup(function(e) {
if (e.keyCode == 13)
search();
});
$("#btnClose").click(function(){
self.close(0);
});
$("#btnAddPart").click(function(){
fn_addPartMng();
});
//image src encoding
$("img").each(function(i) {
var imgSrc = $(this).attr("data-SRC");
$(this).attr("src", encodeURI(imgSrc));
});
//체크박스 전체선택/전체해제
$("#allCheck").click(function() {
if ($("#allCheck").prop("checked")) {
$("input[type=checkbox]").prop("checked", true);
} else {
$("input[type=checkbox]").prop("checked", false);
}
});
$("#btnSearch").click(function() {
fn_search();
});
$("#search_customer").change(function(){
$("#search_car_type").empty();
if("" != this.value){
fnc_getCarList("", this.value, "search_car_type","${param.search_car_type}");
}
});
$("#search_product_group").change(function(){
$("#search_product").empty();
if("" != this.value){
fnc_getCodeListAppend(this.value,"search_product","${param.search_product}");
}
});
fnc_getOEMList("search_customer", "${param.search_customer}");
if("" != "${param.search_customer}"){
fnc_getCarList("", "${param.search_customer}", "search_car_type","${param.search_car_type}");
}
fnc_getCodeListAppend("<%=Constants.PRODUCT_GROUP_CODE%>","search_product_group","${param.search_product_group}");
$("#SEARCH_REVISION_RELEASE").val("${param.SEARCH_REVISION_RELEASE}");
$('.select2').select2();
if("" != "${RESULT.msg}"){
Swal.fire("${RESULT.msg}");
opener.fn_getConnectPartMngList();
}
});
});
function fn_addPartMng(){
var selectedPart = $("input[name=CHILD_OBJID]:checked");
if(0 < selectedPart.length){
if(confirm("선택된 Part를 연결하시겠습니까?")){
// document.form1.action = "/eoMng/addPartMng.do";
// document.form1.submit();
$.ajax({
url:"/eoMng/addPartMng.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
async:false,
success:function(data){
Swal.fire(data.msg);
opener.fn_refresh();
self.close();
},
error: function(jqxhr, status, error){
}
});
}
}else{
Swal.fire("선택된 Part가 없습니다.");
return false;
}
}
function openPartMngPopup(objId){
var hiddenForm = document.hiddenForm;
var url = "/partMng/partMngFormPopUp.do";
if("" != objId){
url = "/partMng/partMngDetailPopUp.do";
}
var target = "partMngPopUp";
window.open(url,target,"width=600, height=700, menubars=no, scrollbars=yes, resizable=yes");
hiddenForm.action = url;
hiddenForm.OBJID.value = objId;
hiddenForm.target = target;
hiddenForm.submit();
}
function fn_search() {
document.form1.action = "/eoMng/partMngListPopUp.do";
document.form1.submit();
}
function fn_excel() {
document.form1.actionType.value = "excel";
fn_search();
}
</script>
</head>
<body class="backcolor">
<form name="hiddenForm" id="hiddenForm" method="post">
<input type="hidden" name="OBJID" id="OBJID">
</form>
<form name="form1" id="form1" method="post">
<input type="hidden" name="OBJID" id="OBJID" value="${param.OBJID}">
<section>
<div class="min_part_enroll">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name">
<h2>
<span>설계관리_Part 조회</span>
</h2>
</div>
<!-- <div id="plmSearchZon"> -->
<!-- <table> -->
<!-- <tbody> -->
<!-- <tr> -->
<!-- <td><label for="">고객사</label></td> -->
<!-- <td> -->
<!-- <select name="search_customer" id="search_customer" style="width:130px;" autocomplete="off" class="select2"></select> -->
<!-- </td> -->
<!-- <td><label for="">차종</label></td> -->
<!-- <td> -->
<!-- <select name="search_car_type" id="search_car_type" style="width:130px;" autocomplete="off" class="select2"></select> -->
<!-- </td> -->
<!-- <td><label for="">제품군</label></td> -->
<!-- <td> -->
<!-- <select name="search_product_group" id="search_product_group" style="width:150px;" autocomplete="off" class="select2"></select> -->
<!-- </td> -->
<!-- <td><label for="">제품</label></td> -->
<!-- <td> -->
<!-- <select name="search_product" id="search_product" style="width:230px;" autocomplete="off" class="select2"></select> -->
<!-- </td> -->
<!-- <td><label for="">품번</label></td> -->
<!-- <td> -->
<%-- <input type="text" name="search_part_no" id="search_part_no" style="width:130px;" autocomplete="off" value="${param.search_part_no}"> --%>
<!-- </td> -->
<!-- <td><label for="">품명</label></td> -->
<!-- <td> -->
<%-- <input type="text" name="search_part_name" id="search_part_name" style="width:130px;" autocomplete="off" value="${param.search_part_name}"> --%>
<!-- </td> -->
<!-- </tr> -->
<!-- </tbody> -->
<!-- </table> -->
<!-- </div> -->
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<%-- <td><label for="product_code">양산제품코드</label></td>
<td>
<select name="product_code" id="product_code" style="" class="select2" autocomplete="off">
<option value="">선택</option>
${code_map.product_code}
</select>
</td>
<td><label for="">UPG_NO</label></td>
<td>
<select name="upg_no" id="upg_no" class="select2" style="width:250px;" autocomplete="off"></select>
</td> --%>
<td><label for="">품번</label></td>
<td>
<input type="text" name="SEARCH_PART_NO" id="SEARCH_PART_NO" style="width:194px;" autocomplete="off" value="${param.SEARCH_PART_NO}">
</td>
<td><label for="">품명</label></td>
<td>
<input type="text" name="SEARCH_PART_NAME" id="SEARCH_PART_NAME" style="width:150px;" autocomplete="off" value="${param.SEARCH_PART_NAME}">
</td>
<td><label for="">재질</label></td>
<td>
<input type="text" name="SEARCH_MATERIAL" id="SEARCH_MATERIAL" style="width:150px;" autocomplete="off" value="${param.SEARCH_MATERIAL}">
</td>
<td><label for="">사양</label></td>
<td>
<input type="text" name="SEARCH_SPEC" id="SEARCH_SPEC" style="width:150px;" autocomplete="off" value="${param.SEARCH_SPEC}">
</td>
<td><label for="">부품 유형</label></td>
<td>
<select name="SEARCH_PART_TYPE" id="SEARCH_PART_TYPE" style="width:150px;" autocomplete="off"></select>
</td>
<td><label for="">EO No.</label></td>
<td>
<input type="text" name="SEARCH_EO" id="SEARCH_EO" style="width:150px;" autocomplete="off" value="${param.SEARCH_EO}">
</td>
</tr>
<tr>
<td><label for="">EO Date</label></td>
<td>
<input type="text" name="SEARCH_EO_DATE_FROM" id="SEARCH_EO_DATE_FROM" style="width:90px;" autocomplete="off" value="${param.SEARCH_EO_DATE_FROM}">~
<input type="text" name="SEARCH_EO_DATE_TO" id="SEARCH_EO_DATE_TO" style="width:90px;" autocomplete="off" value="${param.SEARCH_EO_DATE_TO}">
</td>
<td><label for="">Revision</label></td>
<td colspan="7">
<select name="SEARCH_REVISION_RELEASE" id="SEARCH_REVISION_RELEASE" style="width:150px;" autocomplete="off">
<option value="1">current</option>
<option value="0">all</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<div class="contents_page_basic_margin">
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="등록" class="plm_btns" id="btnAddPart">
</div>
</div>
<div class="ascendig_text">
<font size="3px">총 ${fn:length(LIST)}건</font>
</div>
<div class="plm_table_wrap">
<!-- <div style="overflow-y:scroll;"> -->
<!-- <table class="plm_table"> -->
<!-- <colgroup> -->
<!-- <col width="2%" /> -->
<!-- <col width="4%" /> 순 -->
<!-- <col width="13%" /> 품번 -->
<!-- <col width="13%" /> 품명 -->
<!-- <col width="9%" /> 형상 -->
<!-- <col width="5%" /> Revision -->
<!-- <col width="5%" /> 수량 -->
<!-- <col width="9%" /> 재질 -->
<!-- <col width="9%" /> 중량 -->
<!-- <col width="7%" /> SIZE -->
<!-- <col width="8%" /> 표면처리 -->
<!-- <col width="8%" /> SPEC -->
<!-- <col width="4%" /> -->
<!-- <col width="4%" /> -->
<!-- </colgroup> -->
<!-- <thead> -->
<!-- <tr class="plm_thead"> -->
<!-- <td rowspan="2"> -->
<!-- <input type="checkbox" id="allCheck" class="checkBox"> -->
<!-- </td> -->
<!-- <td rowspan="2">순</td> -->
<!-- <td rowspan="2">품번</td> -->
<!-- <td rowspan="2">품명</td> -->
<!-- <td rowspan="2">형상</td> -->
<!-- <td rowspan="2">Revision</td> -->
<!-- <td rowspan="2">수량</td> -->
<!-- <td rowspan="2">재질</td> -->
<!-- <td rowspan="2">중량</td> -->
<!-- <td rowspan="2">SIZE</td> -->
<!-- <td rowspan="2">표면처리</td> -->
<!-- <td rowspan="2">SPEC</td> -->
<!-- <td colspan="2">금형개발</td> -->
<!-- </tr> -->
<!-- <tr class="plm_thead"> -->
<!-- <td>신규</td> -->
<!-- <td>C/O</td> -->
<!-- </tr> -->
<!-- </thead> -->
<!-- </table> -->
<!-- </div> -->
<div class="plm_table_wrap">
<div style="overflow-y:scroll;">
<table class="plm_table">
<colgroup>
<col width="3%" /> <!-- 체크박스 -->
<col width="3%" /> <!-- 순 -->
<col width="8%" /> <!-- Part No. -->
<col width="12%" /> <!-- Part Name -->
<col width="9%" /> <!-- 형상 -->
<col width="3%" /> <!-- UNIT -->
<col width="3%" /> <!-- Qty -->
<col width="9%" /> <!-- EO No -->
<col width="5%" /> <!-- EO Date -->
<col width="5%" /> <!-- Revision -->
<col width="23%" /> <!-- SPEC. -->
<col width="8%" /> <!-- Material -->
<col width="6%" /> <!-- Weight -->
<col width="6%" /> <!-- Part Type -->
<col width="3%" /> <!-- 비고 -->
</colgroup>
<thead>
<tr class="plm_thead">
<td><input type="checkbox" id="allCheck" class="checkBox">
</td>
<td>순 </td>
<td>품번 </td>
<td>품명 </td>
<td>형상 </td>
<td>단위 </td>
<td>수량 </td>
<td>EO No </td>
<td>EO Date </td>
<td>Revision </td>
<td>사양 </td>
<td>재질 </td>
<td>무게 </td>
<td>부품 유형 </td>
<td>비고 </td>
</tr>
</thead>
</table>
</div>
<!-- <div> -->
<!-- <div class="plm_scroll_table" style="height:500px;"> -->
<!-- <table class="plm_table"> -->
<!-- <colgroup> -->
<!-- <col width="2%" /> -->
<!-- <col width="4%" /> 순 -->
<!-- <col width="13%" /> 품번 -->
<!-- <col width="13%" /> 품명 -->
<!-- <col width="9%" /> 형상 -->
<!-- <col width="5%" /> Revision -->
<!-- <col width="5%" /> 수량 -->
<!-- <col width="9%" /> 재질 -->
<!-- <col width="9%" /> 중량 -->
<!-- <col width="7%" /> SIZE -->
<!-- <col width="8%" /> 표면처리 -->
<!-- <col width="8%" /> SPEC -->
<!-- <col width="4%" /> -->
<!-- <col width="4%" /> -->
<!-- </colgroup> -->
<%-- <c:choose> --%>
<%-- <c:when test="${empty LIST}"> --%>
<!-- <tr style="text-align: center;"> -->
<!-- <td align="center" colspan="16">조회된 데이터가 없습니다.</td> -->
<!-- </tr> -->
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<%-- <c:forEach var="item" items="${LIST}" varStatus="varStatus"> --%>
<!-- <tr> -->
<%-- <td><input type="checkbox" name="CHILD_OBJID" value="${item.OBJID}" data-STATUS="${item.STATUS_TITLE}" data-WRITER="${item.WRITER}"></td> --%>
<%-- <td>${item.RNUM}</td><!-- 순 --> --%>
<%-- <td title="${item.PART_NO}"><a href="#" onclick="openPartMngPopup('${item.OBJID}');">${item.PART_NO}</a></td><!-- 품번 --> --%>
<%-- <td title="${item.PART_NAME}">${item.PART_NAME}</td><!-- 품명 --> --%>
<!-- <td title=""> -->
<%-- <c:if test="${!empty item.SAVED_FILE_NAME and !empty item.REAL_FILE_NAME and !empty item.FILE_PATH}"> --%>
<%-- <img src="#" height='85px' width='85px' onclick="fnc_openImagePopUp(this.src)" data-SRC="/common/viewImage.do?realFileName=${item.REAL_FILE_NAME}&savedFileName=${item.SAVED_FILE_NAME}&attDir=${item.FILE_PATH}"/> --%>
<%-- </c:if> --%>
<!-- </td> 형상 -->
<%-- <td title="${item.REVISION}">${item.REVISION}</td><!-- Revision --> --%>
<%-- <td title="${item.QTY}">${item.QTY}</td><!-- 수량 --> --%>
<%-- <td title="${item.MATERIAL}">${item.MATERIAL_TITLE}</td><!-- 재질 --> --%>
<%-- <td title="${item.WEIGHT}">${item.WEIGHT}</td><!-- 중량 --> --%>
<%-- <td title="${item.SIZE}">${item.SIZE}</td><!-- SIZE --> --%>
<%-- <td title="${item.SURFACE_TREATMENT}">${item.SURFACE_TREATMENT}</td><!-- 표면처리 --> --%>
<%-- <td title="${item.SPEC_NO}">${item.SPEC_NO_TITLE}</td><!-- SPEC --> --%>
<%-- <td title="">${'new' eq item.MOLD_DEV ? 'O':''}</td><!-- 신규 --> --%>
<%-- <td title="">${'carryOver' eq item.MOLD_DEV ? 'O':''}</td><!-- C/O --> --%>
<!-- </tr> -->
<%-- </c:forEach> --%>
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
<!-- </table> -->
<!-- </div> -->
<!-- </div> -->
<div>
<div class="plm_scroll_table" style="height:500px;">
<table class="plm_table">
<colgroup>
<col width="3%" /> <!-- 체크박스 -->
<col width="3%" /> <!-- 순 -->
<col width="8%" /> <!-- Part No. -->
<col width="12%" /> <!-- Part Name -->
<col width="9%" /> <!-- 형상 -->
<col width="3%" /> <!-- UNIT -->
<col width="3%" /> <!-- Qty -->
<col width="9%" /> <!-- EO No -->
<col width="5%" /> <!-- EO Date -->
<col width="5%" /> <!-- Revision -->
<col width="23%" /> <!-- SPEC. -->
<col width="8%" /> <!-- Material -->
<col width="6%" /> <!-- Weight -->
<col width="6%" /> <!-- Part Type -->
<col width="3%" /> <!-- 비고 -->
</colgroup>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align: center;">
<td align="center" colspan="18">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr>
<td><input type="checkbox" name="CHILD_OBJID" value="${item.OBJID}" data-STATUS="${item.STATUS_TITLE}" data-WRITER="${item.WRITER}"></td>
<td>${item.RNUM}</td><!-- 순 -->
<td title="${item.PART_NO}" class="align_l"><a href="#" onclick="openPartMngPopup('${item.OBJID}');">${item.PART_NO}</a></td><!-- 품번 -->
<td title="${item.PART_NAME}" class="align_l">${item.PART_NAME}</td><!-- 품명 -->
<td title="" class="align_c">
<c:if test="${!empty item.SAVED_FILE_NAME and !empty item.REAL_FILE_NAME and !empty item.FILE_PATH}">
<img src="#" height='85px' width='100%' onclick="fnc_openImagePopUp(this.src)" data-SRC="/common/viewImage.do?realFileName=${item.REAL_FILE_NAME}&savedFileName=${item.SAVED_FILE_NAME}&attDir=${item.FILE_PATH}"/>
</c:if>
</td><!-- 형상 -->
<td title="${item.UNIT_TITLE}" class="align_c">${item.UNIT_TITLE}</td><!-- EO No -->
<td title="${item.QTY}" class="align_c">${item.QTY}</td><!-- 수량 -->
<td title="${item.EO_NO}" class="align_c">${item.EO_NO}</td><!-- EO No -->
<td title="${item.EO_DATE}" class="align_c">${item.EO_DATE}</td><!-- EO Date -->
<td title="${item.REVISION}" class="align_c">${item.REVISION}</td><!-- Revision -->
<td title="${item.SPEC}" class="align_l">${item.SPEC}</td><!-- SPEC -->
<td title="${item.MATERIAL}" class="align_c">${item.MATERIAL}</td><!-- 재질 -->
<td title="${item.WEIGHT}" class="align_c">${item.WEIGHT}</td><!-- 중량 -->
<td title="${item.PART_TYPE_TITLE}" class="align_l">${item.PART_TYPE_TITLE}</td><!-- SIZE -->
<td title="${item.REMARK}" class="align_l">${item.REMARK}</td><!-- 표면처리 -->
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="btn_wrap">
<div class="plm_btn_wrap_center">
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
</div>
</div>
</section>
</form>
</body>
</html>