최초커밋
This commit is contained in:
@@ -0,0 +1,335 @@
|
||||
<%@ 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 userId = CommonUtils.checkNull(person.getUserId());
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#btnClose").click(function(){
|
||||
self.close(0);
|
||||
});
|
||||
|
||||
$("#btnSave").click(function(){
|
||||
fn_save();
|
||||
});
|
||||
|
||||
$("#LOCATION").change(function(){
|
||||
$("#QTY").val("");
|
||||
$("#REMARK").val("");
|
||||
|
||||
fn_getInventoryMngInfo();
|
||||
});
|
||||
|
||||
$("#INPUT_QTY").keyup(function(){
|
||||
var qty = parseInt($("#QTY").val());
|
||||
var inputQty = parseInt($("#INPUT_QTY").val());
|
||||
|
||||
if(qty < inputQty){
|
||||
Swal.fire("투입수량은 재고수량을 초과할 수 없습니다.");
|
||||
}
|
||||
|
||||
$("#AFTER_QTY").val(qty-inputQty);
|
||||
|
||||
});
|
||||
|
||||
fnc_getCodeListAppend("<%=Constants.INVENTORY_LOCATION_CD%>","LOCATION","");
|
||||
|
||||
fn_getProjectNoList("TARGET_OBJID","");
|
||||
|
||||
fnc_datepick();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
//구분 및 Location의 선택에 따라 재고등록된 내용을 가져온다.
|
||||
function fn_getInventoryMngInfo(){
|
||||
var location = $("#LOCATION").val();
|
||||
|
||||
if("" != location){
|
||||
$.ajax({
|
||||
url:"/inventoryMng/getFinalInventoryRegistInfo.do",
|
||||
type:"POST",
|
||||
data:$("#form1").serialize(),
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
|
||||
var resultMap = data;
|
||||
|
||||
console.log("resultMap:"+resultMap);
|
||||
|
||||
if(null != resultMap){
|
||||
$("#PARENT_OBJID").val(resultMap.OBJID);
|
||||
$("#QTY").val(resultMap.QTY);
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var qty = parseInt($("#QTY").val());
|
||||
var inputQty = parseInt($("#INPUT_QTY").val());
|
||||
$("#AFTER_QTY").val(qty-inputQty);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function fn_getProjectNoList(selectboxId,selectedVal){
|
||||
$.ajax({
|
||||
url:"/common/getProjectNoList.do",
|
||||
type:"POST",
|
||||
data:{},
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
|
||||
var resultList = data;
|
||||
|
||||
if(0 < resultList.length){
|
||||
$("#"+selectboxId).empty();
|
||||
|
||||
$("#"+selectboxId).append("<option value=''>선택</option>");
|
||||
|
||||
for (var i = 0; i < resultList.length; i++) {
|
||||
var projectNoObjId = resultList[i].ORDER_MGMT_OBJID;
|
||||
var projectNo = resultList[i].PROJECT_NO;
|
||||
$("#"+selectboxId).append("<option value='"+projectNoObjId+"'>"+projectNo+"</option>");
|
||||
}
|
||||
$("#"+selectboxId).val(selectedVal);
|
||||
}
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function fn_save(){
|
||||
if(fnc_validate('form1')){
|
||||
|
||||
var qty = parseInt($("#QTY").val());
|
||||
var inputQty = parseInt($("#INPUT_QTY").val());
|
||||
|
||||
if(qty < inputQty){
|
||||
Swal.fire("투입수량은 재고수량을 초과할 수 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(confirm("저장하시겠습니까?")){
|
||||
$.ajax({
|
||||
url:"/inventoryMng/mergeInputResourceRegist.do",
|
||||
type:"POST",
|
||||
data:$("#form1").serialize(),
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
Swal.fire(data.message);
|
||||
opener.fn_search();
|
||||
self.close();
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.input_title {border-left:1px solid #ccc;}
|
||||
.input_sub_title {border-left:1px solid #ccc;}
|
||||
.pmsPopupForm tr:last-child td{border-bottom:1px solid #ccc;}
|
||||
</style>
|
||||
<body>
|
||||
<form name="form1" id="form1" action="" method="post">
|
||||
<input type="hidden" name="OBJID" id="OBJID" value="${resultMap.OBJID}">
|
||||
<input type="hidden" name="PARENT_OBJID" id="PARENT_OBJID">
|
||||
<section>
|
||||
<div class="plm_menu_name" style="display:flex;">
|
||||
<h2>
|
||||
<span>자재투입등록</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div id="businessPopupFormWrap">
|
||||
<table class="pmsPopupForm">
|
||||
<colgroup>
|
||||
<col width="20%">
|
||||
<col width="30%">
|
||||
<col width="*">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class="input_title" rowspan="15">
|
||||
<label for="">자재정보</label>
|
||||
</td>
|
||||
<td class="input_title">
|
||||
<label for="">품목</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.PART_NO}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">품명</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.PART_NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">규격</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.SPEC}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">재질</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.MATERIAL}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">단위</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.UNIT}</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<td class="input_title">
|
||||
<label for="">중량</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.WEIGHT}</td>
|
||||
</tr> --%>
|
||||
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">두께</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.THICKNESS}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">가로</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.WIDTH}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">세로</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.HEIGHT}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">외경</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.OUT_DIAMETER}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">내경</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.IN_DIAMETER}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">길이</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >${resultMap.LENGTH}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">Location</label>
|
||||
</td>
|
||||
<td class="input_sub_title">
|
||||
<select name="LOCATION" id="LOCATION" type="select" required title="Location"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">수량</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >
|
||||
<input type="number" name="QTY" id="QTY" value="${resultMap.QTY}" required title="수량" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">비고</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >
|
||||
<input type="text" name="REMARK" id="REMARK" value="${resultMap.REMARK}" readonly>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="businessPopupFormWrap" style="padding-top:10px;">
|
||||
<table class="pmsPopupForm">
|
||||
<colgroup>
|
||||
<col width="20%">
|
||||
<col width="30%">
|
||||
<col width="*">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class="input_title" rowspan="4">
|
||||
<label for="">투입정보</label>
|
||||
</td>
|
||||
<td class="input_title">
|
||||
<label for="">사용처</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >
|
||||
<!-- <select name="TARGET_OBJID" id="TARGET_OBJID" type="select" required title="사용처"></select> -->
|
||||
<input type="text" name="used" id="used" required title="사용처">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">투입일</label>
|
||||
</td>
|
||||
<td class="input_sub_title">
|
||||
<input type="text" name="INPUT_DATE" id="inputDate" value="" required title="투입일">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">투입수량</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >
|
||||
<input type="number" name="INPUT_QTY" id="INPUT_QTY" value="" required title="투입수량">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title">
|
||||
<label for="">투입 후 수량</label>
|
||||
</td>
|
||||
<td class="input_sub_title" >
|
||||
<input type="number" name="AFTER_QTY" id="AFTER_QTY" value="">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_wrap">
|
||||
<div class="plm_btn_wrap_center">
|
||||
<c:choose>
|
||||
<c:when test="${resultMap.WRITER eq connectUserId or param.actionType eq 'regist' or 'plm_admin' eq connectUserId}">
|
||||
<input type="button" value="저장" id="btnSave" class="plm_btns create">
|
||||
</c:when>
|
||||
<c:otherwise></c:otherwise>
|
||||
</c:choose>
|
||||
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user