454 lines
14 KiB
Plaintext
454 lines
14 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();
|
|
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();
|
|
});
|
|
|
|
|
|
$(".btn_rele").click(function(){
|
|
Fn_releaseFormPopup();
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
function openmaterFormPopup(objId){
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/materMgmt/materMgmtUpdateFormPopup.do";
|
|
var target = "materMgmtUpdateFormPopup";
|
|
|
|
window.open(url,target,"width=400, height=450, menubars=no, scrollbars=no, resizable=yes");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.objId.value = objId;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function openreleaseFormPopup(objId){
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/materMgmt/openreleaseFormPopup.do";
|
|
var target = "openreleaseFormPopup";
|
|
|
|
window.open(url,target,"width=700, height=350, menubars=no, scrollbars=no, resizable=yes");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.objId.value = objId;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function Fn_releaseFormPopup(){
|
|
var objId = "";
|
|
$("input[name=partCheckBox]:checked").each(function(){
|
|
objId = fnc_checkNull($(this).attr("data-objId").replace(" ",""));
|
|
});
|
|
|
|
if(""==objId){
|
|
Swal.fire('선택된 자재가 없습니다');
|
|
return;
|
|
}
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/materMgmt/openreleaseFormPopup.do";
|
|
var target = "materMgmtUpdateFormPopup";
|
|
|
|
window.open(url,target,"width=700, height=350, menubars=no, scrollbars=no, resizable=yes");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.objId.value = objId;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
|
|
function writematerFormPopup(){
|
|
var url = "/materMgmt/materMgmtUpdateFormPopup.do?actionType=regist";
|
|
var target = "materMgmtUpdateFormPopup";
|
|
|
|
window.open(url,target,"width=400, height=450, menubars=no, scrollbars=no, resizable=yes");
|
|
}
|
|
|
|
|
|
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(" ",""));
|
|
|
|
Swal.fire(objId);
|
|
|
|
});
|
|
|
|
Swal.fire(checkArr);
|
|
/* 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=550, menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
|
|
//수주활동 검색 기능
|
|
function fn_search(){
|
|
document.form1.action = "/materMgmt/invenmgmtList.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>자재관리_재고 관리</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" class="select2" autocomplete="off" style="width:200px;" >
|
|
<option value="">전체</option>
|
|
${code_map.projectno}
|
|
<c:if test="${param.projectno eq '1'}">
|
|
<option value="1" selected>00000</option>
|
|
</c:if>
|
|
|
|
<c:if test="${param.projectno ne '1'}">
|
|
<option value="1" >00000</option>
|
|
</c:if>
|
|
|
|
|
|
|
|
</select>
|
|
</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>
|
|
<%-- <select name="spec_cd" id="spec_cd" class="select2" autocomplete="off" style="width:300px;">
|
|
<option value="">전체</option>
|
|
${code_map.spec_cd}
|
|
</select> --%>
|
|
|
|
<input 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="dept_cd" id="dept_cd" class="select2" autocomplete="off">
|
|
<option value="">전체</option>
|
|
${code_map.dept_cd}
|
|
</select>
|
|
</td>
|
|
|
|
<td class="align_r">
|
|
<label for="" class="">구매구분</label>
|
|
</td>
|
|
<td>
|
|
<select name="pur_cd" id="pur_cd" class="select2" autocomplete="off">
|
|
<option value="">전체</option>
|
|
${code_map.pur_cd}
|
|
</select>
|
|
</td>
|
|
<td class="align_r">
|
|
<label for="" class="">구분</label>
|
|
</td>
|
|
<td>
|
|
<select name="sort_cd" id="sort_cd" class="select2" autocomplete="off" style="width:80px;">
|
|
<option value="">전체</option>
|
|
${code_map.sort_cd}
|
|
</select>
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="align_r">
|
|
<label for="" class="">사유</label>
|
|
</td>
|
|
<td>
|
|
<select name="reason_cd" id="reason_cd" class="select2" autocomplete="off">
|
|
<option value="">전체</option>
|
|
${code_map.reason_cd}
|
|
</select>
|
|
</td>
|
|
|
|
<td class="align_r">
|
|
<label for="" class="">위치</label>
|
|
</td>
|
|
<td>
|
|
<select name="local_cd" id="local_cd" class="select2" autocomplete="off" style="width:80px;">
|
|
<option value="">전체</option>
|
|
${code_map.local_cd}
|
|
</select>
|
|
</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 btn_rele"> -->
|
|
<input type="button" value="등록" class="plm_btns" onclick="writematerFormPopup();">
|
|
<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="ascendig_text"><font size="3px" color="red">※ 재고금액 합계 : <fmt:formatNumber value="${qtysum.QTY_SUM}" pattern="#,###"/> 원</font></div>
|
|
<div class="plm_table_wrap">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="2%" />
|
|
<col width="4%" />
|
|
<col width="6%" />
|
|
<col width="15%" />
|
|
<col width="15%" />
|
|
<col width="8%" />
|
|
<col width="5%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="5%" />
|
|
<col width="10%" />
|
|
<col width="3%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td><!-- <input type="checkbox" id="allCheck" class="checkBox"> --></td>
|
|
<td>No.</td>
|
|
<td>Project No.</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 LIST}">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="11">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
|
|
<tr>
|
|
<td><input type="radio" value="${item.INVENTORY_MGMT_OBJID}" name="partCheckBox" id="partCheckBox" data-objId="${item.INVENTORY_MGMT_OBJID}"></td>
|
|
<td>${item.RNUM}</td>
|
|
<td align="center" title="${item.PROJECT_NO}">${item.PROJECT_NO}</td>
|
|
<td title="${item.PART_NAME}" style="text-align:left; padding:0px 0px 0px 15px;"><a href="#" onclick="openmaterFormPopup('${item.INVENTORY_MGMT_OBJID}')">${item.PART_NAME}</a></td>
|
|
<td title="${item.SPEC_CD}" style="text-align:left; padding:0px 0px 0px 15px;">${item.SPEC_CD}</td>
|
|
<td title="${item.MFA_CD}">${item.MFA_CD}</td>
|
|
<td title="${item.QTY}"><a href="#" onclick="openreleaseFormPopup('${item.INVENTORY_MGMT_OBJID}')">${item.QTY}</a></td>
|
|
<td title="${item.UNIT_PRICE}" style="text-align:right; padding:0px 15px 0px 0px;"><fmt:formatNumber value="${item.UNIT_PRICE}"/></td>
|
|
<td title="${item.QTY_SUM}" style="text-align:right; padding:0px 15px 0px 0px;"><fmt:formatNumber value="${item.QTY_SUM}"/></td>
|
|
<td title="${item.DEPT_NAME}">${item.DEPT_NAME}</td>
|
|
<td title="${item.REG_DATE}">${item.REG_DATE}</td>
|
|
<td title="${item.INV_NAME}">${item.INV_NAME}</td>
|
|
<td title="${item.INV_REA_NAME}">${item.INV_REA_NAME}</td>
|
|
<td title="${item.INV_PUR_NAME}">${item.INV_PUR_NAME}</td>
|
|
<td title="${item.INV_LOC_NAME}">${item.INV_LOC_NAME}</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</table>
|
|
</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> |