init
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
|
||||
<%@ include file="/jsp/common/include/localemessage.jsp" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "No-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<jsp:include page="/jsp/common/include/css.jsp"/>
|
||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||
<script language="javascript">
|
||||
var url = '<c:url value="/onl/apim/approval/apprequest/prodAppRequestMan.json" />';
|
||||
var url_view = '<c:url value="/onl/apim/approval/apprequest/prodAppRequestMan.view" />';
|
||||
$(document).ready(function() {
|
||||
$('#grid').jqGrid({
|
||||
datatype: "json",
|
||||
mtype: 'POST',
|
||||
url: url,
|
||||
postData: {
|
||||
cmd: 'LIST',
|
||||
},
|
||||
colNames: ['id', '기관명 ', '상태', '생성일'],
|
||||
colModel: [
|
||||
{name: 'id', align: 'center', key: true, hidden: true},
|
||||
{
|
||||
name: 'org.orgName',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
label: '기업명'
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
formatter: function(cellvalue) {
|
||||
const statusMap = {
|
||||
'PENDING': '대기중',
|
||||
'APPROVED': '승인',
|
||||
'REJECTED': '반려',
|
||||
'CANCELED': '취소'
|
||||
};
|
||||
return statusMap[cellvalue] || cellvalue;
|
||||
}
|
||||
},
|
||||
{name: 'createdDate', align: 'center', width: 120}
|
||||
],
|
||||
jsonReader: {
|
||||
repeatitems: false
|
||||
},
|
||||
pager: $('#pager'),
|
||||
rowNum: '${rmsDefaultRowNum}',
|
||||
rowList: eval('[${rmsDefaultRowList}]'),
|
||||
viewrecords: true,
|
||||
autowidth: true,
|
||||
height: 'auto',
|
||||
ondblClickRow: function(rowId) {
|
||||
var rowData = $(this).getRowData(rowId);
|
||||
var id = rowData['id'];
|
||||
var approvalType = rowData['approvalType'];
|
||||
var args = {};
|
||||
var url2 = url_view;
|
||||
url2 += '?cmd=DETAIL';
|
||||
url2 += '&menuId=' + '${param.menuId}';
|
||||
url2 += '&type=' + approvalType;
|
||||
url2 += '&id=' + id;
|
||||
|
||||
showModal(url2, args, 800, 650, function() {
|
||||
$("#grid").trigger("reloadGrid");
|
||||
});
|
||||
},
|
||||
loadError: function(jqXHR, textStatus, errorThrown) {
|
||||
var location = '<%=request.getContextPath()%>/';
|
||||
comloadError(jqXHR, textStatus, errorThrown, location);
|
||||
}
|
||||
});
|
||||
|
||||
resizeJqGridWidth('grid', 'content_middle', '1000');
|
||||
|
||||
$("#btn_search").click(function() {
|
||||
var postData = getSearchForJqgrid("cmd", "LIST");
|
||||
$("#grid").setGridParam({url: url, postData: postData, page: 1}).trigger("reloadGrid");
|
||||
});
|
||||
|
||||
$("select[name^=search], input[name^=search]").keydown(function(key) {
|
||||
if (key.keyCode == 13) {
|
||||
$("#btn_search").click();
|
||||
}
|
||||
});
|
||||
|
||||
buttonControl();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="right_box">
|
||||
<div class="content_top">
|
||||
<ul class="path">
|
||||
<li><a href="#">${rmsMenuPath}</a></li>
|
||||
</ul>
|
||||
</div><!-- end content_top -->
|
||||
<div class="content_middle" id="content_middle">
|
||||
<div class="search_wrap">
|
||||
<button type="button" class="cssbtn" id="btn_search" level="R"><i class="material-icons">search</i> <%= localeMessage.getString("button.search") %>
|
||||
</button>
|
||||
</div>
|
||||
<div class="title">운영 인증키 요청 목록<span class="tooltip">운영 인증키 요청을 관리합니다.</span></div>
|
||||
<form id="ajaxForm" onsubmit="return false;">
|
||||
<table class="search_condition" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width:10%;">승인 상태</th>
|
||||
<td style="width:15%;">
|
||||
<div class="select-style">
|
||||
<select name="searchStatus">
|
||||
<option value="">전체</option>
|
||||
<option value="PENDING">대기중</option>
|
||||
<option value="CANCELED">취소됨</option>
|
||||
<option value="DENIED">반려됨</option>
|
||||
<option value="APPROVED">승인됨</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<table id="grid"></table>
|
||||
<div id="pager"></div>
|
||||
</div><!-- end content_middle -->
|
||||
</div><!-- end right_box -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,129 @@
|
||||
<%@ page contentType="text/html; charset=utf-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
|
||||
<%@ include file="/jsp/common/include/localemessage.jsp" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "No-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>운영 인증키 요청 상세</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<jsp:include page="/jsp/common/include/css.jsp"/>
|
||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||
<script language="javascript">
|
||||
var url = '<c:url value="/onl/apim/approval/apprequest/prodAppRequestMan.json" />';
|
||||
var url_view = '<c:url value="/onl/apim/approval/apprequest/prodAppRequestMan.view" />';
|
||||
let appRequest = null;
|
||||
|
||||
$(document).ready(function() {
|
||||
var key = "${param.id}";
|
||||
if (key) {
|
||||
detail(key);
|
||||
}
|
||||
|
||||
$("#btn_close").click(function() {
|
||||
window.close();
|
||||
});
|
||||
|
||||
$("#btn_save").click(function() {
|
||||
console.log(appRequest);
|
||||
|
||||
if (confirm("변경하시겠습니까?")) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: {cmd: "UPDATE", id: key, apiList: JSON.stringify(appRequest.apiList), status :$("#approvalStatus").val()},
|
||||
success: function(args) {
|
||||
alert("변경되었습니다.");
|
||||
window.opener.location.reload();
|
||||
window.close();
|
||||
},
|
||||
error: function(e) {
|
||||
alert(e.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function detail(key) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: {cmd: 'DETAIL', id: key},
|
||||
success: function(json) {
|
||||
var data = json;
|
||||
appRequest = json;
|
||||
$("#approvalStatus").val(data.status);
|
||||
$("#requesterOrg").text(data.org.orgName);
|
||||
$("#reason").text(data.reason);
|
||||
$("#createdDate").text(data.createdDate).inputmask("9999-99-99 99:99:99", {'autoUnmask': true});
|
||||
|
||||
var apisHtml = "";
|
||||
for (var i = 0; i < data.apiList.length; i++) {
|
||||
var api = data.apiList[i];
|
||||
apisHtml += "<tr>";
|
||||
apisHtml += "<td>" + api.apiName + "</td>";
|
||||
apisHtml += "</tr>";
|
||||
}
|
||||
$("#apisTable tbody").html(apisHtml);
|
||||
},
|
||||
error: function(e) {
|
||||
alert(e.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="popup_box">
|
||||
<div class="title" id="approvalSubject" style="margin-top: 15px;"></div>
|
||||
<%--제목--%>
|
||||
<div class="popup_content">
|
||||
<table class="table_row" cellspacing="0">
|
||||
<tr>
|
||||
<th>요청 기관</th>
|
||||
<td><span id="requesterOrg"></span></td>
|
||||
<th style="width:20%;">처리 상태</th>
|
||||
<td style="width:30%;">
|
||||
<select id="approvalStatus" style="width:100%" >
|
||||
<option value="PENDING">대기중</option>
|
||||
<option value="APPROVED">승인</option>
|
||||
<option value="DENIED">반려</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>요청일자</th>
|
||||
<td><span id="createdDate"></span></td>
|
||||
<th></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>요청 사유</th>
|
||||
<td colspan="3"><span id="reason"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="title">API 목록</div>
|
||||
<table id="apisTable" class="table_row" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>API 이름</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="popup_button">
|
||||
<button type="button" class="cssbtn" id="btn_save" level="W"><i class="material-icons">check</i>저장</button>
|
||||
<button type="button" class="cssbtn" id="btn_close" level="R"><i class="material-icons">cancel</i> <%= localeMessage.getString("button.close") %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user