⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client_productnzjc_list.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'OA 表单生成器1.0
'功能:农资商品库列表
'参数:request("page")=int #当前页码;  request.form("Search")=chr #上次查询条件
%>

<!--#include file="../inc/NoCatch.asp"-->
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->

<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
maxmessage=15 '每页显示记录数
currentpage=request("page") '当前页码
Search=request("Search") '上次查询条件
'------------------------------------------------
'------------------------------------------------取记录
'分页取记录 (返回rs对象)
'rs.recordcount 为记录总数
'rs.PageSize 为本页记录数
'
table="tbioaClient_ProductNzJc" '表名

'接受查询参数
	nzzl=Request("nzzl")'农资种类
	cpmc=Request("cpmc")'产品名称
	sbbs=Request("sbbs")'商标标识
	hgyf=Request("hgyf")'合格与否


'查寻条件
if Search="" then
	Search="WHERE "
	if nzzl<>""	then	Search = Search & "nzzl LIKE '%" & nzzl & "%' and "
	if cpmc<>""	then	Search = Search & "cpmc LIKE '%" & cpmc & "%' and "
	if sbbs<>""	then	Search = Search & "sbbs LIKE '%" & sbbs & "%' and "
	if hgyf<>""	then	Search = Search & "hgyf = '" & hgyf & "' and "
	Search=Search & "1=1"'可查看所有人录入的记录
	'Search=Search & "userid="&LoginID'只能查看自己录入的记录
END if


set rs=Server.CreateObject("ADODB.RecordSet")
sql="select *,(select count(*) from tbioaClient_NzBase where cpmc=tab.cpmc and sbbs=tab.sbbs) as smod from " & table & " tab " & Search & " order by ID desc"
'response.write sql
rs.open sql,oConn,1,1
Showpage=Paging(rs,maxmessage,currentpage,"Search="&Server.URLEncode(Search))
'------------------------------------------------
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
</head>

<body topmargin="10" leftmargin="10">

<table border=0 cellspacing="0" cellpadding="0">
  <tr>
    <td><img border="0" src="../images/icon_menu.gif" align="left">农资质量检测总表 &nbsp;</td>
  </tr>
</table>

<hr width="100%" size=1 color="#000000">
<table border=0 cellspacing="0" cellpadding="0">
  <tr>
    <form name="eventfrm" method="GET" action="">
    <input type="hidden" name="smod" value="<%=smod%>">
    <td nowrap>
    	快速查询:
    	农资种类:<input type="text" name="nzzl" value="<%=htmlout(nzzl)%>" size="15" maxlength="20" class="input">
    	产品名称:<input type="text" name="cpmc" value="<%=htmlout(cpmc)%>" size="15" maxlength="20" class="input">
    	商标标识:<input type="text" name="sbbs" value="<%=htmlout(sbbs)%>" size="15" maxlength="50" class="input">
    	合格与否:<select size="1" name="hgyf" class="input">
          	  <option value="">不限制</option>
          	  <option value="0" <%=selected(hgyf,"0")%>>合格</option>
          	  <option value="1" <%=selected(hgyf,"1")%>>不合格</option>
          	</select>
       <input type="submit" value="查询" class="button0" onmouseout=className="button0" onmouseover=className="button1">
    </td>
    </form>
  </tr>
</table>
<hr width="100%" size=1 color="#000000">

<%=Showpage%>
<br>
<%
if rs.RecordCount=0 then
	response.write "<BR><BR>暂时为空!"
else
%>


<table width="100%" cellspacing="1" cellpadding="2" class="tab">
  <tr>
	<td class="tdTop" width="65" nowrap>检验日期</td>
	<td class="tdTop" nowrap>农资种类</td>
	<td class="tdTop" nowrap>产品名称</td>
	<td class="tdTop" nowrap>商标标识</td>
	<td class="tdTop" nowrap>合格与否</td>
	<td class="tdTop" nowrap>生产厂家</td>
	<td class="tdTop" nowrap>规格型号或生产批号</td>
	<td class="tdTop" nowrap>检验结果</td>
	<td class="tdTop" nowrap>备注</td>
  </tr>
<%for i = 0 to rs.PageSize-1
   If rs.EOF Then Exit For
   if i mod 2 = 0 then td_class="td1" else td_class="td2"
   if rs("smod")>0 then td_class="td6"
%>
  <tr title="经办人:<%=HtmlOut(getusername(rs("userid")))%>">
	<td class="<%=td_class%>"><%=HtmlOut(rs("jyrq"))%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("nzzl"))%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("cpmc"))%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("sbbs"))%></td>
	<td class="<%=td_class%>"><%if rs("hgyf")="1" then response.write "不合格" else response.write "合格"%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("sccj"))%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("scph"))%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("jyjg"))%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("bz"))%></td>
  </tr>
<%
rs.MoveNext
next
%>
</table>


<%
end if
rs.close
%>

</body>

</html>

<%'释放对象变量
oConn.close
%> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -