query.asp
上传用户:feitengda
上传日期:2022-07-20
资源大小:73k
文件大小:10k
- <!--#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 药品管理系统</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>--快速跳转--</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>日
- 关键词:<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%">数量</td>
- <td height="15" align="center" width="15%">日期</td>
- </tr>
- <%if rs.eof and rs.bof then
- response.write "还没有数据,请添加!"
- 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"> 共有数据 <b><%=rs.recordcount%></b> 条, 页次: <b><font color=red><%=pagecount%></font>/<%=rs.pagecount%></b>,
- 当前从第
- <%
- 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="跳转" 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">系统管理</a>]</td></tr>
- </table>
- </td></tr>
- </table>