📄 produit_move.asp
字号:
<%
if session("username")="" then
%>
<script language="javascript">
top.location.href="../login.asp"
</script>
<%
response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->
<html>
<head>
<title><%=dianming%> - 库存调拨</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style2.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY>
<%
if fla1="0" then
%>
<br><center><font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%
response.end
end if
'取得当前页码
currentpage=request("page")
'response.write currentpage
'response.end
if currentpage<1 or currentpage="" then
currentpage="1"
end if
'取得搜索关键字
nowku=request("ku")
nowbigclass=request("bigclass")
nowsmallclass=request("smallclass")
nowkeyword=request("keyword")
nowpaixu=request("paixu")
nowpaixu21=request("paixu2")
if nowpaixu21="1" then
nowpaixu2="2"
else
nowpaixu2="1"
end if
nowpaixu31=request("paixu3")
if nowpaixu31="1" then
nowpaixu3="2"
else
nowpaixu3="1"
end if
%>
<table width="98%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
<tr>
<td width="24%" height="21"> <img src="../Images/ico/ico45.gif" width="32" height="32" hspace="2" vspace="2" align="absmiddle"><font size="+1"><strong> 库存调拨</strong></font></td>
<td width="76%" align="right">
产品查询:
<%
sql="select * from ku order by id"
set rs_ku=conn.execute(sql)
%>
<select name="ku" onChange="form2.submit()">
<option value="">所有仓库</option>
<%
do while rs_ku.eof=false
%>
<option value="<%=rs_ku("id")%>"<%if trim(cstr(rs_ku("id")))=nowku then%> selected="selected"<%end if%>><%=rs_ku("ku")%></option>
<%
rs_ku.movenext
loop
%>
</select>
<%
sql="select * from bigclass order by id"
set rs_bigclass=conn.execute(sql)
%>
<select name="bigclass" onChange="form2.submit()">
<option value="">所有大类</option>
<%
do while rs_bigclass.eof=false
%>
<option value="<%=rs_bigclass("id")%>"<%if trim(cstr(rs_bigclass("id")))=nowbigclass then%> selected="selected"<%end if%>><%=rs_bigclass("bigclass")%></option>
<%
rs_bigclass.movenext
loop
%>
</select>
<%
if nowbigclass="" then
nowbigclass2=0
else
nowbigclass2=nowbigclass
end if
sql="select * from smallclass where id_bigclass="&nowbigclass2&" order by id"
set rs_smallclass=conn.execute(sql)
%>
<select name="smallclass" onChange="form2.submit()">
<option value="">所有小类</option>
<%
do while rs_smallclass.eof=false
%>
<option value="<%=rs_smallclass("id")%>"<%if trim(cstr(rs_smallclass("id")))=nowsmallclass then%> selected="selected"<%end if%>><%=rs_smallclass("smallclass")%></option>
<%
rs_smallclass.movenext
loop
%>
</select>
<input type="text" name="keyword" size="20" value="<%=nowkeyword%>">
<input type="submit" value=" 查询 ">
</td>
</tr>
</form>
</table>
<table width="98%" border="0" cellspacing="1" cellpadding="2" align="center" class="TableMenu">
<tr class="a1" style="color:#ffffff;font-size:12px;">
<th width="13%" height="30">货号</th>
<th width="10%">大类</th>
<th width="12%">小类</th>
<th width="17%">产品名称</th>
<th width="7%">规格</th>
<th width="16%">
<%if nowpaixu2="2" then%>
<a href="?paixu3=<%=nowpaixu31%>&paixu2=2&paixu=r&page=<%=currentpage%>&keyword=<%=nowkeyword%>&ku=<%=nowku%>&bigclass=<%=nowbigclass%>&smallclass=<%=nowsmallclass%>" class="title">库存数量<img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"></a>
<%else%>
<a href="?paixu3=<%=nowpaixu31%>&paixu2=1&paixu=r&page=<%=currentpage%>&keyword=<%=nowkeyword%>&ku=<%=nowku%>&bigclass=<%=nowbigclass%>&smallclass=<%=nowsmallclass%>" class="title">库存数量<img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"></a>
<%end if%></th>
<th width="4%">单位</th>
<th width="9%">
<%if nowpaixu3="2" then%>
<a href="?paixu2=<%=nowpaixu21%>&paixu3=2&paixu=j&page=<%=currentpage%>&keyword=<%=nowkeyword%>&ku=<%=nowku%>&bigclass=<%=nowbigclass%>&smallclass=<%=nowsmallclass%>" class="title">建议卖价<img src="../images/up2.gif" border="0" hspace="2" align="absmiddle"></a>
<%else%>
<a href="?paixu2=<%=nowpaixu21%>&paixu3=1&paixu=j&page=<%=currentpage%>&keyword=<%=nowkeyword%>&ku=<%=nowku%>&bigclass=<%=nowbigclass%>&smallclass=<%=nowsmallclass%>" class="title">建议卖价<img src="../images/down2.gif" border="0" hspace="2" align="absmiddle"></a>
<%end if%>
</th>
<th width="12%">库存调拨</th>
</tr>
<%
set rs_produit =server.createobject("ADODB.RecordSet")
sql="select * from produit where 1=1"
if nowkeyword<>"" then
sql=sql&" and (title like '%"&nowkeyword&"%' or huohao like '%"&nowkeyword&"%')"
end if
if nowku<>"" then
sql=sql&" and id_ku="&nowku
end if
if nowbigclass<>"" then
sql=sql&" and id_bigclass="&nowbigclass
end if
if nowsmallclass<>"" then
sql=sql&" and id_smallclass="&nowsmallclass
end if
if nowpaixu="r" then
if nowpaixu2="1" then
sql=sql&" order by shulian desc,huohao"
else
sql=sql&" order by shulian,huohao"
end if
elseif nowpaixu="j" then
if nowpaixu3="1" then
sql=sql&" order by price desc,huohao"
else
sql=sql&" order by price,huohao"
end if
else
sql=sql&" order by id desc,huohao"
end if
rs_produit.open sql,conn,1,3
if not rs_produit.eof then
rs_produit.pagesize=16
rs_produit.absolutepage=currentpage
y=""
for currentrec=1 to rs_produit.pagesize
if rs_produit.eof then
exit for
end if
if request("form")<>"" then
sql="select * from produit where huohao='"&rs_produit("huohao")&"'"
set rs_shulian=conn.execute(sql)
nowshulian=0
nowtext=""
do while rs_shulian.eof=false
nowshulian=nowshulian+rs_shulian("shulian")
sql="select * from ku where id="&rs_shulian("id_ku")
set rs_ku=conn.execute(sql)
nowtext=nowtext+rs_ku("ku")&"("&rs_shulian("shulian")&"),"
rs_shulian.movenext
loop
end if
'listy=split(y,"-|-")
'nowshow=true
'for z=0 to UBound(listy)-1
' if listy(z)=rs_produit("huohao") then
' nowshow=false
' exit for
' end if
'next
'if nowshow then
' y=y&rs_produit("huohao")&"-|-"
%>
<tr bgcolor="#ececec" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#ececec'" <%if request("form")<>"" then%>onDblClick="window.opener.document.<%=request.querystring("form")%>.<%=request.querystring("field")%>.value='<%=rs_produit("huohao")%>';window.opener.document.all.showshulian.innerHTML='目前所有仓库数量:<%=nowshulian%>,<%=left(nowtext,len(nowtext)-1)%>';<%if request("field2")<>"" then%>window.opener.document.<%=request.querystring("form")%>.<%=request.querystring("field2")%>.value='<%=rs_produit("price")%>';<%end if%>window.close();"<%else%>onDblClick="javascript:var win=window.open('produit_show.asp?id=<%=rs_produit("id")%>','产品详细信息','width=895,height=503,top=142,left=115,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes'); win.focus()"<%end if%>>
<td align="center" height="25"><%=rs_produit("huohao")%></td>
<td align="center">
<%
sql="select * from bigclass where id="&rs_produit("id_bigclass")
set rs_bigclass=conn.execute(sql)
%>
<%=rs_bigclass("bigclass")%></td>
<td align="center">
<%
sql="select * from smallclass where id="&rs_produit("id_smallclass")
set rs_smallclass=conn.execute(sql)
%>
<%=rs_smallclass("smallclass")%></td>
<td align="center"><%=rs_produit("title")%></td>
<td align="center"><%=rs_produit("guige")%></td>
<td align="center">
<%
sql="select * from ku where id="&rs_produit("id_ku")
set rs_ku=conn.execute(sql)
sql="select * from produit where huohao='"&rs_produit("huohao")&"'"
set rs_shulian=conn.execute(sql)
nowshulian=0
do while rs_shulian.eof=false
nowshulian=nowshulian+rs_shulian("shulian")
rs_shulian.movenext
loop
nowshulian7=nowshulian
'if request("ku")<>"" then
' nowshulian=rs_produit("shulian")
'end if
%>
<b><%if nowshulian7<rs_produit("baojin") then%><font color="#ff0000"><%=nowshulian%></font><%else%><%=nowshulian%><%end if%></b>,<%=rs_ku("ku")%>【<%=rs_produit("shulian")%>】</td>
<td align="center">
<%=rs_produit("danwei")%></td>
<td align="center"><%=rs_produit("price")%> 元</td>
<td align="center"><a href="../about/about1.htm" <%if rs_produit("shulian")<=0 then%>onclick="alert('此仓库中数量为零,无法调出!');return false;"<%end if%>><img src="../images/res.gif" border="0" hspace="2" align="absmiddle">由此调出</a></td>
</tr>
<%
'end if
rs_produit.movenext
next
else
%>
<tr bgcolor="#ececec" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#ececec'">
<td colspan="11" height="25" align="center" style="color:red"><b>没有找到记录</b></td>
</tr>
<%
end if
%>
<%
if rs_produit.recordcount>0 then
%>
<tr class="a1">
<td colspan="11" height="30">
<table cellpadding=0 cellspacing=0 width="100%">
<tr>
<td width="17%" style="color:#FFFFFF; font-weight:bold" align="right"><%if request("form")<>"" then%>双击选择产品<%else%>双击查看产品详细信息<%end if%></td>
<td width="82%" align="right" style="color:#FFFFFF;">
<font color=#ffffff><b><%=rs_produit.recordcount%></b></font> 条信息 共 <font color=#ffffff><b><%=rs_produit.pagecount%></b></font> 页
<%
nowstart=currentpage-5
if nowstart<1 then
nowstart=1
end if
nowend=currentpage+6
if nowend>rs_produit.pagecount then
nowend=rs_produit.pagecount
end if
response.write " <a href='?paixu="&nowpaixu&"&paixu2="&nowpaixu21&"&paixu3="&nowpaixu31&"&keyword="&nowkeyword&"&ku="&nowku&"&bigclass="&nowbigclass&"&smallclass="&nowsmallclass&"&page=1' class='page'>最前页</a> "
for ipage=nowstart to nowend
if cstr(ipage)=cstr(currentpage) then
response.write " <span style='font-weight:bold;color:#5858E6'>" & ipage &"</span> "
else
response.write " [ <a href='?paixu="&nowpaixu&"&paixu2="&nowpaixu21&"&paixu3="&nowpaixu31&"&keyword="&nowkeyword&"&ku="&nowku&"&bigclass="&nowbigclass&"&smallclass="&nowsmallclass&"&page="&ipage&"' class='page'>" & ipage &"</a> ] "
end if
next
response.write " <a href='?paixu="&nowpaixu&"&paixu2="&nowpaixu21&"&paixu3="&nowpaixu31&"&keyword="&nowkeyword&"&ku="&nowku&"&bigclass="&nowbigclass&"&smallclass="&nowsmallclass&"&page="&rs_produit.pagecount&"' class='page'>最后页</a> "
%>
</td>
<td width="1%"></td>
</tr></table></td></tr>
<%end if%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -