Files
wace_plm/WebContent/WEB-INF/view/admin/processMng/processMngList.jsp
2025-11-24 18:37:52 +09:00

166 lines
5.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" %>
<%
String searchLocationCode = CommonUtils.checkNull(request.getParameter("searchLocationCode"));
String searchLocationName = CommonUtils.checkNull(request.getParameter("searchLocationName"));
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<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:'50', title:'NO', field:'RNUM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'작업장코드', field:'PROCESS_CODE',
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell) {
var objid = fnc_checkNull(cell.getData().OBJID);
openwarehouseListInfoPopUp(objid);
}
},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'외주거래처코드', field:'VENDOR_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'작업장명', field:'LOCATION_NAME'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'외주거래처명', field:'VENDOR_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'작업장설명', field:'LOCATION_DESCRIPTION'},
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'적합여부', field:'FIT_YN'},
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'사용여부', field:'USE_YN'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'BASELOC_CD', field:'BASE_LOC_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'CO_CD', field:'CO_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'AVABSTOCK_YN', field:'AVABSTOCK_YN'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'LOC_NMK', field:'LOC_NMK'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'INSERT_ID', field:'INSERT_ID'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'INSERT_IP', field:'INSERT_IP'},
{headerHozAlign:'center', hozAlign:'center', width:'150', title:'INSERT_DT', field:'INSERT_DT'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'MODIFY_ID', field:'MODIFY_ID'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'MODIFY_IP', field:'MODIFY_IP'},
{headerHozAlign:'center', hozAlign:'center', width:'150', title:'MODIFY_DT', field:'MODIFY_DT'},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'ATTR_NMK', field:'ATTR_NMK'}
];
function fn_search(){
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/admin/processMngListPagingGridList.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/deleteProcessMng.do",
data: {"OBJID":objId},
dataType:"json",
success:function(data){
if(data.result == 'true'){
Swal.fire("삭제되었습니다.");
fn_search();
}
},
error: function(jqxhr, status, error){
}
});
}
});
}else{
Swal.fire("선택한 항목이 없습니다.");
}
}
function openprocessMngListInfoPopUp(objid){
var popup_width = 400;
var popup_height = 800;
var target = "openprocessMngListInfoPopUp";
var url = "/admin/processMngListFormPopUp.do";
fn_centerPopup(popup_width, popup_height, url, target);
var hiddenForm = document.hiddenForm;
hiddenForm.objid.value = objid;
hiddenForm.target = "openprocessMngListInfoPopUp";
hiddenForm.action = "/admin/processMngListFormPopUp.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:openprocessMngListInfoPopUp('');">
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
</div>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="label"><label>작업장코드</label></td>
<td><input type="text" name="searchProcessCode" id="searchProcessCode" value="<%=searchProcessCode%>"></td>
<td class="label"><label>작업장명</label></td>
<td><input type="text" name="searchProcessName" id="searchProcessName" value="<%=searchProcessName%>"></td>
</tr>
</tbody>
</table>
</div>
<%@include file="/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>
</form>
</body>
</html>