<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="../Inc/SK.Session.asp" -->
<!--#include file="../Inc/SK.Funtion.asp" -->
<%if Not (getconfig("SK_Office")="0" AND (Session("Manager")="1" OR (JudgePopedomTF(Session("UserName"),"SK100000000") AND JudgePopedomTF(Session("UserName"),"SK100000610")))) then Call ReturnError()%>
<%
if Not isnumeric(JCID(F("ID"))) then Call ReturnError10()
set rs=server.createobject("adodb.recordset")
if Session("Manager")=1 or Session("Manager")=2 then
sql="SELECT * from SK_OfficeBorrow where SK_Del=0 and BorrowID="&JCID(F("ID"))&""
else
sql="SELECT * from SK_OfficeBorrow where SK_Del=0 and SK_SalesID="&Session("UID")&" and BorrowID="&JCID(F("ID"))&""
end if
rs.Open sql,conn,1,3
if rs.eof and rs.bof then Call ReturnError4()
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>查看个人借款</title>
<META http-equiv=Page-Enter content=SKCRM>
<META http-equiv=Page-Exit content=SKCRM>
<META content="MSHTML 6.00.3790.2858" name=GENERATOR>
<LINK href="../images/style.css" type=text/css rel=stylesheet>

<style type="text/css">
<!--
body {
margin: 5px 0px 5px 0px;
overflow-x: hidden;
}
-->
</style>
</head>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<TBODY>
<tr>
<td class="SK_Td_Top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="25"><img src="../images/tab_03.gif" width="12" height="25" /></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle">查看个人借款</td>
<td width="54%"></td>
</tr>
</table></td>
<td width="16"><img src="../images/tab_07.gif" width="16" height="25" /></td>
</tr>
</table></td>
</tr>
<tr>
<td>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="../images/tab_12.gif"></td>
<td>

<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
<tr>
  <td width="14%" class="SK_Text2">报销主题</td>
  <td class="SK_Text1"><%=Rs("SK_Title")%></td>
  <td width="14%" class="SK_Text2">报销类别</td>
  <td width="36%" class="SK_Text1"><%
set RsClass=server.createobject("adodb.recordset")
SqlClass="select * from SK_SystemCategory where SK_Di=144 and CategoryID="&Rs("SK_Di")&""
RsClass.open SqlClass,conn,1,1
Response.write"<font color=#999999>"&RsClass("SK_Name")&"</font></a>"
RsClass.close
set RsClass=Nothing
%></td>
</tr>
<tr>
  <td class="SK_Text2">报销日期</td>
  <td class="SK_Text1"><%=Rs("SK_ATime")%></td>
  <td class="SK_Text2">报销金额</td>
  <td class="SK_Text1"><%=formatnumber(Rs("SK_Amount"),2)%></td>
</tr>
<tr>
  <td class="SK_Text2">审核状态</td>
  <td class="SK_Text1"><%if Rs("SK_ShFeet")=0 then 
Response.write"<font color=""#009999"">未审核</font>"
elseif Rs("SK_ShFeet")=1 then
Response.write"<span style=""CURSOR: hand""><font color=""#0066FF"">已通过</font></span>"
elseif Rs("SK_ShFeet")=2 then
Response.write"<span style=""CURSOR: hand""><font color=""red"">未通过</font></span>"
end if
%></td>
  <td class="SK_Text2">审核人员</td>
  <td class="SK_Text1"><%
set RsShUID=server.createobject("adodb.recordset")
SqlShUID="select * from SK_SystemUsers where UsersID="&Rs("SK_ShUID")&""
RsShUID.open SqlShUID,conn,1,1
Response.write""&RsShUID("SK_OName")&" 审核时间:"&Rs("SK_ShTime")&""
RsShUID.close
Set RsShUID=Nothing
%></td>
</tr>
<%if Rs("SK_ShContent")<>"" then%>
<tr>
  <td class="SK_Text2">审核备注</td>
  <td colspan="3" class="SK_Text1"><%=Rs("SK_ShContent")%></td>
  </tr>
  <%end if%>
<tr>
  <td class="SK_Text2">借款状态</td>
  <td class="SK_Text1"><%if Rs("SK_Feet")=0 then Response.write"<font color=red>未借款</font>" else Response.write"<font color=blue>已借款</font>" end if%></td>
  <td class="SK_Text2">财务人员</td>
  <td class="SK_Text1"><%
set RsFinUID=server.createobject("adodb.recordset")
SqlFinUID="select * from SK_SystemUsers where UsersID="&Rs("SK_FinUID")&""
RsFinUID.open SqlFinUID,conn,1,1
Response.write""&RsFinUID("SK_OName")&" 借款时间:"&Rs("SK_FinTime")&""
RsFinUID.close
Set RsFinUID=Nothing
%></td>
</tr>

<tr>
  <td valign="top" class="SK_Text2">借款备注</td>
  <td colspan="3" valign="top" class="SK_FContent"><%=Rs("SK_Content")%></td>
  </tr>
