---
title: "js scoll table "
author: "superyang"
date: "2013-01-11T13:40:55Z"
tags: []
categories: ["Web前端"]
slug: "js-scoll-table"
draft: false
lastmod: "2013-02-26T14:02:34Z"
id: 1768169
url: "https://superyang.iteye.com/blog/1768169"
---

<%@ 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.offsetHeight)?(this.children.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);                            
                       }
                       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).scrollHeight;
          nScrollTop = $(this).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;
		//alert(userName);
	    document.getElementById(userName).value=rets;
	}
}


 


//项目关联
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 = $(':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>