52,778
社区成员
发帖
与我相关
我的任务
分享<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs_new.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
request.setAttribute("basePath", basePath);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link
href="${basePath}static_resources/js/ligerUI/skins/Aqua/css/ligerui-all.css"
rel="stylesheet" type="text/css">
<link
href="${basePath}static_resources/js/ligerUI/skins/ligerui-icons.css"
rel="stylesheet" type="text/css">
<script src="${basePath}static_resources/js/ligerUI/js/core/base.js"
type="text/javascript"></script>
<script
src="${basePath}static_resources/js/ligerUI/js/plugins/ligerDrag.js"
type="text/javascript"></script>
<script
src="${basePath}static_resources/js/ligerUI/js/plugins/ligerDialog.js"
type="text/javascript"></script>
<script
src="${basePath}static_resources/js/ligerUI/js/plugins/ligerResizable.js"
type="text/javascript"></script>
<script type="text/javascript"
src="${basePath}static_resources/js/ZYLib/ZYCommLib.js"></script>
<script type="text/javascript"
src="${basePath}static_resources/js/common.js"></script>
<link href="${basePath}static_resources/js/ZYLib/zyLib.css"
rel="stylesheet" type="text/css" />
<style type="text/css">
.l-case-title {
font-weight: bold;
margin-top: 20px;
margin-bottom: 20px;
}
</style>
<title>My JSP 'listToShow.jsp' starting page</title>
<script type="text/javascript">
function childFunction() {
var deptId = window.parent.$("#deptId").val();
var userName = encodeURI(encodeURI(window.parent.$("#userName").val()
.Trim()));
document.getElementById("listToShowForm").action = "${basePath}common/showHisUserInfo.action?method=showAllUserList&deptId="
+ deptId + "&userName=" + userName;
$("#listToShowForm").submit();
//window.location.href = "${basePath}highValueConsum/vendorcatalog.action?method=showAllCatalog&vendorId="+ vendorId;
}
/**
* 点击列表一条记录变色
*/
var trObj = null;
function trClick(obj) {
//点击表格中一行数据变色,其他行数据不变色
if (trObj != null) {
$(trObj).css('background-color', 'white');
$(obj).css('background-color', '#cccccc');
} else {
$(obj).css('background-color', '#cccccc');
}
trObj = obj;
}
//全选
//function allchoose(tag){
//当前标签是否是选中状态
//var b=tag.checked;
//获得所有check标签
//var arr=document.getElementsByName("check");
//将当前标签的状态赋值给其余所有复选框
//for(var i=0;i<arr.length;i++){
//arr[i].checked=b;
//}
//}
$(function(){
$("#selectAllCheck").click(function() {
if ($(this).attr("checked")) {
$("input[name='selectOne']").attr("checked", true);
} else {
$("input[name='selectOne']").attr("checked", false);
}
$("#consumableSourcecode").focus();
})
$("input[name='selectOne']").click(function() {
var isAllChecked = (function() {
var allChecked = true;
$("input[name='selectOne']").each(function() {
if (!$(this).attr("checked")) {
allChecked = false;
}
})
return allChecked;
})();
if ($(this).attr("checked")) {
if (isAllChecked) {
$("#selectAllCheck").attr("checked", true);
}
} else {
$("#selectAllCheck").attr("checked", false);
}
})
})
</script>
</head>
<body>
<form method="post" id="listToShowForm">
<p:pagedetail>
<div id="Layer1" style="position:absolute;width:600px;height:80px;z-index:1">
<table id="createTable" class="resultlst">
<tr>
<th><input type="checkbox" id="selectAllCheck"
name="selectAllCheck">全选/全不选</th>
<th></th>
<th>工号</th>
<th>姓名</th>
<th>科室</th>
<th>角色</th>
</tr>
<c:forEach items="${showAllUserList}" var="e" varStatus="index">
<tr onclick="trClick(this)">
<td><input type="checkbox" name="selectOne" id="selectOne">
</td>
<td>${index.index+1}</td>
<td><input type="hidden" value="${e.deptId}" />
${e.userCode}</td>
<td>
<%-- <input type="hidden" value="${e.consumableExtendId}"/> --%>
${e.uesrName}</td>
<td>${e.deptName}</td>
<td>${e.roleName}</td>
</tr>
</c:forEach>
</table>
</div>
<div id="Layer2" style="position:absolute;left:680px;width:600px;height:80px;z-index:2">
<table id="getTable" class="resultlst">
<tr>
<th><input type="checkbox" name="checkall" id="checkall">
</th>
<th></th>
<th>工号</th>
<th>姓名</th>
<th>科室</th>
<th>角色</th>
</tr>
</table>
</div>
<div id="Layer3" style="position:absolute;left:600px;width:100px;height:80px;z-index:3">
<table id="gongneng" class="resultlst">
<tr>
<td>
<input type="button" id="addToRight" name="addToRight" value="添加">
</td>
</tr>
<tr>
<td>
<input type="button" id="save" name="save" value="保存">
</td>
</tr>
<tr>
<td>
<input type="button" id="cancel" name="cancel" value="撤消">
</td>
</tr>
</table>
</div>
</p:pagedetail>
<p:footercon></p:footercon>
</form>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="div1">
<p id="p1"><input type="text"/></p>
</div>
<input type="button" value="点击复制" id="but1">
</body>
<script src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$("#but1").click(function(){
var c = $("#p1").clone();
$("#div1").append($(c));
})
</script>
</html>