<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<%
chk_log()
''''''''''''''''''''''''''''''''
chk_newpwr 4,11,5
			dim tpestr(2)
			tpestr(0)="未审核"
			tpestr(1)="已批准"
			tpestr(2)="已作废"
			dim sttstr(2)
			sttstr(0)="未处理"
			sttstr(1)="已送达"
			sttstr(2)="已寄出"

If SafeRequest("iid")<>"" Then
	iid=SafeRequest("iid")
End If

If chk_int(iid)=false Then
 call errorpage(-2,"错误参数!")
end if
	conn.open constr
	if session("sysclass")>=4 then
	rs.open "select * from v_invlst where i_id = '"&iid&"'",conn,1,1
	else
	rs.open "select * from v_invlst where i_uid="&session("usrid")&" and i_id = '"&iid&"'",conn,1,1
	end if
	  if rs.recordcount<=0 then
      call errorpage(-2,"对不起，该记录不存在！")
      end if

%>
<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="top" height="28"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td height=8> 
            <table cellspacing=0 class=datalist cellpadding=0 width=100% border=0 align="center">
              <tr > 
                <th class=datalistheader  colspan="2" align=center> 基本情况</th>
              </tr>
              <tr> 
                <td class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">发票抬头: </p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"><b> <%=trim(rs("i_copnme_cn"))%> </b> 
                </td>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">发票金额：</p>
                </td>
                <td  class=datalistgrida > 
                  <p style="margin-left: 6"> <%=trim(rs("i_mny"))%> 
                </td>
              </tr>
              <tr> 
                <td class=datalistgrida   height="22" width="30%"> 
                  <p style="margin-left: 6">发票内容：</p>
                </td>
                <td  class=datalistgrida > 
                  <p style="margin-left: 6"> <%=html_encode(trim(rs("i_cnt"))) %> 
                </td>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">核准结果:</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"><%=tpestr(rs("i_tpe"))%> (核准者：<%=rs("i_tpeusr")%>) 
                </td>
              </tr>
              <tr> 
                <td class=datalistgrida  height="22" > 
                  <p style="margin-left: 6">处理状态:</p>
                </td>
                <td  class=datalistgrida height="22" > 
                  <p style="margin-left: 6"><%=sttstr(rs("i_stt"))%> (处理者：<%=rs("i_sttusr")%>) 
                </td>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">申请日期:</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"><%= rs("i_addtme") %> &nbsp; 
                </td>
              </tr>
              <tr> 
                <td class=datalistgrida  height="22" > 
                  <p style="margin-left: 6">投递日期:</p>
                </td>
                <td  class=datalistgrida height="22" > 
                  <p style="margin-left: 6"><%= rs("i_sndtme") %>&nbsp; 
                </td>
              </tr>
              <tr> 
                <td class=datalistgrida  height="22" > 
                  <p style="margin-left: 6">其它说明:</p>
                </td>
                <td  class=datalistgrida height="22" > 
                  <p style="margin-left: 6"><%=html_encode(trim(rs("i_cmt"))) %> 
                    &nbsp; 
                </td>
              </tr>
              <td class=datalistgrida  height="22" colspan="2" > 
                <p style="margin-left: 6">&nbsp; </p>
              </td>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">邮寄地址：</p>
                </td>
                <td  class=datalistgrida > 
                  <p style="margin-left: 6"><%=rs("i_adr_cn")%> 
                </td>
              </tr>
              <tr> 
                <td class=datalistgrida   height="22" width="30%"> 
                  <p style="margin-left: 6">邮政编码：</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"><%=rs("i_cde")%> 
                </td>
              </tr>
              <tr> 
                <td class=datalistgrida height="22"> 
                  <p style="margin-left: 6">收 件 人：</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"><%=rs("i_ctt_cn")%> 
                </td>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">联系电话：</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"><%=rs("i_tel")%> 
                </td>
              </tr>
              <tr > 
                <td class=datalistgrida  height="22" > 
                  <p style="margin-left: 6">所属会员：</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"><a href="javascript:showurl('/master/memmng/mem_dtl.asp?unme=<%=rs("i_unme")%>');" class=commonface><b><%=rs("i_unme")%></b></a> 
                  </p>
                </td>
              </tr>
              <td class=datalistgrida  height="22" colspan="2" > 
                <p style="margin-left: 6">&nbsp; </p>
              </td>
              </tr>
              <tr > 
                <th  class=datalistheader  colspan="2" align=center> 核准操作</th>
              </tr>
              <tr align="center"> 
                <td  class=datalistgrida  height="32" colspan="2"> 
                  <p style="margin-left: 6">
				  <%if rs("i_tpe")<>1 then %> 
                    <input type="button" name="Submit" value="批准" class=btxx onclick="javascript:invok(<%=iid%>);">
					<% end if %>
 				  <%if rs("i_tpe")<>2 then %> 
                   <input type="button" name="Submit2" value="作废" class=btxx onclick="javascript:invno(<%=iid%>);">
 					<% end if %>
 				  <%if rs("i_tpe")=2 then %> 
                  <input type="button" name="Submit3" value="删除" class=btxx onclick="javascript:invdel(<%=iid%>);">
    					<% end if %>
               </p>
                </td>
              </tr>
              <td class=datalistgrida  height="22" colspan="2" > 
                <p style="margin-left: 6">&nbsp; </p>
              </td>
              </tr>
			  <form action=fnc_mng.asp methos=post>
              <tr > 
                <th  class=datalistheader  colspan="2" align=center> 投递操作</th>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">投递日期: </p>
                </td>
                <td class=datalistgrida> 
                  <p style="margin-left: 6"><b> 
                    <input type="text" name="i_sndtme" value="<%
					if isdate(rs("i_sndtme")) and rs("i_sndtme")<>"" then
					response.write (rs("i_sndtme"))
else
					response.write  date()

					end if
					%>">
                    </b> 
                </td>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">投递状态：</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"> 
                    <select name="i_stt">
                      <option value="0" <%if rs("i_stt")=0 then
					  response.write " selected "
					  end if %>>未处理</option>
                      <option value="2" <%if rs("i_stt")=2 then
					  response.write " selected "
					  end if %>>已投递</option>
                      <option value="1" <%if rs("i_stt")=1 then
					  response.write " selected "
					  end if %>>已送达</option>
                    </select>
                </td>
              </tr>
              <tr> 
                <td  class=datalistgrida  height="22" width="30%"> 
                  <p style="margin-left: 6">其它说明：</p>
                </td>
                <td class=datalistgrida  > 
                  <p style="margin-left: 6"> 
                    <textarea name="i_cmt" rows="5" cols="60"><%=rs("i_cmt")%></textarea>
                    <b> 
                    <input type="submit" name="Submit22" value="确定" class=btxx>
                    <input type="hidden" name="module" value="inv_snd">
                    <input type="hidden" name="iid" value="<%=iid%>">
                    </b> 
                </td>
              </tr>
			  </form>
            </table>
          </td>
        </tr>
      </table>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
    </td>
  </tr>
  </tbody> 
</table>
<script>
function invok(iid)
{
if (confirm("请确认是否批准该发票申请？"))
{
showurl("/master/fncmng/fnc_mng.asp?module=inv_adm&iid="+iid+"&i_tpe=1");
}
}
function invno(iid)
{
if (confirm("请确认是否作废该发票申请？"))
{
showurl("/master/fncmng/fnc_mng.asp?module=inv_adm&iid="+iid+"&i_tpe=2");
}
}
function invdel(iid)
{
if (confirm("请确认是否删除该发票申请？"))
{
showurl("/master/fncmng/fnc_mng.asp?module=inv_del&iid="+iid);
}
}
</script>
<!--#include virtual="/incs/bottom.asp"-->

