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

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

开发平台:

DOS

  1. <!--#include file="conn.asp"-->
  2. <!--#include file="top.asp"-->
  3. <!--#include file="checkuser.asp"-->
  4. <head>
  5. <style type="text/css">
  6. <!--
  7. .select {
  8. color: #FFFFFF;
  9. background-color: #08246b;
  10. }
  11. .offline {
  12. filter: Gray;
  13. }
  14. -->
  15. </style>
  16. <title>查找结果</title>
  17. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  18. <link href="css/main.css" rel="stylesheet" type="text/css">
  19. <SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>
  20. </head>
  21. <body >
  22.   <table width="100%" border="1" cellspacing="0" bordercolor="#D6D3CE">
  23.   <tr><td align="center">
  24.   <%if request("action")<>"search" then%>
  25. <fieldset style="width:95%"><legend>详细入库信息查询</legend>
  26. <table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
  27. <form name="powersearch" method="post" action="In_Compiles.asp?action=search" >
  28.   <tr><td width="20%" height="30" ><input type="checkbox" name="SeachModel"   value=1>按分类</td><td>
  29.   <select name='class'  style='width:130'>
  30. <option selected value="">请选择类别</option>
  31. <%
  32. set rs1=server.createobject("adodb.recordset")
  33.    rs1.open "select * from class",conn,1,1
  34.    if not rs1.eof then
  35.    do while not rs1.eof
  36. %>
  37. <option value="<%=rs1("classnumber")%>"><%=rs1("classnumber")%></option>
  38. <%
  39. rs1.movenext
  40. loop
  41. end if
  42. rs1.close
  43. set rs1=nothing
  44. %></select></td><td width="20%"><input type="checkbox" name="SeachModel"   value=2>
  45. 按配件名称</td>
  46. <td width="30%">
  47. <input name="pinming" type="text"  size="20">
  48. </td>
  49. </tr>
  50. <tr><td height="30" >
  51. <input type="checkbox" name="SeachModel"   value=3>
  52. 按车型</td>
  53.   <td><input name="guige" type="text"  size="20"></td>
  54.  
  55.   <td><input type="checkbox" name=SeachModel   value=4>按供应商</td>
  56.             <td><select name="Supplier"   style='width:130'>
  57. <%
  58.  set rs=server.createobject("adodb.recordset")
  59. sql="select * from Supplier"
  60. rs.open sql,conn,1,1
  61. if not rs.eof then
  62. do while not rs.eof
  63. %>
  64. <option value="<%=rs("Supplier_name")%>"><%=rs("Supplier_name")%></option>
  65. <%
  66. rs.movenext
  67. loop
  68. rs.close
  69. set rs=nothing
  70. end if 
  71. %>
  72. </select>
  73.             </td>
  74.           </tr>
  75.  
  76. <tr><td  height="30" ><input type="checkbox" name=SeachModel value=5>按入库日期</td><td ><INPUT  name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>"  size="8"> 到 <INPUT  name="uptime1" onFocus="show_cele_date(uptime1,'','',uptime1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>"  size="8"></td><td  height="30" ><input type="checkbox" name=SeachModel value=6>按结帐日期</td><td ><INPUT  name="end_time" onFocus="show_cele_date(end_time,'','',end_time)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>"  size="8"> 到 <INPUT  name="end_time1" onFocus="show_cele_date(end_time1,'','',end_time1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>"  size="8"></td></tr>
  77. <tr><td><input type="checkbox" name=SeachModel   value=7>按仓库</td>
  78.             <td><select name='storage'  style='width:130'>
  79. <%
  80. set rs1=server.createobject("adodb.recordset")
  81.    rs1.open "select * from storage  order by storage",conn,1,1
  82.    if not rs1.eof then
  83.    do while not rs1.eof
  84. %>
  85. <option value="<%=rs1("storage")%>"><%=rs1("storage")%></option>
  86. <%
  87. rs1.movenext
  88. loop
  89. end if
  90. rs1.close
  91. set rs1=nothing
  92. %></select>
  93.             </td><td align="center" height="30" colspan="2"><input type="submit" name="Submit" value="查询" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查询"></td></tr>
  94. </form>
  95. </table> </fieldset><br>
  96. <br>
  97. <fieldset style="width:95%"><legend>单月入库汇总查询</legend>
  98. <table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
  99. <form name="powersearch" method="post" action="In_Compiles1.asp?action=search" >
  100. <tr><td  height="30"  width="30%" align="center">选择查询日期(1个自然月) </td><td  width="30%"> <INPUT  name="end_time" onFocus="show_cele_date(end_time,'','',end_time)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>"  size="10"> 到 <INPUT  name="end_time1" onFocus="show_cele_date(end_time1,'','',end_time1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>"  size="10"></td><td  height="30"  width="40%"><input type="submit" name="Submit" value="查询" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查询"> * 如:2006年8月则选择2006-8-1到2006-8-31</td></tr>
  101. </form>
  102. </table> </fieldset>
  103. <br>
  104. <br>
  105. <fieldset style="width:95%"><legend>年度入库汇总查询</legend>
  106. <table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
  107. <form name="powersearch" method="post" action="In_Compiles2.asp?action=search" >
  108. <tr><td  height="30"  width="30%" align="center">请输入查询年份 </td><td  width="30%"> <INPUT  name="nian"  value="<%=year(now())%>" onKeyUp="value=value.replace(/[^d.]/g,'')" maxlength="4" size="6"> </td><td  height="30"  width="40%"><input type="submit" name="Submit" value="查询" style="font-size: 9pt;  color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查询"></td></tr>
  109. </form>
  110. </table> </fieldset>
  111. <%else%>
  112. <%
  113. dim SeachModel
  114. SeachModel=request.form("SeachModel")
  115. pinming=trim(request.form("pinming"))
  116. Supplier=request.form("Supplier")
  117. class1=request.form("class")
  118. guige=request.form("guige")
  119. storage=request.form("storage")
  120. uptime=cstr(trim(request.form("uptime")))
  121. uptime1=cstr(trim(request.form("uptime1")))
  122. end_time=cstr(trim(request.form("end_time")))
  123. end_time1=cstr(trim(request.form("end_time1")))
  124. '查询代码开始
  125. names=Split(SeachModel,", ")
  126. i=0
  127. sql="select * from In_Store where"
  128. for each name in names
  129. if names(i)="1" then
  130. sql=sql+" and class = '"&class1&"'"
  131. end if
  132. if names(i)="5" then
  133. sql=sql+" and uptime  between  #"&uptime&"# and #"&uptime1&"#"
  134. end if
  135. if names(i)="6" then
  136. sql=sql+" and end_time  between  #"&end_time&"# and #"&end_time1&"#"
  137. end if
  138. if names(i)="2" then
  139. sql=sql+" and pinming like '%"&pinming&"%'"
  140. end if
  141. if names(i)="4" then
  142. sql=sql+" and Supplier = '"&Supplier&"'"
  143. end if
  144. if names(i)="3" then
  145. sql=sql+" and guige = '"&guige&"'"
  146. end if
  147. if names(i)="7" then
  148. sql=sql+" and storage = '"&storage&"'"
  149. end if
  150. i=i+1
  151. next
  152. sql=sql+" order by -id"
  153. set rs=server.createobject("adodb.recordset")
  154. sql=Replace(sql, "where and", "where")
  155. %>
  156. <table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#D4D0C8" class="tddown">
  157.           <tr class="but"> 
  158.             <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">日期</td>
  159.             <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">类 别</td>
  160.             <td width="12%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">配件名称</td>
  161.             <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">车 型</td>
  162.             <td width="5%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">单 位</td>
  163. <td width="18%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">供应商</td>
  164. <td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">采购单价</td>
  165. <td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">数 量</td>
  166. <td width="9%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">总金额</td>
  167. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">结帐日期</td>
  168.           </tr>
  169.           <tr valign="top" bgcolor="#FFFFFF"> 
  170.             <td colspan="12" align="center" class="iframe"> 
  171.                 <table width="100%" border="0" cellpadding="0" cellspacing="0" class="mouse">
  172.                   <% 
  173.   dim i
  174.   i=0
  175.   use_num=0
  176.   use_Amount=0
  177.          rs.open sql,conn,1,1
  178.  if rs.eof and rs.bof then
  179. response.write "<tr><td><br><br><center>还没有符合条件的查询!</center><br><br></td></tr>"
  180. else
  181.  do while not rs.eof
  182.  i=i+1
  183.    %>
  184.                   <tr><td height="18" width="10%" align="center" ><a href="In_Store.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("uptime")%></a></td>
  185. <td height="18" width="10%" align="center" ><font color="#CC3300"><%=rs("class")%></font><%if rs("class")="" then%>&nbsp;<%end if%></td>
  186. <td height="18" width="12%">&nbsp;<a href="In_Store.Asp?id=<%=rs("ID")%>&action=edit"><font color="#000099"><%=rs("pinming")%></font></a></td>
  187. <td height="18" width="10%" align="center">&nbsp;<%=rs("guige")%></td>
  188. <td height="18" width="5%" align="center"><font color="#009900"><%=rs("Unit")%></font><%if rs("Unit")="" then%>&nbsp;<%end if%></td>
  189. <td height="18"  width="18%" >&nbsp;<font color="#666666"><%=rs("Supplier")%></font></td>
  190. <td height="18" width="8%" align="right" ><font color="#FF0000"><%=rs("use_price")%></font><%if rs("use_price")="" then%>&nbsp;<%end if%></td>
  191. <td height="18" width="8%" align="right"><%=rs("use_num")%>&nbsp;</td>
  192. <td height="18" width="9%" align="right"><font color="#FF6600"><%=rs("use_Amount")%></font>&nbsp;</td>
  193. <td height="18" width="10%" align="center"><%if rs("end_time")="1980-1-1" then%><font color="#FF0000">未结帐</font><%else%><%=rs("end_time")%><%end if%></td>
  194. </tr>
  195.   
  196.                   <%
  197. use_num=use_num+rs("use_num")
  198. use_Amount=use_Amount+rs("use_Amount")
  199. rs.movenext
  200. loop
  201. end if
  202. %>
  203.                    <tr><td colspan="6" height="30">  符合查询条件的入库记录总共为 <font color="#cc0000"><%=i%></font> 条</td><td  align="right">总计:</td><td align="right"><font color="#cc0000"><%=use_num%></font></td><td align="right"><font color="#cc0000"><%=use_Amount%></font></td></tr>
  204. </table>
  205.               </td>
  206.           </tr>
  207.         </table>
  208. <br>
  209. <table cellpadding="0">
  210. <form name="search" method="post" action="In_Detail.asp" target="_blank" >
  211.   <tr><td>
  212.   <input name="SeachModel" type="hidden" value="<%=SeachModel%>">
  213.   <input name="pinming" type="hidden" value="<%=pinming%>">
  214.   <input name="class" type="hidden" value="<%=class1%>">
  215.   <input name="guige" type="hidden" value="<%=guige%>">
  216.   <input name="Supplier" type="hidden" value="<%=Supplier%>">
  217.   <input name="storage" type="hidden" value="<%=storage%>">
  218.   <input name="uptime" type="hidden" value="<%=uptime%>">
  219.   <input name="uptime1" type="hidden" value="<%=uptime1%>">
  220.   <input name="end_time" type="hidden" value="<%=end_time%>">
  221.   <input name="end_time1" type="hidden" value="<%=end_time1%>">
  222.   <input type="submit" name="sub"  value="生成明细表"></td></tr></form></table>
  223. <%end if%>
  224. </TD></TR>
  225.   </table>
  226. </body>
  227. </html>
  228. <!--#include file="footer.htm"--></TD>
  229.  </BODY></HTML>