AppDataMapingDetail.jsp 12.4 KB
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>

<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="xssUtil" class="weaver.filter.XssUtil" scope="page" />
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/requestTopMenu_wev8.css" type="text/css" />
<link rel="stylesheet" href="/wui/theme/ecology8/jquery/js/zDialog_e8_wev8.css" type="text/css" />
<script type="text/javascript" src="/js/dragBox/parentShowcol_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/requestView_wev8.css" type="text/css" />
<script language=javascript src="/js/ecology8/hrm/HrmSearchInit_wev8.js"></script>
</head>
<%
if(!HrmUserVarify.checkUserRight("sso:ssosetting", user)){
 	response.sendRedirect("/notice/noright.jsp");
 	return;
}
String isDialog="1";
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(20961,user.getLanguage());
String needfav ="1";
String needhelp ="";


String loginid=Util.null2String(request.getParameter("loginid"));
String lastname=Util.null2String(request.getParameter("lastname"));

%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<table id="topTitle" cellpadding="0" cellspacing="0">
	<tr>
		<td></td>
		<td class="rightSearchSpan" style="text-align:right; width:500px!important">
								<input type="button" value="<%=SystemEnv.getHtmlLabelName(82,user.getLanguage())%>" class="e8_btn_top" onclick="adduser()"/> 
		
						<input type="button" value="<%=SystemEnv.getHtmlLabelName(18596,user.getLanguage())%>" class="e8_btn_top" onclick="add()"/> 
				<input type="button" value="<%=SystemEnv.getHtmlLabelName(197,user.getLanguage())%>" class="e8_btn_top" onclick="doRefresh()"/> 
					<input type="button" value="<%=SystemEnv.getHtmlLabelName(32136,user.getLanguage())%>" class="e8_btn_top" onclick="doDelete()"/> 
			<span  id="innerCorner" title="<%=SystemEnv.getHtmlLabelName(23036 ,user.getLanguage()) %>" class="cornerMenu"></span>
		</td>
	</tr>
</table>
<%
String backto = Util.null2String(request.getParameter("backto"));
if(HrmUserVarify.checkUserRight("sso:ssosetting", user)){
	RCMenu += "{"+SystemEnv.getHtmlLabelName(82,user.getLanguage())+",javascript:adduser(),_self} " ;
	RCMenuHeight += RCMenuHeightStep ;
	RCMenu += "{"+SystemEnv.getHtmlLabelName(18596,user.getLanguage())+",javascript:add(),_self} " ;
	RCMenuHeight += RCMenuHeightStep ;
	RCMenu += "{"+SystemEnv.getHtmlLabelName(197,user.getLanguage())+",javascript:doRefresh(),_self} " ;
	RCMenuHeight += RCMenuHeightStep ;
	RCMenu += "{"+SystemEnv.getHtmlLabelName(32136,user.getLanguage())+",javascript:doDelete(),_self} " ;
	RCMenuHeight += RCMenuHeightStep ;
}



String appid = Util.null2String(request.getParameter("appid"));
String id = Util.null2String(request.getParameter("id"));
String account_rules = Util.null2String(request.getParameter("account_rules"));
    if ("".equals(account_rules)) {
        rs.executeSql("select account_rules,appid from weaver_sso_app where id='"+id+"'");
        if (rs.next()) {
            account_rules = rs.getString("account_rules");
            appid = rs.getString("appid");
        }
    }
String appname = Util.null2String(request.getParameter("appname"));
String err = Util.null2String(request.getParameter("err"));
 

String sqlwhere = "where 1=1 ";
String tableString="";
 	
	sqlwhere+=" and appid='"+appid+"'";
if(!"".equals(loginid)){	
	sqlwhere+=" and loginid='"+loginid+"'";
}
if(!"".equals(lastname)){	
	sqlwhere+=" and lastname like '%"+lastname+"%'";
}

