387 lines
13 KiB
Plaintext
387 lines
13 KiB
Plaintext
<%
|
|
/**
|
|
* 자재입고 등록
|
|
* @since 2021.11.16
|
|
* @author kim
|
|
* @version 1.0
|
|
*
|
|
* << 개정 이력 >>
|
|
*
|
|
* 수정일 수정자 수정내용
|
|
* ---------------- --------------------- --------------------------------------------------------
|
|
* 2021.11.16 김효일 최초작성
|
|
**/
|
|
%>
|
|
<%@ 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" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
</head>
|
|
<link rel="stylesheet" href="/css/ions-basic.css">
|
|
<script type="text/javascript" src="/js/ions-common.js" ></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$('.select2').select2();
|
|
|
|
fnc_makeDatepick();
|
|
|
|
// 거래명세표번호 검색
|
|
$("#btnRcDocNoSearch").click(function(){
|
|
window.open("/common/itemMgmt/searchRcDocNo.do", "searchRcDocNo", "width=1024, height=710", "menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
// 업체 검색
|
|
$("#btnSuVndSearch").click(function(){
|
|
window.open("/common/itemMgmt/searchVendor.do", "searchRcDocNo", "width=1024, height=710", "menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
// 품목 검색
|
|
$("#btnItemAdd").click(function(){
|
|
window.open("/common/itemMgmt/searchItem.do", "searchProduct", "width=1024, height=710", "menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
// 저장
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
// 삭제
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
|
|
// 닫기
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
});
|
|
|
|
// 품목 정보 등록
|
|
function fn_save(){
|
|
if(fnc_valitate("form1")){
|
|
if(confirm("등록 하시겠습니까?")){
|
|
saveProcess();
|
|
}
|
|
}
|
|
}
|
|
|
|
// 등록
|
|
function saveProcess(){
|
|
$.ajax({
|
|
url:"/imItem/saveImItem.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.RESULT.msg);
|
|
|
|
if (data.RESULT.result) {
|
|
opener.fn_search();
|
|
self.close();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
// 품목 정보 삭제
|
|
function fn_delete() {
|
|
if(confirm("삭제 하시겠습니까?\n ※주의 : 자재관리 및 발주특성 항목도 삭제됩니다.")){
|
|
deleteProcess();
|
|
}
|
|
}
|
|
|
|
// 삭제
|
|
function deleteProcess(){
|
|
$.ajax({
|
|
url:"/imItem/deleteImItem.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.RESULT.msg);
|
|
|
|
if (data.RESULT.result) {
|
|
opener.fn_search();
|
|
self.close();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
// 거래명세서번호 선택
|
|
function rcDocNoSelected(selectedItem) {
|
|
form1.rcDocNo.value = selectedItem.issueNo;
|
|
form1.displayRcDocNo.value = selectedItem.issueNo;
|
|
}
|
|
|
|
// 업체 선택
|
|
function verndorSelected(selectedItem) {
|
|
form1.suVndCd.value = selectedItem.suVndCd;
|
|
form1.suVndNm.value = selectedItem.suVndNm;
|
|
}
|
|
|
|
var riSeqNo = '${maxRiSeqNo}'; // 일련번호
|
|
|
|
// 품목 선택
|
|
function rcDocNoSelected(selectedItem) {
|
|
var puLotNo = $("#puLotNo").val();
|
|
|
|
if (puLotNo === "") {
|
|
Swal.fire("기종별 공정은 로트번호 선택 후 조회 가능합니다.");
|
|
return;
|
|
}
|
|
|
|
riSeqNo += 1;
|
|
var html = "";
|
|
|
|
html += '<tr id='+riSeqNo+'>';
|
|
html += ' <td>'+riSeqNo+'</td>';
|
|
html += ' <td>'+selectedItem.imItemNo+'</td>';
|
|
html += ' <td>'+selectedItem.imItemNm+'</td>';
|
|
html += ' <td>'+selectedItem.imItemSpec+'</td>';
|
|
html += ' <td>'+selectedItem.imMaterial+'</td>';
|
|
html += ' <td>'+selectedItem.imUnit+'</td>';
|
|
html += ' <td>';
|
|
html += ' <input type="text" name="riNogoodQty" id="riNogoodQty" maxlength="9" />';
|
|
html += ' </td>';
|
|
html += ' <td>';
|
|
html += ' <input type="text" name="riRcptQty" id="riRcptQty" maxlength="9" />';
|
|
html += ' </td>';
|
|
html += ' <td></td>';
|
|
html += ' <td></td>';
|
|
html += ' <td>';
|
|
html += ' <input type="checkbox" name="imInspection" id="imInspection" value="Y" />';
|
|
html += ' </td>';
|
|
html += ' <td>';
|
|
html += ' <input type="text" name="inInspectNo" id="inInspectNo" maxlength="15" />';
|
|
html += ' </td>';
|
|
html += ' <td>';
|
|
html += ' <input type="button" value="삭제" onclick="fn_itemDelete("'+riSeqNo+'");" class="plm_btns">';
|
|
html += ' </td>';
|
|
html += '</tr>';
|
|
}
|
|
|
|
//품목 삭제
|
|
function fn_itemDelete(riSeqNo) {
|
|
$("#riSeqNo").remove();
|
|
}
|
|
</script>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="rcRcptNo" id="rcRcptNo" value="${param.rcRcptNo}" />
|
|
<input type="hidden" name="rcDocNo" id="rcDocNo" value="${info.RCDOCNO}" />
|
|
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>자재불출 등록</span>
|
|
</h2>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap" >
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="25%"/>
|
|
<col width="15%"/>
|
|
<col width="20%"/>
|
|
<col width="15%"/>
|
|
<col width="25%"/>
|
|
</colgroup>
|
|
<tr><td colspan="5" style="height:15px;"></td></tr>
|
|
<tr>
|
|
<td rowspan="9" class="sub_title">자재불출정보</td>
|
|
<td class="input_title" style="font-size:13px;">
|
|
<label for=""><span class="input_sub_title">
|
|
</span> 불출의뢰번호</label>
|
|
</td>
|
|
<td class="input_sub_title"><input type="text" name="project_no8" id="project_no8" maxlength="20" style="width:100px;float:left;" />
|
|
<input type="button" value="?" class="gray_btns" id="btnSearch8"></td>
|
|
<td width="13%" class="input_title" style="font-size:13px;"> </td>
|
|
<td class="input_sub_title"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" style="font-size:13px;"><label for=""><span class="input_sub_title">
|
|
</span>입고번호</label></td>
|
|
<td class="input_sub_title"><input type="text" name="project_no8" id="project_no8" maxlength="20" style="width:100px;float:left;" />
|
|
<input type="button" value="?" class="gray_btns" id="btnSearch8"></td>
|
|
<td class="input_title" style="font-size:13px;"> </td>
|
|
<td class="input_sub_title"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" style="font-size:13px;"><label for="">불출구분</label></td>
|
|
<td class="input_sub_title"><select name="sort_cd" id="sort_cd" type="select" style="width:150px;">
|
|
<option value="">선택</option>
|
|
</select></td>
|
|
<td class="input_title" style="font-size:13px;"><label for="">불출부서</label></td>
|
|
<td class="input_sub_title"><input type="text" name="project_no4" id="project_no4" maxlength="20" style="width:130px;/"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" style="font-size:13px;">
|
|
<label for="">처리구분</label>
|
|
|
|
</td>
|
|
<td class="input_sub_title"><select name="sort_cd5" id="sort_cd5" type="select" style="width:150px;">
|
|
<option value="">선택</option>
|
|
</select></td>
|
|
<td class="input_title" style="font-size:13px;">
|
|
<label for="">담당자</label>
|
|
|
|
</td>
|
|
<td class="input_sub_title"><input type="text" name="project_no4" id="project_no4" maxlength="20" style="width:130px;/"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="label">불출계정</label></td>
|
|
<td class="input_sub_title"><input type="text" name="project_no8" id="project_no8" maxlength="20" style="width:100px;float:left;" />
|
|
<input type="button" value="?" class="gray_btns" id="btnSearch8"></td>
|
|
<td class="input_title" style="font-size:13px;"><label for="">로트번호</label></td>
|
|
<td class="input_sub_title"><input type="text" name="project_no4" id="project_no4" maxlength="20" style="width:130px;/"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label">불출선</label></td>
|
|
<td class="input_sub_title"><input type="text" name="project_no8" id="project_no8" maxlength="20" style="width:100px;float:left;" />
|
|
<input type="button" value="?" class="gray_btns" id="btnSearch8"></td>
|
|
<td class="input_sub_title"> </td>
|
|
<td class="input_sub_title"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label">특이사항</label></td>
|
|
<td colspan="3" class="input_sub_title"><input type="text" name="project_no" id="project_no" maxlength="20" style="width:90%;/"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label">품목명</label></td>
|
|
<td class="input_sub_title"><input type="text" name="project_no8" id="project_no8" maxlength="20" style="width:100px;float:left;" />
|
|
<input type="button" value="?" class="gray_btns" id="btnSearch8"></td>
|
|
<td class="input_sub_title"> </td>
|
|
<td class="input_sub_title"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="label">불출수량</label></td>
|
|
<td class="input_sub_title"><input type="text" id="search_fromDate2"
|
|
name="search_fromDate2" class="date_icon"
|
|
style="width: 80px !important;background-color:#fff;" autocomplete="off"></td>
|
|
<td class="input_sub_title"> </td>
|
|
<td class="input_sub_title"> </td>
|
|
</tr>
|
|
<tr><td colspan="5" style="height:15px;"></td></tr>
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<div class="plm_btn_wrap">
|
|
<input type="button" value="추가" id="btnItemAdd" class="plm_btns">
|
|
</div>
|
|
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="10%" />
|
|
<col width="8%" />
|
|
<col width="15%" />
|
|
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
|
|
<col width="8%" />
|
|
<col width="15%" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td height="46">일련번호</td>
|
|
<td>품번</td>
|
|
<!-- part_name -->
|
|
<td>품명</td>
|
|
<!-- parent_part_no -->
|
|
<td>규격</td>
|
|
<!-- part_no -->
|
|
<td>재질</td>
|
|
<!-- qty -->
|
|
<td>단위</td>
|
|
<!-- material -->
|
|
<td>현재고</td>
|
|
<td>불출수량</td>
|
|
<td>Location</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
<div style="height:350px;overflow-y:scroll;margin-right:-10px;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="10%" />
|
|
<col width="8%" />
|
|
<col width="15%" />
|
|
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
|
|
<col width="8%" />
|
|
<col width="15%" />
|
|
</colgroup>
|
|
<tbody id="productPart">
|
|
<c:choose>
|
|
<c:when test="${empty partList}">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="8">조회된 데이터가 없습니다.</td>
|
|
</tr>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<c:forEach var="item" items="${partList}" varStatus="varStatus">
|
|
<tr id="${item.RISEQNO}">
|
|
<td>${item.RISEQNO}</td>
|
|
<td>${item.IMITEMNO}</td>
|
|
<td>${item.IMITEMNM}</td>
|
|
<td>${item.IMITEMSPEC}</td>
|
|
<td>${item.IMMATERIAL}</td>
|
|
<td>${item.IMUNIT}</td>
|
|
<td>
|
|
<input type="text" name="riNogoodQty" id="riNogoodQty" value="${item.RINOGOODQTY}" maxlength="9" />
|
|
</td>
|
|
<td>
|
|
<input type="text" name="riRcptQty" id="riRcptQty" value="${item.RIRCPTQTY}" maxlength="9" />
|
|
</td>
|
|
<td>${item.RIPRICE}</td>
|
|
<td>${item.RIRCPTAMT}</td>
|
|
<td>
|
|
<input type="checkbox" name="imInspection" id="imInspection" value="Y" ${item.IMINSPECTION eq 'Y' ? 'checked':''} />
|
|
</td>
|
|
<td>
|
|
<input type="text" name="inInspectNo" id="inInspectNo" value="${item.ININSPECTNO}" maxlength="15" />
|
|
</td>
|
|
<td>
|
|
<input type="button" value="삭제" onclick="fn_itemDelete('${item.RISEQNO}');" class="plm_btns">
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<c:if test="${(param.actionType ne 'view' and info.REG_USER_ID eq connectUserId) or 'regist' eq param.actionType or 'plm_admin' eq connectUserId}">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns">
|
|
</c:if>
|
|
<c:if test="${(param.actionType eq 'modify' and info.REG_USER_ID eq connectUserId) or 'plm_admin' eq connectUserId}">
|
|
<input type="button" value="삭제" id="btnDelete" class="plm_btns">
|
|
</c:if>
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |