<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp"-->
<%chk_log()
Chk_newpwr 4,11,5
conn.open constr %>
<%
perpage=20
ThePage=0
page=0
rcount=0
thepage=0
'''''''''''''''''''''''''''''''''
ordernum=SafeRequest("ordernum")
if chk_int(ordernum)=true then
if ordernum=11 then
orderstring=" i_copnme_cn asc"
elseif ordernum=12 then
orderstring=" i_copnme_cn desc"
elseif ordernum=21 then
orderstring=" i_mny asc"
elseif ordernum=22 then
orderstring=" i_mny desc"
elseif ordernum=31 then
orderstring=" i_unme asc"
elseif ordernum=32 then
orderstring=" i_unme desc"
elseif ordernum=41 then
orderstring=" i_tpe asc"
elseif ordernum=42 then
orderstring=" i_tpe desc"
elseif ordernum=51 then
orderstring=" i_stt asc"
elseif ordernum=52 then
orderstring=" i_stt desc"
elseif ordernum=61 then
orderstring=" i_addtme asc"
elseif ordernum=62 then
orderstring=" i_addtme desc"
else
orderstring=" i_copnme_cn asc"
end if
else
ordernum=11
orderstring=" i_copnme_cn "
end if
'''''''''''''''''''''''''''''''''''''''''
   if session("sysclass")>=5 then
   query="select * from v_invlst where  1=1  "&keywords&timestrings&pdtfncstring&" order by "&orderstring
   else
   query="select * from v_invlst where  (u_rotnme='"&session("usrname")&"' or (u_rotnme='' and ("&session("sysarestr")&"  or u_myare=0)))   "&keywords&timestrings&pdtfncstring&"  order by "&orderstring
   end if
rs.open query,conn,1,1
if rs.RecordCount<=0 then
          ErrMsg="<font color=#ff0000>对不起</font>，没有搜索到符合条件的记录！..."
		
	   else
	      rcount=rs.recordcount
	      rs.pagesize=perpage
		  ThePage=rs.pagecount
		  if Chk_Int(SafeRequest("page"))=false then
		  page=1
		  else
		   page=cint(SafeRequest("page"))
		    if page<=0  then
		       page=1
		    elseif page>ThePage then
		       page=ThePage
		    end if	  
		  end if
		    rs.absolutepage=page
       end if   

%>
<script language="javascript">
<!--

