out_store.asp
Upload User: apresys
Upload Date: 2021-03-30
Package Size: 813k
Code Size: 26k
Development Platform:

DOS

  1. <!--#include file="conn.asp"-->
  2. <!--#include file="checkuser.asp"-->
  3. <html>
  4. <head>
  5. <title>∷汽车4S店配件仓储管理系统:.</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  7. <link href="css/main.css" rel="stylesheet" type="text/css">
  8. <SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>
  9. <style type="text/css">
  10. <!--
  11. td {  font-family: "宋体"; font-size: 9pt}
  12. body {  font-family: "宋体"; font-size: 9pt}
  13. select {  font-family: "宋体"; font-size: 9pt}
  14. A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
  15. A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt} 
  16. -->
  17. </style>
  18. <SCRIPT LANGUAGE=javascript>
  19. <!--
  20. function Juge(powersearch)
  21. {
  22. if (powersearch.pinming.value == "")
  23. {
  24. alert("名称不能为空!");
  25. powersearch.pinming.focus();
  26. return (false);
  27. }
  28. }
  29. function SelectAll() {
  30. for (var i=0;i<document.selform.selBigClass.length;i++) {
  31. var e=document.selform.selBigClass[i];
  32. e.checked=!e.checked;
  33. }
  34. }
  35. //-->
  36. </script>
  37. <script>
  38.   var po_ca_show = new Array();
  39.   var po_ca_value = new Array();
  40.   var po_detail_show = new Array();
  41.   var po_detail_value = new Array();
  42.   var funtype1;
  43. //Modified by Ryan Gao 2006-03-30 16:01:09
  44. <%
  45. i=0
  46. set rs1=server.createobject("adodb.recordset")
  47. rs1.open "select * from class",conn,1,1
  48. if not rs1.eof then   
  49. do while not rs1.eof
  50. j=0
  51. %>
  52. po_ca_show[<%=i%>] = '<%=rs1("classnumber")%>';
  53. po_ca_value[<%=i%>] = '<%=rs1("classnumber")%>';
  54. po_detail_show[<%=i%>] = new Array();
  55. po_detail_value[<%=i%>] = new Array();
  56. <%
  57. classnumber=rs1("classnumber")
  58. set rs2=server.createobject("adodb.recordset")
  59. rs2.open "select * from store where class='"&classnumber&"' order by pinming",conn,1,1
  60. if not rs2.eof then   
  61. do while not rs2.eof
  62. %>
  63. po_detail_show[<%=i%>][<%=j%>] = '<%=rs2("pinming")%> | <%=rs2("guige")%> | <%=rs2("number")%> | <%=rs2("price")%> | <%=rs2("unit")%>';
  64. po_detail_value[<%=i%>][<%=j%>] = '<%=rs2("id")%>|<%=rs2("Material_id")%>';
  65. <%
  66. rs2.movenext
  67. j=j+1
  68. loop
  69. else
  70. %>
  71. po_detail_show[<%=i%>][<%=j%>] = '此类暂无材料';
  72. po_detail_value[<%=i%>][<%=j%>] = '';
  73. <%
  74. end if
  75. rs2.close
  76. set rs2=nothing
  77. %>
  78. <%
  79. rs1.movenext
  80. i=i+1
  81. loop
  82. end if
  83. rs1.close
  84. set rs1=nothing
  85. %>
  86. </script>
  87. <script Language="JavaScript">
  88. var psid="";
  89. function DoLoad(form,funtypev){
  90.         var n;
  91.         var i,j,k;
  92.         var num;
  93.         num= GetObjID('funtype[]');
  94.         num1= GetObjID('pinming');
  95.         if (!funtypev)
  96.            return;
  97.         k=0;
  98.         for (i=0;i<po_ca_show.length;i++) {
  99.          for(j = 0; j < po_detail_value[i].length; j++){
  100.                 if(funtypev.indexOf(po_detail_value[i][j])!=-1) {
  101.                     NewOptionName = new Option(po_detail_show[i][j], po_detail_value[i][j]);
  102.                     form.elements[num].options[k] = NewOptionName;
  103.                     k++;
  104.                     }
  105.          }
  106.         }
  107. }
  108. function Do_po_Change(form){
  109.         var num,n, i, m;
  110.         num= GetObjID('d_position1');
  111.         m = document.powersearch.elements[num].selectedIndex-1;
  112.         n = document.powersearch.elements[num + 1].length;
  113.         for(i = n - 1; i >= 0; i--)
  114.                 document.powersearch.elements[num + 1].options[i] = null;
  115.         if (m>=0) {
  116.         for(i = 0; i < po_detail_show[m].length; i++){
  117.                 NewOptionName = new Option(po_detail_show[m][i], po_detail_value[m][i]);
  118.                 document.powersearch.elements[num + 1].options[i] = NewOptionName;
  119.         }
  120.         document.powersearch.elements[num + 1].options[0].selected = true;
  121.         }
  122. }
  123. function InsertItem(ObjID, Location)
  124. {
  125. len=document.powersearch.elements[ObjID].length;
  126. for (counter=len; counter>Location; counter--)
  127. {
  128. Value = document.powersearch.elements[ObjID].options[counter-1].value;
  129. Text2Insert  = document.powersearch.elements[ObjID].options[counter-1].text;
  130. document.powersearch.elements[ObjID].options[counter] = new Option(trimPrefixIndent(Text2Insert), Value);
  131. }
  132. }
  133. function GetLocation(ObjID, Value)
  134. {
  135.   total=document.powersearch.elements[ObjID].length;
  136.   for (pp=0; pp<total; pp++)
  137.      if (document.powersearch.elements[ObjID].options[pp].text == "---"+Value+"---")
  138.      { return (pp);
  139.        break;
  140.      }
  141.   return (-1);
  142. }
  143. function GetObjID(ObjName)
  144. {
  145.   for (var ObjID=0; ObjID < window.powersearch.elements.length; ObjID++)
  146.     if ( window.powersearch.elements[ObjID].name == ObjName )
  147.     {  return(ObjID);
  148.        break;
  149.     }
  150.   return(-1);
  151. }
  152. </script>
  153. </HEAD>
  154. <BODY topMargin=0 rightMargin=0 leftMargin=0>       
  155. <!--#include file="top.asp"-->
  156. <%
  157.   select case request("action")
  158.   case "add"
  159.        call SaveAdd()
  160.   case "modify"
  161.        call SaveModify()
  162.   case "del"
  163.        call delCate()
  164.   case "edit"
  165.        isEdit=True
  166.        call myform(isEdit)
  167.   case else
  168.        isEdit=False
  169.        call myform(isEdit) 
  170.   end select
  171. sub SaveAdd
  172. Loan_num=request.Form("Loan_num")
  173. pinming=trim(request.Form("pinming"))
  174. names=Split(pinming,"|")
  175. id=names(0)
  176. Material_id=names(1)
  177. Set rs99 = server.CreateObject("adodb.recordset")
  178. sql99 = "select * from material where Id=" & Material_id
  179. rs99.Open sql99, conn, 1, 1
  180. if not rs99.eof then
  181. pinming = rs99("pinming")
  182. guige=rs99("guige")
  183. unit=rs99("unit")
  184. end if
  185. rs99.Close
  186. Set rs99 = Nothing
  187. show=0
  188. set rs=server.createobject("adodb.recordset") 
  189. sql="select * from storage where storage='"&request.Form("storage")&"'"
  190. rs.open sql,conn,1,3
  191. if not rs.eof then
  192. Material_ids=Split(rs("Material_id"),"|")
  193. nums=Split(rs("num"),"|")
  194. for i=0 to UBound(Material_ids)
  195. if Material_ids(i)<>"" then
  196. if clng(Material_ids(i))=clng(Material_id) then
  197. id0=id0&Material_ids(i)&"|"
  198. n=cdbl(nums(i))-cdbl(request.Form("Loan_num"))
  199. if n<0 then
  200. response.Write "<script language=javascript>alert('对不起该仓位存货不足!');</script>"
  201. response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
  202. response.end
  203. end if
  204. num0=num0&n&"|"
  205. show=1
  206. else
  207. id0=id0&Material_ids(i)&"|"
  208. num0=num0&nums(i)&"|"
  209. end if
  210. end if
  211. next
  212. rs("Material_id") = id0
  213. rs("num") = num0
  214. rs.update
  215. end if
  216. rs.close
  217. set rs=nothing
  218. if show=0 then
  219. response.Write "<script language=javascript>alert('对不起该仓位没存放需出库物品!');</script>"
  220. response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
  221. response.end
  222. end if
  223. set rs=server.createobject("adodb.recordset") 
  224. sql="select * from store where id="&id&""
  225. rs.open sql,conn,1,3
  226. if not rs.eof then
  227. if rs("number")-Loan_num<0 then
  228. response.Write "<script language=javascript>alert('对不起,库存不足,请调整您的出库量!');</script>"
  229. response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
  230. response.end
  231. else
  232. rs("number")=rs("number")-Loan_num
  233. rs.update
  234. end if
  235. end if
  236. rs.close
  237. set rs=nothing
  238. set rs=server.createobject("adodb.recordset") 
  239. sql="select * from out_store"
  240. rs.open sql,conn,1,3
  241. rs.addnew
  242. rs("class") = trim(request.Form("d_position1"))
  243. rs("Material_id") = Material_id
  244. rs("guige") = guige
  245. rs("pinming") = pinming
  246. rs("uptime") = request.Form("uptime")
  247. rs("end_time") = request.Form("end_time")
  248. rs("Unit") = unit
  249. rs("use_dep") = trim(request.Form("use_dep"))
  250. rs("Loan_price") = request.Form("Loan_price")
  251. rs("Loan_num") = Loan_num
  252. rs("Loan_Amount") = request.Form("Loan_num") * request.Form("Loan_price")
  253. rs("content") = trim(request.Form("content"))
  254. rs("storage") = request.Form("storage")
  255. rs.update
  256. response.Write "<script language=javascript>alert('出库成功!');</script>"
  257. response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
  258. response.end
  259. rs.close
  260. set rs=nothing
  261. end sub
  262.  
  263. sub SaveModify  
  264. old_num=request.Form("old_num")
  265. Loan_num=request.Form("Loan_num")
  266. num= old_num-Loan_num
  267. Material_id=request.Form("Material_id")
  268. set rs=server.createobject("adodb.recordset") 
  269. sql="select * from store where Material_id="&Material_id&""
  270. rs.open sql,conn,1,3
  271. if not rs.eof then
  272. if rs("number")+num<0 then
  273. response.Write "<script language=javascript>alert('对不起,库存不足,请调整您的出库量!');</script>"
  274. response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
  275. response.end
  276. else
  277. rs("number")=rs("number")+num
  278. rs.update
  279. end if
  280. end if
  281. rs.close
  282. set rs=nothing
  283.   
  284. set rs=server.createobject("adodb.recordset") 
  285. sql="select * from out_store where id="&request.Form("id")
  286. rs.open sql,conn,1,3
  287. rs("end_time") = request.Form("end_time")
  288. rs("use_dep") = trim(request.Form("use_dep"))
  289. rs("Loan_price") = request.Form("Loan_price")
  290. rs("Loan_num") = Loan_num
  291. rs("Loan_Amount") = request.Form("Loan_num") * request.Form("Loan_price")
  292. rs("content") = trim(request.Form("content"))
  293. rs.update
  294. response.Write "<script language=javascript>alert('修改成功!');</script>"
  295. response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
  296. response.end
  297. rs.close
  298. set rs=nothing
  299. end sub   
  300.  
  301. sub delCate()
  302. conn.execute("delete from out_store where id in ("&Request.Form("selBigClass")&")")
  303. response.Write "<script language=javascript>alert('删除成功!');</script>"
  304. response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
  305. response.end
  306.   end sub
  307.   %> <% sub myform(isEdit) %>    
  308. <TABLE width=800 align=center border="1" cellspacing="0" bordercolor="#D6D3CE">
  309.   <TBODY> 
  310.   <TR> 
  311.     <td align="center" valign="top"> <%if oskey="supper" or oskey="admin" then%>
  312. <fieldset style="width:98%"><legend>
  313. <%
  314.     
  315.    if isedit then
  316.    set rs=server.createobject("adodb.recordset")
  317.    rs.open "select * from out_store where id=" & request("id"),conn,1,1
  318.        response.write "编辑出库信息"
  319.    else
  320.        response.write "添加出库信息"
  321.    end if %></legend>
  322.         <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
  323.           <tr class="but"> 
  324. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">出库日期</td>
  325.             <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">类 别</td>
  326. <td width="45%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">配件名称 | 车 型 | 剩余数量 | 采购单价 | 计量单位</td>
  327. <td width="15%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">领用单位</td>
  328. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">销售单价</td>
  329. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">数量</td>
  330.           </tr>
  331.   <form name="powersearch" method="post" action="out_store.asp" onSubmit="return Juge(this)" >
  332.   <tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'> 
  333.   <% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>">
  334.   
  335.    <input type="Hidden" name="storage" value="<%=rs("storage")%>">
  336.   <input type="Hidden" name="Material_id" value="<%=rs("Material_id")%>"><% End If %>
  337.             <td height="18" align="center">
  338. <input name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" type="text"  size="10"  value='<% if isedit then
  339.                                                          response.write rs("uptime")
  340.  else
  341.  response.write date()
  342.   end if %>'></td>
  343.             <td>
  344. <select name='d_position1' onchange='Do_po_Change(this);' valign=top style='width:90'<% if isedit then%> disabled="disabled"<%end if%>>
  345. <% if isedit then%>
  346. <option selected="selected"><%=rs("class")%></option>
  347. <%else%>
  348. <option selected value='0000'>请选择类别</option>
  349. <%end if%>
  350. <%
  351. set rs1=server.createobject("adodb.recordset")
  352.    rs1.open "select * from class",conn,1,1
  353.    if not rs1.eof then
  354.    do while not rs1.eof
  355. %>
  356. <option value="<%=rs1("classnumber")%>"><%=rs1("classnumber")%></option>
  357. <%
  358. rs1.movenext
  359. loop
  360. end if
  361. rs1.close
  362. set rs1=nothing
  363. %></select></td>
  364.             <td align="center">
  365. <select name='pinming' size=1 style='width:300'<% if isedit then%> disabled="disabled"<%end if%>>
  366. <% if isedit then%>
  367. <option selected="selected" value="0|<%=rs("pinming")%>|<%=rs("guige")%>|<%=rs("Loan_num")%>|<%=rs("unit")%>"><%=rs("pinming")%></option>
  368. <input type="hidden" value="<%=rs("Loan_num")%>" name="old_num">
  369. <%else%>
  370. <option>--请选择--</option>
  371. <%end if%>
  372. </select>
  373. </td>
  374. <td><select name="use_dep"  size="1" style='width:150'>
  375. <% if isedit then%><option ><%=rs("use_dep")%></option><%end if%>
  376. <%
  377. set rs3=server.createobject("adodb.recordset")
  378.    rs3.open "select * from department",conn,1,1
  379.    if not rs3.eof then
  380.    do while not rs3.eof
  381. %>
  382. <option <% if isedit then
  383. if trim(rs3("depname"))=trim(rs("use_dep")) then
  384. %> selected="selected"<%end if%><%end if%>><%=rs3("depname")%></option>
  385. <%
  386. rs3.movenext
  387. loop
  388. end if
  389. rs3.close
  390. set rs3=nothing
  391. %>
  392. </select>
  393. </td>
  394. <td><input name="Loan_price" type="text"  size="10" value='<% if isedit then
  395.                                                          response.write rs("Loan_price")
  396.   end if %>'></td>
  397. <td><input name="Loan_num" type="text"  size="10" value='<% if isedit then
  398.                                                          response.write rs("Loan_num")
  399.   end if %>'></td>
  400.           </tr>
  401.   <tr class="but">
  402. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">销售金额</td>
  403. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">结帐日期</td>
  404. <td  colspan="3" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">备  注</td>
  405. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">出库仓位</td>
  406.           </tr>
  407.   <tr> 
  408.             <td align="center"><input name="Loan_Amount" readonly type="text"  size="10" value='<% if isedit then
  409.                                                          response.write rs("Loan_Amount")
  410.   end if %>'></td>
  411. <td align="center"><input name="end_time" onFocus="show_cele_date(end_time,'','',end_time)" type="text"  size="10"  value='<% if isedit then
  412.                                                          response.write rs("end_time")
  413.  else
  414.  response.write "2008-1-1"
  415.   end if %>'></td>
  416. <td colspan="3" align="center"><textarea name="content" cols="80" rows="2"><% if isedit then
  417.                                                          response.write rs("content")
  418.   end if %></textarea></td>
  419. <td>
  420. <select name='storage'  style='width:70'<% if isedit then%> disabled="disabled"<%end if%>>
  421. <% if isedit then%>
  422. <option selected="selected"><%=rs("storage")%></option>
  423. <%end if%>
  424. <%
  425. set rs1=server.createobject("adodb.recordset")
  426.    rs1.open "select * from storage order by storage",conn,1,1
  427.    if not rs1.eof then
  428.    do while not rs1.eof
  429. %>
  430. <option value="<%=rs1("storage")%>"><%=rs1("storage")%></option>
  431. <%
  432. rs1.movenext
  433. loop
  434. end if
  435. rs1.close
  436. set rs1=nothing
  437. %></select></td></tr>
  438. <tr>
  439. <td colspan="8" align="center"><input type="submit" value="<% if isedit then
  440.                                                          response.write "编辑"
  441.  else
  442.  response.write "添加"
  443.   end if %>"> </td>
  444.           </tr></form>
  445.   
  446.            </table>
  447.         </fieldset><%end if%>
  448.       <TABLE cellSpacing=1 cellPadding=0 width="100%" border=0 >
  449.         <TR>
  450.           <TD height="25" align="center">出 库 配 件 列 表</TD>
  451.               </TR>
  452.             </TABLE>
  453. <form action="out_store.asp" method="post" name="selform" >
  454.   <table width="100%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8" align="center">
  455.     <tr> 
  456.       
  457.       <td width="100%" align="center" valign="top">
  458.   <fieldset style="width:100%">
  459.         <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
  460.           <tr class="but"> 
  461. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">出库日期</td>
  462.             <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">类 别</td>
  463. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">配件名称</td>
  464. <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">车 型</td>
  465. <td width="6%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">单 位</td>
  466. <td width="15%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">领用单位</td>
  467. <td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">销售单价</td>
  468. <td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">数量</td>
  469. <td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">总金额</td>
  470. <td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">结帐日期</td>
  471.             <td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">仓 位</td>
  472.           </tr>
  473.  <%
  474. PageShowSize = 10            '每页显示多少个页
  475. MyPageSize   = 20          '每页显示多少条
  476. If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
  477. MyPage=1
  478. Else
  479. MyPage=Int(Abs(Request("page")))
  480. End if
  481. set rs=server.CreateObject("ADODB.RecordSet") 
  482. search=request("search")
  483. if search<>"" then 
  484. class1=request("class")
  485. keyword=request("keyword")
  486. rs.Source="select* from out_store where class like '%"&class1&"%' and pinming like '%"&keyword&"%' order by -id"
  487. else
  488. rs.Source="select* from out_store order by -id"
  489. end if
  490. rs.Open rs.Source,conn,1,1
  491. if not rs.EOF then
  492. rs.PageSize     = MyPageSize
  493. MaxPages         = rs.PageCount
  494. rs.absolutepage = MyPage
  495. total            = rs.RecordCount
  496. for i=1 to rs.PageSize
  497. if not rs.EOF then
  498. %>
  499. <tr><td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="selBigClass" type="checkbox" id="selBigClass" value="<%=rs("ID")%>"><a href="out_store.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("uptime")%></a></td>
  500. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("class")%><%if rs("class")="" then%>&nbsp;<%end if%></td>
  501. <td height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;<a href="out_store.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("pinming")%></a></td>
  502. <td height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;<%=rs("guige")%></td>
  503. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("Unit")%><%if rs("Unit")="" then%>&nbsp;<%end if%></td>
  504. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("use_dep")%><%if rs("use_dep")="" then%>&nbsp;<%end if%></td>
  505. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("Loan_price")%><%if rs("Loan_price")="" then%>&nbsp;<%end if%></td>
  506. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("Loan_num")%><%if rs("Loan_num")="" then%>&nbsp;<%end if%></td>
  507. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("Loan_Amount")%><%if rs("Loan_Amount")="" then%>&nbsp;<%end if%></td>
  508. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%if rs("end_time")="1980-1-1" then%><font color="#FF0000">未结帐</font><%else%><%=rs("end_time")%><%end if%></td>
  509. <td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("storage")%></td>
  510. </tr>
  511. <%
  512. rs.MoveNext
  513. end if
  514. next
  515. end if
  516. %>
  517. <tr><td align="right" colspan="10" height="22">
  518. 共 <%=total%> 条,当前第 <%=Mypage%>/<%=Maxpages%> 
  519.             页,每页 <%=MyPageSize%> 条 
  520.             <%
  521. if search<>"" then
  522. url="out_store.asp?class="&class1&"&keyword="&keyword&"&search=search&"
  523. else
  524.             url="out_store.asp?"
  525. end if
  526. PageNextSize=int((MyPage-1)/PageShowSize)+1
  527. Pagetpage=int((total-1)/rs.PageSize)+1
  528. if PageNextSize >1 then
  529. PagePrev=PageShowSize*(PageNextSize-1)
  530. Response.write "<a class=black href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
  531. Response.write "<a class=black href='" & Url & "page=1' title='第1页'>页首</a> "
  532. end if
  533. if MyPage-1 > 0 then
  534. Prev_Page = MyPage - 1
  535. Response.write "<a class=black href='" & Url & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
  536. end if
  537. if Maxpages>=PageNextSize*PageShowSize then
  538. PageSizeShow = PageShowSize
  539. Else
  540. PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
  541. End if
  542. If PageSizeShow < 1 Then PageSizeShow = 1
  543. for PageCounterSize=1 to PageSizeShow
  544. PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
  545. if PageLink <> MyPage Then
  546. Response.write "<a class=black href='" & Url & "page=" & PageLink & "'>[" & PageLink & "]</a> "
  547. else
  548. Response.Write "<B>["& PageLink &"]</B> "
  549. end if
  550. If PageLink = MaxPages Then Exit for
  551. Next
  552. if Mypage+1 <=Pagetpage  then
  553. Next_Page = MyPage + 1
  554. Response.write "<a class=black href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
  555. end if
  556. if MaxPages > PageShowSize*PageNextSize then
  557. PageNext = PageShowSize * PageNextSize + 1
  558. Response.write " <A class=black href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
  559. Response.write " <a class=black href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
  560. End if
  561. rs.Close
  562. set rs=nothing
  563. %>&nbsp;&nbsp;&nbsp;&nbsp;<%if oskey="supper" or oskey="admin" then%>
  564.         <input type="checkbox" name="checkbox" value="checkbox" onClick="javascript:SelectAll()"> 选择/反选
  565.               <input onClick="{if(confirm('此操作将删除该信息!nn为了数据的一致,请先把出库数量修改为0再删除nn确定要执行此项操作吗?')){this.document.selform.submit();return true;}return false;}" type=submit value=删除 name=action2> 
  566.               <input type="Hidden" name="action" value='del'><%end if%></td></tr>
  567.         </table>
  568. </fieldset>
  569.   
  570. </td>
  571.     </tr>
  572.     <tr> 
  573.       <td height="50" colspan="3" align="center">
  574.         
  575.         </td>
  576.     </tr>
  577.   </table>
  578. </form><br>
  579. <fieldset style="width:80%"><legend>出库搜索</legend>
  580.         <table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
  581.          
  582.   <form name="search" method="post" action="out_store.asp">
  583.   <tr><input name="search" type="hidden" value="search">
  584.             <td height="18" align="center" width="20%">
  585. <select name="class" size="1">
  586. <option value="">所有分类</option>
  587. <%
  588.        set rs2=server.createobject("adodb.recordset")
  589.    rs2.open "select * from class",conn,1,1
  590.    if not rs2.eof then
  591.    do while not rs2.eof
  592.    classnumber=rs2("classnumber")
  593.    %>
  594.    <option value="<%=rs2("classnumber")%>"><%=rs2("classnumber")%></option>
  595. <%
  596. rs2.movenext
  597. loop
  598. end if
  599. rs2.close
  600. set rs2=nothing
  601. %></select></td>
  602.             <td align="center" width="65%">配件名称关键字: <input name="keyword" type="text"  size="25"> 关键字为空则搜索所有</td>
  603.                       
  604. <td align="center" width="15%" ><input type="submit"  value="查 找"> </td>
  605.           </tr></form>
  606. </TD>
  607.               </TR>
  608.           </table>
  609.     </fieldset>      
  610.       <table width="100%" border="0" cellspacing="0" cellpadding="4">
  611.       
  612.       </table>
  613.   </TBODY>
  614. </TABLE>
  615. <%end sub%>
  616. <P>
  617. <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  618.   <TBODY>
  619.   <TR vAlign=center>
  620.     <TD align=middle width="100%"><!--#include file="footer.htm"--></TD>
  621.   </TR></TBODY></TABLE></P></BODY></HTML>