<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools"></t:base>
<link rel="stylesheet" href="plug-in/main/css/layout.css" type="text/css"></link>
<link rel="stylesheet" href="plug-in/main/css/base.css" type="text/css"></link>
<link rel="stylesheet" href="plug-in/main/css/skin-blue.css" type="text/css"></link>
<style>
.switch-box{
width:58px;
height:24px;
border-radius: 11px;
border:1px solid #c1c1c1;
background: #eff1ee;
cursor:pointer;
}
.switch-box.on{
background: #79e68b;
}
.switch-box.on .switch-btn{
float:right;
}
.switch-btn{
width:22px;
height:22px;
border-radius: 11px;
border:1px solid #c1c1c1;
box-shadow:inset 0 0 1px #cccccc;
background-color: #fff;
}
table.datagrid-htable td,table.datagrid-btable td{
vertical-align:middle;
}
table.datagrid-htable td .datagrid-cell,table.datagrid-btable td .datagrid-cell{
display:table-cell;
}
#date-time-box{
border-bottom: 1px solid #b2bad0;
height:40px;
line-height:40px;
padding-left: 20px;
background: #ededed;
overflow:hidden;position:absolute;top:0;left:0;
width:100%;
box-sizing:border-box;
}
#date-time-box .datetime-query{
float:left;
line-height:36px;
}
#date-time-box .datetime-query input{
line-height:20px;
padding:1px 3px;
border:1px solid #9c9c9c;
}
#date-time-box a.query-button{
display: block;
margin-right: 10px;
color: rgb(255, 255, 255);
text-align: center;
min-width: 54px;
height: 28px;
margin-top:6px;
line-height: 28px;
float: left;
padding: 0px 4px;
background: rgb(92, 142, 223);
border-radius: 3px;
}
iframe{
border:none;
border-left: 1px solid #b2bad0;
border-right: 1px solid #b2bad0;
}
span{
margin-left:10px;
margin-right:10px;
}
#table {
border-left: 1px solid #ccc;
border-top: 1px solid #ced8dd;
min-width: 100%;
margin-top: 50px;
}
#table td,#table th {
border-right: 1px dotted #ccc;
border-bottom: 1px dotted #ccc;
padding: 3px;
line-height: 1.8;
}
td {
min-width: 90px;
text-align: center;
}
.theader {
background:linear-gradient(to bottom, #f9f9f9 0px, #efefef 100%);
}
.theader td{
text-align:center;
}
.table-container {
overflow: auto;
display: block;
}
</style>
<div style="max-height:600px;min-height:200px;padding-bottom:40px;position:relative;height:100%;box-sizing:border-box;">
<input id="proid" name="proid" type="hidden" value="${proid}">
<input id="taskKey" name="taskKey" type="hidden" value="${taskKey}">
<div class="easyui-layout" fit="true">
<div region="center" style="padding:1px 1px 20px 1px; ">
<table id="table" align="center" cellspacing="0" cellpadding="0" type="checkbox">
<c:forEach var="edu" items="${hzlist}">
<h1>${edu.fsname}</h1>
</c:forEach>
<tr id="show_tab_one">
<td hidden="hidden">id</td>
<td hidden="hidden">name</td>
<td>序号</td>
<td>选择</td>
<td>姓名</td>
</tr>
<c:forEach var="edu" items="${list}" varStatus="status">
<tr class="del">
<td class="xh">${status.index+1}</td>
<td><input class="eid" type="checkbox" value="${edu.id}" /></td>
<td id="id" hidden="hidden">${edu.id}</td>
<td>${edu.realname}</td>
</tr>
</c:forEach>
</table>
</div>
</div>
<div style="position:absolute;bottom:0;width:100%;text-align:right;right:0;height:40px;overflow:hidden;background:#fff;">
<a id="closeIframe" style="display:block;float:right;height:28px;margin-top:6px;line-height:28px;font-size:14px;text-align:center;width:80px;background:#d1d1d1;color:#fff;margin-left:14px;border-radius:3px;margin-right:20px;">关闭</a>
<a id="submitIframe" style="display:block;float:right;height:28px;margin-top:6px;line-height:28px;font-size:14px;text-align:center;width:80px;background:#2A8FBD;color:#fff;border-radius:3px">提交</a>
</div>
</div>
<input id="dygcId" name="dygcId" type="hidden" value="${dygcId}">
<input id="fsqbsid" name="fsqbsid" type="hidden" value="${fsqbsid}">
<input id="fspx" name="fspx" type="hidden" value="${fspx}">
<script type="text/javascript">
function submit() {
debugger;
var f= $(".eid:checked");
var ids = "";
var idsName = "";
f.each(function(){
var eid =$(this).val();
var pp = $(this).parent().next().next().text();
console.log(pp);
ids += eid+",";
idsName += pp+",";
});
ids = ids.substring(0,ids.length-1);
idsName = idsName.substring(0,idsName.length-1);
if(ids != ""){
var win = window.top.document;
win.getElementById("initiator").value=ids;
win.getElementById("initiatorValue").value=idsName;
$('#btn_sub', parent.document).click();
window.top.document.getElementById("iframe-submit").style.display="none";
token();
}else{
tip("请选择一个用户");
}
}
$(function($) {
$('#closeIframe').click(function(){
window.top.document.getElementById("iframe-submit").style.display="none";
});
$('#submitIframe').click(function(){
submit();
});
});
function token(){
var f= $(".eid:checked");
var ids = "";
var idsName = "";
f.each(function(){
var eid =$(this).val();
var pp = $(this).parent().next().next().text();
console.log(pp);
ids += eid+",";
idsName += pp+",";
});
ids = ids.substring(0,ids.length-1);
idsName = idsName.substring(0,idsName.length-1);
var dygcId = $("#dygcId").val();
var fsqbsid = $("#fsqbsid").val();
var fspx = $("#fspx").val();
$.ajax({
type:"post",
async:false,
data:{dygcId:dygcId,fsqbsid:fsqbsid,fspx:fspx,tjuserid:ids},
url : "damofficeaction.do?jzzkz_test",// 请求的action路径
success : function(data) {
var d = $.parseJSON(data);
}
});
}
</script>
table表格复选框多选获取ID和字段值
最新推荐文章于 2024-08-20 09:45:52 发布