function tofirst()
{searchform.page.value=1;
searchform.submit();
 }
  function toprev()
{searchform.page.value-=1;
searchform.submit();
 }
  function tonext()
{
searchform.page.value=<%=page%>-1+2;
searchform.submit();
 }
  function tolast()
{searchform.page.value=<%=ThePage%>;
searchform.submit();
 }
 function toorder(ordn)
{searchform.ordernum.value=ordn;
searchform.page.value=1;
searchform.submit();
 }
 function delit(n_id)
 {
 if (confirm("确定删除吗？"))
 location.href="art_mng.asp?module=art_del&nid="+n_id;
 }

 //-->
 </script>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><b>发票列表</b></td>
          <td valign=bottom noWrap align=right 
                        width="75%">&nbsp;</td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2  class=menuline></td>
        </tr>
        </tbody> 
      </table>
      <br>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="middle" height="28"> 
      <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tbody> 
        <form action=inv_lst.asp method=post name=searchform2>
          <tr> 
            <td height=20 width="119">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
              <div align="center"> 
                <input type=hidden name=ordernum value="<%=ordernum%>">
                <%=page_turn%></div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select name="page" onChange="javascript:document.searchform2.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <table border=0 cellpadding=0 
                        cellspacing=0 class=datalist align="center"  width="100%">
        <tbody> 
        <tr > 
          <th class=datalistheader width="6%" align=center> <b>序号</b> </th>
          <%
			if ordernum=11 then
			odr1=12
			else
			odr1=11
			end if
			if ordernum=21 then
			odr2=22
			else
			odr2=21
			end if
			if ordernum=31 then
			odr3=32
			else
			odr3=31
			end if
			if ordernum=41 then
			odr4=42
			else
			odr4=41
			end if
			if ordernum=51 then
			odr5=52
			else
			odr5=51
			end if
			if ordernum=61 then
			odr6=62
			else
			odr6=61
			end if
			%>
          <th class=datalistheader width="30%" align=center><a  class=commonface href="javascript:toorder(<%=odr1%>);"><b>抬头</b></a></th>
          <th class=datalistheader width="12%" align=center ><a  class=commonface href="javascript:toorder(<%=odr2%>);"><b>金额</b></a></th>
          <th class=datalistheader width="12%" align=center ><a  class=commonface href="javascript:toorder(<%=odr3%>);"><b>用户</b></a></th>
          <th class=datalistheader align=center width="8%"><a class=commonface  href="javascript:toorder(<%=odr4%>);"><b>核准</b></a></th>
          <th class=datalistheader align=center width="8%"><a class=commonface href="javascript:toorder(<%=odr5%>);"><b>状态</b></a></th>
          <th class=datalistheader align=center width="13%"><a class=commonface href="javascript:toorder(<%=odr6%>);"><b>申请时间</b></a></th>
          <th class=datalistheader align=center><b>操作</b></th>
        </tr>
        <%
			dim tpestr(2)
			tpestr(0)="未审核"
			tpestr(1)="已批准"
			tpestr(2)="已作废"
			dim sttstr(2)
			sttstr(0)="未处理"
			sttstr(1)="已送达"
			sttstr(2)="已寄出"
		  i=1
	Do While Not rs.eof 
	if i mod 2=1 then
	classstl="datalistgrida"
	else
	classstl="datalistgridb"
	end if
	%>
        <tr > 
          <td  class=<%=classstl%>  align=center height="20"><%=i+perpage*(page-1)%></td>
          <td class=<%=classstl%> ><a href="javascript:showurl('inv_edt.asp?iid=<%=rs("i_id")%>');" class=commonface><%=rs("i_copnme_cn")%></a> 
          </td>
          <td class=<%=classstl%> align=center><%=rs("i_mny")%></td>
          <td class=<%=classstl%> align=center><%=rs("i_unme")%></td>
          <td  class=<%=classstl%>  align=center><%=tpestr(rs("i_tpe"))%></td>
          <td  class=<%=classstl%>  align=center><%=sttstr(rs("i_stt"))%></td>
          <td  class=<%=classstl%>  align=center><%=rs("i_addtme")%>&nbsp;</td>
          <td   class=<%=classstl%>>&nbsp; <a href="javascript:showurl('inv_edt.asp?iid=<%=rs("i_id")%>');" class=commonface><u>管理</u></a> 
          </td>
        </tr>
        <%
  rs.movenext
i=i+1
if i>perpage then
exit do
end if

  loop 
  	rs.close
	conn.close
  %>
        </tbody> 
      </table>
      <div align="center"></div>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tbody> 
        <form action=inv_lst.asp method=post name=searchform>
          <tr> 
            <td height=20 width="120">&nbsp;共计 <b> <%=rcount%> </b>条记录 </td>
            <td height=20> 
              <div align="center"> 
                <input type=hidden name=ordernum value="<%=ordernum%>">
                <%=page_turn%> </div>
            </td>
            <td height=20 width="120"> 
              <div align="right">转第 
                <select name="page" onChange="javascript:document.searchform.submit();">
                  <option selected value=<%=page%>><%=page%></option>
                  <%
				   for i=1 to thepage
				   response.write "<option value="&i&">"&i&"</option>"
				   next
				   %>
                </select>
                页</div>
            </td>
          </tr>
        </form>
        </tbody> 
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height=8></td>
        </tr>
      </table>
      <br>
    </td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->

