Merge branch 'main' of https://g.wace.me/chpark/wace_plm into V2025112501

This commit is contained in:
leeheejin
2025-12-03 09:17:54 +09:00
9 changed files with 596 additions and 12 deletions

View File

@@ -0,0 +1,168 @@
<%@ 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" %>
<%
String material_name = CommonUtils.checkNull(request.getParameter("material_name"));
String material_code = CommonUtils.checkNull(request.getParameter("material_code"));
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<!-- JSTL 변수선언 -->
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
<c:set var="nPage" value="${empty param.page?1:param.page}" />
<c:set var="pageIndex" value="${(nPage-1)/10}" />
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
<script>
$(document).ready(function(){
fnc_datepick();
// 엔터키로 조회
$("input").keyup(function(e){
if(e.keyCode == 13){
$("#page").val("1");
fn_search();
}
});
$("#btnSearch").click(function(){
$("#page").val("1");
fn_search();
});
// 삭제
$("#btnDelete").click(function(){
fn_delete();
});
fn_search();
});
</script>
<script type="text/javascript">
var columns = [
{title:'OBJID', field:'OBJID', visible:false},
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'NO', field:'RNUM'},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'소재', field:'MATERIAL_CODE',
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell) {
var objid = fnc_checkNull(cell.getData().OBJID);
openMaterialPopUp(objid);
}
},
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'소재명', field:'MATERIAL_NAME'},
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'사이즈', field:'SIZE_SPEC'},
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'소재품번', field:'MATERIAL_PART_NO'},
{headerHozAlign:'center', hozAlign:'left', title:'비고', field:'REMARK'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'상태', field:'STATUS_NAME'},
{headerHozAlign:'center', hozAlign:'center', width:'110', title:'등록일', field:'REGDATE'}
];
// 조회
function fn_search(){
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/admin/materialMngGridList.do", columns, true);
}
// 삭제
function fn_delete(){
var checkedObj = _tabulGrid.getSelectedData();
if(0 < checkedObj.length){
var objId = fnc_checkNull(checkedObj[0].OBJID);
Swal.fire({
title: '선택한 소재를 삭제하시겠습니까?',
text: '',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: '확인',
cancelButtonText: '취소',
reverseButtons: false
}).then(result => {
if (result.isConfirmed) {
$.ajax({
type: "POST",
url: "/admin/deleteMaterialMngInfo.do",
data: {"objId": objId},
dataType: "json",
success: function(data){
if(data.result == 'true'){
Swal.fire("삭제되었습니다.");
fn_search();
} else {
Swal.fire("삭제에 실패했습니다.");
}
},
error: function(jqxhr, status, error){
Swal.fire("오류가 발생했습니다.");
}
});
}
});
} else {
Swal.fire("선택한 항목이 없습니다.");
}
}
// 소재 등록/수정 팝업
function openMaterialPopUp(objid){
var popup_width = 700;
var popup_height = 450;
var target = "openMaterialPopUp";
var url = "/admin/materialRegistPopUp.do";
fn_centerPopup(popup_width, popup_height, url, target);
var hiddenForm = document.hiddenForm;
hiddenForm.objid.value = objid;
hiddenForm.target = "openMaterialPopUp";
hiddenForm.action = "/admin/materialRegistPopUp.do";
hiddenForm.submit();
}
</script>
</head>
<body style="overflow-y: hidden;">
<form name="hiddenForm" id="hiddenForm">
<input type="hidden" name="objid">
</form>
<form name="form1" id="form1" method="post">
<input type="hidden" name="status" id="status">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name_gdnsi">
<h2>
<span>소재관리</span>
</h2>
<div class="btnArea">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="소재 등록" class="plm_btns" onclick="javascript:openMaterialPopUp('');">
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
</div>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="label"><label for="">소재명</label></td>
<td><input type="text" name="material_name" id="material_name" value="<%=material_name%>"></td>
<td class="label"><label for="">소재코드</label></td>
<td><input type="text" name="material_code" id="material_code" value="<%=material_code%>"></td>
</tr>
</tbody>
</table>
</div>
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,186 @@
<%@ 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>
$(document).ready(function(){
// 닫기 버튼
$("#btn_close").click(function(){
self.close();
});
// 저장 버튼
$("#btn_save").click(function(){
fn_save();
});
});
// 저장
function fn_save(){
// 필수값 체크
var materialName = $("#material_name").val();
if(materialName == null || materialName == ''){
Swal.fire({
title: '알림',
text: '소재명을 입력해주세요.',
icon: 'warning'
});
$("#material_name").focus();
return;
}
Swal.fire({
title: '확인',
text: '저장하시겠습니까?',
icon: 'question',
showCancelButton: true,
confirmButtonText: '확인',
cancelButtonText: '취소'
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
url: "/admin/saveMaterialMngInfo.do",
type: "POST",
data: $("#materialForm").serialize(),
dataType: "json",
success: function(data){
if(data.result == 'true'){
Swal.fire({
title: '성공',
text: data.message,
icon: 'success'
}).then(() => {
if(opener && opener.fn_search){
opener.fn_search();
}
self.close();
});
} else {
Swal.fire({
title: '실패',
text: data.message || '저장에 실패했습니다.',
icon: 'error'
});
}
},
error: function(jqxhr, status, error){
Swal.fire({
title: '오류',
text: '저장 중 오류가 발생했습니다.',
icon: 'error'
});
}
});
}
});
}
</script>
<style>
.form-table {
width: 100%;
border-collapse: collapse;
}
.form-table th, .form-table td {
border: 1px solid #ddd;
padding: 8px 10px;
text-align: left;
}
.form-table th {
background-color: #f5f5f5;
width: 120px;
font-weight: bold;
}
.form-table input[type="text"], .form-table textarea, .form-table select {
width: 100%;
box-sizing: border-box;
padding: 5px;
border: 1px solid #ccc;
}
.form-table textarea {
height: 80px;
resize: vertical;
}
.btn-area {
text-align: center;
padding: 15px;
}
.required:after {
content: " *";
color: red;
}
</style>
</head>
<body>
<form name="materialForm" id="materialForm" method="post">
<input type="hidden" name="objid" id="objid" value="${resultMap.OBJID}">
<div class="plm_menu_name_myungjin">
<h2>
<span>소재 등록/수정</span>
</h2>
</div>
<div style="padding: 15px;">
<table class="form-table">
<colgroup>
<col width="120px">
<col width="*">
</colgroup>
<tbody>
<tr>
<th><label for="material_code" class="required">소재코드</label></th>
<td>
<input type="text" name="material_code" id="material_code" value="${resultMap.MATERIAL_CODE}" maxlength="50" placeholder="예: MAT-001">
</td>
</tr>
<tr>
<th><label for="material_name">소재명</label></th>
<td>
<input type="text" name="material_name" id="material_name" value="${resultMap.MATERIAL_NAME}" maxlength="256" placeholder="소재명을 입력하세요">
</td>
</tr>
<tr>
<th><label for="size_spec" class="required">사이즈</label></th>
<td>
<input type="text" name="size_spec" id="size_spec" value="${resultMap.SIZE_SPEC}" maxlength="100" placeholder="예: 100x50x10mm">
</td>
</tr>
<tr>
<th><label for="material_part_no" class="required">소재품번</label></th>
<td>
<input type="text" name="material_part_no" id="material_part_no" value="${resultMap.MATERIAL_PART_NO}" maxlength="100" placeholder="소재품번을 입력하세요">
</td>
</tr>
<tr>
<th><label for="status">상태</label></th>
<td>
<select name="status" id="status">
<option value="ACTIVE" ${resultMap.STATUS == 'ACTIVE' || empty resultMap.STATUS ? 'selected' : ''}>활성</option>
<option value="INACTIVE" ${resultMap.STATUS == 'INACTIVE' ? 'selected' : ''}>비활성</option>
</select>
</td>
</tr>
<tr>
<th><label for="remark">비고</label></th>
<td>
<textarea name="remark" id="remark" placeholder="비고를 입력하세요">${resultMap.REMARK}</textarea>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn-area">
<input type="button" value="저장" class="plm_btns" id="btn_save">
<input type="button" value="닫기" class="plm_btns" id="btn_close">
</div>
</form>
</body>
</html>

