日期:2014-05-16 浏览次数:20966 次
<!--#include file="conn.asp"-->
if danhao="" then
response.write "请输入要查找的货号。"
else
fgsbm = left(danhao,4)
huohao = mid(danhao,5,9)
jshj = mid(danhao,16,2)
set rs=server.createobject("adodb.recordset")
sql="select jydbh,fhrxm,shrxm,shrdh,jydzt,Name from jydxx,Bm_jydzt where jydzt=id and sxhh ='"&huohao&"'"
rs.open sql,conn,1,1
if rs.eof then
Response.Write "没有搜索到内容。"
else
do while not rs.eof
danhao="1001-12345-123"
set rx=new RegExp
rx.Global=true
rx.Pattern="^\d{4}-\d{3,}-\d{1,}$"'第二组数字最少3位,如果有他限制自己修改,低三组数字最少1位
if not rx.Test(danhao) then
response.write "单号错误"
response.end
end if
arr=split(danhao,"-")
set rs=server.createobject("adodb.recordset")
if arr(0)="xxxx" then
sql="select jydbh,fhrxm,shrxm,shrdh,jydzt,Name from jydxx,Bm_jydzt where jydzt=id and sxhh ='"&huohao&"'"
elseif arr(0)="xxxxxxxxxxx"
sql="xxxxxxxxxxxx"
else'默认查询的数据库
sql=""
end if
rs.open sql,conn,1,1
if rs.eof then
Response.Write "没有搜索到内容。"
else
do while not rs.eof