253 lines
7.8 KiB
Plaintext
253 lines
7.8 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@include file= "/init.jsp" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('.select2').select2();
|
|
//날짜
|
|
fnc_datepick();
|
|
|
|
fn_BomUnitCodeList("${param.project_no}", "unit", "${param.unit}");
|
|
fn_BomPartList("${param.project_no}","${param.unit}", "part_no", "${param.part_no}");
|
|
|
|
|
|
$("#btn_close").click(function(){
|
|
self.close();
|
|
opener.fn_search();
|
|
});
|
|
|
|
$("#project_no").change(function(){
|
|
resetpart();
|
|
fn_BomUnitCodeList(this.value, "unit", "${param.unit}");
|
|
|
|
fn_BomPartList("","", "part_no", "${param.part_no}");
|
|
});
|
|
|
|
$("#unit").change(function(){
|
|
resetpart();
|
|
fn_BomPartList($("#project_no").val(),this.value, "part_no", "${param.unit}");
|
|
});
|
|
|
|
|
|
$("#part_no").change(function(){
|
|
resetpart();
|
|
var part_name = $("#part_no option:selected").attr("data-part_name");
|
|
var spec = $("#part_no option:selected").attr("data-spec");
|
|
var material = $("#part_no option:selected").attr("data-material");
|
|
var part_type = $("#part_no option:selected").attr("data-part_type");
|
|
var maker = $("#part_no option:selected").attr("data-maker");
|
|
|
|
$("#part_name").val(part_name);
|
|
$("#spec").val(spec);
|
|
$("#material").val(material);
|
|
$("#part_type").val(part_type);
|
|
$("#maker").val(maker);
|
|
});
|
|
|
|
$("#part_no").trigger("change");
|
|
|
|
$("#location").change(function(){
|
|
fnc_getCodeListAppend($(this).val(), "sub_location", "");
|
|
});
|
|
});
|
|
|
|
function resetpart(){
|
|
$("#part_name").val("");
|
|
$("#spec").val("");
|
|
$("#material").val("");
|
|
$("#part_type").val("");
|
|
}
|
|
|
|
function saveOEMInfo(){
|
|
if(fnc_valitate("oemForm")){
|
|
var zeroQty = $("input[name=qty]").val();
|
|
|
|
if (zeroQty > 0) {
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/inventoryMng/saveinventoryForm.do",
|
|
type:"POST",
|
|
data:$("#oemForm").serialize(),
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
alert(data.msg);
|
|
/* if(data.RESULT !=''){
|
|
Swal.fire('저장되었습니다');
|
|
} */
|
|
opener.fn_search();
|
|
self.close();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
Swal.fire('수량이 0보다 작습니다.');
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="oemForm" id="oemForm" action="" method="post">
|
|
<input type="hidden" name="objid" id="objid" value="${OBJID}">
|
|
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>자재등록</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="35%">
|
|
<col width="15%">
|
|
<col width="35%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">프로젝트번호</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="project_no" id="project_no" value="${param.project_no}" required reqTitle="프로젝트번호" type="select" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.project_no}
|
|
</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">유닛명</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="unit" id="unit" required reqTitle="유닛명" type="select" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">품번</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="part_no" id="part_no" required reqTitle="품번" type="select" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
<td class="input_title"><label for="">품명</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="part_name" id="part_name" readonly>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">재질</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="material" id="material" readonly>
|
|
</td>
|
|
<td class="input_title"><label for="">사양(규격)</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="spec" id="spec" readonly>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">PART구분</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="part_type" id="part_type" readonly>
|
|
</td>
|
|
<td class="input_title"><label for="">수량</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="number" name="qty" id="qty" required reqTitle="수량" numberOnly>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">내자/외자</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="form_no" id="form_no" >
|
|
</td>
|
|
<td class="input_title"><label for="">메이커</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="maker" id="maker" >
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">자재코드</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="material_code" id="material_code" >
|
|
</td>
|
|
<td class="input_title"><label for="">공급업체</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="supply_objid" id="supply_objid" class="select2" type="select" reqTitle="공급업체"><option value="">선택</option>${code_map.SUPPLY_OBJID}</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">단가</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="price" id="price" >
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="35%">
|
|
<col width="15%">
|
|
<col width="35%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">재고구분</label></td>
|
|
<td class="input_sub_title">
|
|
<select name=cls_cd id="cls_cd" style="" required reqTitle="재고구분" type="select" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.cls_cd}
|
|
</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">발생사유</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="cau_cd" id="cau_cd" style="" required reqTitle="발생사유" type="select" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.cau_cd}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">location</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="location" id="location"required reqTitle="창고위치" type="select" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.location}
|
|
</select>
|
|
</td>
|
|
<td class="input_title"><label for="">sub_location</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="sub_location" id="sub_location" required reqTitle="SUB창고위치" type="select" class="select2"></select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" class="plm_btns" onclick="javascript:saveOEMInfo();">
|
|
<input type="button" value="닫기" name="" id="btn_close" class="plm_btns" onclick="javascript:self.close();">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |