📄 reports_zx.asp
字号:
<%@language=vbscript codepage=936 %>
<%
Option Explicit
%>
<!--#include file="sysconfig.asp"-->
<!--#include file="Inc/Function_1.asp"-->
<%
dim id,sql,sql_jh,sql_detail,sqlguikou,rs,rsguikou,rs_jh,rs_detail,guikou_id,totalput
dim cost_number_j,cost_number_r,jye,jzl
guikou_id=Trim(request("guikou_id"))
totalput=0
dim strFileName
strFileName="reports_zx.asp?guikou_id=" & guikou_id
sql="select * from danwei where cost_delete=0"
if guikou_id<>"" then
sql=sql & " and guikou_id='" & guikou_id & "'"
end if
sql=sql & " order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
totalPut=rs.recordcount
%>
<!-- #include file="Inc/Head.asp" -->
<table cellpadding="2" cellspacing="1" border="0" align="center" class="a2">
<tr>
<td width="783" height="25" align="center" class="a1"><strong>报 表 管 理 </strong></td>
</tr>
<tr class="a4">
<td align="center">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="2" class="border">
<tr class="title">
<td height="25" bgcolor="#C0C0C0" class="t1"><a href="reports_zx.asp">所有单位汇总表</a> |
<%
'分类选择
sqlguikou="select * from guikou where cost_delete=0"
Set rsguikou= Server.CreateObject("ADODB.Recordset")
rsguikou.open sqlguikou,conn,1,1
if rsguikou.eof then
response.Write("还没有任何归口,请首先添加归口。")
end if
do while not rsguikou.eof
if rsguikou("id")=guikou_id then
response.Write("<a href='reports_zx.asp?guikou_id=" & rsguikou("id") & "'><font color='#FF0000'>" & rsguikou("guikou_name") & "</font></a> | ")
else
response.Write("<a href='reports_zx.asp?guikou_id=" & rsguikou("id") & "'>" & rsguikou("guikou_name") & "</a> | ")
end if
rsguikou.movenext
loop
rsguikou.close
set rsguikou=nothing
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="2">
<tr>
<td bgcolor="#CCCCCC" class="t1"><a href="reports_zx.asp"> 所有单位汇总表</a>
>>
<%
if guikou_id<>"" then
set rsguikou=conn.execute("select * from guikou where cost_delete=0 and id="&guikou_id&"")
response.write "<a href='reports_zx.asp?guikou_id=" & guikou_id & "'>" &rsguikou("guikou_name")& "</a> "
else
response.write "所有单位"
end if
%>
</td>
<td width="150" bgcolor="#CCCCCC" class="t1">
<%
if rs.eof and rs.bof then
response.write "共有 0 个单位</td></tr></table>"
else
response.Write "共找到 " & totalPut & " 个单位"
%>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="border">
<tr bgcolor="#C0C0C0" class="title">
<td height="25" colspan="5" align="center" bgcolor="#C0C0C0" class="t1" ><strong>荆州市市直部门政府采购执行报表
<input type="hidden" name="out_word3" onclick="vbscript:buildDoc" value="导出到word" class="notPrint">
<input type="hidden" name="out_excel2" onclick="AutomateExcel();" value="导出到excel" class="notPrint">
<input name="out_excel12" type="button" class="notPrint" id="out_excel12" onclick="javascript:AutomateExcel() " value="打印到excel">
<input type="button" name="out_word22" onclick="vbscript:buildDoc" value="打印到word" class="notPrint">
</strong></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="border" id="reports" >
<tr bgcolor="#C0C0C0" class="t1">
<td width="28%" height="25" align="center" bgcolor="#C0C0C0" ><strong>单位名称</strong></td>
<td width="12%" align="center" bgcolor="#C0C0C0" ><strong>政府采购计划</strong></td>
<td width="12%" align="center" bgcolor="#C0C0C0" ><strong>实际政府<br>
采购金额</strong></td>
<td width="12%" align="center" bgcolor="#C0C0C0" ><strong>节约额</strong></td>
<td width="6%" align="center" ><strong>节支率</strong></td>
<td width="18%" align="center" ><strong>政府采购<br>
计划函号</strong></td>
<td width="12%" align="center" ><strong>录入时间</strong></td>
</tr>
<% do while not rs.eof
id=rs("id")
cost_number_j=0
cost_number_r=0
jye=0
jzl=0
sql_detail="select * from cost_detail where danwei_id="&id
Set rs_detail= Server.CreateObject("ADODB.Recordset")
rs_detail.open sql_detail,conn,1,1
do while not rs_detail.eof
cost_number_j=+rs_detail("cost_number_j")
cost_number_r=+rs_detail("cost_number_r")
jye=cost_number_j-cost_number_r
jzl=jye/cost_number_j*100
%>
<tr class="t1">
<td width="28%" height="22" align="center" bgcolor="#E3E3E3"><%=rs("danwei_name")%> </td>
<td width="12%" align="center" bgcolor="#E3E3E3"><%=rs_detail("cost_number_j")%>
</td>
<td width="12%" align="center" bgcolor="#E3E3E3"><%=rs_detail("cost_number_r")%>
</td>
<td width="12%" align="center" bgcolor="#E3E3E3"><%=jye%></td>
<td width="6%" align="center" bgcolor="#E3E3E3"><%=jzl%>%</td>
<td width="18%" align="center" bgcolor="#E3E3E3">荆财采计[2008]<%=rs_detail("cost_no_j")%>号</td>
<td width="12%" align="center" bgcolor="#E3E3E3"><%= FormatDateTime(rs_detail("UpdateTime_r"),2) %></td>
</tr>
<% rs_detail.movenext
loop
rs_detail.close
set rs_detail=nothing
rs.movenext
loop
%>
<%' <tr bgcolor="#E3E3E3" class="t1">
'<td width="28%">
' <div align="center"><strong>合计</strong></div></td>
'<td width="12%">
'<div align="center"><strong></strong></div></td>
' <td width="12%" bgcolor="#E3E3E3">
' <div align="center"><strong></strong></div></td>
' <td width="12%">
' <div align="center"><strong></strong></div></td>
' <td width="6%">
' <div align="center"></div></td>
' <td width="18%"> </td>
' <td width="12%"> </td>
'</tr>
%>
<tr bgcolor="#E3E3E3" class="t1" >
<td width="28%" height="25" align="center" >内容:
<%if guikou_id<>"" then
set rsguikou=conn.execute("select * from guikou where cost_delete=0 and id="&guikou_id&"")
response.write rsguikou("guikou_name")
else
response.write "所有单位"
end if
%> </td>
<td width="12%" height="25" align="center" > </td>
<td width="12%" height="25" align="center" >制表人:</td>
<td width="12%" height="25" align="center" ><%=Session("username")%></td>
<td width="6%" height="25" align="center" > </td>
<td width="18%" align="center" >制表时间:</td>
<td width="12%" align="center" ><%=month(now())%>月<%=day(now())%>日</td>
</tr>
</table>
<%
end if
%>
<br>
<BR>
</td>
</tr>
</table>
<BR>
<!--#include file="print.asp"-->
<%
call htmlend
rs.close
set rs=nothing
call CloseConn()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -