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

📄 brow_in_yarn.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-->

<% 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="brow_in_FABRIC.asp">胚布入库单</a>&nbsp;|&nbsp;
<a href="brow_in_cloth.asp">成品布入库单</a>&nbsp; |&nbsp; <a href="brow_in_other.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 action=brow_in_yarn.asp>
<TR>
<TD width="267">&nbsp;<FONT style=line-height:150%>&nbsp;<select size="1" name="action">
<option value="make_no">制令号</option>
<option value="order_no">订单号</option>
</select></font>
<input type="text" name="keyword" class=smallinput size=14 value="" maxlength="50"   style="color:#008080;font-size: 9pt">
<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()

keyword=request.form("keyword")

if keyword<>"" then
    if request("action")="make_no" then
    	sql="select * from in_yarn where yarn_makeno like '%"&trim(keyword)&"%' order by yarn_no desc"
    else
    	sql="select * from in_yarn where yarn_orderno like '%"&trim(keyword)&"%' order by yarn_no desc"
    end if
else
  sql="select * from in_yarn order by id"
end if

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 "    <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='brow_in_yarn.asp?page="+cstr(k)+"'>"+Cstr(k)+"</a></b>] "
	       end if
	   next
           if n>=2 and currentpage<n then
		  response.write "[<b>"+"<a href='brow_in_yarn.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
	
	sql2="select * from provider where provider_id = " &rs("yarn_providerno") &" "
    rs2.open sql2,conn,3,2
	sql3="select * from yarn_sort where yarn_sort_id = " &rs("yarn_sortno") &" "
    rs3.open sql3,conn,3,2
	sql4="select * from yarn_type where yarn_type_id = " &rs("yarn_typeno") &""
	rs4.open sql4,conn,3,2
	sql5="select * from color where color_id = " &rs("colorno") &""
	rs5.open sql5,conn,3,2
    response.write "<tr bgcolor="&bgclr&">"
    response.write "<td align=center><font color=blue>" &rs("yarn_no") &"</td>"
    response.write "<td align=center><font color=blue>" &rs("yarn_makeno") &"</td>"
    response.write "<td align=center><font color=blue>" &rs("yarn_orderno") &"</td>"

	'供应商
    response.write "<td align=center><font color=blue>" &rs2("provider_name") &"</td>"
	rs2.close

	'纱料种类
	response.write "<td align=center><font color=blue>" &rs3("yarn_sort_name") &"</td>"
  	rs3.close

	'纱料型号
	response.write "<td align=center><font color=blue>" &rs4("yarn_type_name") &"</td>"
    rs4.close

    '纱料颜色
    response.write "<td align=center><font color=blue>" &rs5("color_name") &"</td>"
	rs5.close
    response.write "<td align=center><font color=blue>" &rs("yarn_unit_p") &"</td>"
    response.write "<td align=center><font color=blue>" &rs("yarn_amount") &"</td>"'
    response.write "<td align=center><font color=blue>" &rs("yarn_meno") &"</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 + -