Out_Detail.asp
上传用户:apresys
上传日期:2021-03-30
资源大小:813k
文件大小:4k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  5. <link href="css/main.css" rel="stylesheet" type="text/css">
  6. <title>出库配件汇总表</title>
  7. <!--media=print 这个属性可以在打印时有效--> 
  8. <style media=print> 
  9. .Noprint{display:none;} 
  10. .PageNext{page-break-after: always;} 
  11. </style>
  12. </head>
  13. <body leftmargin="30" topmargin="20">
  14. <%
  15. dim SeachModel
  16. SeachModel=request.Form("SeachModel")
  17. pinming=trim(request.Form("pinming"))
  18. use_dep=request.Form("use_dep")
  19. class1=request.Form("class")
  20. guige=request.Form("guige")
  21. storage=request.form("storage")
  22. uptime=cstr(trim(request.form("uptime")))
  23. uptime1=cstr(trim(request.form("uptime1")))
  24. end_time=cstr(trim(request.form("end_time")))
  25. end_time1=cstr(trim(request.form("end_time1")))
  26. '查询代码开始
  27. names=Split(SeachModel,", ")
  28. i=0
  29. sql="select * from out_Store where"
  30. for each name in names
  31. if names(i)="1" then
  32. sql=sql+" and class = '"&class1&"'"
  33. end if
  34. if names(i)="5" then
  35. sql=sql+" and uptime  between  #"&uptime&"# and #"&uptime1&"#"
  36. end if
  37. if names(i)="6" then
  38. sql=sql+" and end_time  between  #"&end_time&"# and #"&end_time1&"#"
  39. end if
  40. if names(i)="2" then
  41. sql=sql+" and pinming like '%"&pinming&"%'"
  42. end if
  43. if names(i)="4" then
  44. sql=sql+" and use_dep = '"&use_dep&"'"
  45. end if
  46. if names(i)="3" then
  47. sql=sql+" and guige = '"&guige&"'"
  48. end if
  49. if names(i)="7" then
  50. sql=sql+" and storage = '"&storage&"'"
  51. end if
  52. i=i+1
  53. next
  54. sql=sql+" order by -id"
  55. set rs=server.createobject("adodb.recordset")
  56. sql=Replace(sql, "where and", "where")
  57. %><br />
  58. <table width="920" border="1" cellpadding="0" cellspacing="0" bgcolor="#ffffff"  bordercolor="#000000">
  59.           <tr><td height="35" colspan="11" align="center"><font size="4" face="黑体"><b>出库材料汇总明细</b></font></td></tr>
  60.   <tr> 
  61.             <td width="70" height="22" align="center" >出库日期</td>
  62.             <td width="100" align="center" >类 别</td>
  63.             <td width="120" align="center" >配件名称</td>
  64.             <td width="100" align="center" >车 型</td>
  65.             <td width="40" align="center" >单 位</td>
  66. <td width="80" align="center" >领用部门</td>
  67. <td width="80" align="center" >销售单价</td>
  68. <td width="80" align="center" >数量</td>
  69. <td width="80" align="center" >销售金额</td>
  70. <td width="70" align="center" >结帐日期</td>
  71. <td width="100" align="center">备 注</td>
  72.           </tr>
  73.           
  74.                   <% 
  75.   dim i
  76.   i=0
  77.   Loan_num=0
  78.   Loan_Amount=0
  79.          rs.open sql,conn,1,1
  80.  if rs.eof and rs.bof then
  81. response.write "<tr><td><br><br><center>还没有符合条件的查询!</center><br><br></td></tr>"
  82. else
  83.  do while not rs.eof
  84.  i=i+1
  85.    %>
  86.                   <tr><td height="18" width="10%" align="center" ><%=rs("uptime")%></td>
  87. <td height="22" align="center" ><%=rs("class")%><%if rs("class")="" then%>&nbsp;<%end if%></td>
  88. <td >&nbsp;<%=rs("pinming")%></td>
  89. <td  align="center">&nbsp;<%=rs("guige")%></td>
  90. <td align="center"><%=rs("Unit")%><%if rs("Unit")="" then%>&nbsp;<%end if%></td>
  91. <td  >&nbsp;<%=rs("use_dep")%></td>
  92. <td  align="right" ><%=rs("Loan_price")%>&nbsp;</td>
  93. <td  align="right"><%=rs("Loan_num")%>&nbsp;</td>
  94. <td  align="right"><%=rs("Loan_Amount")%>&nbsp;</td>
  95. <td >&nbsp;<%if rs("end_time")="1980-1-1" then%><font color="#FF0000">未结帐</font><%else%><%=rs("end_time")%><%end if%></td>
  96. <td>&nbsp;<%=rs("content")%></td>
  97. </tr>
  98.   
  99.                   <%
  100. Loan_num=Loan_num+rs("Loan_num")
  101. Loan_Amount=Loan_Amount+rs("Loan_Amount")
  102. rs.movenext
  103. loop
  104. end if
  105. %>
  106.                    <tr><td colspan="6" height="30"> 符合查询条件的出库记录总共为 <font color="#cc0000"><%=i%></font> 条</td><td  align="right">总计:</td><td align="right"><%=Loan_num%>&nbsp;</td><td align="right"><%=Loan_Amount%>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
  107. </table>
  108. <table>
  109. <tr><td height="30" colspan="10" align="center"><OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0 VIEWASTEXT> 
  110. </OBJECT> 
  111. <input type=button value=打印 onClick="document.all.WebBrowser.ExecWB(6,1)" class="NOPRINT"> 
  112. <input type=button value=直接打印 onClick="document.all.WebBrowser.ExecWB(6,6)" class="NOPRINT"> 
  113. <input type=button value=页面设置 onClick="document.all.WebBrowser.ExecWB(8,1)" class="NOPRINT"> 
  114. <input type=button value=打印预览 onClick="document.all.WebBrowser.ExecWB(7,1)" class="NOPRINT">
  115. </td></tr>
  116. </table>
  117. </body>
  118. </html>