📄 view_seach.asp
字号:
<!--#include file="../title.asp" -->
<%
dim ref_no,buyer,style_no,merchangdiser,radio
dim fabric,mo_start,mo_end,buyer_start,buyer_end
dim fabric_start,fabric_end,thread_strat,thread_end
dim lc_start,lc_end,clr_start,clr_end
dim pattn_start,pattn_end,appe_start,appe_end
dim shipt_start,shipt_end,order_start,order_end
ref_no=request("ref_no")
buyer=request("buyer")
style_no=request("style_no")
merchangdiser=request("merchangdiser")
fabric=request("fabric")
pattern=request("pattern")
mo_start=request("mo_start")
mo_end=request("mo_end")
buyer_start=request("buyer_start")
buyer_end=request("buyer_end")
fabric_start=request("fabric_start")
fabric_end=request("fabric_end")
thread_start=request("thread_start")
thread_end=request("thread_end")
lc_start=request("lc_start")
lc_end=request("lc_end")
clr_start=request("clr_start")
clr_end=request("clr_end")
pattn_start=request("pattn_start")
pattn_end=request("pattn_end")
appe_start=request("appe_start")
appe_end=request("appe_end")
shipt_strat=request("shipt_start")
shipt_end=request("shipt_end")
order_start=request("order_start")
order_end=request("order_end")
readio=request("r1")
select case readio
case "V1"
if ref_no<>"" then
sql="select * from cloth_info where ref_no like '%"&ref_no&"%' "
rs.open sql,conn,3,1
call view()
else
response.write "REF NO WRONG!"
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
Case "V2"
if buyer<>"" then
sql="select * from cloth_info where buyer like '%"&buyer&"%' "
rs.open sql,conn,3,1
call view()
else
response.write "BUYER WRONG!"
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V3"
if style_no<>"" then
sql="select * from cloth_info where style_no like '%"&style_no&"%' "
rs.open sql,conn,3,1
call view()
else
response.write "STYLE NO!"
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V4"
if pattern<>"" then
sql="select * from cloth_info where pattern like '%"&pattern&"%'"
rs.open sql,conn,3,1
call view()
else
response.write "PATTERN !"
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V5"
if merchangdiser<>"" then
sql="select * from cloth_info where merchangdiser like '%"&merchangdiser&"%' "
rs.open sql,conn,3,1
call view()
else
response.write "MERCHANGDISER WRONG!"
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V6"
if fabric<>"" then
sql2="select * from cloth_fabric where fabrication like '%"&fabric&"%'"
rs2.open sql2,conn,3,1
call viewfabric()
else
response.write "FABRIC WRONG!"
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V7"
if IsDate(mo_start) and IsDate(mo_end) then
mo_satrt=FormatDateTime(mo_start)
mo_end=FormatDateTime(mo_end)
sql="select * from cloth_info where mo between #"&mo_start&"# and #"&mo_end&"# "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>M/O WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V8"
if IsDate(buyer_start) and IsDate(buyer_end) then
sql="select * from cloth_info where buyer_po between #"&buyer_start&"# and #"&buyer_end&"# "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>BUYER P/O WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V9"
if IsDate(fabric_start) and IsDate(fabric_end) then
sql="select * from cloth_info where fabric_po between #"&fabric_start&"# and #"&fabric_end&"# "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>FABRIC P/O WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V10"
if IsDate(thread_start) and IsDate(thread_end) then
sql="select * from cloth_info where thread_po between #"&thread_start&"# and #"&thread_end&"# "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>THREAD P/O WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V11"
if IsDate(lc) and IsDate(lc) then
sql="select * from cloth_info where lc between #"&lc_start&"# and #"&lc_end&"# "
rs.open sql,conn,3,1
call view()
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>L/C WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V12"
if IsDate(clr_start) and IsDate(clr_end) then
sql="select * from cloth_info where clr_swatch between #"&clr_start&"# and #"&clr_end&" "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>CLR SWATCH WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V13"
if IsDate(pattn_start) and IsDate(pattn_end) then
sql="select * from cloth_info where pattn_paper between #"&patten_start&"# and #"&patten&"# "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>PATTN PAPER WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V14"
if IsDate(appv_start) and IsDate(apv_end) then
sql="select * from cloth_info where appv_sample between #"&appv_start&"# and #"&appv_end&"# "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>APPV SAMPLE WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V15"
if IsDate(shipt_start) and IsDate(shipt_end) then
sql="select * from cloth_info where shpt_sample between #"&shipt_start&"# and #"&shipt_end&"#"
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>SHIPT SAMPLE WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
case "V16"
if isnumber(order_start) and isnumber(order_end) then
sql="select * from cloth_info where order_qty between "&order_start&" and "&order_end&" "
rs.open sql,conn,3,1
if rs.eof and rs.bof then
errmsg=errmsg+"<li>NO RECORDSET!"
call no_record()
else
call view()
end if
else
errmsg=errmsg+"<li>ORDER QTY WRONG!"
call no_record()
%><meta http-equiv="refresh" content='2; URL="javascript:history.go(-1)"'><%
end if
end select
sub view()
%>
<body topmargin="0" leftmargin="0">
<table table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" >
<tr>
<td align="center">
<table table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="774">
<tr align="center">
<td width="74">REF NO</td>
<td width="92">BUYER</td>
<td width="50">ORDER QTY</td>
<td width="67">M/0</td>
<td width="67">BUYER P/O</td>
<td width="67">FARIC P/O</td>
<td width="68">L/C</td>
<td width="39"> </td>
<td width="241">修改</td>
</tr>
<%
do while not rs.eof
%>
<tr align="center">
<td width="74"><%=rs("ref_no")%> </td>
<td width="92"><input type="text" name="T1" size="12" value="<%=rs("buyer")%>"></td>
<td width="50"><input type="text" name="T1" size="6" value="<%=rs("order_qty")%>"></td>
<td width="67"><input type="text" name="T1" size="8" value="<%=rs("mo")%>"></td>
<td width="67"><input type="text" name="T1" size="8" value="<%=rs("buyer_po")%>"></td>
<td width="67"><input type="text" name="T1" size="8" value="<%=rs("fabric_po")%>"></td>
<td width="68"><input type="text" name="T1" size="8" value="<%=rs("lc")%>"></td>
<td width="39"><a href="seach_info.asp?id=<%=rs("id")%>">查看</a> </td>
<td width="241"> <a href="order_edit.asp?id=<%=rs("id")%>">订单</a>
<a href="edit_access.asp?ref=<%=rs("ref_no")%>">辅料</a>
<a href="edit_cost.asp?ref=<%=rs("ref_no")%>&types=1">成本分析</a>
<a href="edit_cost.asp?ref=<%=rs("ref_no")%>&types=2"> 实际成本</a></td>
</tr>
<%
rs.movenext
loop
rs.close
%>
</table>
</TD>
</TR>
</TABLE>
</tr>
</table>
<%
end sub
sub viewfabric()
%>
<table table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" >
<tr>
<td align="center">
<table table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="772">
<tr align="center">
<td width="62">REF NO</td>
<td width="102">
BUYER</td>
<td width="50">ORDER QTY</td>
<td width="96">MERCHANDISER</td>
<td width="67">M/0</td>
<td width="67">BUYER P/O</td>
<td width="67">FARIC P/O</td>
<td width="68">L/C</td>
<td width="181"> </td>
</tr>
<%
do while not rs2.eof
sql="select * from cloth_info where ref_no = '"&rs2("ref_no")&"' "
rs.open sql,conn,1,1
do while not rs.eof
%>
<tr align="center">
<td width="74"><%=rs("ref_no")%> </td>
<td width="93"><input type="text" name="T1" size="12" value="<%=rs("buyer")%>"></td>
<td width="50"><input type="text" name="T1" size="6" value="<%=rs("order_qty")%>"></td>
<td width="96"><input type="text" name="T1" size="12" value="<%=rs("merchandiser")%>"></td>
<td width="67"><input type="text" name="T1" size="8" value="<%=rs("mo")%>"></td>
<td width="67"><input type="text" name="T1" size="8" value="<%=rs("buyer_po")%>"></td>
<td width="67"><input type="text" name="T1" size="8" value="<%=rs("fabric_po")%>"></td>
<td width="68"><input type="text" name="T1" size="8" value="<%=rs("lc")%>"></td>
<td width="178"><a href="seach_info.asp?id=<%=rs("id")%>">查看</a>
<a href="order_edit.asp?id=<%=rs("id")%>">订单修改</a> <a href="edit.asp?id=<%=rs("id")%>">成本修改</a></td>
</tr>
<%
rs.movenext
loop
rs.close
rs2.movenext
loop
rs2.close
end sub
sub no_record()
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="317">
<tr align="center">
<td width="315"><b><font size="6"><%=errmsg%></font></b> </td>
</tr>
</table>
<%
end sub
Function isnumber(strng)
isnumber = false
Dim regEx, Match
Set regEx = New RegExp
regEx.Pattern = "^\d+(\.\d+)?$"
regEx.IgnoreCase = True
Set Match = regEx.Execute(strng)
if match.count then isnumber= true
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -