?? product_in_compiles.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<!--#include file="checkuser.asp"-->
<head>
<style type="text/css">
<!--
.select {
color: #FFFFFF;
background-color: #08246b;
}
.offline {
filter: Gray;
}
-->
</style>
<title>∷企業生產管理信息系統∷</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>
</head>
<body >
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<tr><td align="center">
<%if request("action")<>"search" then%>
<table width="800" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">詳細消耗信息查詢</font></b>
</td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="product_In_Compiles.asp?action=search" >
<tr>
<td><input type="checkbox" name=SeachModel value=4>按爐號</td>
<td><select name="Supplier" >
<%
set rs=server.createobject("adodb.recordset")
sql="select * from guolu"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
%>
<option value="<%=rs("guoluname")%>"><%=rs("guoluname")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if
%>
</select>
</td>
</tr>
<tr>
<td><input type="checkbox" name=SeachModel value=1>按班位</td>
<td><select name="banwei" >
<%
set rs=server.createobject("adodb.recordset")
sql="select * from banwei"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
%>
<option value="<%=rs("banweiname")%>"><%=rs("banweiname")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if
%>
</select>
</td>
</tr>
<tr><td height="30" ><input type="checkbox" name=SeachModel value=5>按入庫日期</td><td ><INPUT name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"> 到 <INPUT name="uptime1" onFocus="show_cele_date(uptime1,'','',uptime1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"></td></tr><tr><td align="center" height="30" colspan="8"><input type="submit" name="Submit" value="查詢" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查詢"></td></tr>
</form>
</table>
</td>
</tr>
</table>
<br><br>
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<tr>
<td>
<table width="800" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">單月入庫匯總查詢</font></b>
</td>
</tr>
</table>
<table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="product_In_Compiles.asp?action=search" >
<tr><td height="40" valign="middle" width="30%" align="center"><input type="checkbox" name=SeachModel value=7>選擇查詢日期(1個自然月) </td><td width="30%"> <INPUT name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"> 到 <INPUT name="uptime1" onFocus="show_cele_date(uptime1,'','',uptime1)" value="<%=year(now())%>-<%=month(now())%>-<%=day(now())%>" size="8"></td><td height="30" width="40%"><input type="submit" name="Submit" value="查詢" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查詢"> * 如:2006年8月則選擇2006-8-1到2006-8-31</td></tr>
</form>
</table>
</td>
</tr>
</table>
<br><br>
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<tr>
<td>
<table width="800" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">年度入庫匯總查詢</font></b>
</td>
</tr>
</table>
<table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<form name="powersearch" method="post" action="product_In_Compiles.asp?action=search" >
<tr><td height="40" valign="middle" width="30%" align="center"><input type="checkbox" name=SeachModel value=8>請輸入查詢年份 </td><td width="30%"> <INPUT name="nian" value="<%=year(now())%>" onKeyUp="value=value.replace(/[^\d\.]/g,'')" maxlength="4" size="6"> </td><td height="30" width="40%"><input type="submit" name="Submit" value="查詢" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'" title="查詢"></td></tr>
</form>
</table>
<%else%>
<%
dim SeachModel
SeachModel=request.form("SeachModel")
Supplier=request.form("Supplier")
banwei1=request.form("banwei")
uptime=cstr(trim(request.form("uptime")))
uptime1=cstr(trim(request.form("uptime1")))
end_time=cstr(trim(request.form("end_time")))
end_time1=cstr(trim(request.form("end_time1")))
nian=cstr(trim(request.form("nian")))
'查詢代碼開始
names=Split(SeachModel,", ")
i=0
sql="select * from product_In_Store where"
for each name in names
if names(i)="1" then
sql=sql+" and banwei = '"&banwei1&"'"
end if
if names(i)="5" then
sql=sql+" and uptime between #"&uptime&"# and #"&uptime1&"#"
end if
if names(i)="6" then
sql=sql+" and end_time between #"&end_time&"# and #"&end_time1&"#"
end if
if names(i)="7" then
sql=sql+" and uptime between #"&uptime&"# and #"&uptime1&"#"
end if
if names(i)="8" then
sql=sql+" and year(uptime) = '"&nian&"'"
end if
if names(i)="2" then
sql=sql+" and pinming like '%"&pinming&"%'"
end if
if names(i)="4" then
sql=sql+" and Supplier = '"&Supplier&"'"
end if
if names(i)="3" then
sql=sql+" and guige = '"&guige&"'"
end if
i=i+1
next
sql=sql+" order by -id"
set rs=server.createobject("adodb.recordset")
sql=Replace(sql, "where and", "where")
%>
<table width="800" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">查 詢 結 果 列 表</font></b>
</td>
</tr>
</table>
<table id = "PrintA" width="800" border="1" cellpadding="0" cellspacing="1" bordercolor="#EFEADD">
<tr class="but">
<td width="80" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">入庫日期</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">爐 號</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">班 位</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">蘭 碳</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">生 石 灰</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">無 煙 煤</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">用 電 量</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">單 耗</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">鋼 材</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">電極糊</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">氧 氣</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">碳 棒</td>
<td width="60" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">產 量</td>
</tr>
<tr valign="top">
<td colspan="13" align="center" class="iframe">
<table width="800" border="1" cellpadding="0" cellspacing="1" bordercolor="#EFEADD">
<%
dim i
i=0
use_num=0
use_Amount=0
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td><br><br><center>還沒有符合條件的查詢!</center><br><br></td></tr>"
else
do while not rs.eof
i=i+1
%>
<tr onmouseover="this.bgColor='#73A475';" onmouseout="this.bgColor=''"">
<td height="18" align="center" width="80"><%=rs("uptime")%></td>
<td align="center" width="60"><%=rs("Supplier")%></td>
<td align="center" width="60"><%=rs("banwei")%></td>
<td align="center" width="60"><%=Formatnumber(rs("lantan"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("shengshihui"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("wuyanmei"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("yongdianliang"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("danhao"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("gangcai"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("tiepi"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("yangqi"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("yique"),2,-1,0,0)%></td>
<td align="center" width="60"><%=Formatnumber(rs("use_num"),2,-1,0,0)%></td>
</tr>
<%
lantan_num=lantan_num+rs("lantan")
shengshihui_num=shengshihui_num+rs("shengshihui")
wuyanmei_num=wuyanmei_num+rs("wuyanmei")
yongdianliang_num=yongdianliang_num+rs("yongdianliang")
danhao_num=danhao_num+rs("danhao")
danhao1=danhao_num/i
gangcai_num=gangcai_num+rs("gangcai")
tiepi_num=tiepi_num+rs("tiepi")
yangqi_num=yangqi_num+rs("yangqi")
yique_num=yique_num+rs("yique")
use_num=use_num+rs("use_num")
rs.movenext
loop
end if
%>
<tr><td colspan="13" height="30"> 符合查詢條件的入庫記錄總共為 <font color="#cc0000"><%=i%></font> 條</td></tr>
<tr>
<td height="18" align="center" width="80" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red>總計:</font></td>
<td align="center" colspan="2" width="120" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"> </td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(lantan_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(shengshihui_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(wuyanmei_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(yongdianliang_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(danhao1,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(gangcai_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(tiepi_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(yangqi_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(yique_num,2,-1,0,0)%></font></td>
<td align="center" width="60" class="but1" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but1'"><font color=red><%=Formatnumber(use_num,2,-1,0,0)%></font></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0">
<form name="search" method="post" action="product_in_Detail.asp" target="_blank" >
<tr><td>
<input name="SeachModel" type="hidden" value="<%=SeachModel%>">
<input name="pinming" type="hidden" value="<%=pinming%>">
<input name="class" type="hidden" value="<%=class1%>">
<input name="banwei" type="hidden" value="<%=banwei1%>">
<input name="Supplier" type="hidden" value="<%=Supplier%>">
<input name="uptime" type="hidden" value="<%=uptime%>">
<input name="uptime1" type="hidden" value="<%=uptime1%>">
<input name="end_time" type="hidden" value="<%=end_time%>">
<input name="end_time1" type="hidden" value="<%=end_time1%>">
<input name="nian" type="hidden" value="<%=nian%>">
<input type="submit" name="sub" value="生成明細表"></td></tr></form></table>
<%end if%>
</TD></TR>
</table>
</body>
</html>
<!--#include file="footer.htm"--></TD>
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -