`
superyang
  • 浏览: 22914 次
  • 性别: Icon_minigender_2
  • 来自: 广州
社区版块
存档分类
最新评论

js scoll table

阅读更多
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/gzydTag.tld" prefix="yd"%>
<%@page
import="java.util.List,java.util.ArrayList,org.apache.struts.util.LabelValueBean"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
div.DivContainer /* Div */{
    overflow: scroll;
    height:expression((document.body.clientHeight-this.offsetTop-20>this.children[0].offsetHeight)?(this.children[0].offsetHeight+20) : (document.body.clientHeight-this.offsetTop));
width:expression(document.body.clientWidth);
    text-align: center;
}

td.HLocked /*左侧冻结的列*/ {
    z-index: 10;
    position: relative;
left: expression(document.getElementById("div").scrollLeft);
    text-align: center;
padding:2 1 2 2;
BACKGROUND: #ECEEED;
}

th.VLocked /*垂直固定的表头*/ {
    z-index: 20;
    position: relative;
top: expression(document.getElementById("div").scrollTop);
    color: black;
    text-align: center;  
padding:2 1 2 2;
BACKGROUND: #ECEEED;
}
th.Locked /*垂直、水平都固定的表头*/ {
    z-index: 30;
    position: relative;
top: expression(document.getElementById("div").scrollTop);
left: expression(document.getElementById("div").scrollLeft);
    text-align: center;
padding:2 1 2 2;
BACKGROUND: #ECEEED;
}
tr{
   height:32px;
}

</style>

<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/main.css" rel="stylesheet" type="text/css" />
<script src="<%=path%>/js/jquery.js" language="javascript"></script>
<script src="<%=basePath%>js/sorttable.js" language="javascript"></script>
<script src="<%=path%>/js/calendar.js" language="javascript"></script>
<script src="<%=basePath%>js/tdscroll.js" charset="UTF-8" language="javascript"></script>
<script src="<%=basePath%>js/js.js" language="javascript"></script>
<script type="text/javascript">       

$(document).ready(function()
        {

            $('#form').submit(function(){
               
                var tag=$('#tag').val();
                if(tag==""||tag=="export"){
                  
                   return true;
                }
                
                jQuery.ajax({
                    url: "util.do",   // 提交的页面
                    data: $('#form').serialize(), // 从表单中获取数据
                    dataType:"json",
                    type: "POST",                   // 设置请求类型为"POST",默认为"GET"
                    beforeSend: function()          // 设置表单提交前方法
                    {
                      
                    },
                    error: function(request) {      // 设置表单提交出错
                       
                    },
                    success: function(data) {
                        // 设置表单提交完成使用方法
                    
                       for(var i=0;i<data.length;i++){                           
                             addRows("tab",data[i],i);                           
                       }
                       flag=false;
                        var msg=document.getElementById("msg");
                       if(msg!=null){
                       msg.style.display="none";
                       }
                    }
                });
                return false;
            });
           
           
      
        });
       
         function handleData(obj,tr_Num,i){  
          
            var tr="<tr style='height:32px;'>";
           if(tr_Num%2==0){
              tr="<tr style='height:32px;' calss='ln'>";
           }
          
       tr+="<td  class='HLocked tableCell' style='height:32px;'>";
      // tr+="<input type='checkbox' name='tbb.businessId' value='"+obj.businessId+"' onclick='check_(this)'>";
       tr+="<input type='checkbox' name='ckb' tag='"+obj.businessId+"' value='"+obj.taskId+"' onclick='check_(this)'>";
     tr+="<input type='hidden' id='task_"+obj.businessId+"' value='"+obj.taskId+"'>";
     tr+="<input type='hidden' name='cat"+obj.taskId+"' id='cat"+obj.taskId+"' value='"+obj.businessId+"'>";
tr+="<input type='hidden' id='businessIds' name='businessIds' value='"+obj.businessId+"'>";
       tr+="</td>";
       tr+="<td  class='HLocked tableCell'>"+(tr_Num+1)+"</td>";
       tr+="<td  class='HLocked tableCell'>"+obj.businessNo+"&nbsp;</td>";
       tr+="<td  class='HLocked tableCell'>"+obj.businessName+"&nbsp;</td>";
     tr+="<td  calss='tableCell' align='center'>"+obj.delegateUnitNo+"&nbsp;</td>";
             //合同
             var str=obj.contractNo;
             if(obj.htBusinessId>0){
               str="<a href='#' style='color:green' onclick=\"viewContract('"+obj.htBusinessId+"')\">"+obj.contractNo+"</a>";
             }          
             tr+="<td  calss='tableCell' align='center'>"+str+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.businessTypeName+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.projectScale+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+format(obj.receiveDate)+"&nbsp;</td>";
       tr+="<td  calss='tableCell' align='center'>"+format(obj.completeDate)+"&nbsp;</td>";
              tr+="<td  calss='tableCell' align='center'>"+obj.subProjectPriceSongshen+"&nbsp;</td>";
           tr+="<td  calss='tableCell' align='center'>"+obj.subProjectPriceDingan+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.subProjectPriceHeJian+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.subProjectPriceBianZhi+"&nbsp;</td>";  
             tr+="<td  calss='tableCell' align='center'>"+obj.finance.accountsMoney+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.finance.receivedMoney+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+format(obj.newMoneyDateTime)+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.paidSum.amountPayable+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.paidSum.amountPaid+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+format(obj.approveDate)+"&nbsp;</td>";
             tr+="<td  calss='tableCell' align='center'>"+obj.projectManager+"&nbsp;</td>";          
             tr+="<td  calss='tableCell' align='center'>"+obj.handlesIdNames+"&nbsp;</td>";
       tr+="<td  calss='tableCell' align='center'>"+obj.delegateUnit+"&nbsp;</td>";      
       tr+="<td  calss='tableCell' align='center'>"+obj.finance.receivedCompany+"&nbsp;</td>";   
            
             tr+="<td  calss='tableCell' align='center'>"+obj.processName+"&nbsp;</td>";
           
           
       tr+="</tr>";
                          
           return tr;  
        }
       
$(document).ready(function (){
        tbody=document.getElementById("tbody");
        var nScrollHight = 0; //滚动距离总长(注意不是滚动条的长度)
        var nScrollTop = 0;   //滚动到的当前位置
      

        $("#div").scroll(function(){
          var nDivHight = $("#div").height();
          nScrollHight = $(this)[0].scrollHeight;
          nScrollTop = $(this)[0].scrollTop;
          if(nScrollTop + nDivHight >= nScrollHight)
             if(!flag){          
            flag=true;
           
            loadData();
           
            }
          });
      });
     
// Minified source of Grid.js:
var flag=false;
var tbody=null;
function loadData(){
    
      var pageNO=document.getElementById("pageNO").value;
      pageNO++;
      var totalPage=document.getElementById("totalPage").value;
   
      if(pageNO>totalPage){
     // pageNO--;
      return ;
      }    
      document.getElementById("pageNO").value=pageNO;
      var msg=document.getElementById("msg");   
      if(msg!=null){
        msg.style.display="";
      }
   
      $("#form").submit();

}

function m_out(obj,cbx_id){
var b= document.getElementById(cbx_id).checked;
if(b){

}else{
obj.style.backgroundColor='#fff';
}
}


function reset_(){
    clearV('tbb.projectManager','');
    clearV('tbb.handlers','');
    clearV('dateStr1','');
    clearV('dateStr2','');
    clearV('dateStr3','');
    clearV('dateStr4','');
    clearV('dateStr5','');
    clearV('dateStr6','');  
    clearV('tbb.delegateUnit','');
    clearV('tbb.businessTypeID','0');
    clearV('tbb.processName','');



       
       
       
</script>


</head>
<body id="body">
<html:form action="/util" target="_self" styleId="form">
<html:hidden property="method" value="listZjyw" styleId="method" />
<html:hidden property="tag" styleId="tag" value="json" />
<html:hidden property="low" styleId="low" />
<html:hidden property="tbb.businessId" styleId="businessId"/>
            <table width="100%" border="0" cellpadding="0" cellspacing="0"
class="menutable">
<tr>
<td colspan="16" class="tableCellHeader">
<span class="font3"><b>造价业务台帐</span>
</td>

</tr>
</table>
<!-- 业务台账 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tableCell_right">
<div id="div1" style="float:right;">
<input name="btn" type="button" onClick="export22()" class="b_sub"
value="导出">
</div>
<div id="div7" style="float:right">
<input name="btn" type="button" onClick="monitor()" class="b_sub"
value="监控">
</div>
<logic:match value=",302906," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div7" style="float:right">
<input name="btn" type="button" onClick="viewWorkDiary()" class="b_sub"
value="项目日志">
</div>
</logic:match>
<logic:match value=",302907," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div5" style="float:right">
<input name="button6" type="button" onClick="changeStructure()"
class="b_sub" value="调整结构">
</div>
</logic:match>

<logic:match value=",302908," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div6" style="float:right">
<input name="button6" type="button" onClick="addMajor('major')"
class="b_sub" value="添加专业">
</div>
</logic:match>
<logic:match value=",302909," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div6" style="float:right">
<input name="button6" type="button" onClick="addMajor('subproject')"
class="b_sub" value="添加分项">
</div>
</logic:match>
        
         <logic:match value=",302904," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div7" style="float:right">
<input name="btn" type="button" onClick="associateProject()"
class="b_sub" value="项目关联">
</div>
</logic:match>
<logic:match value=",302903," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div5" style="float:right">
<input name="button6" type="button" onClick="del()"
class="b_sub" value="删除">
</div>
</logic:match>

<logic:match value=",302902," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div6" style="float:right">
<input name="button6" type="button" onClick="modify()"
class="b_sub" value="修改">
</div>
</logic:match>

<logic:match value=",302901," scope="session"
name="EMPLOYEEINFO_KEY" property="functionIds">
<div id="div4" style="float:right">
<input name="button5" type="button" onClick="view()"
class="b_sub" value="查看">
</div>
</logic:match>

<div id="low2" style="float:right;">
<input name="btn" id="advanBtn" type="button"
onClick="changdiv_('2');" class="b_sub" value="高级">

</div>
<div id="div1" style="float:right">
<input name="btn" type="button" onClick="search()" class="b_sub"
value="查询">
</div>


</td>
</tr>
</table>
<div id="advandiv" style=" display:block">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="8" class="tableCellHeader">
搜索条件
<br>
</td>
</tr>

     <tr class="tableDataRowOdd">
   <td width="10%" height="30" class="tableCell_right01">
业务编号:
</td>
<td width="38%" height="30" class="tableCell_left01">
<html:text property="tbb.businessNo"
style="width:78%" styleClass="input01"/>
   

</td>
   <td width="10%" height="30" class="tableCell_right01" align="right">
业务名称:
</td>
<td width="38%" height="30" class="tableCell_left01">
<html:text property="tbb.businessName" style="width:78%" styleClass="input01" />


</td>
</tr>
</table>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" style="display:none" id="sTab">
<tr class="tableDataRowOdd">
   
    <td width="10%" height="30" class="tableCell_right01">
项目负责人:
<br></td>
<td width="38%" height="30" class="tableCell_left01">
<html:text property="tbb.projectManager"
style="width:78%" styleClass="input01" styleId="projectManager"/>
<input name="button2" type="button" onclick="selectUser('handerId','projectManager');" class="b_sub" value="选择">

<br></td>
<td width="10%" height="30" class="tableCell_right01">
经办人:
<br></td>
<td width="38%" height="30" class="tableCell_left01">
<html:text property="tbb.handlers"
style="width:78%" styleClass="input01" styleId="handlers"/>
<input name="button2" type="button" onclick="selectUser('handerId','handlers');" class="b_sub" value="选择">

<br></td>
</tr>

<tr class="tableDataRowOdd">
   
    <td width="10%" height="30" class="tableCell_right01">
接收日期:
<br></td>
<td width="38%" height="30" class="tableCell_left01">
  <input type="text" name="dateStr1" style="width:36%"
class="input01" readonly="readOnly"
onclick="new calendar();" value="<bean:write name="utilForm" property="dateStr1" format="yyyy-MM-dd"/>"/>&nbsp;至&nbsp;
                              <input type="text" name="dateStr2" style="width:36%"
class="input01" readonly="readOnly"
onclick="new calendar();" value="<bean:write name="utilForm" property="dateStr2" format="yyyy-MM-dd"/>"/>

<br></td>
<td width="10%" height="30" class="tableCell_right01">
完成日期:
<br></td>
<td width="38%" height="30" class="tableCell_left01">
    <input type="text" name="dateStr3" style="width:36%"
class="input01" readonly="readOnly"
onclick="new calendar();" value="<bean:write name="utilForm" property="dateStr3" format="yyyy-MM-dd"/>"/>&nbsp;至&nbsp;
                              <input type="text" name="dateStr4" style="width:36%"
class="input01" readonly="readOnly"
onclick="new calendar();" value="<bean:write name="utilForm" property="dateStr4" format="yyyy-MM-dd"/>"/>
<br></td>

</tr>



<tr class="tableDataRowOdd">

<td width="8%" height="30" class="tableCell_right01">
委托编号:
</td>
<td width="39%" height="30" class="tableCell_left01">
        <html:text property="tbb.delegateUnitNo" styleClass="input01" style="width:78%"
styleId="delegateUnitNo" ></html:text>

</td>
   
    <td width="10%" height="30" class="tableCell_right01">
委托单位:
</td>
<td width="38%" height="30" class="tableCell_left01">
<html:text property="tbb.delegateUnit"
style="width:78%" styleClass="input01" styleId="delegateUnit"/>


</td>
   
   
     


</tr>

<tr class="tableDataRowOdd">
<td width="10%" height="30" class="tableCell_right01">
流程步骤:
</td>
<td width="38%" height="30" class="tableCell_left01">
    <html:select property="tbb.processName" style="width:78%" >
<html:option value="">-请选择-</html:option>
<html:optionsCollection name="lp" label="processName" value="processName" />
</html:select>

</td>
<td width="10%" height="30" class="tableCell_right01">
业务类型:
</td>
<td width="38%" height="30" class="tableCell_left01">
<html:select property="tbb.businessTypeID" styleClass="input01" style="width:78%">
     <html:option value="0">-请选择-</html:option>
     <html:optionsCollection name="lx" label="baseDataName" value="baseDataId" />
    </html:select>

</td>
</tr>
             

</table>
</div>

<script type="text/javascript">
  var low='<bean:write property="low" name="utilForm"/>';
changdiv_1(low);

</script>

` <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tableCell">
累计:

</td>
<td class="tableCell">
编制价:<font color='red'><bean:write name="sumTbb" property="subProjectPriceBianZhi"  format="##################0.0#"/></font>&nbsp;&nbsp;

</td>
<td class="tableCell">
送审造价:<font color='red'><bean:write name="sumTbb" property="subProjectPriceSongshen"  format="##################0.0#"/></font>&nbsp;&nbsp;

</td>
<td class="tableCell">
审核造价:<font color='red'><bean:write name="sumTbb" property="subProjectPriceDingan"  format="##################0.0#"/></font>&nbsp;&nbsp;

</td>
<td class="tableCell">
核减造价:<font color='red'><bean:write name="sumTbb" property="subProjectPriceHeJian" format="##################0.0#" /></font>&nbsp;&nbsp;

</td>
<td class="tableCell">
应收金额:<font color='red'><bean:write name="sumTbb" property="contractMoney"  format="##################0.0#"/></font>&nbsp;&nbsp;

</td>
<td class="tableCell">
已收金额:<font color='red'><bean:write name="sumTbb" property="receivedMoney" format="##################0.0#" /></font>&nbsp;&nbsp;

</td>

<td class="tableCell">
应支付金额:<font color='red'><bean:write name="sumTbb" property="uncollectedMoney"  format="##################0.0#"/></font>&nbsp;&nbsp;

</td>
<td class="tableCell">
已支付金额:<font color='red'><bean:write name="sumTbb" property="costOverall"  format="##################0.0#"/></font>&nbsp;&nbsp;

</td>
<td class="tableCell">
共<font style="color:red"><bean:write name="page" property="totalRows"/></font>条记录

</td>
<td class="tableCell">


</td>
</tr>
</table>
<div id="div" class="DivContainer">
         
<table border="1" cellPadding="0" cellSpacing="0"
class="dt1 sortable scrolltable " autosortcol="1"
    style="width:260%" id="tab">
<TBODY>

<TR >
<TH width="1%" class="Locked sorttable_nosort">
<!-- 
<input type="checkbox" name="projIdsAll" value="0"
onClick="checkALL(this,'ckb')">
-->&nbsp;
</TH>
<TH width="2%" class="Locked column_sortable">
序号 </TH>
<TH width="3%" class="Locked column_sortable">
业务编号 </TH>
<TH width="9%" class="Locked column_sortable">
业务名称 </TH>
<TH width="4%" class="VLocked column_sortable">
委托编号 </TH>
   <TH width="4%" class="VLocked column_sortable">
合同编号 </TH>
   <TH width="3%" class="VLocked column_sortable">
业务类型 </TH>
<TH width="6%" class="VLocked column_sortable">
工程规模 </TH>

<TH width="3%" class="VLocked column_sortable">
接收日期 </TH>
<TH width="3%" class="VLocked column_sortable">
完成日期 </TH>

  <TH width="4%" class="VLocked column_sortable">
送审造价 </TH>
<TH width="4%" class="VLocked column_sortable">
审核造价 </TH>
<TH width="4%" class="VLocked column_sortable">
增减造价 </TH>
<TH width="4%" class="VLocked column_sortable">
编制价 </TH>
    <TH width="3%" class="VLocked column_sortable">
应收款
</TH>
<TH width="3%" class="VLocked column_sortable">
已收款
</TH>
<TH width="3%" class="VLocked column_sortable">
收款时间 </TH>
<TH width="3%" class="VLocked column_sortable">
应支付
</TH>
<TH width="3%" class="VLocked column_sortable">
已支付
</TH>
<TH width="3%" class="VLocked column_sortable">
支付时间 </TH>

<TH width="4%" class="VLocked column_sortable">
负责人 </TH>

    <TH width="4%" class="VLocked column_sortable">
经办人 </TH>
<TH width="6%" class="VLocked column_sortable">
委托单位 </TH>

<TH width="6%" class="VLocked column_sortable">
收款单位 </TH>


<TH width="5%" class="VLocked column_sortable">
            当前步骤
    </TH>

</TR>
<logic:iterate id="obj" name="list" indexId="index">
<TR class="<%if(index%2==0){out.write("ln");}%>">
<TD class="HLocked tableCell" style="height:32px;">
<input type="checkbox" name="ckb" tag="<bean:write name="obj" property="businessId"/>"
value="<bean:write name="obj" property="taskId"/>" onclick="check_(this);">

</TD>
<TD class="HLocked tableCell" align="center">
<%=index + 1%>
</TD>
<TD class="HLocked tableCell" align="center">
<bean:write name="obj" property="businessNo" />&nbsp;
</TD>
<TD class="HLocked tableCell" align="center">
<bean:write name="obj" property="businessName" />&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="delegateUnitNo"/>&nbsp;
</TD>
  <TD align="center">
<logic:greaterThan name="obj" property="htBusinessId" value="0">
                  <a href="#" onclick="return viewContract('<bean:write name="obj" property="htBusinessId" />')" style='color:green'><bean:write name="obj" property="contractNo" /></a>
           </logic:greaterThan>
           <logic:lessEqual name="obj" property="htBusinessId" value="0">
                  <bean:write name="obj" property="contractNo" />&nbsp;
           </logic:lessEqual>
</TD>
<TD align="center">
<bean:write name="obj" property="businessTypeName"/>&nbsp;
</TD>

<TD align="center">
<bean:write name="obj" property="projectScale" />&nbsp;
</TD>

<TD align="center">
  <bean:write name="obj" property="receiveDate" format="yyyy.MM.dd"/>&nbsp;
</TD>
<TD align="center">
  <bean:write name="obj" property="completeDate" format="yyyy.MM.dd"/>&nbsp;
</TD>

<TD align="center">
<bean:write name="obj" property="subProjectPriceSongshen" format="###,###,###,###,##0.0####" />&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="subProjectPriceDingan" format="###,###,###,###,##0.0####" />&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="subProjectPriceHeJian" format="###,###,###,###,##0.0####" />&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="subProjectPriceBianZhi" format="###,###,###,###,##0.0####" />&nbsp;
</TD>

<TD align="center">
    <bean:write name="obj" property="finance.accountsMoney" format="###,###,###,###,##0.0####" />  <!-- 应收款 -->&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="finance.receivedMoney" format="###,###,###,###,##0.0####" />   <!-- 已收款 -->&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="newMoneyDateTime" format="yyyy-MM-dd" />                    <!-- 收款时间 -->&nbsp;
</TD>
<TD align="center">
  <bean:write name="obj" property="paidSum.amountPayable" format="###,###,###,###,##0.0####" />               <!-- 应支付 -->&nbsp;
</TD>
<TD align="center">
  <bean:write name="obj" property="paidSum.amountPaid" format="###,###,###,###,##0.0####" />               <!-- 已支付 -->&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="approveDate" format="yyyy-MM-dd" />&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="projectManager" />&nbsp;
</TD>
<TD align="center">
  <bean:write name="obj" property="handlesIdNames" />&nbsp;
</TD>
<TD align="center">
<bean:write name="obj" property="delegateUnit" />&nbsp;
</TD>
  
<TD align="center" >
<bean:write name="obj" property="finance.receivedCompany"/>&nbsp;
</TD>

 
<TD align="center">

<bean:write name="obj" property="processName" />&nbsp;



<input type="hidden"
   name="cat<bean:write name="obj" property="taskId" />"
   id="cat<bean:write name="obj" property="taskId" />"
   value="<bean:write name="obj" property="businessId" />">
<input type="hidden" id="businessIds" name="businessIds" value="<bean:write name="obj" property="businessId" />" />

</TR>
</logic:iterate>
</TBODY>
        </TABLE>
       <div align='center' style="display:none" id="msg">
请稍等,正在加载数据.....
         </div>
  </div>


<div align='center' style="display:none">
<yd:page formName="utilForm" />
</div>
</html:form>
    

<html:form action="/business" target="_blank">
<html:hidden property="method" value="moddifyBusinessIndex" />
<input type="hidden" name="modifyFlag" value="false" id="modifyFlag">
<input type="hidden" name="taskId" value="0" id="taskId">
<input type="hidden" name="readOnly" value="0" id="readOnly">
<html:hidden property="businessId" styleId="businessId" />
<html:hidden property="htBusinessId" styleId="htBusinessId" />
</html:form>

</body>

</html>
<script type="text/javascript">
function search()
{
document.getElementById("tag").value="";
document.getElementById("pageNO").value=1;
document.getElementById("rows").value=0;
    $('#form').submit();
    return false;

}

function selectUser(userId,userName)
{
var employee=window.showModalDialog('<%=path%>/department.do?method=selectEmployee','','dialogHeight:500px; dialogWidth:600px;dialogTop:20px;dialogLeft:20px;status:0;help:no;status=no;center=yes;edge=sunken;resizable=yes;Minimize=yes;Maximize=yes;');
if(employee)
{
var rets=employee.split('=');

    //_$(userId).value=rets[0];
//alert(userName);
    document.getElementById(userName).value=rets[1];
}
}





//项目关联
function associateProject(){

var temp=checkCount("ckb");
if(temp==0){
alert("请选择一条记录");
return ;
}
if(temp>1){
alert("只能选择一条记录");
return ;
}
    var obj=getCheckChkObJ("ckb");
var id=obj.value;
window.open('','associateProject');
businessForm.method.value='associateProject';
businessForm.target='associateProject';
//_$('taskId').value=id;
 

  var ii="cat"+id;

var busId=document.getElementById(ii).value;
businessForm.businessId.value=busId;

businessForm.submit();

businessForm.method.value='yeWuBusinessList';
businessForm.target='_self';
}
function modify(){
var temp=checkCount("ckb");
if(temp==0){
alert("请选择一条记录");
return ;
}
if(temp>1){
alert("只能选择一条记录");
return ;
}
    var obj=getCheckChkObJ("ckb");
var id=obj.value;

businessForm.method.value='moddifyBusinessIndex';
document.getElementById("modifyFlag").value=true;
businessForm.target='_blank';
_$('taskId').value=id;
_$('readOnly').value=0;
document.getElementById('businessId').value="";
document.getElementById('htBusinessId').value="";
businessForm.submit();

businessForm.method.value='yeWuBusinessList';
//businessForm.target='_self';

}
function view(){
var temp=checkCount("ckb");
if(temp==0){
alert("请选择一条记录");
return ;
}
if(temp>1){
alert("只能选择一条记录");
return ;
}
    var obj=getCheckChkObJ("ckb");
var id=obj.value;

businessForm.method.value='moddifyBusinessIndex';
businessForm.target='_blank';
_$('taskId').value=id;
_$('readOnly').value=1;
businessForm.submit();

businessForm.target='_self';
    businessForm.method.value='yeWuBusinessList';
}

   function viewContract(htBusinessId){
   
 
if(htBusinessId==0 || htBusinessId=='null'){
alert("请选择一条记录");
return ;
}

businessForm.method.value='moddifyBusinessIndex';

_$('htBusinessId').value=htBusinessId;
document.getElementById('taskId').value="";
document.getElementById('businessId').value="";
//document.getElementById('htBusinessId').value="";

_$('readOnly').value=1;
businessForm.submit();


}
function del() {
      var cb = $('[name=ckb]:checked');
      if (cb.length!=1) {
       alert('请选择一条记录进行操作');
       return false;
      }
     
      if (confirm('删除后不可恢复,确定要删除吗?')) {
         document.getElementById("tag").value='delete';
         document.getElementById("pageNO").value=1;
         document.getElementById('businessId').value=cb.val();
         document.getElementById('form').submit();
        //window.location.href="<%=path%>/util.do?method=listTbyw&tag=delete&tbb.businessId="+cb.val();
       
      }
      return false;
    }
  function monitor(){
   
if(checkCount("ckb")==0 ){
alert("请选择一条记录");
return ;
}
else{
    var obj=getCheckChkObJ("ckb");
var id=obj.value;
  var ii="cat"+id;
  //alert(ii);
  var businessId=document.getElementById(ii).value;

    //window.location.href="taskMonitor.do?method=monitor&taskId="+id+"&businessId="+businessId;
    window.open('taskMonitor.do?method=monitor&taskId='+id+'&businessId='+businessId,'_blank');
}

}



function save(url){

if(checkCount("ckb")==0 || checkCount("ckb")>1){
alert("请选择一条记录");
return ;
}
else{
    var obj=getCheckChkObJ("ckb");
var id=obj.value;
  var ii="cat"+id;
  //alert(ii);
  var businessId=document.getElementById(ii).value;
  var h=window.screen.height;
    var w=window.screen.width;
    var clienth=300;
var clientw=400;
var settop=(h-clienth)/2;
var setleft=(w-clientw)/2;
var sFeatures="resizable=no,toolbar=no,location=no,menubar=no,scrollbars=yes,toolbar=no,width="+clientw+",height="+clienth+",top="+settop+",left="+setleft;
window.open(url+"&businessId="+businessId,"", sFeatures);

}

}
function ref(){
window.location.reload();

}

function setwindow(url){

  if(checkCount("ckb")==0 ){
alert("请选择一条记录");
return ;
}
else{
    var obj=getCheckChkObJ("ckb");
var taskId=obj.value;


var h=window.screen.height;
    var w=window.screen.width;
    var clienth=400;
var clientw=500;
var settop=(h-clienth)/2;
var setleft=(w-clientw)/2;
var sFeatures="resizable=no,toolbar=no,location=no,menubar=no,scrollbars=yes,toolbar=no,width="+clientw+",height="+clienth+",top="+settop+",left="+setleft;
window.open(url+"&taskId="+taskId,"", sFeatures);
}

}

function addMajor(type){
var temp=checkCount("ckb");
if(temp==0){
alert("请选择一条记录");
return ;
}
if(temp>1){
alert("只能选择一条记录");
return ;
}
    var obj=getCheckChkObJ("ckb");
var id_tag=obj.tag;
window.open('<%=path%>/subProjectBase.do?method=addMajorPage&addWhat='+type+'&businessId='+id_tag+'&taskId='+obj.value,'_blank');

}

  function  viewWorkDiary(){
var temp=checkCount("ckb");
if(temp==0){
alert("请选择一条记录");
return ;
}
if(temp>1){
alert("只能选择一条记录");
return ;
}
    var obj=getCheckChkObJ("ckb");
var id_tag=obj.tag;
window.open('<%=path%>/workDiary.do?method=projectWorkDiaryList&diary.businessId='+id_tag);

}

function export22()
{

document.getElementById("tag").value="export";
document.getElementById('form').submit();
    document.getElementById("tag").value="json";
//document.getElementById("pageNO").value=1;
//document.getElementById("rows").value=0;
}

function changeStructure() {
   var temp=checkCount("ckb");
if(temp==0){
alert("请选择一条记录");
return ;
}
if(temp>1){
alert("只能选择一条记录");
return ;
}
    var obj=getCheckChkObJ("ckb");
var id_tag=obj.tag;
    window.open('<%=path%>/change.do?method=changeStructurePage&taskId='+ obj.value +'&businessId='+ id_tag, '_blank');
}

</script>
<script language="javascript" for="document" event="onkeydown" type="text/javascript">


if(event.keyCode==13){

search();
}


</script>
分享到:
评论