<%
'自定义选项开始
set RsOptions=server.createobject("adodb.recordset")
sqlOptions="SELECT * from SK_OfficeOptions where SK_Di=2 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsOptions.Open sqlOptions,conn,1,1
if RsOptions.bof and RsOptions.eof then
else
%>
<tr>
  <td colspan="4" class="SK_Title1">自定义选项</td>
</tr>
<tr>
  <td colspan="4" class="SK_Text1">
<%
Response.write"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
for Optionsi=1 to RsOptions.recordCount '变量i从1循环到数据库中的全部记录数 
if (Optionsi mod 2 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr>" 
end if
Response.write"<td class=""SK_Text2"" width=""14%"">"&RsOptions("SK_Title")&"</td><td class=""SK_Text1"">"

Set rs1=Server.CreateObject("ADODB.RecordSet") 
sql1="SELECT * from SK_OfficeOptionsDetail where SK_OptionsID="&RsOptions("FieldID")&" and OptionsDetailID="&rs(""&RsOptions("SK_FieldName")&"")&"" 
rs1.Open sql1,conn,1,1
Response.write""&rs1("SK_OName")&""
rs1.close
set rs1=Nothing

Response.write"</td>"
if (Optionsi mod 2 = 0) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "</tr>" 
end if 
RsOptions.movenext 
next 
Response.write"</table>"
%>
</td>
</tr>
<%
end if
RsOptions.close
set RsOptions=Nothing
'自定义选项结束
'自定义字段开始
set RsFields=server.createobject("adodb.recordset")
sqlFields="SELECT * from SK_OfficeFields where SK_Di=2 and SK_ShowOnForm=0 Order by SK_OrderID asc"
RsFields.Open sqlFields,conn,1,1
if RsFields.bof and RsFields.eof then
else
%>
<tr>
  <td colspan="4" class="SK_Title1">自定义字段</td>
</tr>
<tr>
<td colspan="4" class="SK_Text1">
<%
Response.write"<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
for Fieldsi=1 to RsFields.recordCount '变量i从1循环到数据库中的全部记录数 
if (Fieldsi mod 2 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr>" 
end if
Response.write"<td class=""SK_Text2"" width=""14%"">"&RsFields("SK_Title")&"</td><td class=""SK_Text1"">"&Rs(""&RsFields("SK_FieldName")&"")&"</td>"
if (Fieldsi mod 2 = 0) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "</tr>" 
end if 
RsFields.movenext 
next 
Response.write"</table>"
%>
</td>
</tr>
<%
end if
RsFields.close
set RsFields=Nothing
'自定义字段结束
%>
<tr>
  <td colspan="4" class="SK_Title1">其他信息</td>
  </tr>
<tr>
  <td class="SK_Text2">借款人员</td>
  <td class="SK_Text1"><%
set RsBUsers=server.createobject("adodb.recordset")
SqlBUsers="select * from SK_SystemUsers where UsersID="&Rs("SK_SalesID")&""
RsBUsers.open SqlBUsers,conn,1,1
Response.write""&RsBUsers("SK_OName")&""
RsBUsers.close
Set RsBUsers=Nothing
%></td>
  <td class="SK_Text2">&nbsp;</td>
  <td class="SK_Text1">&nbsp;</td>
</tr>
<tr>
  <td class="SK_Text2">创建人员</td>
  <td class="SK_Text1"><%=Rs("SK_Addor")%></td>
  <td class="SK_Text2">新建时间</td>
  <td class="SK_Text1"><%=Rs("SK_Time")%></td>
</tr>
<%if Rs("SK_Editor")<>"0" then%>
<tr>
  <td class="SK_Text2">修改人员</td>
  <td class="SK_Text1"><%
set RsEditor=server.createobject("adodb.recordset")
SqlEditor="select * from SK_SystemUsers where UsersID="&Rs("SK_Editor")&""
RsEditor.open SqlEditor,conn,1,1
Response.write""&RsEditor("SK_OName")&""
RsEditor.close
Set RsEditor=Nothing
%></td>
  <td class="SK_Text2">修改时间</td>
  <td class="SK_Text1"><%=Rs("SK_ETime")%></td>
</tr>
<%end if%>
<tr>
<td colspan="4" class="SK_Text">
<input type="button" value=" 关闭 " onClick="window.opener.location.reload();window.close();" class="button1" /></td>
</tr>
</table>

</td>
<td width="8" background="../images/tab_15.gif"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="SK_Td_Foot">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" height="20"><img src="../images/tab_18.gif" width="12" height="20" /></td>
<td width="98%" class="SK_Td_Page"></td>
<td width="1%"><img src="../images/tab_20.gif" width="16" height="20" /></td>
</tr>
</table>
	
</td>
</tr>
</TBODY>
</table>
</body>
<%
Call CloseDB()
%>
</html>