Files
wace_plm/WebContent/WEB-INF/view/partMng/structureStatusChangePopup.jsp
2025-10-22 17:52:00 +09:00

141 lines
3.7 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 type="text/javascript">
$(function(){
$("#btnClose").click(function(){
self.close();
});
$("#btnSave").click(function(){
fn_save();
});
$('.select2').select2();
// 제품구분 초기값 설정
$("#product_cd").val("${STRUCTURE_INFO.PRODUCT_CD}").trigger('change');
});
function fn_save(){
// 필수값 체크
if(!$("#product_cd").val()){
Swal.fire('제품구분을 선택해 주세요');
return;
}
if(!$("#part_no").val()){
Swal.fire('품번을 입력해 주세요');
return;
}
if(confirm("저장 하시겠습니까?")){
$.ajax({
url:"/partMng/updateStructureStatus.do",
type:"POST",
data:$("#form1").serialize(),
dataType:"json",
success:function(data){
if(data.result == "success"){
Swal.fire(data.msg);
opener.fn_search();
self.close();
}else{
Swal.fire(data.msg);
}
},
error: function(jqxhr, status, error){
Swal.fire('저장 중 오류가 발생했습니다.');
}
});
}
}
</script>
</head>
<body>
<form name="form1" id="form1" action="" method="post">
<input type="hidden" name="objId" id="objId" value="${param.objId}" />
<section>
<div class="plm_menu_name">
<h2>
<span>E-BOM List 한 개 선택후 상태변경 버튼 클릭</span>
</h2>
</div>
<div id="businessPopupFormWrap">
<table class="pmsPopupForm">
<colgroup>
<col width="25%">
<col width="75%">
</colgroup>
<tr>
<td class="input_title">
<label for="product_cd">제품구분</label>
<span style="color: red;">*</span>
</td>
<td class="input_sub_title">
<select name="product_cd" id="product_cd" style="width:100%;" class="select2" autocomplete="off">
<option value="">선택</option>
${code_map.product_cd}
</select>
</td>
</tr>
<tr>
<td class="input_title">
<label for="part_no">품번</label>
<span style="color: red;">*</span>
</td>
<td class="input_sub_title">
<input type="text" name="part_no" id="part_no" value="${STRUCTURE_INFO.PART_NO}" style="width:100%;"/>
</td>
</tr>
<tr>
<td class="input_title">
<label for="part_name">품명</label>
</td>
<td class="input_sub_title">
<input type="text" name="part_name" id="part_name" value="${STRUCTURE_INFO.PART_NAME}" style="width:100%;"/>
</td>
</tr>
<tr>
<td class="input_title">
<label for="version">Version</label>
</td>
<td class="input_sub_title">
<input type="text" name="version" id="version" value="${STRUCTURE_INFO.REVISION}" style="width:100%;"/>
</td>
</tr>
<tr>
<td class="input_title">
<label>상태</label>
</td>
<td class="input_sub_title" style="text-align: left; padding-left: 10px;">
<label>
<input type="radio" name="status" value="Y" ${STRUCTURE_INFO.STATUS eq 'Y' ? 'checked' : ''}> Y
</label>
<label style="margin-left: 20px;">
<input type="radio" name="status" value="N" ${STRUCTURE_INFO.STATUS eq 'N' ? 'checked' : ''}> N
</label>
</td>
</tr>
</table>
</div>
<div class="btn_wrap">
<div class="plm_btn_wrap_center">
<input type="button" value="저장" id="btnSave" class="plm_btns">
<input type="button" value="닫기" id="btnClose" class="plm_btns">
</div>
</div>
</section>
</form>
</body>
</html>