525 lines
16 KiB
Plaintext
525 lines
16 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);
|
|
});
|
|
|
|
$("#btnDel").click(function() {
|
|
deletepart();
|
|
});
|
|
|
|
//체크박스 전체선택/전체해제
|
|
$("#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/partmgmtTempFormPopup.do";
|
|
var target = "partmgmtTempFormPopup";
|
|
|
|
window
|
|
.open(url, target,
|
|
"width=720, 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=partCheckBox]: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("선택파트를 배포하시겠습니까?")) {
|
|
var param = $("#form1").serialize();
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/partmgmt/changeMultiPartStatus.do",
|
|
data : param,
|
|
dataType : "json",
|
|
success : function(data) {
|
|
if (data == "SUCCESS") {
|
|
Swal.fire("저장되었습니다.");
|
|
fn_search();
|
|
}
|
|
;
|
|
},
|
|
error : function(jqxhr, status, error) {
|
|
}
|
|
});
|
|
}
|
|
} else {
|
|
Swal.fire("선택된 파트가 없습니다.");
|
|
}
|
|
}
|
|
|
|
function deletepart() {
|
|
|
|
var partLength = $("input[name=partCheckBox]:checked").length;
|
|
|
|
if (0 < partLength) {
|
|
if (confirm("선택파트를 삭제하시겠습니까?")) {
|
|
var param = $("#form1").serialize();
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/partmgmt/deletePart.do",
|
|
data : param,
|
|
dataType : "json",
|
|
success : function(data) {
|
|
if (data == "SUCCESS") {
|
|
Swal.fire("삭제되었습니다.");
|
|
fn_search();
|
|
}
|
|
;
|
|
},
|
|
error : function(jqxhr, status, error) {
|
|
}
|
|
});
|
|
}
|
|
} else {
|
|
Swal.fire("선택된 파트가 없습니다.");
|
|
}
|
|
}
|
|
|
|
function savepop() {
|
|
if ($("#projectno").val() == "") {
|
|
Swal.fire('Project No.룰 선택해 주세요');
|
|
$("#projectno").focus();
|
|
return;
|
|
|
|
}
|
|
|
|
var url = "/partmgmt/partmgmtsaveFormPopup.do?projectno="
|
|
+ $("#projectno").val() + "&projectname="
|
|
+ $("#projectno option:checked").text();
|
|
var target = "partmgmtsaveFormPopup";
|
|
|
|
window.open(url, target,"width=1200, height=550, menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
function savepart() {
|
|
if ($("#projectno").val() == "") {
|
|
Swal.fire('원본이 되는 프로젝트를 선택해 주세요.');
|
|
$("#projectno").focus();
|
|
return;
|
|
|
|
}
|
|
|
|
var url = "/partmgmt/partmgmtcopyFormPopup.do?projectno="
|
|
+ $("#projectno").val() + "&projectname="
|
|
+ $("#projectno option:checked").text();
|
|
var target = "partmgmtcopyFormPopup";
|
|
|
|
window
|
|
.open(url, target,
|
|
"width=700, height=200, menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
function saveexcelpop() {
|
|
if ($("#projectno").val() == "") {
|
|
Swal.fire('프로젝트를 선택해 주세요.');
|
|
$("#projectno").focus();
|
|
return;
|
|
|
|
}
|
|
|
|
var url = "/partmgmt/openPartExcelImportPopUp.do?projectno="
|
|
+ $("#projectno").val() + "&projectname="
|
|
+ $("#projectno option:checked").text();
|
|
var target = "openPartExcelImportPopUp";
|
|
|
|
window
|
|
.open(url, target,
|
|
"width=1200, height=700, 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=560 menubar=no status=no");
|
|
}
|
|
|
|
function fn_search() {
|
|
document.form1.action = "/partmgmt/partmgmtTempList.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"> <input type="hidden"
|
|
name="status_cd" id="status_cd">
|
|
</form>
|
|
<form name="form1" id="form1" method="post">
|
|
<input type="hidden" name="actionType" value="">
|
|
<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 class="align_r"><label for="" class="">Project No.</label></td>
|
|
<td><select name="projectno" id="projectno"
|
|
style="width: 170px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option> ${code_map.projectno}
|
|
</select></td>
|
|
<td class="align_r"><label for="" class="">품번</label></td>
|
|
<td><input 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 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><input type="text" name="material" id="material"
|
|
value="${param.material}" autocomplete="off" /> <%-- <select name="spec_cd" id="spec_cd" style="width:300px;">
|
|
<option value="">전체</option>
|
|
${code_map.spec_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="">후처리</label></td>
|
|
<td>
|
|
<input type="text" name="process_cd" id="process_cd"
|
|
value="${param.process_cd}" autocomplete="off" /> --%>
|
|
<%-- <select name="process_cd" id="process_cd"
|
|
style="width: 200px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option> ${code_map.process_cd}
|
|
</select> --%></td>
|
|
|
|
<td class="align_r"><label for="" class="">부품구분</label></td>
|
|
<td><select name="sort_cd" id="sort_cd"
|
|
style="width: 80px;" class="select2" autocomplete="off">
|
|
<option value="">전체</option> ${code_map.sort_cd}
|
|
</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="PART 복제" class="plm_btns" onclick="savepart();"> -->
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch">
|
|
<input type="button" value="PART 등록" class="plm_btns"
|
|
onclick="savepop();"> <input type="button"
|
|
value="Excel Upload" class="plm_btns" onclick="saveexcelpop();">
|
|
<input type="button" value="배포" class="plm_btns"
|
|
onclick="relepart();"> <input type="button" value="삭제"
|
|
class="plm_btns" id="btnDel">
|
|
<!-- <input type="button" value="Excel Export" class="plm_btns" onclick="excelExport()"> -->
|
|
</div>
|
|
</div>
|
|
<div class="ascendig_text">
|
|
<font size="3px">총 ${totalCount}건</font>
|
|
</div>
|
|
<!-- <div class="ascendig_text"><font size="1.5px" color="red">*Part 배포시 선택한 part의 하위 part는 자동 배포 됩니다.</font></div> -->
|
|
<div class="plm_table_wrap">
|
|
<div>
|
|
<div>
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="2%" />
|
|
<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="10%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="3%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td><input type="checkbox" id="allCheck"
|
|
class="checkBox"></td>
|
|
<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> -->
|
|
<!-- process_cd -->
|
|
<!-- <td>경도</td> -->
|
|
<!-- mfa_cd -->
|
|
<!-- <td>형번(규격)</td> -->
|
|
<!-- spec_cd -->
|
|
<td>메이커</td>
|
|
<!-- sup_cd -->
|
|
<td>Rev.</td>
|
|
<!-- rev -->
|
|
<td>Date</td>
|
|
<!-- reg_date -->
|
|
<td>부품구분</td>
|
|
<!-- sort_cd -->
|
|
</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><input type="checkbox"
|
|
value="${item.PART_MGMT_OBJID}" name="partCheckBox"
|
|
id="partCheckBox" data-objId="${item.PART_MGMT_OBJID}"></td>
|
|
<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.PROCESS_CD}">${item.PROCESS_CD}</td>
|
|
<td title="${item.MFA_CD}">${item.MFA_CD}</td> --%>
|
|
<!-- 경도 -->
|
|
<%-- <td title="${item.SPEC_CD}">${item.SPEC_CD}</td> --%>
|
|
<!-- 형번(규격) -->
|
|
<td title="${item.SUP_CD}">${item.SUP_CD}</td>
|
|
<td title="${item.REV}">${item.REV}</td>
|
|
<td title="${item.REG_DATE}">${item.REG_DATE}</td>
|
|
<input type="hidden" name="REV" value="${item.REV}" />
|
|
<td title="${item.SORT_NAME}">${item.SORT_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> --%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |