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

📄 yarn_storage.asp

📁 oa办公系统asp程序
💻 ASP
字号:
<%@language=vbscript%>
<% response.buffer=true %>
<%'On Error Resume Next%>
<%const title="管理库存"%>
<html>
<head>
<title><%=title%></title>
<link rel=stylesheet type=text/css href=../css/css.css>
</head>
<body topmargin="0" bgcolor="#468ea3">

<!--#include file=../Opendb.inc-->
<%
sql = "select * from yarn_type order by yarn_type_id asc"
rs.open sql,conn,1,1
%>
<SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("yarn_type_name"))%>","<%= trim(rs("yarn_sort_id"))%>","<%= trim(rs("yarn_type_id"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;
</SCRIPT>
<% const MaxPerPage=50 '分页显示的纪录个数
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   dim detail
   if not isempty(request("page")) then    
   currentPage=cint(request("page"))
   else
      currentPage=1
   end if
'response.write "currentpage="&currentpage
%>
<%
session("key")=replace(request.form("keyword"),"<","&lt;")
session("key")=replace(session("key"),">","&gt;")
%>
<p align="center"><b><font size="7">海盐威康纺织工业有限公司<br>
</font></b><font size="3">|&nbsp; 纱料库存 |</font> </p>
<p align="center">| <a href="FABRIC_sort.asp">胚布库存</a>&nbsp;|&nbsp;
<a href="cloth_sort.asp">成品布库存</a>&nbsp; |&nbsp; <a href="other_sort.asp">其它库存</a>&nbsp; |</p>

<table border=0 align=center width="270" bgcolor="#a5d0dc">
  <tr>
	<TD background=images/a-27.gif bgcolor=#ffffff valign=top width="191"><FONT style=line-height:150%>
<TABLE cellSpacing=6 cellPadding=0 width="279" border=0>
<TBODY>


<form method=Post name="myform" action=yarn_storage.asp>

<SCRIPT language="javascript">
function changelocation(locationid)
    {
    document.myform.type.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.myform.type.options[document.myform.type.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
      </SCRIPT>  
<TR>
<TD width="267">
			<%
        sql = "select * from yarn_sort"
        rs.open sql,conn,1,1
	if rs.eof and rs.bof then
	response.write "请先添加栏目。"
	response.end
	else
%>&nbsp;<FONT style=line-height:150%>&nbsp;
<SELECT name="sort" onChange="changelocation(document.myform.sort.options[document.myform.sort.selectedIndex].value)" size="1">
				<OPTION selected value="">&nbsp;&nbsp;&nbsp;&nbsp;</OPTION><% 
        do while not rs.eof
%><OPTION value="<%=trim(rs("yarn_sort_id"))%>"><%=trim(rs("yarn_sort_name"))%></OPTION>
                 <%
        rs.movenext
        loop
	end if
        rs.close
%></SELECT> 
</font>
<SELECT name="type">
		 <OPTION selected value="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</OPTION>
	  </SELECT>
<FONT style=line-height:150%>
<input type="submit" name="Submit2" value="搜索" style="height='21'"><input type="reset" value="重置" name="B2"></TD></TR>
</form>
</center>            
</table> 
</TD>

  </tr>
</table>


<table width=100% align=center border='0'  cellspacing='0' bordercolordark='#FFFFFF' bordercolorlight='#DADBFC' bordercolor='#00000'>
    <%ShowContent%>
</table>
     <%ShowPages%>
<!--#include file=../copyright.asp-->
</body>
</html>


<%
sub ShowContent()
  sql="select * from water_yarn where yarn_sort_id="&request("sort")&"  and yarn_type_id="&request("type")&" order by id"
	rs.open sql,conn,3,2
i=0
if not rs.eof then
response.write "  <tr bgcolor='#0000A0'>"
response.write "    <td nowrap align=center ><font color=white>编号:</td>"
response.write "    <td nowrap align=center ><font color=white>日期:</td>"
response.write "    <td nowrap align=center ><font color=white>期初:</td>"
response.write "    <td nowrap align=center ><font color=white>入库数:</td>"
response.write "    <td nowrap align=center ><font color=white>出库数:</td>"
response.write "    <td nowrap align=center ><font color=white>期末数</td>"
response.write "    <td nowrap align=center ><font color=white></td>"
response.write "  </tr>"
totalPut=rs.recordcount
response.write "找到记录:<font color=red>"&totalput&"</font> 条"
    if currentPage=1 then
       showDetails
    else
       if (currentPage-1)*MaxPerPage<totalPut then
          rs.move  (currentPage-1)*MaxPerPage
          showdetails
       else
          currentPage=1
          showDetails
       end if
   end if

else
   response.write "<font color=red><p align=center>无记录!</font>"
end if
end sub
%>

<%
sub showpages()
       dim n
	   if (totalPut mod MaxPerPage)=0 then
	      n= totalPut \ MaxPerPage
	   else
	      n= totalPut \ MaxPerPage + 1
	   end if
'response.write "n="&n
	   if n<=1 then exit sub
	   dim k
	   response.write "<p align='left'>&gt;&gt; 分页(<font color=red>"&currentpage&"</font>/"&n&") "
	   for k=1 to n
	       if k=currentPage then
	          response.write "[<b>"+Cstr(k)+"</b>] "
	       else
		  response.write "[<b>"+"<a href='yarn_storage.asp?page="+cstr(k)+"'>"+Cstr(k)+"</a></b>] "
	       end if
	   next
           if n>=2 and currentpage<n then
		  response.write "[<b>"+"<a href='yarn_storage.asp?page="+cstr(Currentpage+1)+"'>下一页</a></b>]"
           end if

	   response.write "</p>"
end sub
%>

<%
sub ShowDetails()
total_sum=0
record=0
  do while not rs.eof 
record=record+1
if record/2=int(record/2) then
  bgclr="#c0cccc"
else
  bgclr="#ECECF0"
end if

    response.write "<tr bgcolor="&bgclr&">"
    response.write "<td align=center><font color=blue>" &rs("yarn_water_id") &"</td>"

	response.write "<td align=center><font color=blue>" &rs("yarn_TIME") &"</td>"
    response.write "<td align=center><font color=blue>" &rs("yarn_begin") &"</td>"
    if rs("yarn_in")=0 then
    response.write "<td align=center><font color=blue>-</td>"
    else
	response.write "<td align=center><font color=blue>" &rs("yarn_in") &"</td>"
    end if
    if rs("yarn_out")=0 then
    response.write "<td align=center><font color=blue>-</td>"
    else
    response.write "<td align=center><font color=blue>" &rs("yarn_out") &"</td>"'
    end if
    response.write "<td align=center><font color=blue>" &rs("yarn_end") &"</td>"
	'response.write "<td bgcolor=#cce6ed><a href=in_del.asp?id=" &rs("id")& "&action=yarn>删除</a>&nbsp; <a href=IN_yarn_edit.asp?no="&rs("yarn_no")&"&action=edit>修改</a>&nbsp; </td>"
    response.write "</tr>"
  i=i+1
  if i>=MaxPerPage then exit do
  rs.MoveNext
  loop


end sub
%>

⌨️ 快捷键说明

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