ERP-node/WebContent/WEB-INF/view/partMng/partMngDeployList.jsp

439 lines
18 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>
<!-- //JSTL 페이징 변수선언 -->
<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>
<c:set var="connector" value="<%=connector %>" />
<style type="text/css">
::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom, #f5d78e, #f5d78e);
}
</style>
<script type="text/javascript">
$(function() {
$(document).ready(function() {
$("._table1").scroll(function () {
$("._table2").scrollLeft($("._table1").scrollLeft());
});
$("._table2").scroll(function () {
$("._table1").scrollLeft($("._table2").scrollLeft());
});
fnc_datepick();
$("input[type=text]").keyup(function(e) {
if (e.keyCode == 13)
search();
});
$("#btnReg").click(function(){
openPartMngPopup("");
});
$("#btnDelete").click(function(){
fn_deletePartMng();
});
$("#btnDeploy").click(function(){
fn_partMngDeploy();
});
//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() {
/* if($("#product_code").val()==""){
Swal.fire('기종을 선택해주세요');
return;
} */
fn_search();
});
$("#btnConnectFile").click(function() {
var form = document.form1;
form.action = "/partMng/partConnectDrawingFile.do";
form.submit();
});
$("#btnExcel").click(function() {
fn_excel();
});
$("#product_code").change(function(){
fnc_productUPGNEWList(this.value,"","upg_no", "");
});
if("${param.product_code}"!=""){
fnc_productUPGNEWList("${param.product_code}","","upg_no", "");
$("#upg_no").val("${param.upg_no}");
}
fnc_getCodeListAppend("<%=Constants.PART_TYPE_CODE%>","SEARCH_PART_TYPE","${param.SEARCH_PART_TYPE}");
$("#SEARCH_REVISION_RELEASE").val("${param.SEARCH_REVISION_RELEASE}");
$('.select2').select2();
//첨부팝업
$(".File").click(function(){
var objId = $(this).attr("data-OBJID");
var docType =$(this).attr("data-docType");
var docTypeName = $(this).attr("data-docTypeName");
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
window.open("/projectConcept/FileRegistPopup.do"+params, "", "width=800, height=335");
});
});
});
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 = "/partMng/partMngDeployList.do";
document.form1.submit();
}
function fn_excel() {
document.form1.actionType.value = "excel";
fn_search();
}
// 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="search" id="search" value="Y">
<input type="hidden" name="actionType" id="actionType">
<div>
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name">
<h2>
<span>구매관리_설변품목 리스트</span>
</h2>
</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="">EO No.</label></td> -->
<!-- <td> -->
<%-- <input type="text" name="SEARCH_EO" id="SEARCH_EO" style="width:150px;" autocomplete="off" value="${param.SEARCH_EO}"> --%>
<!-- </td> -->
<td><label for="">최초설계일</label></td>
<td>
<input type="text" name="SEARCH_DESIGN_DATE_FROM" id="SEARCH_DESIGN_DATE_FROM" style="width:90px;" autocomplete="off" value="${param.SEARCH_DESIGN_DATE_FROM}">~
<input type="text" name="SEARCH_DESIGN_DATE_TO" id="SEARCH_DESIGN_DATE_TO" style="width:90px;" autocomplete="off" value="${param.SEARCH_DESIGN_DATE_TO}">
</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="">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="btnConnectFile"> -->
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<!-- <input type="button" value="Excel Download" class="plm_btns" id="btnExcel"> -->
</div>
</div>
<div class="ascendig_text">
<font size="3px">총 <fmt:formatNumber value="${fn:length(LIST)}" pattern="#,###" />건</font>
</div>
<div class="in_table_scroll_wrap _table1" style="height:26px;width:99.4%;">
<table class="plm_table">
<colgroup>
<!-- <col width="30px" /> -->
<col width="30px" /> <!-- 순 -->
<col width="250px" /> <!-- 품번 -->
<col width="250px" /> <!-- 품명 -->
<col width="30px" /> <!-- 형상 -->
<col width="70px" /> <!-- 3D -->
<col width="70px" /> <!-- 2D -->
<col width="70px" /> <!-- 2D PDF -->
<col width="30px" /> <!-- Qty -->
<!-- <col width="30px" /> REV -->
<col width="75px" /> <!-- 최초설계일 -->
<col width="75px" /> <!-- 설변일자 -->
<col width="150px" /> <!-- 설변항목 -->
<!-- <col width="5%" /> EO Date
<col width="5%" /> Revision -->
<col width="250px" /> <!-- SPEC. -->
<col width="80px" /> <!-- Material -->
<col width="80px" /> <!-- SUB_Material -->
<col width="60px" /> <!-- Weight -->
<col width="60px" /> <!-- Part Type -->
<col width="250px" /> <!-- 비고 -->
</colgroup>
<thead>
<tr class="plm_thead">
<!-- <td><input type="checkbox" id="allCheck" class="checkBox"></td> -->
<td>순 </td>
<td>품번 </td>
<td>품명 </td>
<td>형상 </td>
<!-- <td>UNIT </td> -->
<td>3D </td>
<td>2D </td>
<td>PDF </td>
<td>수량 </td>
<!-- <td>Rev </td> -->
<td>최초설계일</td>
<td>설변일자</td>
<td>설변항목</td>
<!-- <td>EO No </td>
<td>EO Date </td> -->
<td>규격 </td>
<td>재질 </td>
<td>대체 재질 </td>
<td>중량 </td>
<td>부품 유형 </td>
<td>비고 </td>
<!-- <td>단가 </td>
<td>공급가 </td>
<td>구매처 </td> -->
</tr>
</thead>
</table>
</div>
<div class="in_table_scroll_wrap _table2" style="height:560px;width:100%;">
<table class="plm_table">
<colgroup>
<!-- <col width="30px" /> -->
<col width="30px" /> <!-- 순 -->
<col width="250px" /> <!-- 품번 -->
<col width="250px" /> <!-- 품명 -->
<col width="30px" /> <!-- 형상 -->
<col width="70px" /> <!-- 3D -->
<col width="70px" /> <!-- 2D -->
<col width="70px" /> <!-- 2D PDF -->
<col width="30px" /> <!-- Qty -->
<!-- <col width="30px" /> REV -->
<col width="75px" /> <!-- 최초설계일 -->
<col width="75px" /> <!-- 설변일자 -->
<col width="150px" /> <!-- 설변항목 -->
<!-- <col width="5%" /> EO Date
<col width="5%" /> Revision -->
<col width="250px" /> <!-- SPEC. -->
<col width="80px" /> <!-- Material -->
<col width="80px" /> <!-- SUB_Material -->
<col width="60px" /> <!-- Weight -->
<col width="60px" /> <!-- Part Type -->
<col width="250px" /> <!-- 비고 -->
</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="OBJID" value="${item.OBJID}" data-STATUS="${item.STATUS_TITLE}" data-WRITER="${item.WRITER}" data-PART_NO="${item.PART_NO}" data-REVISION="${item.REVISION}"></td> --%>
<td>${item.RNUM}</td><!-- 순 -->
<td title="${item.PART_NO}${item.REVISION}" class="align_l" style="text-align: left; padding-left: 5px;"><a href="#" onclick="openPartMngPopup('${item.OBJID}');">${item.PART_NO}${item.REVISION}</a></td><!-- 품번 -->
<td title="${item.PART_NAME}" class="align_l" style="text-align: left; padding-left: 5px;">${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><a href="#" class="File file_${item.CU01_CNT eq 0?'empty_':''}icon" data-OBJID="${item.OBJID}" data-docType="3D_CAD" data-docTypeName="3D CAD 첨부파일"></a></td>
<td><a href="#" class="File file_${item.CU02_CNT eq 0?'empty_':''}icon" data-OBJID="${item.OBJID}" data-docType="2D_DRAWING_CAD" data-docTypeName="2D(Drawing) CAD 첨부파일"></a></td>
<td><a href="#" class="File file_${item.CU03_CNT eq 0?'empty_':''}icon" data-OBJID="${item.OBJID}" data-docType="2D_PDF_CAD" data-docTypeName="2D(PDF) CAD 첨부파일"></a></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.REVISION}" class="align_c">${item.REVISION}</td><!-- Revision --> --%>
<%-- <td title="${item.EO_NO}" class="align_c">${item.EO_NO}</td><!-- EO No -->
<td title="${item.EO_DATE_TITLE}" class="align_c">${item.EO_DATE_TITLE}</td><!-- EO Date --> --%>
<td title="${item.DESIGN_DATE}" class="align_c">${item.DESIGN_DATE}</td><!-- 최초설계일 -->
<td title="${item.EO_DATE}" class="align_c">${item.EO_DATE}</td><!-- 설변일자 -->
<td title="${item.CHANGE_OPTION_NAME}" class="align_c">${item.CHANGE_OPTION_NAME}</td><!-- 설변항목 -->
<td title="${item.SPEC}" class="align_l" style="text-align: left; padding-left: 5px;">${item.SPEC}</td><!-- SPEC -->
<td title="${item.MATERIAL}" class="align_c">${item.MATERIAL}</td><!-- 재질 -->
<td title="${item.SUB_MATERIAL}" class="align_c">${item.SUB_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><!-- 표면처리 -->
<!-- <td title="" class="align_l"></td>
<td title="" class="align_l"></td>
<td title="" class="align_l"></td> -->
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
</div>
</div>
</div>
<!-- <div class="pdm_page"> -->
<%-- <input type="hidden" name="page" id="page" value="${nPage}"> --%>
<%-- <c:if test="${!empty LIST}"> --%>
<!-- <div class="page_pro"> -->
<!-- <table> -->
<!-- <tr> -->
<%-- <c:choose> --%>
<%-- <c:when test="${nPage > 1}"> --%>
<%-- <td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td> --%>
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<!-- <td class="no_more_page">prev</td> -->
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
<%-- <c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status"> --%>
<%-- <c:if test="${status.index -1 < maxPage}"> --%>
<%-- <c:choose> --%>
<%-- <c:when test="${status.index eq nPage}"> --%>
<%-- <td><a href="#" class="now_page">${nPage}</a></td> --%>
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<%-- <td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td> --%>
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
<%-- </c:if> --%>
<%-- </c:forEach> --%>
<%-- <c:choose> --%>
<%-- <c:when test="${nPage < maxPage}"> --%>
<%-- <td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td> --%>
<%-- </c:when> --%>
<%-- <c:otherwise> --%>
<!-- <td class="no_more_page">next</td> -->
<%-- </c:otherwise> --%>
<%-- </c:choose> --%>
<!-- </tr> -->
<!-- </table> -->
<%-- <c:if test="${!empty LIST}"> --%>
<%-- <p id="adminPageCount">총 ${totalCount}건</p> --%>
<%-- </c:if> --%>
<!-- </div> -->
<%-- </c:if> --%>
<!-- </div> -->
</div>
</div>
</div>
</div>
</form>
</body>
</html>