String backfields=" * " ;
String perpage="10";
String PageConstId = "weaver_sso_user_mapping";
String fromSql=" (select a.* ,b.subcompanyid1  ,b.departmentid ,b.lastname , '自定义' account_rules from weaver_sso_user_mapping  a left join hrmresource b on a.userid=b.id )  a "; 
tableString =  " <table instanceid=\"ListTable\" tabletype=\"checkbox\"  pagesize=\""+PageIdConst.getPageSize(PageConstId,user.getUID(),PageIdConst.Browser)+"\" >";
tableString += " <checkboxpopedom    popedompara=\"column:id+1\" showmethod=\"weaver.expdoc.ExpUtil.getShowmethod\"  />"+
		 " <sql backfields=\""+backfields+"\" sqlform=\""+fromSql+"\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlwhere)+"\"  sqlorderby=\"id\"  sqlprimarykey=\"id\" sqlsortway=\"Desc\" sqlisdistinct=\"true\" />"+
         "       <head>"+
         "           <col width=\"16%\"  text=\""+SystemEnv.getHtmlLabelName(141,user.getLanguage())+"\" column=\"subcompanyid1\"    transmethod=\"weaver.hrm.HrmTransMethod.getListSubcompanyname\"    />"+
         "           <col width=\"16%\"  text=\""+SystemEnv.getHtmlLabelName(124,user.getLanguage())+"\" column=\"departmentid\"    transmethod=\"weaver.weaversso.HtmlUtil.gethrmdepartmentname\"      />"+
         "           <col width=\"16%\"  text=\""+SystemEnv.getHtmlLabelName(25034,user.getLanguage())+"\" column=\"lastname\"      />"+
         "           <col width=\"16%\"  text=\"OA"+SystemEnv.getHtmlLabelName(83594,user.getLanguage())+"\" column=\"LoginId\" orderkey=\"LoginId\" transmethod=\"weaver.hrm.HrmTransMethod.getHrmEditHrmResourceName\" otherpara=\"column:id\"    />"+
         "           <col width=\"16%\"  text=\""+SystemEnv.getHtmlLabelName(25432,user.getLanguage())+SystemEnv.getHtmlLabelName(83594,user.getLanguage())+"\" column=\"AppLoginId\"      otherpara=\"column:appid\"  transmethod=\"weaver.weaversso.HtmlUtil.getShowName\" />"+

         "       </head>"+
         "<operates width=\"20%\">"+
		 " <popedom column=\"id\" otherpara=\"1\" transmethod=\"weaver.expdoc.ExpUtil.getPopedomValue\"  ></popedom> "+
		 "     <operate href=\"javascript:doEditById()\" text=\""+SystemEnv.getHtmlLabelName(93,user.getLanguage())+"\" target=\"_self\" index=\"0\"/>"+
		 "     <operate href=\"javascript:doDeleteById()\" text=\""+SystemEnv.getHtmlLabelName(23777,user.getLanguage())+"\" target=\"_fullwindow\" index=\"1\"/>"+       
		 "</operates>"+
         " </table>";
%>	
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>

<form  method="post" name="datalist" id="datalist" >

<div id="tabDiv" >
   <span style="font-size:14px;font-weight:bold;"><%=titlename%></span> 
</div>

<div class="cornerMenuDiv"></div>
<div class="advancedSearchDi" id="advancedSearchDi">
	<wea:layout type="4col">
		<wea:group context='<%= SystemEnv.getHtmlLabelName(20331,user.getLanguage())%>'>
			<wea:item>OA<%=SystemEnv.getHtmlLabelName(83594,user.getLanguage())%></wea:item>
			<wea:item><input  type="text" name="loginid" value='<%=loginid%>' _noMultiLang='true'></wea:item>
			<wea:item><%=SystemEnv.getHtmlLabelName(413,user.getLanguage())%></wea:item>
			<wea:item><input   type="text" name="lastname" value='<%=lastname%>'  _noMultiLang='true'></wea:item>
		</wea:group>
		<wea:group context="" attributes="{'groupDisplay':'none'}">
	 
		</wea:group>
		
		 		<wea:group context='<%=SystemEnv.getHtmlLabelName(33198,user.getLanguage())%>' attributes="{'groupOperDisplay':'none'}">
				<wea:item attributes="{'isTableList':'true','colspan':'full'}">
					<!--================== 显示列表 ==================-->					
													<input type="hidden" name="pageId" id="pageId"  value="<%= PageConstId%>"/>
					
					<wea:SplitPageTag  tableString='<%=tableString%>'  mode="run" isShowTopInfo="true"/> 
				</wea:item>
			</wea:group>
	</wea:layout>
</div>
 
</form>
 <%if("1".equals(isDialog)){ %>
 <script type="text/javascript">
 var parentWin = parent.parent.getParentWindow(parent);
 
 function onBack(){
try{	parentWin.closeDialog();
}catch(e){
}
try{	parentWin.closeDialog();
 
		dialog = parent.parent.getDialog(parent);
		if(dialog)
	{
		dialog.close();
	}else{
	    window.parent.close();
	}
	}catch(e){
}
}
 
 
 function editHrmResource(id)
{
doEditById(id);
	//openFullWindowForXtable("/hrm/HrmTab.jsp?_fromURL=HrmResource&id="+id);
}
 
 </script>
		<div id="zDialog_div_bottom" class="zDialog_div_bottom">
				<wea:layout type="2col">
					<wea:group context="">
						<wea:item type="toolbar">
							<input type="button" value="<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>" id="zd_btn_cancle"  class="zd_btn_cancle" onclick="onBack();">
						</wea:item>
					</wea:group>
				</wea:layout>
			</div>
			<script type="text/javascript">
				jQuery(document).ready(function(){
					window.notExecute = true;
					resizeDialog(document);
				});
			</script>
 <%} %>
</BODY>
</HTML>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDrag_wev8.js"></script>
<script type="text/javascript">
	


if(11=="<%=err%>"){
	top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(382231,user.getLanguage()) %>");
	 
}
var dialog = null;
function closeDialog(){
	if(dialog)
		dialog.close();
}
//新建子目录
function openDialog(url,title){
	dialog = new window.top.Dialog();
	dialog.currentWindow = window;
	var url = url;
	dialog.Title = title;
	dialog.Width = 750;
	dialog.Height = 596;
	dialog.Drag = true;
	dialog.URL = url;
	dialog.show();
}
jQuery(document).ready(function () {
	$("#topTitle").topMenuTitle({searchFn:doRefresh});
	$(".topMenuTitle td:eq(0)").html($("#tabDiv").html());
	$("#tabDiv").remove();
	$("#advancedSearch").bind("click", function(){
	  $(".searchInput").val('');
	});
});
function resetCondtion(){
	datalist.sysid.value = "";
	datalist.name.value = "";
	datalist.namesimple.value = "";
}
function doRefresh(){
	$("#datalist").submit(); 
}
function add(){
	var url = "/integration/weaversso/AppDetailTab.jsp?urlType=4&backto=<%=backto%>&account_rules=<%=account_rules%>&isdialog=1&appid=<%=appid%>";
	var title = "<%=SystemEnv.getHtmlLabelName(382233,user.getLanguage()) %>";
	openDialog(url,title);
}
function doDelete(ids){
	if(!ids){
		ids = _xtable_CheckedCheckboxId();
	}
	if(ids.match(/,$/)){
		ids = ids.substring(0,ids.length-1);
	}
	if(ids=="")
	{
		top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(22686,user.getLanguage()) %>");
		return ;
	}
 	top.Dialog.confirm("<%=SystemEnv.getHtmlLabelName(15097,user.getLanguage())%>", function (){
		self.location.href="/integration/weaversso/ImportOperation.jsp?backto=<%=backto%>&operation=delete&operation3="+ids+"&operation2=<%=appid%>";
	}, function () {}, 320, 90);	
}
function doDeleteById(id)
{
	if(id=="") return ;
	top.Dialog.confirm("<%=SystemEnv.getHtmlLabelName(15097,user.getLanguage())%>", function (){
		self.location.href="/integration/weaversso/ImportOperation.jsp?backto=<%=backto%>&operation=delete&operation3="+id+"&operation2=<%=appid%>";
	}, function () {}, 320, 90);	
}
 
function doEditById(id){
	if(id=="") return ;
	var url = "/integration/weaversso/AppDetailTab.jsp?urlType=5&isdialog=1&appid=<%=appid%>&backto=<%=backto%>&account_rules=<%=account_rules%>&id="+encodeURI(encodeURI(id));
	var title = "<%=SystemEnv.getHtmlLabelName(382234,user.getLanguage())%>";
	openDialog(url,title);
}

function adduser( ){
 
	var url = "/integration/weaversso/AppDetailTab.jsp?urlType=7&isdialog=1&appid=<%=appid%>&backto=<%=backto%>&account_rules=<%=account_rules%>";
	var title = "<%=SystemEnv.getHtmlLabelName(382235,user.getLanguage())%>";
	openDialog(url,title);
}

function doLog(id){
				doOpen("/systeminfo/SysMaintenanceLog.jsp?isdialog=1&secid=65&sqlwhere=<%=xssUtil.put("where operateitem=160 and relatedid=")%>&relatedid="+id,"<%=SystemEnv.getHtmlLabelName(32061,user.getLanguage())%>",jQuery(window).width(),jQuery(window).height());
			}
function showAllLog(){
				var _sqlwhere = "<%=rs.getDBType().equals("db2")?"int(operateitem)":"operateitem"%>";
				var url = "/systeminfo/SysMaintenanceLog.jsp?sqlwhere=<%=xssUtil.put("where "+(rs.getDBType().equals("db2")?"int(operateitem)":"operateitem")+"=160")%>";
				doOpen(url,"<%=SystemEnv.getHtmlLabelName(83,user.getLanguage())%>",jQuery(window).width(),jQuery(window).height());
			}
			
	var dialog = null;
	var dWidth = 500;
	var dHeight = 300;
function doOpen(url,title,_dWidth,_dHeight){
				if(dialog==null){
					dialog = new window.top.Dialog();
				}
				dialog.currentWindow = window;
				dialog.Title = title;
				dialog.Width = _dWidth ? _dWidth : dWidth;
				dialog.Height = _dHeight ? _dHeight : dHeight;
				dialog.Drag = true;
				dialog.maxiumnable = true;
				dialog.URL = url;
				dialog.show();
			}
</script>