215 lines
6.9 KiB
Plaintext
215 lines
6.9 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ 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>
|
|
|
|
<script>
|
|
var isEditMode = "${empty info?'false':'true'}";
|
|
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
$("#attributeName").focus();
|
|
});
|
|
|
|
//save
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
});
|
|
</script>
|
|
<script>
|
|
//정합성 검사
|
|
function fn_validate(){
|
|
if($("#categoryObjId").val() == null || $("#categoryObjId").val() == ""){
|
|
Swal.fire("중분류명이 선택되지 않았습니다.");
|
|
$("#categoryObjId").focus();
|
|
return false;
|
|
}
|
|
if($("#attributeName").val() == null || $("#attributeName").val() == ""){
|
|
Swal.fire("잠재적 고장필터명이 입력되지 않았습니다.");
|
|
$("#attributeName").focus();
|
|
return false;
|
|
}
|
|
if($("#potentialImpact").val() == null || $("#potentialImpact").val() == ""){
|
|
Swal.fire("고장의 잠재적 영향명이 입력되지 않았습니다.");
|
|
$("#potentialImpact").focus();
|
|
return false;
|
|
}
|
|
if($("#potentialCause").val() == null || $("#potentialCause").val() == ""){
|
|
Swal.fire("고장의 잠재적 원인명이 입력되지 않았습니다.");
|
|
$("#potentialCause").focus();
|
|
return false;
|
|
}
|
|
if($("#currentPrevent").val() == null || $("#currentPrevent").val() == ""){
|
|
Swal.fire("현실 개선관리(예방)이 입력되지 않았습니다.");
|
|
$("#currentPrevent").focus();
|
|
return false;
|
|
}
|
|
if($("#currentDetect").val() == null || $("#currentDetect").val() == ""){
|
|
Swal.fire("현실 개선관리(검출)명이 입력되지 않았습니다.");
|
|
$("#currentDetect").focus();
|
|
return false;
|
|
}
|
|
// if($("#recommendOption").val() == null || $("#recommendOption").val() == ""){
|
|
// Swal.fire("권고조치사항명이 입력되지 않았습니다.");
|
|
// $("#recommendOption").focus();
|
|
// return false;
|
|
// }
|
|
|
|
return true;
|
|
}
|
|
|
|
//잠재적 고장필터명 저장
|
|
function fn_save(){
|
|
var flag = false;
|
|
if(isEditMode == "false"){
|
|
flag = fn_duplicateNameCheck();
|
|
}else{
|
|
|
|
flag = true;
|
|
}
|
|
|
|
if(flag){
|
|
if(fn_validate()){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/admin/saveDfmeaAttributeInfo.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
Swal.fire(data.msg);
|
|
if(data.result == "true" || data.result == true || data.result){
|
|
opener.fn_search();
|
|
self.close(0);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//잠재적 고장필터명 중복체크
|
|
function fn_duplicateNameCheck(){
|
|
var result = false;
|
|
var attributeName = $("#attributeName").val();
|
|
var catecoryObjId = $("#catecoryObjId").val();
|
|
|
|
$.ajax({
|
|
url:"/admin/checkDuplicateDfmeaAttributeName.do",
|
|
type:"POST",
|
|
data:{"attributeName":attributeName, "catecoryObjId":catecoryObjId},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
if(data.result == "false" || data.result == false || !data.result){
|
|
if(attributeName == "${info.ATTRIBUTE_NAME}"){
|
|
return true;
|
|
}
|
|
Swal.fire(data.msg);
|
|
}else{
|
|
result = true;
|
|
}
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
|
|
return result;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<section id="commonSection">
|
|
<div class=admin_title>
|
|
<h2>잠재적 고장필터 관리</h2>
|
|
</div>
|
|
<div id="adminPopupFormWrap">
|
|
<form id="form1" name="form1" method="post">
|
|
<input type="hidden" id="objId" name="objId" value="${info.OBJID}">
|
|
<table id="adminPopupForm">
|
|
<colgroup>
|
|
<col width="37%" />
|
|
<col width="63%" />
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td><label>DFMEA 중분류</label></td>
|
|
<c:choose>
|
|
<c:when test="${!empty dfmeaMngList}">
|
|
<td>
|
|
<select type="select" title="DFMEA 중분류" id="categoryObjId" name="categoryObjId" required>
|
|
<option value="">선택</option>
|
|
<c:forEach var="dfmeaMng" items="${dfmeaMngList}">
|
|
<option id="catecoryObjId" value="${dfmeaMng.OBJID}" ${info.CATEGORY_OBJID eq dfmeaMng.OBJID?'selected':''}>${dfmeaMng.CATEGORY_NAME}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td><input type="text" value="조회된 정보가 없습니다." style="text-align:center;" readonly></td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tr>
|
|
<tr>
|
|
<td><label>잠재적 고장필터명</label></td>
|
|
<td><textarea type="text" title="잠재적 고장필터명" name="attributeName" id="attributeName" maxlength="60" required >${info.ATTRIBUTE_NAME}</textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>고장의 잠재적 영향</label></td>
|
|
<td><textarea type="text" title="고장의 잠재적 영향" name="potentialImpact" id="potentialImpact" maxlength="200" required>${info.POTENTIAL_IMPACT}</textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>고장의 잠재적 원인</label></td>
|
|
<td><textarea type="text" title="고장의 잠재적 원인" name="potentialCause" id="potentialCause" maxlength="200" required>${info.POTENTIAL_CAUSE}</textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>현실 개선관리(예방)</label></td>
|
|
<td><textarea type="text" title="현실 개선관리(예방)" name="currentPrevent" id="currentPrevent" maxlength="200" required>${info.CURRENT_DESIGN_MANAGE_PREVENT}</textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>현실 개선관리(검출)</label></td>
|
|
<td><textarea type="text" title="현실 개선관리(검출)" name="currentDetect" id="currentDetect" maxlength="200" required>${info.CURRENT_DESIGN_MANAGE_DETECT}</textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>권고조치사항</label></td>
|
|
<%-- <td><textarea type="text" title="권고조치사항" name="recommendOption" id="recommendOption" maxlength="100" required>${info.RECOMMEND_OPTION}</textarea></td> --%>
|
|
<td><textarea type="text" title="권고조치사항" name="recommendOption" id="recommendOption" maxlength="200">${info.RECOMMEND_OPTION}</textarea></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><label>활성화 여부</label></td>
|
|
<td>
|
|
<select name="status" id="status">
|
|
<option value="active" ${info.STATUS eq 'active'?'selected':''}>활성화</option>
|
|
<option value="inActive" ${info.STATUS eq 'inActive'?'selected':''}>비활성화</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div id="adminPopupBtnWrap">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="btnCenterWrap">
|
|
<div class="center_btns_wrap">
|
|
<input type="button" value="저장" class="btns" id="btnSave">
|
|
<input type="button" value="닫기" name="" id="btn_close" class="btns" onclick="javascript:self.close();">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</body>
|
|
</html> |