?? codesearch_in.asp
字號(hào):
<%@language=vbscript%>
<%
response.buffer=true
Response.Expires = 0
Response.CacheControl = "Private"
%>
<%'On Error Resume Next%>
<%const title="條碼查詢結(jié)果"%>
<!-- #include file=../data/username.inc-->
<!-- #include file=../data/connect.asp-->
<!-- #include file=../data/myPrg.asp-->
<!-- #include file=../data/flag.inc-->
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<link rel=stylesheet type=text/css href=../data/forum.css>
</head>
<%
newcompanyid = request("companyid")
if newcompanyid = "" then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""請(qǐng)先選擇公司再做此步操作!"");"
Response.write "history.go(-1);"
Response.Write "</script>"
Response.End
elseif not isnumeric(newcompanyid) then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""companyid必須為整數(shù)!"");history.go(-1);"
Response.Write "</script>"
Response.End
else
newcompanyid = cint(newcompanyid)
end if
xianhao = trim(request("xianhao"))
sia = trim(request("sia"))
if xianhao = "" and sia = "" then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""箱號(hào)或者條碼至少一個(gè)不得為空白!!!"");"
Response.Write "</script>"
Response.End
end if
xianhao = replace(xianhao,"'","’")
sia = replace(sia,"'","’")
sql = "select company_table from io_company where io_flag = 1 and company_id = "&newcompanyid&" order by id desc"
'Response.Write sql
'Response.End
set rs_data = conn.execute(sql)
if rs_data.eof then
rs_data.close
set rs_data = nothing
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "alert(""箱號(hào)或者條碼不存在!!!"");"
Response.Write "history.go(-1);"
Response.Write "</script>"
Response.End
else
dim io_flag
io_flag = 0
do while not rs_data.eof
'Response.Write sql
'Response.End
io_table = rs_data("company_table")
'如果條碼為空,則箱號(hào)所在的記錄可能是同一記錄的多個(gè)產(chǎn)品
if sia <> "" then
sql = "select in_inwa_id,in_idetail_id from " &io_table&" where 1 = 1 "
if xianghao <> "" then
sql = sql + " and in_info_xianghao = '"&xianhao&"' "
end if
sql = sql + " and in_info_code = '"&sia&"'"
set rs_io = conn.execute(sql)
if not rs_io.eof then
inwa_id = rs_io("in_inwa_id")
detail_id = rs_io("in_idetail_id")
io_flag = 1
'找到記錄則立即退出循環(huán)
rs_io.close
set rs_io = nothing
exit do
end if
rs_io.close
set rs_io = nothing
else
sql = "select in_inwa_id,in_idetail_id from " &io_table&" where in_info_xianghao = '"&xianhao&"' "
sql = sql + "group by in_inwa_id,in_idetail_id "
'Response.Write sql
'Response.End
set rs_o = server.CreateObject("adodb.recordset")
rs_o.Open sql,conn,1,3
if not rs_o.EOF then
count = rs_o.RecordCount
if count = 1 then
inwa_id = rs_o("in_inwa_id")
detail_id = rs_o("in_idetail_id")
io_flag = 1
'找到記錄則立即退出循環(huán)
rs_o.Close
set rs_o = nothing
exit do
else
inwa_id = ""
detail_id = ""
in_flag = false
do while not rs_o.EOF
if in_flag = true then
inwa_id = inwa_id &","& rs_o("in_inwa_id")
detail_id = detail_id &","& rs_o("in_idetail_id")
else
inwa_id = inwa_id & rs_o("in_inwa_id")
detail_id = detail_id & rs_o("in_idetail_id")
in_flag = true
end if
rs_o.MoveNext
loop
io_flag = 1
'找到記錄則立即退出循環(huán)
exit do
end if
end if
rs_o.Close
set rs_o = nothing
end if
rs_data.movenext
loop
if io_flag = 0 then
call closedatabase
Response.Write "<script language=javascript>"
Response.Write "history.go(-1);"
Response.Write "</script>"
Response.End
end if
end if
rs_data.close
set rs_data = nothing
%>
<body topmargin="0">
<%
Showtitle(title)
%>
<form name="form1" method="post" action="baobiao_in_view_print.asp" target=_blank>
<div align="center">
<table width=100% align=center border='1' cellspacing='0' bordercolordark='#000000' bordercolorlight='#DADBFC' bordercolor='#000000'>
<tr>
<td width="24" rowspan="2"><div align="center">No.</div></td>
<td width="97" rowspan="2"><div align="center">
<p>Stock Inward<br>
Advice No.</p></div>
</td>
<td height="30" colspan="4"><div align="center">貨品信息</div></td>
<td colspan="3"><div align="center">其它信息</div></td>
<td colspan="4"><div align="center">簽收信息</div></td>
<td width="63" rowspan="2"><div align="center">備注</div></td>
</tr>
<tr>
<td width="28" height="50"><div align="center">型<br>
號(hào)</div></td>
<td width="35" height="50"><div align="center">顏<br>
色</div></td>
<td width="25" height="50"><div align="center">數(shù)<br>
量</div></td>
<td width="49" height="50"><div align="center">商品號(hào)</div></td>
<td width="48" height="50"><div align="center">空運(yùn)或汽運(yùn)</div></td>
<td width="51" height="50"><div align="center">預(yù)計(jì)到達(dá)時(shí)間</div></td>
<td width="49" height="50"><div align="center">聯(lián)系人/電話</div></td>
<td width="38" height="50"><div align="center">實(shí)收<br>
數(shù)量</div></td>
<td width="87" height="50"><div align="center">簽收日期</div></td>
<td width="35" height="50"><div align="center">簽收<br>
時(shí)間</div></td>
<td width="52" height="50"><div align="center">簽收人</div></td>
</tr>
<%
sql = "select * from inward "
sql = sql + " join dc on inward.inwa_dc_id = dc.dc_id "
sql = sql + " join inward_detail on inward.inwa_id = inward_detail.idetail_inwa_id "
sql = sql + " join product on inward_detail.idetail_prod_id = product.prod_id "
if sia <> "" or count = 1 then
sql = sql + " where inward.inwa_companyid = "&newcompanyid&" and inward.inwa_id = "&inwa_id&" "
sql = sql + " and inward_detail.idetail_id = "&detail_id&" "
else
sql = sql + " where inward.inwa_companyid = "&newcompanyid&" and inward.inwa_id in ("&inwa_id&") "
sql = sql + " and inward_detail.idetail_id in ("&detail_id&") "
end if
if flag > 3 then
sql = sql + " and inward.inwa_dc_id in ("&dcservice&") "
end if
sql = sql + " order by inward.inwa_id asc"
'Response.Write sql
'Response.End
set rs_tongzhi = server.CreateObject("adodb.recordset")
rs_tongzhi.Open sql,conn,1,1
if not rs_tongzhi.eof then
i = 1
do while not rs_tongzhi.eof
%>
<tr>
<td width="24"><%=i%></td>
<td width="97">
<div align="center"><a href="#" onclick="javascript:window.open('search_ruku_record_info.asp?id=<%=rs_tongzhi("inwa_id")%>&companyid=<%=newcompanyid%>','hamier899e','height=500,width=500,scrollbars')"><font color=navy><%Response.Write rs_tongzhi("inwa_sia")%></font></a></div>
</td>
<td><%response.write rs_tongzhi("prod_type")%></td>
<td><%
prod_colorwe = trim(rs_tongzhi("prod_color"))
if prod_colorwe = "" then
response.write " "
else
response.write prod_colorwe
end if
%></td>
<td width="25"><div align="center"><%response.write rs_tongzhi("idetail_no")%></div></td>
<td width="49"><div align="center"><%response.write rs_tongzhi("prod_no")%></div></td>
<td><div align="center"><%response.write rs_tongzhi("inwa_type")%></div></td>
<td><%response.write rs_tongzhi("inwa_yuji_time")%></td>
<td><%response.write rs_tongzhi("inwa_contact")%></td>
<td width="38"><div align="center">
<%if rs_tongzhi("inwa_flag") = 1 then
response.write rs_tongzhi("idetail_rec_no")
else
Response.Write " "
end if
%>
</div></td>
<td width="97">
<%if rs_tongzhi("inwa_flag") = 1 then
response.write formatdatetime(rs_tongzhi("inwa_rec_date"),2)
else
Response.Write " "
end if%></td>
<td width="35">
<%
if rs_tongzhi("inwa_flag") = 1 then
response.write formatdatetime(rs_tongzhi("inwa_rec_date"),4)
else
Response.Write " "
end if%>
</td>
<td width="52"><div align="center">
<%
if rs_tongzhi("inwa_flag") = 1 then
response.write rs_tongzhi("inwa_rec_man")
else
Response.Write " "
end if
%>
</div></td>
<td width="63"><input type="checkbox" name="<%=i%>" value="<%=rs_tongzhi("idetail_id")%>" checked></td>
</tr>
<%
i = i + 1
rs_tongzhi.movenext
loop
end if
%>
<tr>
<td width="24"><div align="center">總計(jì)</div></td>
<td width="97"> </td>
<td> </td>
<td> </td>
<td width="25"> </td>
<td width="49"> </td>
<td> </td>
<td> </td>
<td> </td>
<td width="38"> </td>
<td width="97"> </td>
<td width="35"> </td>
<td width="52"> </td>
<td width="63"> </td>
</tr>
</table>
<input type="hidden" name="no" value="<%=rs_tongzhi.recordcount%>">
<input type="hidden" name="companyid" value="<%=newcompanyid%>">
<%
if rs_tongzhi.recordcount > 0 then
%>
<input class=buttonface type="submit" name="ok" value="打印選擇項(xiàng)">
<input class=buttonface type="reset" name="ok" value="重設(shè)">
<%
end if
rs_tongzhi.Close
set rs_tongzhi = nothing
call closedatabase
%>
<input class=buttonface type="button" name="ok" value="返回" onclick="javascript:window.location.href='codesearch.asp?companyid=<%=newcompanyid%>'">
</form>
</div>
<!--#include file=../data/copyright.asp-->
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -