<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="security" uri="http://www.ccpit.org/" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="<c:url value='/resource/themes-1.3.1/default/easyui.css'/>" rel="stylesheet" type="text/css"/>
<link href="<c:url value='/resource/themes-1.3.1/icon.css' />" rel="stylesheet" type="text/css"/>
<link href="<c:url value='/resource/themes-1.3.1/css/default.css'/>" rel="stylesheet" type="text/css" />
</head>
<body style="overflow:hidden">
	<form id="viewSiteForm" method="post" style="height:100%">
		<div id="cc" class="easyui-layout" style="width: 100%;">
			<div id="left" region="west" maxWidth=200 scroll="no"
				class="easyui-panel" collapsible="false" key="unit.zuzhijigouguanli"
				split="true" title="组织结构" style="width: 200px; height: 90%;">
				<div>
					<!-- 部门树 -->
					<ul id="tt" class="easyui-tree" animate="false">
					</ul>
				</div>
			</div>
			<div id="right" region="center"	style="padding: 1px; margin-right: 1px; background: #ffffff;">
				<div buttons="#dlg-buttons_add" id="orgDivID" style="height:160px;"> 
					<table class="detailtable" align="center" width="100%">
						<tr>
							<td>&nbsp;</td>  
						</tr>
						<tr >
							<td width="15%" align="right">上级机构:</td>
							<td width="30%" align="left"><input id="parentNameId01"
								name="parentName" class="easyui-textbox"
								maxlength="25" style="width:230px"></td> 
							<td width="15%" align="right">机构名称:</td>
							<td width="30%" align="left"><input id="name" name="name"
								class="easyui-textbox" style="width:230px"></td>
						</tr>
						<tr>
							<td width="15%" align="right">机构编号:</td>
							<td width="30%" align="left"><input id="privilegeNumId01" name="privilegeNum"
								class="easyui-textbox" style="width:230px"></td>
							<td width="15%" align="right">顺序编号:</td>
							<td width="30%" align="left"><input id="orderNumber" name="orderNumber"
								class="easyui-textbox" style="width:230px"></td>
						</tr>
						<tr>
							<td width="15%" align="right">部门描述:</td>
							<td width="30%" align="left"><input id="description" name="description"
								class="easyui-textbox" style="width:230px"></td>
						</tr>
							<tr>
								<td colspan="4" align="center">
									<security:url uri="/admin/org/addOrg"><a href="#"  class="easyui-linkbutton" iconCls="icon-edit_add" plain="false" onclick="openAddWin()"><span>新增</span></a></security:url> 
									<security:url uri="/admin/org/editOrg"><a href="#"	 class="easyui-linkbutton" iconCls="icon-pencil" plain="false" onclick="editOrg()"><span>修改</span></a></security:url> 
								    <security:url uri="/admin/org/delOrg"><a href="#"  class="easyui-linkbutton" iconCls="icon-remove" plain="false" onclick="delOrg()"><span>删除</span></a></security:url>
								 </td>
							</tr>
					</table> 
				</div>
				<!--datagrid列表  --> 
				<table id="userListTable" toolbar="#toolbar" width="100%">
				</table>
				<!--datagrid列表  --> 
				<table id="orgRoleListTable" toolbar="" width="100%">
				</table>
			    <!-- 	datagrid工具栏 -->
				<div id="toolbar">
					<security:url uri="/admin/role/addOrg_User"><a href="#" class="easyui-linkbutton" iconCls="icon-edit_add" plain="true" onclick="openAddWin1('add')"><span >添加用户</span></a></security:url>
					<security:url uri="/admin/role/editOrg_User"><a href="#" class="easyui-linkbutton" iconCls="icon-pencil" plain="true" onclick="openAddWin1('edit')"><span >修改用户</span></a></security:url>
					<security:url uri="/admin/role/delOrd_User"><a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="deleUser()"><span >删除用户</span></a></security:url>
					<security:url uri="/admin/role/addOrg_Role"><a href="#" class="easyui-linkbutton" iconCls="icon-roleImage" plain="true" onclick="openUserRoleWin()"><span >用户角色分配</span></a></security:url>
					<security:url uri="/admin/user/resetPass"><a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="sendMail()"><span >发送密码</span></a></security:url>
				</div>
			</div>
		</div>
	</form>
</body>
<div id="addOrgWinId" class="easyui-window" >
	<form id="addOrgForm" class="easyui-form" method="post">
		<table align="center" style="margin:15px 60px 0px 0px" class="edittable">
			<tr>
				<td width="20%" align="right"><span >上级机构:</span></td>
				<td width="30%"><input id="parentNameId02" name="parentName"
					class="easyui-textbox" style="width: 230px;"></td>
				<td width="20%" align="right"><span >名&emsp;&emsp;称:</span></td>
				<td width="30%"><input id="name" name="name"
					class="easyui-textbox" missingMessage="不能为空"
					 style="width: 230px;" data-options="required:true"></td>
			</tr>
			<tr>
				<td width="20%" align="right"><span key="unit.unitid" class="paltform-i18n">编&emsp;&emsp;号:</span></td>
				<td width="30%"><input id="privilegeNum" name="privilegeNum"
					class="easyui-textbox" missingMessage="不能为空" style="width: 230px;"
					 maxlength="25"></td>
				<td align="right"><span key="unit.ordernum" class="paltform-i18n">顺序编号:</span></td>
				<td><input id="orderNumber" name="orderNumber" Maxlength="4"
					class="easyui-textbox" missingMessage="不能为空"
					style="width: 230px;"></td>
			
			</tr>
			<tr>
				<td align="right"><span key="unit.address">地&emsp;&emsp;址:</span></td>
				<td><input id="url" name="url"
					class="easyui-textbox" style="width: 230px;"></td>
				<td align="right"><span key="unit.address">菜单类型:</span></td>
				<td><select id="privilegeTypeId" name="privilegeType"
					class="easyui-combobox" style="width: 230px;" editable="false"
					panelHeight="auto">
						<option value="OrgType">菜单页面</option>
						<option value="buttonType">功能按钮</option>
				</select></td>
			</tr>
			<tr>
				<td align="right"><span key="descriptioninfo" class="paltform-i18n">菜单描述:</span></td>
				<td colspan="3"><textarea id="description"
						class="easyui-textbox" validType="maxLength[500]"
						name="description" style="width: 230px;"></textarea></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td></td>
			</tr>
			<tr>
				<td align="center" colspan="4">
					<a href="#" class="easyui-linkbutton"iconCls="icon-ok" onclick="saveData()"><span key="save"class="paltform-i18n">保存</span></a> 
					<a href="#"	class="easyui-linkbutton" iconCls="icon-cancel"	onclick="closeWindow()"><span key="cancel" class="paltform-i18n">取消</span></a></td>
			</tr>
		</table>
	</form>
</div>
<div id="addUserWinId" class="easyui-window" >
	<div id="main_area" style="margin:15px 0px 0px 0px"> 
	<form id="saveUserForm" class="easyui-form" method="post">
		<table align="center" style="margin:15px 60px 0px 0px" class="edittable">
			<tr> 
				<td width="10%" align="right"><span>登陆账号:</span></td>
				<td width="25%" align="left">
					<input id="loginNameId" name="loginName" class="easyui-validatebox" data-options="required:true" />
				</td>
			    <td width="10%" align="right"><span>用户姓名:</span></td>
				<td width="25%" align="left">
					<input id="usernameId" name='username' class="easyui-validatebox" data-options="required:true" />
				</td>
			</tr>
			<tr>
			    <td align="right"><span>年&emsp;&emsp;龄:</span></td>
				<td align="left"><input id="ageId"   name='age'  class="easyui-numberbox"  maxlength="2"/></td>
				<td align="right"><span>性&emsp;&emsp;别:</span></td>
				<td align="left">
					<select id="sexId" class="easyui-combobox" name="sex"  editable="false" panelHeight="auto" >  
					   	<option value="男">男</option>
		 				<option value="女">女</option>
					</select> 
				</td>
			</tr>
			<tr>
			    <td align="right"><span>公&emsp;&emsp;司:</span></td>
				<td align="left"><input id="companyId"   name="company" class="easyui-textbox"  maxlength="20"/></td>
				<td align="right"><span>联系电话:</span></td>
				<td align="left">
					<input id="telphoneId"  class="easyui-numberbox"  name="telphone"  editable="false"  />  
				</td>
			</tr>
			<tr>
				<td align="right"><span>邮&emsp;&emsp;箱:</span></td>
				<td align="left">
					<input id="emailId" name="email" class="easyui-validatebox" data-options="validType:'email'" />  
				</td>
				<td align="right"><span>账号状态:</span></td>
				<td align=	"left">
					<select id="countStatusId" class="easyui-combobox" name="countStatus"  editable="false" panelHeight="auto" >  
					   	<option value="1">有效</option>
		 				<option value="0">无效</option>
					</select> 
				</td>
			</tr>
			<tr>
				<td align="right"><span>用户类型:</span></td>
				<td align="left">
					<select id="userTypeId" class="easyui-combobox" name="userType"  editable="false" panelHeight="auto" >  
					   	<option value="back">后台用户</option>
		 				<option value="front">前台用户</option>
					</select> 
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
			</tr>
			<tr align="center">
				 <td colspan="4">
				    <a id="buttonId01" href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveData1()">保存</a>
					<a id="buttonId02" href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="closeWindow1();">取消</a>
				 </td>
  			</tr>
		</table>
	</form>
	</div>
</div>
	<!-- 给部门分配角色窗口 -->
	<div id="allotRoleWin" class="easyui-window" >
        <div id="cc" class="easyui-layout" fit="true">
            <div data-options="region:'west'" style="width:200px;">
                <div class="content">
                    <span align="center">全部角色</span>
                    <div class="mult-selections " id="role-select1">

                    </div>
                </div>
            </div>
            <div data-options="region:'east'" style="width:200px;">
                <div class="content">
                    <span>已有角色</span>
                    <div class="mult-selections" id="role-select2">

                    </div>
                </div>
            </div> 
            <div data-options="region:'center'">
                <div id="buttonId" align="center" >
                    <a id="toRight" class="easyui-linkbutton">&emsp;&emsp;>&emsp;&emsp;</a><br> 
                    <a id="allToRight" class="easyui-linkbutton">>></a><br>
                    <a id="toLeft" class="easyui-linkbutton"><</a><br>
                    <a id="allToLeft" class="easyui-linkbutton"><<</a><br>
                    <a id="saveRoles" href="#" class="easyui-linkbutton" iconCls="icon-save">保存</a> 
                </div>
            </div>
        </div> 
    </div>
<script src="<c:url value='/resource/home/js/jquery-1.8.1.min.js' />"></script><!-- jQuery v@1.8.0  -->
<script src="<c:url value='/resource/home/js/jquery.easyui.min.js'/>"></script> <!-- jQuery EasyUI 1.3.1  -->
<script src="<c:url value='/resource/locale/easyui-lang-zh_CN.js'/>"></script>
<script src="<c:url value='/resource/admin/orgManage/orgListPage.js'/>"></script>
</html>