This commit is contained in:
Rinjae
2025-09-05 17:16:26 +09:00
commit c54ef1903f
4947 changed files with 817291 additions and 0 deletions
@@ -0,0 +1,163 @@
<%@ 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="/common/acl/user/userLoginHistoryMan.json" />';
var url_view = '<c:url value="/common/acl/user/userLoginHistoryMan.view" />';
$(document).ready(function() {
var gridPostData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
$('#grid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
postData : gridPostData,
colNames:['번호',
'<%= localeMessage.getString("user.name") %>',
'<%= localeMessage.getString("login.userId") %>',
'<%= localeMessage.getString("user.name") %>',
'<%= localeMessage.getString("user.roleName") %>',
'<%= localeMessage.getString("userLoginHistory.loginDttm") %>'
],
colModel:[
{ name : 'rowNum' , align:'center', width:"40" ,sortable:false },
{ name : 'loginLogId' , align:'center' , hidden:true , formatter:'integer'},
{ name : 'userId' , align:'center' },
{ name : 'username' , align:'center' },
{ name : 'roleidnfiname' , align:'center' },
{ name : 'loginDttm' , align:'center' }
],
jsonReader: {
repeatitems:false
},
pager : $('#pager'),
page : '${param.page}',
rowNum : '${rmsDefaultRowNum}',
autoheight: true,
height: $("#container").height(),
autowidth: true,
viewrecords: true,
rowList : eval('[${rmsDefaultRowList}]'),
gridComplete:function (d){
var colModel = $(this).getGridParam("colModel");
var rowData = $(this).getDataIDs();
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false}); //그리드 헤더 화살표 삭제(정렬X)
}
for(var i = 0 ; i< rowData.length; i++){
$(this).jqGrid('setCell', rowData[i], 'rowNum', i+1);
}
},
loadError: function (jqXHR, textStatus, errorThrown) {
if(jqXHR.status == 401) {
var location ='<%=request.getContextPath()%>/';
comloadError(jqXHR, textStatus, errorThrown ,location);
}
}
});
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_search").click(function(){
var postData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
var start = $("input[name=searchStartYYYYMMDD]").val().replace(/-/gi,"");
var end = $("input[name=searchEndYYYYMMDD]").val().replace(/-/gi,"");
var now = new Date();
if(start > getToday()){
alert("시작일이 오늘 이후입니다. 시작일을 확인해주세요.");
$("input[name=searchStartYYYYMMDD]").focus();
return false;
}
if(start > end){
alert("조회기간 종료일은 시작일보다 커야합니다.");
$("input[name=searchEndYYYYMMDD]").focus();
return false;
}
$("input[name=searchStartDate]").val(start);
$("input[name=searchEndDate]").val(end);
postData["searchStartDate"] = start;
postData["searchEndDate"] = end;
$("#grid").setGridParam({ postData: postData ,page : "1" }).trigger("reloadGrid");
});
$("input[name^=search]").keydown(function(key){
if (key.keyCode == 13){
$("#btn_search").click();
}
});
$("#startDatepicker").datepicker();
$("#endDatepicker").datepicker();
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"><%= localeMessage.getString("userLoginHistory.title") %></div>
<table class="search_condition" cellspacing=0;>
<tbody>
<tr>
<th style="width:10%; min-width:100px;"><%= localeMessage.getString("login.userId") %></th>
<td><input type="text" name="searchUserId" value="${param.searchUserId}"></td>
<th style="width:10%; min-width:100px;"><%= localeMessage.getString("user.name") %></th>
<td><input type="text" name="searchUserName" value="${param.searchUserName}"></td>
</tr>
<tr>
<th style="width:180px;"><%= localeMessage.getString("userLoginHistory.searchDate") %></th>
<td colspan="3">
<input type="text" name="searchStartYYYYMMDD" id="startDatepicker" readonly="readonly" value="" size="10" style="width:20%; border:1px solid #ebebec;">
~
<input type="text" name="searchEndYYYYMMDD" value="" id="endDatepicker" size="10" readonly="readonly" style="width:20%; border:1px solid #ebebec;">
<input type="hidden" name="searchStartDate" value="" style="width:0px;">
<input type="hidden" name="searchEndDate" value="" style="width:0px;">
</td>
</tr>
</tbody>
</table>
<table id="grid" ></table>
<div id="pager"></div>
</div><!-- end content_middle -->
</div><!-- end right_box -->
</body>
</html>
+159
View File
@@ -0,0 +1,159 @@
<%@ 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="/common/acl/user/userMan.json" />';
var url_view = '<c:url value="/common/acl/user/userMan.view" />';
$(document).ready(function() {
var gridPostData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
$('#grid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
postData : gridPostData,
colNames:['<%= localeMessage.getString("login.userId") %>',
'<%= localeMessage.getString("user.name") %>',
'<%= localeMessage.getString("user.roleName") %>',
'<%= localeMessage.getString("user.createOn") %>',
'<%= localeMessage.getString("user.depart") %>',
'<%= localeMessage.getString("user.teamName") %>',
'<%= localeMessage.getString("user.position") %>'
],
colModel:[
{ name : 'USERID' , align:'center' ,sortable:false },
{ name : 'USERNAME' , align:'center' },
{ name : 'ROLEIDNFINAME' , align:'center' },
{ name : 'LASTAMNDYMS' , align:'center', formatter: timeStampFormat },
{ name : 'DVSNNAME' , align:'center', hidden: true },
{ name : 'TEAMNAME' , align:'center', hidden: true },
{ name : 'JOBTLNAME' , align:'center', hidden: true }
],
jsonReader: {
repeatitems:false
},
pager : $('#pager'),
page : '${param.page}',
rowNum : '${rmsDefaultRowNum}',
autoheight: true,
height: $("#container").height(),
autowidth: true,
viewrecords: true,
rowList : eval('[${rmsDefaultRowList}]'),
gridComplete:function (d){
var colModel = $(this).getGridParam("colModel");
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false}); //그리드 헤더 화살표 삭제(정렬X)
}
},
ondblClickRow: function(rowId) {
var rowData = $(this).getRowData(rowId);
var userId = rowData['USERID'];
var url2 = url_view;
url2 += '?cmd=DETAIL';
url2 += '&page='+$(this).getGridParam("page");
url2 += '&returnUrl='+getReturnUrl();
url2 += '&menuId='+'${param.menuId}';
//검색값
url2 += '&'+getSearchUrl();
//key값
url2 += '&userId='+userId;
goNav(url2);
},loadError: function (jqXHR, textStatus, errorThrown) {
if(jqXHR.status == 401) {
var location ='<%=request.getContextPath()%>/';
comloadError(jqXHR, textStatus, errorThrown ,location);
}
}
});
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_search").click(function(){
var postData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
$("#grid").setGridParam({ postData: postData ,page : "1" }).trigger("reloadGrid");
});
$("#btn_new").click(function(){
var url2 = url_view;
url2 += '?cmd=DETAIL';
url2 += '&page='+$("#grid").getGridParam("page");
url2 += '&returnUrl='+getReturnUrl();
url2 += '&menuId='+'${param.menuId}';
//검색값
url2 += '&'+getSearchUrl();
goNav(url2);
});
$("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_new" level="W"><i class="material-icons">add</i> <%= localeMessage.getString("button.new") %></button>
<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"><%= localeMessage.getString("user.title") %><span class="tooltip"><%= localeMessage.getString("user.tooltip") %></span></div>
<table class="search_condition" cellspacing=0;>
<tbody>
<tr>
<th style="width:10%; min-width:100px;"><%= localeMessage.getString("login.userId") %></th>
<td><input type="text" name="searchUserId" value="${param.searchUserId}"></td>
<th style="width:10%; min-width:100px;"><%= localeMessage.getString("user.name") %></th>
<td><input type="text" name="searchUserName" value="${param.searchUserName}"></td>
<th style="width:10%; min-width:100px;"><%= localeMessage.getString("user.roleName") %></th>
<td><input type="text" name="searchRoleName" value="${param.searchRoleName}"></td>
</tr>
<%--<tr>
<th><%= localeMessage.getString("user.depart") %></th>
<td><input type="text" name="searchDepart" value="${param.searchDepart}"></td>
<th><%= localeMessage.getString("user.teamName") %></th>
<td><input type="text" name="searchTeamName" value="${param.searchTeamName}"></td>
<th><%= localeMessage.getString("user.position") %></th>
<td><input type="text" name="searchPosition" value="${param.searchPosition}"></td>
</tr> --%>
</tbody>
</table>
<table id="grid" ></table>
<div id="pager"></div>
</div><!-- end content_middle -->
</div><!-- end right_box -->
</body>
</html>
@@ -0,0 +1,355 @@
<%@ 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="/common/acl/user/userMan.json" />';
var url_view = '<c:url value="/common/acl/user/userMan.view" />';
var isDetail = false;
function isValid(){
if($('input[name=userId]').val() == ""){
alert("<%= localeMessage.getString("user.checkRequired1") %>");
return false;
}else if($('input[name=userName]').val() == ""){
alert("<%= localeMessage.getString("user.checkRequired2") %>");
return false;
}
return true;
}
function init(key,callback){
$.ajax({
type : "POST",
url:url,
dataType:"json",
data:{cmd: 'LIST_INIT_COMBO'},
success:function(json){
//new makeOptions("ROLEID","ROLENAME").setObj($("select[name=roleidnfiname]")).setData(json.authRows).setFormat('this.data[index][this.name]').rendering();
if(typeof callback === 'function') {
callback(key);
}
},
error:function(e){
alert(e.responseText);
}
});
}
function detail(key){
if (!isDetail)return;
$.ajax({
type : "POST",
url:url,
dataType:"json",
data:{cmd: 'DETAIL', userId : key},
success:function(json){
var data = json;
$("input[name=userId]").attr('readonly',true);
// 상세 권한 보이기
$(".datailT").css("display","");
$("input[name=roleidnfiname]").attr('readonly',true);
//W 권한 아닐경우 readonly
if ("${rmsMenuAuth}" !="W"){
$("input[name=userName]").attr('readonly',true);
$("input[name=dvsnname]").attr('readonly',true);
$("input[name=teamName]").attr('readonly',true);
$("input[name=jobtlname]").attr('readonly',true);
$("input[name=pafiarinfobrncd]").attr('readonly',true);
$("input[name=intnloutsrcdsticname]").attr('readonly',true);
$("input[name=cphnno]").attr('readonly',true);
$("input[name=ofctelno]").attr('readonly',true);
$("input[name=emad]").attr('readonly',true);
$("input[name=eaigroupcodstcd]").attr('readonly',true);
$("input[name=spotprxyempid]").attr('readonly',true);
$("input[name=spotprxyname]").attr('readonly',true);
$("input[name=allowIp]").attr('readonly',true);
$("select[name=status]").attr('readonly',true);
}
$("#ajaxForm input[type!=radio],#ajaxForm select,#ajaxForm textarea").each(function(){
var name = $(this).attr("name");
var tag = $(this).prop("tagName").toLowerCase();
$(tag+"[name="+name+"]").val(data[name.toUpperCase()] ? data[name.toUpperCase()].trim():"");
});
$("input[name=LASTAMNDYMS]").inputmask("9999-99-99 99:99:99",{'autoUnmask':true});
/* $("input[name=SECONDMENTSTDT]").inputmask("9999-99-99",{'autoUnmask':true});
$("input[name=SECONDMENTENDT]").inputmask("9999-99-99",{'autoUnmask':true}); */
},
error:function(e){
alert(e.responseText);
}
});
}
$(document).ready(function() {
var returnUrl = getReturnUrlForReturn();
var key ="${param.userId}";
$(".datailT").css("display","none");
if (key != "" && key !="null"){
isDetail = true;
}
init(key,detail);
function checkForUpdates() {
var updatedRoleId = localStorage.getItem('updatedRoleId');
if(updatedRoleId) {
$("input[name='roleidnfiname']").val(updatedRoleId);
localStorage.removeItem('updatedRoleId');
var key = $("input[name='userId']").val();
if (key) {
init(key, detail);
}
}
}
$("#btn_modify").click(function(){
if (confirm("<%= localeMessage.getString("common.checkModify")%>") != true)
return;
if (!isValid()){
return;
}
var postData = $('#ajaxForm').serializeArray();
if (isDetail){
postData.push({ name: "cmd" , value:"UPDATE"});
}else{
postData.push({ name: "cmd" , value:"INSERT"});
}
$.ajax({
type : "POST",
url:url,
data:postData,
dataType: "json",
success:function(json){
if(json.result == "success"){
alert("<%= localeMessage.getString("common.saveMsg") %>");
goNav(returnUrl);//LIST로 이동
}else{
alert(json.result);
}
},
error:function(e){
alert(e.responseText);
}
});
});
$("#btn_previous").click(function(){
goNav(returnUrl);//LIST로 이동
});
$("#btn_change").click(function(){
var args = {};
args['userId'] = $("input[name=userId]").val();
var url2 = url_view;
url2 += "?cmd=POPUP";
//showModal(url2,args,550,600);
showModal(url2, args, 550, 600);
var checkInterval = setInterval(function() {
var updatedRoleId = localStorage.getItem('updatedRoleId');
if (updatedRoleId) {
clearInterval(checkInterval);
$("input[name='roleidnfiname']").val(updatedRoleId);
localStorage.removeItem('updatedRoleId');
}
}, 500);//time out 500ms
});
$("#btn_biz_change").click(function(){
var args = {};
args['userId'] = $("input[name=userId]").val();
var url2 = url_view;
url2 += "?cmd=POPUP2";
showModal(url2,args,980,650);
});
$("#btn_service_change").click(function(){
var args = {};
args['userId'] = $("input[name=userId]").val();
var url2 = url_view;
url2 += "?cmd=POPUP3";
showModal(url2,args,980,650);
});
/* 사용자 권한 및 역할 변경 이력 */
$("#btn_change_history").click(function(){
var args = new Object();
args['userId'] = $("input[name=userId]").val();
var url2 = url_view;
url2 += "?cmd=POPUP4";
showModal(url2,args,1050,700);
});
$("#btn_initialize").click(function(){
if (confirm('<%= localeMessage.getString("common.checkModify")%>') != true) return;
$.ajax({
type : "POST",
url:url,
dataType:"json",
data:{cmd: 'UPDATE_PASSWORD', userId : $("input[name=userId]").val()},
success:function(json){
alert(json.result);
},
error:function(e){
alert("ERROR : " + e.responseText);
}
});
});
$("#btn_delete").click(function(){
if(confirm("<%= localeMessage.getString("common.confirmMsg")%>")){
var postData = $('#ajaxForm').serializeArray();
postData.push({ name: "cmd" , value:"DELETE"});
$.ajax({
type : "POST",
url:url,
data:postData,
success:function(args){
alert("<%= localeMessage.getString("common.deleteMsg") %>");
goNav(returnUrl);//LIST로 이동
},
error:function(e){
alert(e.responseText);
}
});
}else{
return false;
}
});
buttonControl(isDetail);
titleControl(isDetail);
});
</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">
<div class="search_wrap">
<button type="button" class="cssbtn" id="btn_change_history" level="W" status="DETAIL"><i class="material-icons">sync_alt</i> <%= localeMessage.getString("button.chage_history") %></button>
<button type="button" class="cssbtn" id="btn_initialize" level="W" status="DETAIL"><i class="material-icons">restart_alt</i> <%= localeMessage.getString("button.initialize") %></button>
<button type="button" class="cssbtn" id="btn_service_change" level="W" status="DETAIL"><i class="material-icons">sync_alt</i> <%= localeMessage.getString("button.serviceChange") %></button>
<button type="button" class="cssbtn" id="btn_biz_change" level="W" status="DETAIL"><i class="material-icons">sync_alt</i> <%= localeMessage.getString("button.bizChange") %></button>
<button type="button" class="cssbtn" id="btn_change" level="W" status="DETAIL"><i class="material-icons">group</i> <%= localeMessage.getString("button.roleChange") %></button>
<button type="button" class="cssbtn" id="btn_modify" level="W" status="DETAIL,NEW"><i class="material-icons">save</i> <%= localeMessage.getString("button.modify") %></button>
<button type="button" class="cssbtn" id="btn_delete" level="W" status="DETAIL"><i class="material-icons">delete</i> <%= localeMessage.getString("button.delete") %></button>
<button type="button" class="cssbtn" id="btn_previous" level="R" status="DETAIL,NEW"><i class="material-icons">arrow_back</i> <%= localeMessage.getString("button.previous") %></button>
</div>
<div class="title"><%= localeMessage.getString("userDetail.title") %></div>
<form id="ajaxForm">
<table class="table_row" cellspacing="0">
<input type="hidden" name="jobclcd">
<tr>
<th style="width:180px;"><%= localeMessage.getString("login.userId") %></th><td ><input type="text" name="userId"/> </td>
</tr>
<tr>
<th><%= localeMessage.getString("user.name") %> </th><td><input type="text" name="userName" /></td>
</tr>
<tr class="datailT">
<th><%= localeMessage.getString("user.auth") %> </th><td><input type="text" name="roleidnfiname" /></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.depart") %> </th><td><input type="text" name="dvsnname"/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.teamName") %> </th><td><input type="text" name="teamName"/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.position") %> </th><td><input type="text" name="jobtlname"/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.depCode") %> </th><td><input type="text" name="pafiarinfobrncd"/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.inOutCode") %> </th><td><input type="text" name="intnloutsrcdsticname"/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.mobile") %> </th><td><input type="text" name="cphnno" /></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.phone") %> </th><td><input type="text" name="ofctelno"/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.email") %> </th><td><input type="text" name="emad" /></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.allowIp") %> </th><td><input type="text" name="allowIp" /></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.status") %> </th>
<td>
<div class="select-style">
<select name="status">
<option value=""><%= localeMessage.getString("code.normal") %></option>
<option value="1"><%= localeMessage.getString("code.normal") %></option>
<option value="2"><%= localeMessage.getString("code.lock") %></option>
</select>
</div>
</td>
</tr>
<%-- <tr>
<th><%= localeMessage.getString("user.eaiGrupCd") %> </th><td><input type="text" name="eaigroupcodstcd" /></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.fieldAgentId") %> </th><td><input type="text" name="spotprxyempid"/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.fieldAgentName") %> </th><td><input type="text" name="spotprxyname" /></td>
</tr> --%>
<tr>
<th><%= localeMessage.getString("user.createOn") %> </th><td><input type="text" name="LASTAMNDYMS" readonly/></td>
</tr>
<%-- <tr>
<th><%= localeMessage.getString("user.secondmentbrncd") %> </th><td><input type="text" name="SECONDMENTBRNCD" readonly/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.secondmentstdt") %> </th><td><input type="text" name="SECONDMENTSTDT" readonly/></td>
</tr>
<tr>
<th><%= localeMessage.getString("user.secondmentstdt") %> </th><td><input type="text" name="SECONDMENTENDT" readonly/></td>
</tr> --%>
</table>
</form>
</div><!-- end content_middle -->
</div><!-- end right_box -->
</body>
</html>
@@ -0,0 +1,148 @@
<%@ 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="/common/acl/user/userMan.json" />';
var userId = window.dialogArguments["userId"];
function isValid(){
return true;
}
function unformatterFunction(cellvalue, options, rowObject){
return $('input:checkbox', rowObject).is(':checked') ? "true" : "false";
}
function formatterFunction(cellvalue, options, rowObject){
var rowId = options["rowId"];
var name = options["colModel"]["name"];
if (cellvalue == "true"){
return "<input type ='checkbox' id ='chk"+name + rowId + "' checked='checked' />";
}else if (cellvalue == "false"){
return "<input type ='checkbox' id ='chk"+name + rowId + "' />";
}else{
return "";
}
}
$(document).ready(function() {
$('#grid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
postData : { cmd : 'LIST_USER_ROLE' , userId : userId
},
colNames:['<input type="checkbox" id="chkCheck" />',
'<%= localeMessage.getString("role.id") %>',
'<%= localeMessage.getString("role.name") %>',
'<%= localeMessage.getString("role.description") %>'
],
colModel:[
{ name : 'CHK' , align:'center' ,unformat: unformatterFunction, formatter: formatterFunction , width:"20"},
{ name : 'ROLEID' , align:'left' ,key :true ,width:"100"},
{ name : 'ROLENAME' , align:'left' ,width:"100"},
{ name : 'ROLEDESC' , align:'left' }
],
cmTemplate: {
sortable: false,
},
jsonReader: {
repeatitems:false
},
rowNum: 10000,
height: '500',
autowidth: true,
viewrecords: true,
ondblClickRow: function(rowId) {
}
});
$("#chkCheck").click(function(e){
e = e || event;/* get IE event ( not passed ) */
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = false;
$("input[id*=chkCHK]").prop("checked",$(this).is(":checked"));
});
$("#btn_modify").click(function(){
if (confirm("<%= localeMessage.getString("common.checkModify")%>") != true)
return;
if (!isValid()){
return;
}
var data = $("#grid").getRowData();
var gridData = new Array();
for (var i = 0; i <data.length; i++) {
if (data[i]['CHK'] == "false") continue;
gridData.push($("#grid").jqGrid('getRowData', data[i]['ROLEID']));
}
var roleIds = gridData.map(function(item) { return item.ROLEID; }).join(",");
localStorage.setItem('updatedRoleId', roleIds);
var postData = new Array();
postData.push({ name: "cmd" , value:"TRANSACTION_USER_ROLE"});
postData.push({ name: "userId" , value:userId});
postData.push({ name: "gridData" , value:JSON.stringify(gridData)});
$.ajax({
type : "POST",
url:url,
data:postData,
success:function(args){
alert("<%= localeMessage.getString("common.saveMsg") %>");
window.returnValue = "ok";
$("#btn_close").trigger("click");
},
error:function(e){
alert(e.responseText);
}
});
});
$("#btn_close").click(function(){
window.close();
});
buttonControl();
});
</script>
</head>
<body>
<div class="popup_box">
<div class="search_wrap">
<button type="button" class="cssbtn" id="btn_modify" level="R" status="DETAIL,NEW"><i class="material-icons">save</i> <%= localeMessage.getString("button.modify") %></button>
<button type="button" class="cssbtn" id="btn_close" level="R" status="DETAIL,NEW"><i class="material-icons">cancel</i> <%= localeMessage.getString("button.close") %></button>
<%-- <img id="btn_modify" src="<c:url value="/img/btn_modify.png"/>" level="R" status="DETAIL,NEW"/> --%>
<%-- <img id="btn_close" src="<c:url value="/img/btn_close.png"/>" level="R" status="DETAIL,NEW"/> --%>
</div>
<div class="title"><%= localeMessage.getString("userPop.title") %></div>
<table id="grid" ></table>
<div id="pager"></div>
</div><!-- end content_middle -->
</body>
</html>
@@ -0,0 +1,339 @@
<%@ 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="/common/acl/user/userMan.json" />';
var userId = window.dialogArguments["userId"];
var arrGridData = new Array();
// 업무코드 List Count 조회
function init()
{
$.ajax({
type : "POST",
url:url,
data:{ cmd:"LIST_BIZ_COUNT"},
success:function(json){
$("input[name=totalCnt]").val(json.bizCount);
},
error:function(e){
alert(e.responseText);
}
});
}
// 업무코드를 추가 및 삭제 할 때 validation 체크
function isGridValid(gridName)
{
var gridCnt = 0;
gridCnt = $(gridName).jqGrid("getGridParam", "selarrrow").length;
if(gridCnt <= 0)
{
alert("<%= localeMessage.getString("userPop.checkRequierd1") %>");
return false;
}
return true;
}
// 대상 그리드 Reload.
function targetGridReload(){
var postData = getSearchForJqgrid("cmd","LIST_USER_BIZ"); //jqgrid에서는 object 로
postData["userId"] = userId;
postData["targetGridYn"] = "Y";
$("#targetGrid").setGridParam({ postData: postData ,page : "1" }).trigger("reloadGrid");
}
// 대상 그리드 조회
function targetGrid()
{
var gridPostData = getSearchForJqgrid("cmd","LIST_USER_BIZ"); //jqgrid에서는 object 로
gridPostData["userId"] = userId;
gridPostData["targetGridYn"] = "Y";
$('#targetGrid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
loadui: "disable",
postData : gridPostData,
colNames:['<%= localeMessage.getString("eaiMsg.bizCode") %> ',
'<%= localeMessage.getString("unifbwk.search3") %>',
'SAVETYPE',
'CHK'
],
colModel:[
{ name : 'BIZCODE' , align:'left' ,key:true ,sortable:false },
{ name : 'BIZNAME' , align:'left' },
{ name : 'SAVETYPE' , align:'center' },
{ name : 'CHK' , hidden:true }
],
jsonReader: {
repeatitems:false
},
autoheight: true,
height: $("#container").height(),
height: 430,
autowidth: true,
viewrecords: true,
gridview: true, // jqGrid의 성능 향상 - treeGrid, subGrid, afterInsertRow event의 경우 제외.
scroll: true, // 스크롤 사용여부 설정.(default: false)
rowNum : 10000, // Grid에 표시될 레코드 수 설정 (-1은 조회된 데이터 전부 그리드에 셋팅).
multiselect : true,
loadComplete:function (d){
var targetGridCnt = $("#targetGrid").getGridParam("reccount");
var colModel = $(this).getGridParam("colModel");
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false});
}
arrGridData = $("#targetGrid").getRowData();
// 사용자 업무코드 List Count
$("input[name=selectCnt]").val(targetGridCnt);
// 검색조건의 데이터가 있으면 해당 row 선택.
var searchName = $("input[name=searchBzwkName]").val().split(",");
for(var idx in searchName){
var val = searchName[idx];
$("#targetGrid").jqGrid("setSelection",val, true);
}
},
loadError: function (jqXHR, textStatus, errorThrown) {
var location ='<%=request.getContextPath()%>/';
comloadError(jqXHR, textStatus, errorThrown ,location);
},
gridComplete:function (d){
$("input[name=selectCnt]").val($("#targetGrid").getGridParam("reccount"));
},
onSelectRow: function(rowId){
// 선택된 row로 이동
$("#"+$("#targetGrid").jqGrid("getGridParam", "selrow")).focus();
}
});
}
// 저장
function modify(modifyType, grid)
{
if (confirm("<%= localeMessage.getString("common.checkModify")%>") != true)
return;
var gridData = new Array();
if(modifyType == "add")
{
gridData = grid;
}
if(modifyType == "delete")
{
var data = $(grid).getRowData();
for ( var i = 0; i < data.length; i++) {
gridData.push(data[i]);
}
}
$.ajax({
type : "POST",
url:url,
data:{ cmd:"TRANSACTION_USER_BIZ"
, userId:userId
, gridData:JSON.stringify(gridData)
},
success:function(){
alert("<%= localeMessage.getString("common.saveMsg") %>");
// 검색값 초기화
$("input[name=searchBzwkName]").val("").focus();
$("#btn_search").click();
},
error:function(e){
alert(e.responseText);
}
});
}
$(document).ready(function() {
// 업무코드 List Count
init();
// 전체 업무코드 조회
var gridPostData = getSearchForJqgrid("cmd","LIST_USER_BIZ"); //jqgrid에서는 object 로
gridPostData["userId"] = userId;
$('#grid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
postData : gridPostData,
colNames:['<%= localeMessage.getString("eaiMsg.bizCode") %> ',
'<%= localeMessage.getString("unifbwk.search3") %>',
'CHK'
],
colModel:[
{ name : 'BIZCODE' , align:'left' ,sortable:false },
{ name : 'BIZNAME' , align:'left' },
{ name : 'CHK' , align:'left' ,hidden:true }
],
jsonReader: {
repeatitems:false
},
autoheight: true,
height: $("#container").height(),
height: 430,
autowidth: true,
viewrecords: true,
gridview: true, // jqGrid의 성능 향상 - treeGrid, subGrid, afterInsertRow event의 경우 제외.
scroll: true, // 스크롤 사용여부 설정.(default: false)
rowNum : 10000, // Grid에 표시될 레코드 수 설정 (-1은 조회된 데이터 전부 그리드에 셋팅).
multiselect : true,
loadComplete:function (d){
var colModel = $(this).getGridParam("colModel");
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false});
}
},
loadError: function (jqXHR, textStatus, errorThrown) {
var location ='<%=request.getContextPath()%>/';
comloadError(jqXHR, textStatus, errorThrown ,location);
},
gridComplete:function (d){
targetGridReload();
},
});
// target Grid
targetGrid();
$("#btn_close").click(function(){
window.close();
});
$("#btn_search").click(function(){
var postData = getSearchForJqgrid("cmd","LIST_USER_BIZ"); //jqgrid에서는 object 로
postData["userId"] = userId;
$("#grid").setGridParam({ postData: postData ,page : "1" }).trigger("reloadGrid");
});
$("input[name^=search]").keydown(function(key){
if (key.keyCode == 13){
$("#btn_search").click();
}
});
// 조회된 그리드에서 대상 그리드로 업무코드 추가.
$("input[name=add]").click(function(){
if(!isGridValid("#grid")) return;
var selRowIds = $("#grid").jqGrid("getGridParam", "selarrrow");
for(var i=0;i<selRowIds.length;i++){
$("#grid").jqGrid("setCell", selRowIds[i], "CHK", "true");
arrGridData.push($("#grid").getRowData(selRowIds[i]));
}
modify("add", arrGridData);
});
// 대상그리드에서 선택된 업무코드 삭제
$("input[name=remove]").click(function(){
//if(!isGridValid("#targetGrid")) return;
var targetGrid = $("#targetGrid");
var selTargetGridIds = targetGrid.jqGrid("getGridParam", "selarrrow");
var chk = 0;
for(var i=0;i<selTargetGridIds.length;i++){
$("#targetGrid").jqGrid("setCell", selTargetGridIds[i], "CHK", "false");
if(selTargetGridIds[i] != ''){
chk++;
}
}
if(chk <= 0)
{
alert("<%= localeMessage.getString("userPop.checkRequierd1") %>");
return false;
}else{
modify("delete", "#targetGrid");
}
});
$("#btn_close").click(function(){
window.close();
});
buttonControl();
});
</script>
</head>
<body>
<div class="popup_box">
<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>
<button type="button" class="cssbtn" id="btn_close" level="R" status="DETAIL,NEW"><i class="material-icons">cancel</i> <%= localeMessage.getString("button.close") %></button>
<%-- <img src="<c:url value="/img/btn_search.png"/>" alt="" id="btn_search" level="R" /> --%>
<%-- <img id="btn_close" src="<c:url value="/img/btn_close.png"/>" level="R" status="DETAIL,NEW"/> --%>
</div>
<div class="title"><%=localeMessage.getString("userPop2.title")%></div>
<table class="search_condition" cellspacing=0;>
<tbody>
<tr>
<th style="width:180px;"><%=localeMessage.getString("eaiMsg.bizCode")%></th>
<td>
<input type="text" name="searchBzwkName" value="${param.searchBzwkName}">
</td>
</tr>
</tbody>
</table>
<table width="98%" style="margin-left:10px;">
<tr>
<td width="50%">
<div id="grid_div"><table id="grid" ></table></div>
</td>
<td>
<input type=button name="add" value=">" style="width:40px"/><br><br>
<input type=button name="remove" value="<" style="width:40px"/><br><br>
</td>
<td width="50%">
<div id="targetGrid_div"><table id="targetGrid" ></table></div>
</td>
</tr>
</table>
<div id="pager"></div>
</div><!-- end right_box -->
</body>
</html>
@@ -0,0 +1,309 @@
<%@ 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="/common/acl/user/userMan.json" />';
var userId = window.dialogArguments["userId"];
var arrGridData = new Array();
// 사용자 서비스타입 List Count 조회
function init()
{
$.ajax({
type : "POST",
url:url,
data:{ cmd:"LIST_SERVICETYPE_COUNT"},
success:function(json){
$("input[name=totalCnt]").val(json.servicetypeCount);
},
error:function(e){
alert(e.responseText);
}
});
}
// 사용자 서비스타입을 추가 및 삭제 할 때 validation 체크
function isGridValid(gridName)
{
var gridCnt = 0;
gridCnt = $(gridName).jqGrid("getGridParam", "selarrrow").length;
if(gridCnt <= 0)
{
alert("<%= localeMessage.getString("userPop.checkRequierd1") %>");
return false;
}
return true;
}
// 대상 그리드 Reload.
function targetGridReload(){
var postData = getSearchForJqgrid("cmd","LIST_USER_SERVICETYPE"); //jqgrid에서는 object 로
postData["userId"] = userId;
postData["targetGridYn"] = "Y";
$("#targetGrid").setGridParam({ postData: postData ,page : "1" }).trigger("reloadGrid");
}
// 대상 그리드 조회
function targetGrid()
{
var gridPostData = getSearchForJqgrid("cmd", "LIST_USER_SERVICETYPE"); //jqgrid에서는 object 로
gridPostData["userId"] = userId;
gridPostData["targetGridYn"] = "Y";
$('#targetGrid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
loadui: "disable",
postData : gridPostData,
colNames:['서비스타입',
'서비스타입설명',
'SAVETYPE',
'CHK'
],
colModel:[
{ name : 'NAME' , align:'left' ,key:true ,sortable:false },
{ name : 'DESC' , align:'left' },
{ name : 'SAVETYPE' , hidden:true },
{ name : 'CHK' , hidden:true }
],
jsonReader: {
repeatitems:false
},
autoheight: true,
height: $("#container").height(),
height: 430,
autowidth: true,
viewrecords: true,
gridview: true, // jqGrid의 성능 향상 - treeGrid, subGrid, afterInsertRow event의 경우 제외.
scroll: true, // 스크롤 사용여부 설정.(default: false)
rowNum : 10000, // Grid에 표시될 레코드 수 설정 (-1은 조회된 데이터 전부 그리드에 셋팅).
multiselect : true,
loadComplete:function (d){
var targetGridCnt = $("#targetGrid").getGridParam("reccount");
var colModel = $(this).getGridParam("colModel");
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false});
}
arrGridData = $("#targetGrid").getRowData();
// 사용자 업무코드 List Count
$("input[name=selectCnt]").val(targetGridCnt);
},
loadError: function (jqXHR, textStatus, errorThrown) {
var location ='<%=request.getContextPath()%>/';
comloadError(jqXHR, textStatus, errorThrown ,location);
},
gridComplete:function (d){
$("input[name=selectCnt]").val($("#targetGrid").getGridParam("reccount"));
},
onSelectRow: function(rowId){
// 선택된 row로 이동
$("#"+$("#targetGrid").jqGrid("getGridParam", "selrow")).focus();
}
});
}
// 저장
function modify(modifyType, grid)
{
if (confirm("<%= localeMessage.getString("common.checkModify")%>") != true)
return;
var gridData = new Array();
if(modifyType == "add")
{
gridData = grid;
}
if(modifyType == "delete")
{
var data = $(grid).getRowData();
for ( var i = 0; i < data.length; i++) {
gridData.push(data[i]);
}
}
$.ajax({
type : "POST",
url:url,
data:{ cmd:"TRANSACTION_USER_SERVICETYPE"
, userId:userId
, gridData:JSON.stringify(gridData)
},
success:function(){
alert("<%= localeMessage.getString("common.saveMsg") %>");
$("#grid").setGridParam({ postData: getSearchForJqgrid("cmd", "LIST_USER_SERVICETYPE") ,page : "1" }).trigger("reloadGrid");
targetGridReload();
},
error:function(e){
alert(e.responseText);
}
});
}
$(document).ready(function() {
// 업무코드 List Count
init();
// 전체 업무코드 조회
var gridPostData = getSearchForJqgrid("cmd","LIST_USER_SERVICETYPE"); //jqgrid에서는 object 로
gridPostData["userId"] = userId;
$('#grid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
postData : gridPostData,
colNames:['서비스타입',
'서비스타입설명',
'CHK'
],
colModel:[
{ name : 'NAME' , align:'left' ,sortable:false },
{ name : 'DESC' , align:'left' },
{ name : 'CHK' , align:'left' ,hidden:true }
],
jsonReader: {
repeatitems:false
},
autoheight: true,
height: $("#container").height(),
height: 430,
autowidth: true,
viewrecords: true,
gridview: true, // jqGrid의 성능 향상 - treeGrid, subGrid, afterInsertRow event의 경우 제외.
scroll: true, // 스크롤 사용여부 설정.(default: false)
rowNum : 10000, // Grid에 표시될 레코드 수 설정 (-1은 조회된 데이터 전부 그리드에 셋팅).
multiselect : true,
loadComplete:function (d){
var colModel = $(this).getGridParam("colModel");
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false});
}
},
loadError: function (jqXHR, textStatus, errorThrown) {
var location ='<%=request.getContextPath()%>/';
comloadError(jqXHR, textStatus, errorThrown ,location);
},
gridComplete:function (d){
targetGridReload();
},
});
// target Grid
targetGrid();
$("#btn_close").click(function(){
window.close();
});
// 조회된 그리드에서 대상 그리드로 업무코드 추가.
$("input[name=add]").click(function(){
if(!isGridValid("#grid")) return;
var selRowIds = $("#grid").jqGrid("getGridParam", "selarrrow");
for(var i=0;i<selRowIds.length;i++){
$("#grid").jqGrid("setCell", selRowIds[i], "CHK", "true");
arrGridData.push($("#grid").getRowData(selRowIds[i]));
}
modify("add", arrGridData);
});
// 대상그리드에서 선택된 업무코드 삭제
$("input[name=remove]").click(function(){
//if(!isGridValid("#targetGrid")) return;
var targetGrid = $("#targetGrid");
var selTargetGridIds = targetGrid.jqGrid("getGridParam", "selarrrow");
var chk = 0;
for(var i=0;i<selTargetGridIds.length;i++){
$("#targetGrid").jqGrid("setCell", selTargetGridIds[i], "CHK", "false");
if(selTargetGridIds[i] != ''){
chk++;
}
}
if(chk <= 0)
{
alert("<%= localeMessage.getString("userPop.checkRequierd1") %>");
return false;
}else{
modify("delete", "#targetGrid");
}
});
$("#btn_close").click(function(){
window.close();
});
buttonControl();
});
</script>
</head>
<body>
<div class="popup_box">
<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> --%>
<button type="button" class="cssbtn" id="btn_close" level="R" status="DETAIL,NEW"><i class="material-icons">cancel</i> <%= localeMessage.getString("button.close") %></button>
<%-- <img src="<c:url value="/img/btn_search.png"/>" alt="" id="btn_search" level="R" /> --%>
<%-- <img id="btn_close" src="<c:url value="/img/btn_close.png"/>" level="R" status="DETAIL,NEW"/> --%>
</div>
<div class="title">사용자 사용서비스 관리</div>
<table width="98%" style="margin-left:10px;">
<tr>
<td width="50%">
<div id="grid_div"><table id="grid" ></table></div>
</td>
<td>
<input type=button name="add" value=">" style="width:40px"/><br><br>
<input type=button name="remove" value="<" style="width:40px"/><br><br>
</td>
<td width="50%">
<div id="targetGrid_div"><table id="targetGrid" ></table></div>
</td>
</tr>
</table>
<div id="pager"></div>
</div><!-- end right_box -->
</body>
</html>
@@ -0,0 +1,105 @@
<%@ 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="/common/acl/user/userMan.json" />';
var userId = window.dialogArguments["userId"];
$(document).ready(function() {
$('#grid').jqGrid({
datatype:"json",
mtype: 'POST',
url: url,
postData : { cmd : 'LIST_CHANGE_HISTORY' , userId : userId},
colNames:[
'NO',
'번호',
'<%= localeMessage.getString("login.userId") %>',
'<%= localeMessage.getString("user.updateType") %>',
'<%= localeMessage.getString("user.updateDetail") %>',
'<%= localeMessage.getString("user.updateById") %>',
'<%= localeMessage.getString("user.updateDate") %>'
],
colModel:[
{ name : 'chgLogId' , align:'center' ,sortable:false , hidden:true},
{ name : 'rowNum' , align:'center', width:"30" ,sortable:false },
{ name : 'userId' , align:'center' , width:"60" },
{ name : 'chgGbName' , align:'center' , width:"40" },
{ name : 'chgDtl' , align:'center' , width:"140" },
{ name : 'amdrId' , align:'center', width:"60" },
{ name : 'crtnDttm' , align:'center', width:"60"}
],
jsonReader: {
repeatitems:false
},
pager : $('#pager'),
page : '${param.page}',
rowNum : '${rmsDefaultRowNum}',
autoheight: true,
height: $("#container").height(),
height: "520",
autowidth: true,
viewrecords: true,
rowList : eval('[${rmsDefaultRowList}]'),
gridComplete:function (d){
var colModel = $(this).getGridParam("colModel");
var rowData = $(this).getDataIDs();
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false}); //그리드 헤더 화살표 삭제(정렬X)
}
for(var i = 0 ; i< rowData.length; i++){
$(this).jqGrid('setCell', rowData[i], 'rowNum', i+1);
}
},
loadError: function (jqXHR, textStatus, errorThrown) {
debugger
if(jqXHR.status == 401) {
var location ='<%=request.getContextPath()%>/';
comloadError(jqXHR, textStatus, errorThrown ,location);
}
}
});
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_close").click(function(){
window.close();
});
buttonControl();
});
</script>
</head>
<body>
<div class="popup_box">
<div class="search_wrap">
<button type="button" class="cssbtn" id="btn_close" level="R" status="DETAIL,NEW"><i class="material-icons">cancel</i> <%= localeMessage.getString("button.close") %></button>
<%-- <img src="<c:url value="/img/btn_search.png"/>" alt="" id="btn_search" level="R" /> --%>
<%-- <img id="btn_close" src="<c:url value="/img/btn_close.png"/>" level="R" status="DETAIL,NEW"/> --%>
</div>
<div class="title"><%=localeMessage.getString("userPop4.title")%></div>
<table class="grid" id="grid" cellspacing=0;>
</table>
<div id="pager"></div>
</div><!-- end right_box -->
</body>
</html>
@@ -0,0 +1,858 @@
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ page import="com.eactive.eai.rms.common.login.SessionManager"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ 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" src="<c:url value="/js/jexcel.js"/>"></script>
<script language="javascript" src="<c:url value="/js/jsuites.js"/>"></script>
<script language="javascript" src="<c:url value="/js/jsuites.webcomponents.js"/>"></script>
<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/css/jexcel.css"/>" ></link>
<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/css/jsuites.css"/>" ></link>
<style>
.jexcel tbody {
font-size: 13px;
}
</style>
<script>
var url ='<c:url value="/common/acl/user/userRegistUtil.json" />';
var url_view ='<c:url value="/common/acl/user/userRegistUtil.view" />';
var grid;
var columns;
var columnNames;
var dataType;
var toolbarHtml;
var customUpdateTable = function(instance, cell, col, row, val, label, cellName) {
if(col == 0 && val != null && val != ''){
//cell.style.backgroundColor = '#f46e42';
cell.style.textAlign = 'left';
var rowData = grid.getRowData(Number(row));
if(rowData.length > 1){
const itemLenIndex = columnNames.indexOf('LOUTITEMDEPTH');
const depth = Number(rowData[itemLenIndex]);
cell.style.textAlign = 'left';
const padding = depth == 1 ? 5 : (depth*10);
}
}
}
//JEXCEL 관련 함수 시작
function getCellValue(columnName, rowNum){
const index = columnNames.indexOf(columnName);
//var cell = grid.records[rowNum][index];
//return cell.innerText;
const cellId = String.fromCharCode(65+index) + rowNum;
return grid.getValue(cellId)
}
function migCellValue(columnName, dataKey, dataArray, targetArray){
const index = columnNames.indexOf(columnName);
var value = dataArray[dataKey];
if(columnName === 'LOUTITEMTYPE'){
switch(value){
case('GROUP'):
if(dataArray['LOUTITEMOCCURPTRNDSTCD'] == '*'){
value = 'Grid'; break;
}
value = 'Group'; break;
default:
value = 'Field'; break;
}
}
if(columnName === 'LOUTITEMOCCCNT'){
if(dataArray['LOUTITEMNODEPTRNIDDESC'] != 'GROUP'
|| dataArray['LOUTITEMOCCURPTRNDSTCD'] != '*'
|| dataArray['LOUTITEMREFINFO2'].trim().length > 0
|| value === -1 ){
value = '';
}
}
if(columnName === 'LOUTITEMDEPTH'){
value = value - 1;
}
if(columnName === 'LOUTITEMDATATYPE'){
switch(value){
case('Integer'):
value = 'Int'; break;
}
}
if(columnName === 'LOUTITEMMASK'){
value = value == 'Y' ? 'true' : 'false';
}
targetArray[index] = value;
}
const beforePaste = function (instance, data){
const selectedCell = grid.selectedCell;
const obj = grid;
var ax = Number(selectedCell[0]),
ay = Number(selectedCell[1]),
bx = Number(selectedCell[2]),
by = Number(selectedCell[3]);
// Paste filter
var x = ax,
y = ay,
w = bx-x+1,
h = by-y+1;
// change paste range if select is from right to left
if (bx < ax){
x = bx;
w = ax-x+1;
}
// change paste range if select is from down to up
if (by < ay){
y = by;
h = ay-y+1;
}
// Controls
var hash = obj.hash(data);
var style = (hash == obj.hashString) ? obj.style : null;
// Depending on the behavior
if (obj.options.copyCompatibility == true && hash == obj.hashString) {
var data = obj.data;
}
// Split new line
var data = obj.parseCSV(data, "\t");
//modify data to allow wor extending paste range in multiples of input range
if (w>1 & Number.isInteger(w/data[0].length )){
style = null;
repeats = w/data[0].length;
var arrayB = data.map(function(row,i){
var arrayC = Array.apply(null, {length: repeats * row.length})
.map(function(e,i){return row[i % row.length]});
return arrayC
});
data = arrayB;
}
if (h>1 & Number.isInteger(h/data.length )){
style = null;
var repeats = h/data.length;
var arrayB = Array.apply(null, {length: repeats * data.length})
.map(function(e,i){return data[i % data.length]});
data = arrayB;
}
if (x != null && y != null && data) {
// Records
var i = 0;
var j = 0;
var records = [];
var newStyle = {};
var oldStyle = {};
var styleIndex = 0;
// Index
var colIndex = parseInt(x);
var rowIndex = parseInt(y);
var row = null;
// Go through the columns to get the data
while (row = data[j]) {
i = 0;
var colIndex = parseInt(x);
while (row[i] != null) {
// Update and keep history
var record = obj.updateCell(colIndex, rowIndex, row[i]);
// Keep history
records.push(record);
// Style
if (style) {
var columnName = jexcel.getColumnNameFromId([colIndex, rowIndex]);
newStyle[columnName] = style[styleIndex];
oldStyle[columnName] = obj.getStyle(columnName);
obj.records[rowIndex][colIndex].setAttribute('style', style[styleIndex]);
styleIndex++
}
i++;
if (row[i] != null) {
if (colIndex >= obj.headers.length - 1) {
obj.insertColumn();
}
colIndex = obj.right.get(colIndex, rowIndex);
}
}
j++;
if (data[j]) {
if (rowIndex >= obj.rows.length - 1) {
obj.insertRow();
}
var rowIndex = obj.down.get(x, rowIndex);
}
}
// Select the new cells
obj.updateSelectionFromCoords(x, y, colIndex, rowIndex);
// Update history
obj.setHistory({
action: 'setValue',
records: records,
selection: obj.selectedCell,
newStyle: newStyle,
oldStyle: oldStyle,
});
// Update table
obj.updateTable();
}
return false;
};
function moveSelectionRow(up){
const selectedCell = grid.selectedCell;
const correction = up ? -1 : 1 ;
const selectionCorrection = up ? 0 : 2 ;
if(selectedCell != null) {
const x1 = Number(selectedCell[0]) ;
const y1 = Number(selectedCell[1]) ;
const x2 = Number(selectedCell[2]);
const y2 = Number(selectedCell[3]);
if(up){
if(y1 === 0)
return;
grid.moveRow(y1 + correction, y2);
}else{
const rowSize = grid.getData().length;
if(y2 + 1 === rowSize)
return;
grid.moveRow(y2 + correction, y1);
}
const CODE_A = 65;
const x1Code = String.fromCharCode(CODE_A+x1);
const x2Code = String.fromCharCode(CODE_A+x2);
const startCellCode = x1Code + (y1+selectionCorrection);
const endCellCode = x2Code + (y2+selectionCorrection);
grid.updateSelection(grid.getCell(startCellCode), grid.getCell(endCellCode));
//
// const cells = [];
// for (let i = 0; i < gap; i++) {
// const cellNum = 'C'+(top+i+1);
// let value = Number(grid.getValue(cellNum));
// value = increse ? value + 1 : (value === 1 ? 1 : value - 1);
// values[i] = String(value);
// }
}
}
function updateSelectedDepth(increse){
const selectedCell = grid.selectedCell;
const depthColumn = 2;
if(selectedCell != null) {
const y1 = Number(selectedCell[1]);
const y2 = Number(selectedCell[3]);
const top = y1 < y2 ? y1 : y2;
const gap = (y1 < y2 ? y2 - y1 : y1 - y2) + 1;
const values = [];
for (let i = 0; i < gap; i++) {
const cellNum = 'C'+(top+i+1);
let value = Number(grid.getValue(cellNum));
value = increse ? value + 1 : (value === 1 ? 1 : value - 1);
values[i] = String(value);
}
updateValues(top, depthColumn, values);
}
}
function updateSelectedColumn(colIndex, value){
const selectedCell = grid.selectedCell;
if(selectedCell != null) {
const y1 = Number(selectedCell[1]);
const y2 = Number(selectedCell[3]);
const top = y1 < y2 ? y1 : y2;
const gap = (y1 < y2 ? y2 - y1 : y1 - y2) + 1;
const values = [];
for (let i = 0; i < gap; i++) {
values[i] = value;
}
updateValues(top, colIndex, values);
}
}
function updateValues(x, y, values){
var records = [];
for (let i = 0; i < values.length; i++) {
const rowIndex = x + i;
// Update and keep history
var record = grid.updateCell(y, rowIndex, values[i]);
// Keep history
records.push(record);
}
// Update history
grid.setHistory({
action: 'setValue',
records: records,
selection: grid.selectedCell,
});
// Update table
grid.updateTable();
}
function itemDel(){
const selectionRows = grid.getSelectedRows();
if(selectionRows){
const idx = selectionRows[0].rowIndex - 1;
const len = selectionRows.length;
grid.deleteRow(idx, len);
}
}
function onTabKey(event){
const selectedCell = grid.selectedCell;
const x = Number(selectedCell[0]) + 1;
const y = Number(selectedCell[1]) + 1;
const rowSize = grid.getData().length;
const colSize = columnNames.length;
if(x === colSize){
if(y === rowSize){
grid.insertRow();
}
const cellNum = 'A'+(y+1);
grid.updateSelection(grid.getCell(cellNum));
event.preventDefault();
event.stopPropagation();
}
//console.log(x+','+y+','+rowSize+','+colSize);
}
function onEnterKey(event) {
const selectedCell = grid.selectedCell;
const y = Number(selectedCell[1]) + 1;
const rowSize = grid.getData().length;
if(y === rowSize){
grid.insertRow();
}
}
function initializeEditGrid(layoutData){
const itemTypes = ['Field', 'Grid', 'Group'];
const dataTypes = ['BigDecimal','Int','Long','String'];
columns = [ // for columnData prop
{
title: '사용자ID',
name: 'LOUTITEMNAME',
type: 'text',
width: 400
},
{
title: '도메인',
name: 'LOUTITEMID',
type: 'text',
width: 400
},
{
title: '이름',
name: 'LOUTITEMDEPTH',
type: 'text',
width: 400
},
{
title: '담당 어플리케이션 코드',
name: 'LOUTITEMTYPE',
type: 'text',
width: 400
}
];
columnNames = [];
for (let i = 0; i < columns.length; i++) {
columnNames[i] = columns[i].name;
}
grid = jexcel(document.getElementById('editGrid'), {
data: [[]],
columns: columns,
rowResize: false,
rowDrag: true,
columnResize: false,
columnDrag: false,
columnSorting: false,
autoIncrement: false,
allowInsertColumn: false,
allowInsertOnTab: true,
tableOverflow:true,
allowManualInsertRow: false,
tableHeight: 2500,
onbeforepaste: beforePaste,
allowDeletingAllRows:true,
contextMenu: function(obj, x, y, e) {
var items = [];
if (y == null) {
// Insert a new column
if (obj.options.allowInsertColumn == true) {
items.push({
title:obj.options.text.insertANewColumnBefore,
onclick:function() {
obj.insertColumn(1, parseInt(x), 1);
}
});
}
if (obj.options.allowInsertColumn == true) {
items.push({
title:obj.options.text.insertANewColumnAfter,
onclick:function() {
obj.insertColumn(1, parseInt(x), 0);
}
});
}
// Delete a column
if (obj.options.allowDeleteColumn == true) {
items.push({
title:obj.options.text.deleteSelectedColumns,
onclick:function() {
obj.deleteColumn(obj.getSelectedColumns().length ? undefined : parseInt(x));
}
});
}
// Rename column
if (obj.options.allowRenameColumn == true) {
items.push({
title:obj.options.text.renameThisColumn,
onclick:function() {
obj.setHeader(x);
}
});
}
// Sorting
if (obj.options.columnSorting == true) {
// Line
items.push({ type:'line' });
items.push({
title:obj.options.text.orderAscending,
onclick:function() {
obj.orderBy(x, 0);
}
});
items.push({
title:obj.options.text.orderDescending,
onclick:function() {
obj.orderBy(x, 1);
}
});
}
} else {
// Insert new row
if (obj.options.allowInsertRow == true) {
items.push({
title: '행 삽입',
onclick:function() {
const selectedCell = obj.selectedCell;
if(selectedCell == null){
obj.insertRow(1, parseInt(y), 1);
}else{
const y1 = Number(selectedCell[1]);
const y2 = Number(selectedCell[3]);
const top = y1 < y2 ? y1 : y2;
const gap = (y1 < y2 ? y2 - y1 : y1 - y2) + 1;
obj.insertRow(gap, top, 1);
}
}
});
items.push({
title: '행 추가',
onclick:function() {
const selectedCell = obj.selectedCell;
if(selectedCell == null){
obj.insertRow(1, parseInt(y), 1);
}else{
const y1 = Number(selectedCell[1]);
const y2 = Number(selectedCell[3]);
const bottom = y1 > y2 ? y1 : y2;
const gap = (y1 < y2 ? y2 - y1 : y1 - y2) + 1;
obj.insertRow(gap, bottom);
}
}
});
}
if (obj.options.allowDeleteRow == true) {
items.push({
title:'행 삭제',
onclick:function() {
obj.deleteRow(obj.getSelectedRows().length ? undefined : parseInt(y));
}
});
}
}
// Line
items.push({ type:'line' });
// Copy
items.push({
title: obj.options.text.copy,
shortcut: 'Ctrl + C',
onclick: function () {
obj.copy();
}
});
// Paste
items.push({
title: obj.options.text.paste,
shortcut: 'Ctrl + V',
onclick: function () {
obj.paste();
}
});
// Line
items.push({ type:'line' });
items.push({
title: '항목유형',
submenu: [
{
title: 'Field',
onclick: function() {
updateSelectedColumn(3, 'Field');
}
},
{
title: 'Group',
onclick: function() {
updateSelectedColumn(3, 'Group');
}
},
{
title: 'Column',
onclick: function() {
updateSelectedColumn(3, 'Column');
}
},
{
title: 'Grid',
onclick: function() {
updateSelectedColumn(3, 'Grid');
}
},
]
});
items.push({
title: '깊이',
submenu: [
{
title: '깊이증가',
shortcut: 'Alt + →',
onclick: function() {
updateSelectedDepth(true);
}
},
{
title: '깊이감소',
shortcut: 'Alt + ←',
onclick: function() {
updateSelectedDepth(false);
}
},
]
});
items.push({
title: '행 이동',
submenu: [
{
title: '위로이동',
shortcut: 'Alt + ↑',
onclick: function() {
moveSelectionRow(true);
}
},
{
title: '아래로이동',
shortcut: 'Alt + ↓',
onclick: function() {
moveSelectionRow(false);
}
},
]
});
return items;
}
});
$('#editGrid').on("keydown", function(e){
if(e.altKey){
if(e.keyCode == 39){
updateSelectedDepth(true);
return false;
}
if(e.keyCode == 37){
updateSelectedDepth(false);
return false;
}
if(e.keyCode == 38){
moveSelectionRow(true);
return false;
}
if(e.keyCode == 40){
moveSelectionRow(false);
return false;
}
}
if(!e.shiftKey && e.keyCode == 9){
onTabKey(e);
}
if(!e.shiftKey && e.keyCode == 13) {
onEnterKey(e);
}
});
resizeGrid();
initDialog();
}
function closeAddRowDialog(){
$( '#add_row_dialog' ).dialog("close");
}
function addNewRow(){
var cnt = $("input[name=add_row_count]").val();
if(cnt == "" || cnt == undefined) return;
const ncnt = Number(cnt);
if (grid.getJson().length == 0){
const ncnt = Number(cnt) -1;
grid.setData([{}]);
if (ncnt !=0){
grid.insertRow(ncnt);
}
}else{
const ncnt = Number(cnt);
grid.insertRow(ncnt);
}
$( '#add_row_dialog' ).dialog("close");
closeAddRowDialog();
}
function initDialog(){
$( '#add_row_dialog' ).dialog({
resizable: false,
autoOpen: false,
height: "auto",
width: 400,
modal: true,
buttons: {
"Add": function() {
addNewRow();
},
Cancel: function() {
closeAddRowDialog();
}
}
});
$("input[name=add_row_count]").keydown(function(key){
if (key.keyCode == 13){
addNewRow();
}
});
}
function itemAdd(){
grid.resetSelection();
$("input[name=add_row_count]").val("");
$( '#add_row_dialog' ).dialog("open");
}
var resizing = false;
function resizeGrid(){
var screenWidth = $(window).width() - 113;
var columnWidth = 0;
columns.forEach( function (element){
columnWidth += element.width;
} );
var gap = screenWidth - columnWidth;
var halfGap = gap / 2;
grid.setWidth(0, Number(columns[0].width) + halfGap);
grid.setWidth(1, Number(columns[1].width) + halfGap);
resizing = false;
}
$( window ).resize( function() {
if(!resizing){
resizing = true;
setTimeout(resizeGrid, 10);
}
})
//JEXCEL 관련 함수 종료
function init() {
$.ajax({
type : "POST",
url:url,
dataType:"json",
data:{cmd: 'DATASOURCE'},
success:function(json){
let dataSource = json.dataSourceList;
let appendHtml = "";
dataSource.forEach(function(i,v) {
if( i.DATASOURCE != "FGW" ) {
let strSource = i.DATASOURCE;
appendHtml = " <input id='check" + strSource + "' class='datasource' name='" + strSource + "' type='checkbox' checked='checked' value='" + strSource + "'/>"
appendHtml += " <label htmlFor='check" + strSource + "'>" + strSource + "</label>"
$("#checkAll").parent().append(appendHtml);
appendHtml = "";
}
});
},
error: function (e) {
alert(e.responseText);
}
});
}
$(document).ready(function () {
initializeEditGrid();
$('body').css("overflow-x", "hidden");
$("#btn_regist").click(function () {
var postData = getSearchForJqgrid("cmd", "INSERT"); //jqgrid에서는 object로
var data = grid.getData();
/* datasourceList */
var datasourceList = new Array();
$(".datasource:checked").each(function (index, item) {
datasourceList.push(item.value);
});
/* datasourceListEnd */
/* userList */
var userList = new Array();
for (var i = 0; i < data.length; i++) {
var item = data[i];
let user = {};
for (var j = 0; j < item.length; j++) {
if (j == 0) {
user['userId'] = item[j];
} else if (j == 1) {
user['teamName'] = item[j];
} else if (j == 2) {
user['userName'] = item[j];
} else if (j == 3) {
user['bzwkCdList'] = item[j];
} else {
alert(' ');
}
}
userList.push(user);
}
/* userListEnd */
postData['userList'] = JSON.stringify(userList);
postData['datasourceList'] = JSON.stringify(datasourceList);
$.ajax({
url: url,
data: postData,
dataType: "json",
type: "POST",
success: function (result) {
document.getElementById('resultText').innerHTML = "";
var responseMessageList = result.responseMessageList;
for (var i = 0; i < responseMessageList.length; i++) {
var pElement = document.createElement('p');
pElement.innerHTML = responseMessageList[i]['message'];
$("#resultText").append(pElement);
}
alert("일괄등록 작업이 완료되었습니다.");
},
error: function (e) {
alert(e.repsonseText);
}
})// ajax end
});
$("#checkAll").click(function () {
$('input:checkbox').not(this).prop('checked', this.checked);
});
init();
});
</script>
<body>
<div class="right_box">
<div class="content_top">
<ul class="path">
<li><a href="#">${rmsMenuPath}</a></li>
</ul>
</div><!-- end content_top -->
<div id="content_middle" class="content_middle">
<div class="search_wrap">
<img src="<c:url value="/img/btn_regist.png"/>" alt="" id="btn_regist" level="W" status="DETAIL" />
</div>
<div class="title">사용자 일괄 등록</div>
<table class="search_condition" cellspacing=0;>
<tbody>
<tr>
<th>적용 Datasource</th>
<td>
<input id="checkAll" type="checkbox" checked="checked" > <label>전체</label> |
<%-- <input id="checkMCI" class="datasource" name="MCI" type="checkbox" checked="checked" value="MCI"> <label for="checkMCI">MCI대면</label>--%>
<%-- <input id="checkEAI" class="datasource" name="EAI" type="checkbox" checked="checked" value="EAI"> <label for="checkEAI">EAI</label>--%>
<%-- <input id="checkBAT" class="datasource" name="BAT" type="checkbox" checked="checked" value="BAT"> <label for="checkBAT">배치</label> |--%>
<%-- <input id="checkFEP" class="datasource" name="FEP" type="checkbox" checked="checked" value="FEP"> <label for="checkFEP">FEP</label>--%>
<%-- <input id="checkBAP" class="datasource" name="BAP" type="checkbox" checked="checked" value="BAP"> <label for="checkBAP">일괄</label>--%>
</td>
</tr>
</tbody>
</table>
<div id="editGrid"></div>
<table class="search_condition" cellspacing=0; style="margin-top: 30px">
<tr>
<th width="100px">등록 완료 메세지</th>
<td id="resultText">
</td>
</tr>
</table>
</div><!-- end content_middle -->
</div>
</body>
</html>