View File

@@ -1075,7 +1075,7 @@ function fn_location_save(){
<td title="${item.SPEC}" style="text-align:left;">${item.SPEC}</td>
<td title="${item.MAKER}" style="text-align:left;">${item.MAKER}</td>
<td title="${item.UNIT_TITLE}">${item.UNIT_TITLE}</td>
<td title="${item.REAL_ORDER_QTY}"><input type="hidden" name="ORDER_QTY" class="ORDER_QTY_${item.ORDER_PART_OBJID}" value="${item.REAL_ORDER_QTY}" onchange="fn_calc('${item.ORDER_PART_OBJID}');"/><fmt:formatNumber value="${item.REAL_ORDER_QTY}" pattern="#,###" /></td>
<td title="${item.ORDER_QTY}"><input type="hidden" name="ORDER_QTY" class="ORDER_QTY_${item.ORDER_PART_OBJID}" value="${item.ORDER_QTY}" onchange="fn_calc('${item.ORDER_PART_OBJID}');"/><fmt:formatNumber value="${item.ORDER_QTY}" pattern="#,###" /></td>
<td title="${item.POM_DELIVERY_DATE}">${item.POM_DELIVERY_DATE}</td>
</tr>
</c:forEach>

View File

@@ -334,14 +334,14 @@ function fn_formPopUp(objId){
</select>
</td>
<td><label for="unit_code">유닛명</label></td>
<!-- <td><label for="unit_code">유닛명</label></td>
<td>
<select name="unit_code" id="unit_code" style="width:190px;" class="select2" autocomplete="off" type="select" reqTitle="유닛명">
</select>
</td>
</td> -->
<td><label for="">발주No.</label></td>
<td><input type="text" name="purchase_order_no" id="purchase_order_no" autocomplete="off" value="${param.purchase_order_no}" style="width:110px;"/></td>
<td><input type="text" name="purchase_order_no" id="purchase_order_no" autocomplete="off" value="${param.purchase_order_no}" style="width:185px;"/></td>
<td><label for="">부품구분</label></td>
<td><select name="type" id="type" class="select2" autocomplete="off" style="width:130px;"><option value="">선택</option>${code_map.type}</select></td>
@@ -369,7 +369,7 @@ function fn_formPopUp(objId){
<td><label for="">입고결과</label></td>
<td>
<select name="delivery_status" id="delivery_status" class="select2" autocomplete="off" style="width:110px;">
<select name="delivery_status" id="delivery_status" class="select2" autocomplete="off" style="width:130px;">
<option value="">선택</option>
<option value="입고중">입고중</option>
<option value="입고완료">입고완료</option>

View File

@@ -346,7 +346,7 @@ var columns = [
}
}
},
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'발주일', field:'REGDATE'}
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'발주일', field:'MAIL_SEND_DATE'}
];
function editCheck (cell) {
@@ -879,7 +879,7 @@ function fn_openMailFormPopup(purchaseOrderObjId){
</td>
</tr>
<tr>
<!-- <tr>
<td><label for="">상태</label></td>
<td>
<select name="appr_status" id="appr_status" class="select2" autocomplete="off" style="">
@@ -895,7 +895,7 @@ function fn_openMailFormPopup(purchaseOrderObjId){
<td><label for="">규격</label></td>
<td><input type="text" name="SEARCH_PART_SPEC" id="SEARCH_PART_SPEC" autocomplete="off" value="${param.SEARCH_PART_SPEC }" style="width:;"/></td>
</tr>
</tr> -->
</table>
</div>

View File

@@ -107,10 +107,10 @@ body {
}
.header-left {
flex: 0 0 auto;
width: 35%;
flex: 1;
width: 100%;
min-width: 200px;
border-right: 1px solid #000;
/* border-right: 1px solid #000; */ /* 결재란 주석 처리로 인해 비활성화 */
}
.header-right {
@@ -539,7 +539,8 @@ function fn_save(){
</table>
</div>
<!-- 오른쪽: 결재란 -->
<!-- 오른쪽: 결재란 (TODO: 결재 기능 구현 후 주석 해제) -->
<%--
<div class="header-right">
<table class="approval-table">
<!-- 결재 헤더 -->
@@ -689,6 +690,7 @@ function fn_save(){
</tr>
</table>
</div>
--%>
</div>
<!-- 하단 기본정보 (수신및참조, 시행자, 시행일자, 제목) - 입력 가능 -->