420 lines
13 KiB
Plaintext
420 lines
13 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 %>" />
|
|
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
$('.select2').select2();
|
|
/* $('#projectno').select2();
|
|
$('#spec_cd').select2();
|
|
$('#process_cd').select2();
|
|
$('#sort_cd').select2();
|
|
$('#supply_cd').select2(); */
|
|
|
|
fnc_datepick();
|
|
|
|
|
|
$("input[type=text]").keyup(function(e){
|
|
if(e.keyCode == 13) search();
|
|
});
|
|
|
|
//image src encoding
|
|
$("img").each(function(i){
|
|
var imgSrc = $(this).attr("data-SRC");
|
|
$(this).attr("src", encodeURI(imgSrc));
|
|
});
|
|
|
|
$(".btnRevision").click(function(){
|
|
var partNo = $(this).attr("data-PART_NO");
|
|
fn_openPartListPop(partNo);
|
|
});
|
|
|
|
|
|
//체크박스 전체선택/전체해제
|
|
$("#allCheck").click(function(){
|
|
if($("#allCheck").prop("checked")) {
|
|
$("input[type=checkbox]").prop("checked",true);
|
|
} else {
|
|
$("input[type=checkbox]").prop("checked",false);
|
|
}
|
|
});
|
|
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
function openPartFormPopup(objid){
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/partmgmt/partmgmtFormPopup.do";
|
|
var target = "partmgmtFormPopup";
|
|
|
|
window.open(url,target,"width=500, height=600, menubars=no, scrollbars=yes, resizable=yes");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.objid.value = objid;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function search(){
|
|
var form = document.form1;
|
|
|
|
$("#search_partNo").val($.trim($("#search_partNo").val()));
|
|
$("#search_partName").val($.trim($("#search_partName").val()));
|
|
|
|
form.actionType.value = ""
|
|
|
|
form.target = "_self";
|
|
form.action = "/partmgmt/partmgmtList.do";
|
|
form.submit();
|
|
}
|
|
|
|
function relepart(){
|
|
|
|
var partLength = $("input[name=chk]:checked").length;
|
|
|
|
if(0 < partLength){
|
|
var checkArr = new Array();
|
|
|
|
$("input[name=partCheckBox]:checked").each(function(){
|
|
var objId = fnc_checkNull($(this).attr("data-objId").replace(" ",""));
|
|
checkArr.push(objId);
|
|
|
|
});
|
|
|
|
/* var validateFlag = true;
|
|
|
|
$("input[name=partCheckBox]:checked").each(function(){
|
|
var rev = fnc_checkNull($(this).attr("data-REV").replace(" ",""));
|
|
if(rev == ""){
|
|
validateFlag = false;
|
|
}
|
|
}); */
|
|
if(confirm("해당파트를 배포하시겠습니까?")){
|
|
form.status.value="complete";
|
|
var param = $("#form1").serialize();
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/partmgmt/changeMultiPartStatus.do",
|
|
data: param,
|
|
dataType:"json",
|
|
async:false,
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
},
|
|
success: function(result){
|
|
if(null != result){
|
|
Swal.fire(result.message);
|
|
search();
|
|
self.close();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
Swal.fire("선택된 파트가 없습니다.");
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
function savepop(){
|
|
var url = "/partmgmt/partmgmtsaveFormPopup.do";
|
|
var target = "partmgmtsaveFormPopup";
|
|
|
|
window.open(url,target,"width=1300, height=600, menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
function excelExport(){
|
|
var form = document.form1;
|
|
|
|
form.target = "_self";
|
|
form.actionType.value = "excel"
|
|
form.action = "/partmgmt/partmgmtList.do";
|
|
form1.submit();
|
|
}
|
|
|
|
|
|
|
|
function openEOPopup(objId,actionType){
|
|
var hiddenForm = document.hiddenForm;
|
|
|
|
var target = "tempEoListPopup";
|
|
var url = "/eo/eoDetailViewPopup.do";
|
|
|
|
window.open("",target,"width=1500,height=700");
|
|
hiddenForm.objId.value = objId;
|
|
hiddenForm.actionType.value = actionType;
|
|
hiddenForm.action = url;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function openImagePopUp(url){
|
|
var img=new Image();
|
|
img.src=url;
|
|
var img_width=img.width;
|
|
var img_height=img.height;
|
|
var win_width=img.width+25;
|
|
var height=img.height+30;
|
|
|
|
window.open(url,"partListShapeImgPopUp","width="+img_width+",height="+height+", menubars=no, scrollbars=yes, resizable=yes'");
|
|
}
|
|
|
|
//Revision 클릭 시 해당 파트의 모든 Revision을 보여준다.
|
|
function fn_openPartListPop(partNo){
|
|
window.open("/part/openRevisionPartPopUp.do?partNo="+partNo,"openPartListPop","width=1500 height=600 menubar=no status=no");
|
|
}
|
|
|
|
|
|
|
|
//수주활동 검색 기능
|
|
function fn_search(){
|
|
document.form1.action = "/partmgmt/partmgmtList2.do";
|
|
document.form1.submit();
|
|
}
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body class="backcolor">
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
|
<input type="hidden" name="actionType" id="actionType">
|
|
<input type="hidden" name="objId" id="objId">
|
|
<input type="hidden" name="objid" id="objid">
|
|
</form>
|
|
<form name="form1" id="form1" method="post">
|
|
<input type="hidden" name="actionType">
|
|
<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 class="align_r">
|
|
<label for="" class="">Project No.</label>
|
|
</td>
|
|
<td>
|
|
<select name="projectno" id="projectno" style="width: 120px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option> ${code_map.projectno}
|
|
</select>
|
|
</td>
|
|
<td class="align_r"><label for="" class="">품번</label></td>
|
|
<td><input style="width: 130px; type="text" name="part_no" id="part_no"
|
|
value="${param.part_no}" autocomplete="off"/></td>
|
|
<td class="align_r"><label for="" class="">품명</label></td>
|
|
<td><input style="width: 130px; type="text" name="part_name" id="part_name"
|
|
value="${param.part_name}" autocomplete="off"/></td>
|
|
|
|
|
|
<td class="align_r"><label for="" class="">재질</label></td>
|
|
<td colspan="3">
|
|
<%-- <select name="spec_cd" id="spec_cd" style="width:350px;">
|
|
<option value="">전체</option>
|
|
${code_map.spec_cd}
|
|
</select> --%> <input
|
|
style="width: 150px; padding: 0px 0px 0px 2px;" type="text"
|
|
name="spec_cd" id="spec_cd" value="${param.spec_cd}" autocomplete="off"/>
|
|
|
|
</td>
|
|
|
|
<td class="align_r"><label for="" class="">부품구분</label></td>
|
|
<td><select name="sort_cd" id="sort_cd" class="select2" autocomplete="off">
|
|
<option value="">전체</option> ${code_map.sort_cd}
|
|
</select></td>
|
|
|
|
<td class="align_r"><label for="" class="">메이커</label></td>
|
|
<td>
|
|
<input type="text" name="supply_cd" id="supply_cd"
|
|
value="${param.supply_cd}" autocomplete="off" />
|
|
<%-- <select name="supply_cd" id="supply_cd"
|
|
style="width: 230px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option> ${code_map.supply_cd}
|
|
</select> --%></td>
|
|
|
|
<td class="align_r">
|
|
<label for="" class="">Rev</label>
|
|
</td>
|
|
<td>
|
|
<select name="search_isLast" id="search_isLast" style="width: 120px;" class="select2" autocomplete="off">
|
|
<%-- <option value="1" ${'1' eq param.search_isLast ? 'selected':''}>Current</option>
|
|
<option value="2" ${'2' eq param.search_isLast ? 'selected':''}>All</option> --%>
|
|
<option value="2" selected>All</option>
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="search_fromDate">Date</label></td>
|
|
<td colspan=""><input type="text" id="search_fromDate"
|
|
name="search_fromDate" class="date_icon"
|
|
value="${param.search_fromDate}"
|
|
style="width: 80px !important;" autocomplete="off"> ~ <input type="text"
|
|
id="search_toDate" name="search_toDate" class="date_icon"
|
|
value="${param.search_toDate}" style="width: 80px !important;" autocomplete="off">
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<section 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="PART 등록" class="plm_btns" onclick="savepop();"> -->
|
|
<!-- <input type="button" value="배포" class="plm_btns" onclick="relepart();"> -->
|
|
<!-- <input type="button" value="Excel Export" class="plm_btns" onclick="excelExport()"> -->
|
|
</div>
|
|
</div>
|
|
<div class="plm_table_wrap">
|
|
<div>
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="3%" />
|
|
<col width="13%" />
|
|
<col width="9%" />
|
|
<col width="9%" />
|
|
<col width="3%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="6%" />
|
|
<col width="5%" />
|
|
<col width="3%" />
|
|
<col width="8%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>Level</td>
|
|
<td>품명</td><!-- part_name -->
|
|
<td>모품번</td><!-- parent_part_no -->
|
|
<td>자품번</td><!-- part_no -->
|
|
<td>수량</td><!-- qty -->
|
|
<td>재질</td><!-- material -->
|
|
<td>규격</td><!-- size -->
|
|
<td>메이커</td><!-- sup_cd -->
|
|
<td>부품구분</td><!-- sort_cd -->
|
|
<td>Date</td><!-- reg_date -->
|
|
<td>Rev.</td><!-- rev -->
|
|
<td>등록자</td>
|
|
</tr>
|
|
</thead>
|
|
|
|
<c:choose>
|
|
<c:when test="${empty LIST}">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="12">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
|
|
<tr>
|
|
<td>${item.LEV}</td>
|
|
<td align="left" title="${item.PART_NAME}" style="padding: 0px 0px 0px 15px;">${item.PART_NAME}</td>
|
|
<td title="${item.PARENT_PART_NO}">${item.PARENT_PART_NO}</td>
|
|
<td title="${item.PART_NO}" style="text-align: left; padding: 0px 0px 0px 15px;">
|
|
<a href="#" onclick="openPartFormPopup('${item.PART_MGMT_OBJID}')">${item.PART_NO}</a>
|
|
</td>
|
|
<td title="${item.QTY}">${item.QTY}</td>
|
|
<td title="${item.MATERIAL}">${item.MATERIAL}</td>
|
|
<td title="${item.SIZED}">${item.SIZED}</td>
|
|
<td title="${item.SUP_CD}">${item.SUP_CD}</td>
|
|
<td title="${item.SORT_NAME}">${item.SORT_NAME}</td>
|
|
<td title="${item.REG_DATE}">${item.REG_DATE}</td>
|
|
<td title="${item.REV}">${item.REV}</td>
|
|
<td title="${item.REG_USER_NAME}">${item.REG_USER_NAME}</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</table>
|
|
</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 align="center">
|
|
<tr>
|
|
<c:choose>
|
|
<c:when test="${nPage > 1}">
|
|
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">prev</td>
|
|
<td> </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>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
|
|
<td> </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>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |