?? query.asp
字號:
<!--#include file="conn.asp"-->
<%
On Error Resume next
response.charset="GB2312"
session.codepage=936
call admintop()
%>
<SCRIPT LANGUAGE=javascript>
var tt='start';
var ii='start';
function turnit(ss,bb) {
if (ss.style.display=="none") {
if(tt!='start') tt.style.display="none";
if(ii!='start') ii.src="";
ss.style.display="";
tt=ss;
ii=bb;
bb.src="";
}
else {
ss.style.display="none";
bb.src="";
}
}
</SCRIPT>
<table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
<tr>
<td>
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
<tr>
<td height=15 align=center colspan=15 class=classtop>56770 藥品管理系統(tǒng)</td>
</tr>
<form name=form2 method=post action=query.asp>
<tr >
<td class="classtd" align="center" colspan=2>庫存總額:<strong><font color=red>
<%Set rs=conn.execute("select p_cbprice,p_kucun from [56770_product]")
If rs.eof Then
sumprice="0"
Else
Do While Not rs.eof
sumprice=sumprice+(rs("p_cbprice")*rs("p_kucun"))
rs.movenext
Loop
End If
rs.close:Set rs=Nothing
response.write FormatNumber(sumprice,2)
%> 元</font></strong>
</td>
<td class="classtd" align="center">
<select name="anclassid" onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
<option selected>--快速跳轉(zhuǎn)--</option>
<option value=index.asp>返回首頁</option>
<option value=query.asp>查看全部銷售藥品</option>
<option value=?s_type=1>查看今日銷售藥品</option>
<%set rs=conn.execute("select s_id,s_name from [56770_sort] order by s_paixu desc")
if not rs.eof then
do while not rs.eof
%>
<!--<option value="?s_name=<%=server.urlencode(Trim(rs("s_name")))%>"><%=rs("s_name")%></option>-->
<%rs.movenext
loop
end if
rs.close:set rs=nothing
%>
</select></td>
<td class="classtd" colspan="5" align=right>分類:
<select name=s_name style="height:18px;">
<option value="0">全部分類</option>
<%set rs=conn.execute("select s_id,s_name from [56770_sort] order by s_paixu desc")
if not rs.eof then
do while not rs.eof
%>
<option value="<%=Trim(rs("s_name"))%>"><%=rs("s_name")%></option>
<%rs.movenext
loop
end if
rs.close:set rs=nothing
%></select>
<select name="p_year"><option value="2006">2006</option><option value="2007">2007</option><option value="2008">2008</option></select>年
<select name="p_mon"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option></select>月
<select name="p_day"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option><option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option><option value="30">30</option><option value="31">31</option></select>日--
<select name="p_year_1"><option value="2006">2006</option><option value="2007">2007</option><option value="2008">2008</option></select>年
<select name="p_mon_1"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option></select>月
<select name="p_day_1"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option><option value="24">24</option><option value="25">25</option><option value="26">26</option><option value="27">27</option><option value="28">28</option><option value="29">29</option><option value="30">30</option><option value="31">31</option></select>日
關(guān)鍵詞:<input name="gjc" size="15" class=form>
<input type="hidden" name="s_type1" value="1">
<input type=submit name=tiaojian value=" 查 詢 " class=button> </td>
</tr></form>
</table>
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
<%
p_year=request("p_year")
p_mon=request("p_mon")
p_day=request("p_day")
p_year_1=request("p_year_1")
p_mon_1=request("p_mon_1")
p_day_1=request("p_day_1")
qishi="0:00:00"
p_day1=p_year&"-"&p_mon&"-"&p_day&" "&qishi
p_day2=p_year_1&"-"&p_mon_1&"-"&p_day_1&" "&qishi
s_sj=replace(request("s_sj"),"'","’")
gjc=replace(request("gjc"),"'","’")
s_type=request("s_type")
s_type1=request("s_type1")
day1=now()
set rs=server.CreateObject("adodb.recordset")
sql="select * from [56770_pro_log] where p_name<>''"
If gjc<>"" Then sql=sql&" and p_name like '%"&gjc&"%'"
If s_type="" And s_type1<>"" Then sql=sql&" and "&p_day1&">p_sj and p_sj<"&p_day2&""
If s_type<>"" Then sql=sql&" and datediff('h',day1,p_sj)<24"
sql=sql&" order by p_l_id desc"
'response.write sql
rs.open sql,conn, 1, 1
%>
<tr class=classtop1>
<td height="15" align="center" width="40%"><img src=database/images/t1.gif>品名</td>
<td height="15" align="center" width="15%">類別</td>
<td height="15" align="center" width="10%">銷售價</td>
<td height="15" align="center" width="5%">成本價</td>
<td height="15" align="center" width="5%">數(shù)量</td>
<td height="15" align="center" width="15%">日期</td>
</tr>
<%if rs.eof and rs.bof then
response.write "還沒有數(shù)據(jù),請?zhí)砑樱?quot;
Else
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs.pagesize=10
rs.AbsolutePage=pagecount
do while not rs.eof%>
<tr>
<td class="classtd" id=tag<%=rs("p_l_id")%> style='CURSOR: hand' onclick=turnit(Content<%=rs("p_l_id")%>,tag<%=rs("p_l_id")%>); language=JScript>
<img src=database/images/+.gif>
<%=Replace(rs("p_name"),gjc,"<font color=red>"&gjc&"</font>")%>
</td>
<td class="classtd" align="center" >
<%=rs("p_sort")%>
</td>
<td class="classtd" align="center">
<%=Replace(FormatNumber(rs("p_price"),2),gjc,"<font color=red>"&gjc&"</font>")%>
</td>
<td class="classtd" align="center">
<%=FormatNumber(rs("p_cbprice"),2)%>
</td>
<td class="classtd" align="center">
<%=rs("p_count")%>
</td>
<td class="classtd"> <%=rs("p_sj")%>
</td>
</tr>
<tr>
<td colspan="6" align="right" height="25" id=Content<%=rs("p_l_id")%> style='DISPLAY: none'>
<table>
<tr><td width="60%">銷售總額:<%=formatnumber(rs("p_cbprice"),2)%>×<%=rs("p_count")%>=<%=formatnumber(rs("p_cbprice")*rs("p_count"),2)%></td>
<td width="40%" align="center">
利潤:<%=formatnumber((rs("p_cbprice")-rs("p_price"))*rs("p_count"),2)%>
</td></tr>
</table>
</td>
</tr>
<%
rs.movenext
i=i+1
if i>=rs.pagesize then exit do
loop
%>
<form action="index.asp" method="post">
<tr class=classfooter><td height="25" align="center" colspan=6>
<div align="center"> 共有數(shù)據(jù) <b><%=rs.recordcount%></b> 條, 頁次: <b><font color=red><%=pagecount%></font>/<%=rs.pagecount%></b>,
當(dāng)前從第
<%
if pagecount<=1 then
response.write "<font color=red>1</font>"
else
response.write "<font color=red>" & pagecount*rs.pagesize-rs.pagesize+1 & "</font>"
end if
%>
條開始。
<% if pagecount=1 and rs.pagecount<>pagecount and rs.pagecount<>0 then%>
<a href="?page=<%=cstr(pagecount+1)%>">下一頁</a>
<% end if %>
<% if rs.pagecount>1 and rs.pagecount=pagecount then %>
<a href="?page=<%=cstr(pagecount-1)%>">上一頁</a>
<%end if%>
<% if pagecount<>1 and rs.pagecount<>pagecount then%>
<a href="?page=<%=cstr(pagecount-1)%>">上一頁</a> <a href="?page=<%=cstr(pagecount+1)%>">下一頁</a>
<% end if%>
直接到第
<select name="page">
<%for i=1 to rs.pagecount%>
<option value="<%=i%>"><%=i%></option>
<%next%>
</select>頁
<input type="submit" name="go" value="跳轉(zhuǎn)" class=button>
</div>
</td>
</form>
</tr>
<%
End If
rs.close
set rs=Nothing
%>
<tr><td align=center height=25 colspan=15>[<a href="admin/default.asp">系統(tǒng)管理</a>]</td></tr>
</table>
</td></tr>
</table>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -