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

📄 reports_kz.asp

📁 财务预算管理 财务支出
💻 ASP
字号:
<%@language=vbscript codepage=936 %>
<%
Option Explicit
%>
<!--#include file="sysconfig.asp"-->
<!--#include file="Inc/Function_1.asp"-->
<%
dim id,sql,sql_jh,sql_detail,sql_detail1,sqlguikou,rs,rsguikou,rs_jh,rs_detail,rs_detail1,guikou_id,totalput,sum_y,sum_j,sum_r
dim count_sum_y,count_sum_j,count_sum_r
guikou_id=Trim(request("guikou_id"))
totalput=0
dim strFileName
strFileName="reports_kz.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 "
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="1000" 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_kz.asp">所有单位</a>&nbsp;&nbsp;|&nbsp; 
            <%
'分类选择
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_kz.asp?guikou_id=" & rsguikou("id") & "'><font color='#FF0000'>" & rsguikou("guikou_name") & "</font></a> | ")
		else
		response.Write("<a href='reports_kz.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 height="25" bgcolor="#CCCCCC" class="t1"><a href="reports_kz.asp">&nbsp;所有单位</a> 
            &gt;&gt; 
            <%
	if guikou_id<>"" then
			set rsguikou=conn.execute("select * from guikou where cost_delete=0 and id="&guikou_id&"")
			response.write "<a href='reports_kz.asp?guikou_id=" & guikou_id & "'>" &rsguikou("guikou_name")& "</a>&nbsp;&nbsp;"
			else
				response.write "所有单位"
	end if
%>
            </td>
            
          <td width="150" bgcolor="#CCCCCC" class="t1">&nbsp; 
            <%
  	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="13%" height="24" align="center" bgcolor="#C0C0C0" ><strong>预算单位名称</strong></td>
          <td width="11%" align="center" bgcolor="#C0C0C0" ><strong>年初采购预算</strong></td>
          <td width="11%" align="center" bgcolor="#C0C0C0" ><strong>政府采购<br>
            计控制数</strong></td>
          <td width="11%" align="center" bgcolor="#C0C0C0" ><strong>申报采购<br>
            计划金额</strong></td>
          <td width="11%" align="center" bgcolor="#C0C0C0" ><strong>政府采购计划<br>
            下达函号</strong></td>
          <td width="11%" align="center" bgcolor="#C0C0C0" ><strong>采购计划<br>录入时间</strong></td>
          <td width="11%" align="center" bgcolor="#C0C0C0" ><strong>实际政府<br>
            采购金额</strong></td>
          <td width="11%" align="center" ><strong>政府采购<br>
            确认函号</strong></td>
        </tr>
        <%
		 count_sum_y=0
		  count_sum_j=0
		  count_sum_r=0
		  do while not rs.eof%>
		  
		  <% sum_y=0
		  id=rs("id")
		  sql_jh="select * from cost_jh where cost_delete=0 and danwei_id="&id 
		  Set rs_jh= Server.CreateObject("ADODB.Recordset")
          rs_jh.open sql_jh,conn,1,1
          if not(rs_jh.bof and rs_jh.eof) then
             do while not rs_jh.eof
             sum_y=sum_y+rs_jh("cost_number")
             rs_jh.movenext
             loop
          else
          end if
          rs_jh.close
          set rs_jh=nothing
  
        sum_j=0
	     sum_r=0
		  sql_detail="select * from cost_detail where cost_delete=0 and danwei_id="&id 
		  Set rs_detail= Server.CreateObject("ADODB.Recordset")
          rs_detail.open sql_detail,conn,1,1
          if not(rs_detail.bof and rs_detail.eof) then
             do while not rs_detail.eof
             sum_j=sum_j+rs_detail("cost_number_j")
	         sum_r=sum_r+rs_detail("cost_number_r")
             rs_detail.movenext
             loop
          else
          end if
          rs_detail.close
          set rs_detail=nothing
          %>
        <tr class="t1"> 
          <td width="13%" height="22" align="center" bgcolor="#E3E3E3"><%=rs("danwei_name")%> </td>
          <td width="11%" align="center" bgcolor="#E3E3E3"> <%=(sum_y/10000)%>万</td>
          <td width="11%" align="center" bgcolor="#E3E3E3"><%=(sum_y-sum_j)/10000%>万</td>
          <td width="11%" align="center" bgcolor="#E3E3E3"> <%=(sum_j/10000)%>万 </td>
          <td width="11%" align="center" bgcolor="#E3E3E3">&nbsp;</td>
          <td width="11%" align="center" bgcolor="#E3E3E3">&nbsp;</td>
          <td width="11%" align="center" bgcolor="#E3E3E3"><%=sum_r/10000%>万</td>
          <td width="11%" align="center" bgcolor="#E3E3E3">&nbsp;</td>
        </tr>
        <%
		  count_sum_y=count_sum_y+sum_y
		  count_sum_j=count_sum_j+sum_j
		  count_sum_r=count_sum_r+sum_r
       %>
	   <%'明细循环开始
	   sql_detail1="select * from cost_detail where cost_delete=0 and danwei_id="&id 
		  Set rs_detail1= Server.CreateObject("ADODB.Recordset")
          rs_detail1.open sql_detail1,conn,1,1
          if not(rs_detail1.bof and rs_detail1.eof) then
             do while not rs_detail1.eof%>
             
		       <tr class="t1"> 
          <td width="13%" height="22" align="center" bgcolor="#E3E3E3"> </td>
          <td width="11%" align="center" bgcolor="#E3E3E3">&nbsp;</td>
          <td width="11%" align="center" bgcolor="#E3E3E3"></td>
          <td width="11%" align="center" bgcolor="#E3E3E3"><%=rs_detail1("cost_number_j")%></td>
          <td width="11%" align="center" bgcolor="#E3E3E3">荆财采计[2008]<%=rs_detail1("cost_no_j")%>号</td>
          <td width="11%" align="center" bgcolor="#E3E3E3"><%= FormatDateTime(rs_detail1("UpdateTime_j"),2) %></td>
          <td width="11%" align="center" bgcolor="#E3E3E3"><%=rs_detail1("cost_number_r")%></td>
          <td width="11%" align="center" bgcolor="#E3E3E3">荆财采认[2008]<%=rs_detail1("cost_no_r")%>号</td>
        </tr>
			 <%rs_detail1.movenext
             loop
          else
          end if
           rs_detail1.close
          set rs_detail1=nothing
          %>
	<% rs.movenext
	     loop
        %>
        <tr bgcolor="#E3E3E3" class="t1"> 
          <td width="13%"> 
            <div align="center"><strong>合计</strong></div></td>
          <td width="11%"> <div align="center"><strong><%=count_sum_y%></strong></div></td>
          <td width="11%" bgcolor="#E3E3E3"><div align="center"><strong><%=count_sum_y-count_sum_r%></strong></div></td>
          <td width="11%" bgcolor="#E3E3E3"> <div align="center"><strong><%=count_sum_j%></strong></div></td>
          <td width="11%">&nbsp;</td>
          <td width="11%">&nbsp;</td>
          <td width="11%"> <div align="center"><strong><%=count_sum_r%></strong></div></td>
          <td width="11%"> <div align="center"></div></td>
        </tr>
        <tr bgcolor="#E3E3E3" class="t1" > 
          <td 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 height="25" align="center" >&nbsp;</td>
          <td align="center" >&nbsp;</td>
          <td height="25" align="center" >制表人:<%=Session("username")%></td>
          <td align="center" >&nbsp;</td>
          <td align="center" >&nbsp;</td>
          <td height="25" align="center" >&nbsp;</td>
          <td height="25" align="center" >时间<%=month(now())%>月<%=day(now())%>日</td>
        </tr>
      </table>
        <%
   end if 
%>
      <br>
      <BR>
		</td>
	</tr>

</table>
<!--#include file="print.asp"-->
<BR>
<%
call htmlend
rs.close
set rs=nothing  
call CloseConn()
%>

⌨️ 快捷键说明

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