구매요청서 ui 수정만 해놓음
This commit is contained in:
166
WebContent/WEB-INF/view/admin/processMng/processMngList.jsp
Normal file
166
WebContent/WEB-INF/view/admin/processMng/processMngList.jsp
Normal file
@@ -0,0 +1,166 @@
|
||||
<%@ 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>
|
||||
@@ -0,0 +1,182 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@include file="/init.jsp"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
<script type="text/javascript">
|
||||
function saveProcessMng(){
|
||||
if(confirm("저장하시겠습니까?")){
|
||||
var form = document.processMngForm;
|
||||
|
||||
// 날짜 형식 변환 (오후 2:23:33 -> 14:23:33)
|
||||
var insertDt = form.insert_dt.value;
|
||||
var modifyDt = form.modify_dt.value;
|
||||
|
||||
if(insertDt) {
|
||||
form.insert_dt.value = convertToDBFormat(insertDt);
|
||||
}
|
||||
if(modifyDt) {
|
||||
form.modify_dt.value = convertToDBFormat(modifyDt);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/admin/saveProcessMngListInfo.do",
|
||||
data: $(form).serialize(),
|
||||
dataType: "json",
|
||||
success: function(result){
|
||||
alert(result.message);
|
||||
if(result.resultFlag == "true"){
|
||||
opener.fn_search();
|
||||
self.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function convertToDBFormat(dateStr) {
|
||||
// "2021-06-10 오후 2:23:33" -> "2021-06-10 14:23:33"
|
||||
if(!dateStr) return '';
|
||||
|
||||
var parts = dateStr.split(' ');
|
||||
if(parts.length < 3) return dateStr;
|
||||
|
||||
var date = parts[0]; // 2021-06-10
|
||||
var ampm = parts[1]; // 오후 or 오전
|
||||
var time = parts[2]; // 2:23:33
|
||||
|
||||
var timeParts = time.split(':');
|
||||
var hour = parseInt(timeParts[0]);
|
||||
var minute = timeParts[1];
|
||||
var second = timeParts[2];
|
||||
|
||||
// 오후면 12 더하기 (단, 12시는 그대로)
|
||||
if(ampm === '오후' && hour !== 12) {
|
||||
hour += 12;
|
||||
}
|
||||
// 오전 12시는 0시로
|
||||
if(ampm === '오전' && hour === 12) {
|
||||
hour = 0;
|
||||
}
|
||||
|
||||
// 시간을 2자리로 맞추기
|
||||
hour = ('0' + hour).slice(-2);
|
||||
|
||||
return date + ' ' + hour + ':' + minute + ':' + second;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<section id="commonSection" class="admin_option_min">
|
||||
<div class="admin_title">
|
||||
<h2>작업장 등록/수정</h2>
|
||||
</div>
|
||||
<div id="businessPopupFormWrap">
|
||||
<form name="processMngForm" id="processMngForm">
|
||||
<input type="hidden" name="objid" value="${info.OBJID}">
|
||||
<input type="hidden" name="writer" value="<%=session.getAttribute("USER_ID")%>">
|
||||
|
||||
<table class="pmsPopupForm"">
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>작업장코드<label></td>
|
||||
<td><input type="text" name="process_code" value="${info.PROCESS_CODE}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>외주거래처코드<label></td>
|
||||
<td><input type="text" name="vendor_cd" value="${info.VENDOR_CD}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>작업장명<label></td>
|
||||
<td><input type="text" name="process_name" value="${info.PROCESS_NAME}" required></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>외주거래처명<label></td>
|
||||
<td><input type="text" name="vendor_nm" value="${info.VENDOR_NM}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>작업장설명<label></td>
|
||||
<td><input type="text" name="process_description" value="${info.PROCESS_DESCRIPTION}" required></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>적합여부<label></td>
|
||||
<td>
|
||||
<select name="fit_yn">
|
||||
<option value="Y" ${empty info.FIT_YN or info.FIT_YN eq 'Y' ? 'selected' : ''}>적합</option>
|
||||
<option value="N" ${info.FIT_YN eq 'N' ? 'selected' : ''}>부적합</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>사용여부<label></td>
|
||||
<td>
|
||||
<select name="use_status">
|
||||
<option value="Y" ${empty info.USE_STATUS or info.USE_STATUS eq 'Y' ? 'selected' : ''}>사용</option>
|
||||
<option value="N" ${info.USE_STATUS eq 'N' ? 'selected' : ''}>미사용</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>BASELOC_CD<label></td>
|
||||
<td><input type="text" name="base_loc_cd" value="${info.BASE_LOC_CD}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>CO_CD<label></td>
|
||||
<td><input type="text" name="co_cd" value="${info.CO_CD}"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>AVABSTOCK_YN<label></td>
|
||||
<td><input type="text" name="avabstock_yn" value="${info.AVABSTOCK_YN}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>LOC_NMK<label></td>
|
||||
<td><input type="text" name="loc_nmk" value="${info.LOC_NMK}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>INSERT_ID<label></td>
|
||||
<td><input type="text" name="insert_id" value="${info.INSERT_ID}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>INSERT_IP<label></td>
|
||||
<td><input type="text" name="insert_ip" value="${info.INSERT_IP}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>INSERT_DT<label></td>
|
||||
<td><input type="text" name="insert_dt" value="${info.INSERT_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>MODIFY_ID<label></td>
|
||||
<td><input type="text" name="modify_id" value="${info.MODIFY_ID}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>MODIFY_IP<label></td>
|
||||
<td><input type="text" name="modify_ip" value="${info.MODIFY_IP}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>MODIFY_DT<label></td>
|
||||
<td><input type="text" name="modify_dt" value="${info.MODIFY_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label for=""></label>ATTR_NMK<label></td>
|
||||
<td><input type="text" name="attr_nmk" value="${info.ATTR_NMK}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div id="adminPopupBtnWrap">
|
||||
<button type="button" class="btns" onclick="saveProcessMng()">저장</button>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user