相关推荐

    jQuery table scroll表格插件内容部分加滚动条

    接下来,你需要引入jQuery Table Scroll插件的JavaScript和CSS文件。通常,这些文件会包含在你下载的压缩包中,如`texiao6309_1560681033`。解压这个文件,找到对应的js和css文件,并在HTML文件中引用它们: ```...

    el-table-infinite-scroll:El-Table无限滚动

    element-ui 的表格与无限滚动的结合(el-table + infinite-scroll)。查看实例教程此指令依赖于 element-ui@2.12.0,使用前请熟悉:element-ui@2.12.0element-ui@2.12.0安装npm install --save el-table-infinite-...

    Element InfiniteScroll无限滚动的具体使用方法

    在这个实例中,`el-table`组件结合了`v-el-table-infinite-scroll`指令,用于在用户滚动到表格底部时加载下一页数据。通过`el-table-column`定义了表格的列,而`load`方法被用来处理数据的加载逻辑,例如通过`this.$...

    table横向纵向表头冻结js代码

    3. **JavaScript处理**:使用`window.onscroll`或`addEventListener('scroll')`监听滚动事件,当页面滚动时,计算并更新div的位置,使得它们始终显示在视口顶部或左侧。 4. **兼容性检查**:由于不同的浏览器可能对...

    el-table无限滚动+控制列是否显示+列排序(非json)

    &lt;el-table :data="tableData" lazy :load="loadMore" :row-key="getRowKey" @scroll="handleScroll"&gt; &lt;el-table-column v-for="(col, index) in columns" :key="index" :label="col.label" :prop="col.prop" :...

    移动端table固定表头与固定第一列

    对于不支持这些特性的老版本浏览器,可能需要使用一些JavaScript库如jQuery Fixed Header Table插件,或者使用传统的方法,如创建重复的表头和第一列,并通过JavaScript同步滚动状态。 总结起来,实现移动端table的...

    JavaScript Table行定位效果

    8. **框架和库的使用**:虽然可以纯JavaScript实现,但现代开发中可能使用jQuery、Vue.js、React等库或框架简化这些操作,它们提供了更方便的方法来操作DOM和处理事件。 总的来说,实现"JavaScript Table行定位效果...

    js表格无缝滚动效果

    可以设置一个滚动函数,如`function handleScroll() {...}`,然后将其绑定到`scroll`事件上:`table.addEventListener('scroll', handleScroll)`。 4. **判断是否滚动到底部**:在滚动事件处理函数中,我们需要判断...

    HTML固定Table标题行的四种方法

    为解决这一问题,开发者通常采用JavaScript来实现Table标题行的固定,使其在滚动时始终保持可见。本文将详细介绍四种不同的JavaScript方法来实现HTML固定Table标题行。 1. **CSS Sticky Positioning** CSS3中的`...

    JavaScript:固定table的表头

    3. **JavaScript 事件监听**:使用JavaScript的`addEventListener`方法监听滚动事件('scroll')。当用户滚动页面时,事件会被触发,触发相应的处理函数。 4. **计算表头位置**:在滚动事件的回调函数中,我们需要...

    Boostrap table 列头和内容不对齐问题,终极解决方案

    6. **使用自定义修复**:如果以上方法都无法解决问题,可以考虑对 `bootstrap-table.js` 进行定制化修改。根据描述,你提供的压缩包中的 `bootstrap-table.js` 可能已经包含了这样的修复。你可以下载并替换原有的...

    js表头固定,固定table标题行

    本话题将深入探讨“js表头固定”这一技术,主要关注如何使用JavaScript和jQuery来实现固定table标题行的功能。 首先,我们来看"jquery表头固定"。jQuery是一个轻量级、功能丰富的JavaScript库,它简化了HTML文档...

    JS实现table表格固定表头且表头随横向滚动而滚动

    JS实现table表格固定表头且表头随横向滚动而滚动的知识点如下: 1. **基本思路**: - 表头采用一个独立的table元素,并用一个div进行包裹。 - 头部外层div使用相对定位(position: relative),以使表头能够相...

    jQuery.table_scroll插件将垂直和水平滚动条添加到HTML表格元素。-JavaScript开发

    Table Scroll在这里尝试-http://volodymyr-bobko.github.io/table-scroll/ jQuery.table_scroll插件将垂直和水平滚动条添加到HTML表格元素中。 具有垂直滚动功能。 水平滚动可能会窥视表格滚动在这里尝试-...

    js+实现+滚动的表格

    JavaScript(简称JS)是实现这一功能的关键,它是一种轻量级的解释型编程语言,广泛应用于网页和应用程序,特别是处理用户交互、浏览器端的动态内容和Ajax(异步JavaScript和XML)通信。 要创建一个滚动的表格,...

    table的行列冻结

    window.addEventListener('scroll', function() { var header = document.querySelector('thead'); header.style.top = window.pageYOffset + 'px'; }); ``` 对于冻结多列,可以创建一个与原始表格布局相同的浮动...

    react-infinite-scroll-table-example:一个不使用单个滚动事件侦听器的无限滚动表的示例

    该项目是通过引导的。可用脚本在项目目录中,可以运行:npm start 在开发模式下运行应用程序。 打开在浏览器中查看它。 如果您进行编辑,则页面将重新加载。 您还将在控制台中看到任何棉绒错误。...

    table 冻结列原型

    总之,"table冻结列原型"是一个实用的网页开发工具,涉及到CSS布局、JavaScript事件处理和DOM操作等多个方面。对于想要提升用户体验的开发者和设计师来说,理解和掌握这种技术是非常有价值的。通过深入学习和实践,...

    利用JS+CSS实现滚动表格数据展示

    下面将详细介绍如何通过JavaScript(JS)和层叠样式表(CSS)来实现这一功能。 首先,我们需要创建一个基本的HTML结构,包含一个`&lt;table&gt;`元素,用于展示数据。表格通常由`&lt;thead&gt;`(表头)、`&lt;tbody&gt;`(表格主体)...

Global site tag (gtag.js) - Google Analytics