⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 projectstat4_list.asp

📁 ASP程序实现的科技期刊系统
💻 ASP
字号:
<!--#include file="../Include/AdoConn.asp"-->
<!--#include file="../Include/online.asp"-->
<%
dim WhereProjectJD
'根据查询界面,生成where选项。
select case trim(Request.Form ("ProjectJD"))
case ""
	WhereProjectJD=" and 项目进度<>'申报'"
case "申报"
	WhereProjectJD=" and (项目进度='推荐' or 项目进度='接收')"
case "初审"
	WhereProjectJD=" and 项目进度='初审'"
case "专家论证"
	WhereProjectJD=" and 项目进度='初审'"
case "立项"
	WhereProjectJD=" and 项目进度='立项'"
end select

	'创建一记录集
	set objres=server.CreateObject ("adodb.recordset")
	objres.CursorType =3
	objres.CursorLocation =3
	objres.LockType =2

	role=trim(Request.Form("role"))
	'根据角色生成where选项
	select case role
		case 0 '系统维护员
		strSQLWhere=""
		case 1 '申报者
		strSQLWhere=" and 项目负责人='"&session("usercode")&"'"
		case 2 '主管部门
		strSQLWhere=" and left(项目负责人,3)='"&left(session("usercode"),3)&"'"
		case 3 '项目计划员
		strSQLWhere=""
		case 4 '项目管理员
		strSQLWhere=" and 分配接收处室='"&session("Departcode")&"'"
		case 5 '项目拨款员
		strSQLWhere=" and 合同编码<>''"
		case 6 '部门领导
		strSQLWhere=""
	end select
		
	dim ProjectType'所有项目类别
	ProjectType=array("标题","11","12","21","22","23","31","32","33","34","41","42","43","44","45","46","47","48","总计")

	'根据form选择的表生成列标题,及sql语句
	dim rol'列标题
	rol=array("合计金额","无偿","贴息","有偿")
	rol_display=array("合计金额","无偿","贴息","有偿","项目数量","平均额度")

	redim stat(ubound(ProjectType),ubound(rol)+2)'统计值,加2为,"项目数量","平均额度"
	'初始化
	for i=0 to ubound(stat,1)
		for j=0 to ubound(stat,2)
			stat(i,j)=0
		next
	next	
	for i=0 to ubound(rol_display)
		stat(0,i)=rol_display(i)
	next
	
	'打开记录集
	dim strsql
	strsql="select 项目类别,申请经费总额,无偿,贴息,有偿 from xt_vd_ProjectStat where 1=1 "&strSQLWhere&whereProjectJD&" order by 项目类别"
	objres.Open strsql,strconn
	
	
if not objres.EOF then
	for r=1 to objres.RecordCount
		for i=1 to ubound(ProjectType)-1'每条记录与行标题比较,减一为去掉总计行
			if objres(0)=ProjectType(i) then'确定哪行
					for j=0 to ubound(rol)'
							stat(i,j)=stat(i,j)+clng(objres(j+1))'经费总额,无偿,有偿,贴息
							stat(ubound(stat,1),j)=stat(ubound(stat,1),j)+clng(objres(j+1))'纵向合计
					next
					stat(i,ubound(rol)+1)=stat(i,ubound(rol)+1)+1'项目数加1
					stat(i,ubound(rol)+2)=stat(i,0)/stat(i,ubound(rol)+1)'平均额度,即总额除项目数
					stat(ubound(Stat,1),ubound(rol)+1)=stat(ubound(Stat,1),ubound(rol)+1)+1'项目总数
					Stat(ubound(Stat,1),Ubound(Stat,2))=Stat(ubound(Stat,1),0)/stat(ubound(stat,1),ubound(rol)+1)'总计除项目数的平均额度
			end if
		next
	objres.MoveNext
	next
end if
objres.Close

%>
<html>
<head>
<title>项目列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/CssLib/CssLink.css">

</head>
<body bgcolor="#FFFFFF" text="#000000" onload="window.top.ProjectMax()">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      
    <td width="457" align="center"><img src="images/STAT4.gif" width="378" height="25"> 
      (单位:万元)</td>
      <td width="50"> 
        
      <div align="center"><a href="../Project/ProjectStat_Query.asp"><img src="../public/images/query.gif" width="24" height="18" border="0"></a><a href="../Project/ProjectStat_Query.asp><img src="../public/images/query.gif" width="24" height="18" border="0"><br>
        </a> <font color="#003399">查询</font></div>
      </td>
    </tr>
  </table>


  
<table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#006699">
  <tr bordercolor="#0099FF" align="center"> 
    <td colspan="2" bgcolor="#FFFFFF"> 
      <table border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#006699" width="100%">
        <tr bordercolor="#0099FF" align="center" bgcolor="#6699CC"> 
          <td height="30" width="80"><font color="#FFFFFF">计划类别</font></td>
          <td height="30" width="80"><font color="#FFFFFF">计划层次</font></td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="2" height="17" bgcolor="#FFFFFF" width="80">应用开发</td>
          <td height="16" bgcolor="#FFFFFF" width="80">重点</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">启动</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="3" height="16" bgcolor="#FFFFFF" width="80">科技攻关</td>
          <td height="16" bgcolor="#FFFFFF" width="80">重大 </td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">重点</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">一般</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="4" height="16" bgcolor="#FFFFFF" width="80">产业化</td>
          <td height="16" bgcolor="#FFFFFF" width="80">重大</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">重点</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">一般</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">专利</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td rowspan="8" height="16" bgcolor="#FFFFFF" width="80">创新条件与<br>
            环境建设</td>
          <td height="16" bgcolor="#FFFFFF" width="80">中介服务</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">国际合作</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">工程中心</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">重点实验室</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">企业孵化器</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">软科学</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">科学普及</td>
        </tr>
        <tr bordercolor="#0099FF" bgcolor="#FFFFFF" align="center"> 
          <td height="16" width="80">其他</td>
        </tr>
        <tr bordercolor="#0099FF" align="center"> 
          <td height="16" bgcolor="#FFFFFF" width="80">&nbsp;</td>
          <td height="16" bgcolor="#FFFFFF" width="80">总计</td>
        </tr>
      </table>
    </td>
    <td  height="325"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="0" bordercolor="#0099FF" align="center" bgcolor="#006699">
        <%for i=0 to ubound(stat,1) %>
        <tr align="center"> 
          <%for j=0 to ubound(stat,2)%>
          <%if i=0 then%>
          <td bgcolor="#6699CC" width="80" height="30"> 
            <%if Stat(i,j)<>"0" then response.write "<font color='#ffffff'>"&stat(i,j)&"</font>" end if%>
            <%else%>
          <td  bgcolor="#FFFFFF" width="80" height="16"> 
            <%if Stat(i,j)<>"0" then 
				if j<>ubound(stat,2) then response.write Stat(i,j) else Response.Write formatNumber(Stat(i,j),2) end if
              end if%>
            <%end if%>
          </td>
          <%next%>
        </tr>
        <%next%>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -