E-BOM 등록 수정중

This commit is contained in:
2025-10-22 17:52:00 +09:00
parent 5fb059b3fd
commit 39543cec75
5 changed files with 557 additions and 19 deletions

View File

@@ -66,6 +66,11 @@ $(document).ready(function(){
});
//end of 상세 팝업
//상태변경 버튼
$("#btnStatusChange").click(function(){
fn_openStatusChange();
});
//조회
$("#btnSearch").click(function(){
$("#page").val("1");
@@ -152,11 +157,11 @@ var columns = [
{headerHozAlign : 'center', hozAlign : 'left', width : '270', title : '유닛명', field : 'UNIT_NAME' },*/
{headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '제품구분', field : 'PRODUCT_NAME' },
{headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '품번', field : 'PART_NO' },
{headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '품명', field : 'PART_NAME' },
{headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '제품구분', field : 'PRODUCT_NAME' },
{headerHozAlign : 'center', hozAlign : 'left', width : '250', title : '품번', field : 'PART_NO' },
{headerHozAlign : 'center', hozAlign : 'left', width : '250', title : '품명', field : 'PART_NAME' },
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : 'E-BOM', field : 'BOM_CNT',
{headerHozAlign : 'center', hozAlign : 'center', width : '150', title : 'E-BOM', field : 'BOM_CNT',
formatter: fnc_subInfoValueFormatter,
cellClick:function(e, cell){
var objId = fnc_checkNull(cell.getData().OBJID);
@@ -166,12 +171,12 @@ var columns = [
},
// {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '등록자', field : 'DEPT_USER_NAME' },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '등록일', field : 'REG_DATE' },
{headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '등록일', field : 'REG_DATE' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '배포일', field : 'DEPLOY_DATE' },
{headerHozAlign : 'center', hozAlign : 'center', width : '85', title : 'Version', field : 'REVISION' },
{headerHozAlign : 'center', hozAlign : 'left', /* width : '200', */ title : '배포사유', field : 'NOTE' },
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '상태', field : 'STATUS_TITLE' }
{headerHozAlign : 'center', hozAlign : 'center', width : '150', title : 'Version', field : 'REVISION' },
{headerHozAlign : 'center', hozAlign : 'left', /* width : '200', */ title : '배포사유', field : 'NOTE' },
{headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '상태', field : 'STATUS' }
];
//var grid;
@@ -466,6 +471,28 @@ function fn_openChangeDesignNote(objId){
window.open("/partMng/changeDesignNotePopUp.do?objId="+objId, "", "width=1000, height=200, resizable=no");
}
/**
* 상태변경 팝업
*/
function fn_openStatusChange() {
var selectedStructure = _tabulGrid.getSelectedData();
if(selectedStructure.length == 0){
Swal.fire("선택된 내용이 없습니다.");
return false;
}
if(selectedStructure.length > 1){
Swal.fire('단건만 선택 가능합니다.');
return;
}
var selectedData = selectedStructure[0];
var objId = fnc_checkNull(selectedData.OBJID);
window.open("/partMng/structureStatusChangePopup.do?objId=" + objId, "structureStatusChangePopup", "width=500, height=300, resizable=no");
}
function saveexcelpop() {
var selectedStructure = _tabulGrid.getSelectedData();
@@ -536,10 +563,12 @@ function saveexcelpop() {
<span>E-BOM List</span>
</h2>
<div class="btnArea">
<input type="button" value="배포" class="plm_btns" id="btnDeploy">
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
<input type="button" value="구조등록" class="plm_btns" onclick="saveexcelpop();">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
<input type="button" value="PDM>ERP업로드" class="plm_btns" id="btnPDMERPUpload">
<input type="button" value="E-BOM등록" class="plm_btns" onclick="saveexcelpop();">
<input type="button" value="상태변경" class="plm_btns" id="btnStatusChange">
<!-- <input type="button" value="배포" class="plm_btns" id="btnDeploy"> -->
</div>
</div>
@@ -593,7 +622,7 @@ function saveexcelpop() {
<input type="text" name="SEARCH_PART_NO" id="SEARCH_PART_NO">
</td>
<td class="label"><label for="">품</label></td>
<td class="label"><label for="">품</label></td>
<td>
<input type="text" name="SEARCH_PART_NAME" id="SEARCH_PART_NAME">
</td>

View File

@@ -0,0 +1,140 @@
<%@ 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>