{load(fhead)}
</head>
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&c=Dealer&a=home">经销商管理系统</a> >> 自有商品管理 >> 商品发布与管理</span></div>
	<div id="tabs5">
		<ul class="menu5" id="menu5">
		<li onclick="location.href='index.php?m=mod_agent&c=Loan&a=Create';"><span class="xg">借款申请</span></li>
		<li onclick="location.href='index.php?m=mod_agent&c=Loan';" class="hover"><span class="jl">全部记录</span></li>
		</ul>
	</div>
	<div id="adddiv" style="position:absolute;top:100px;left:230px;;width:380px;display:none">
  	<div style="padding:20px;background:#F1F5FA;border:5px #75BCD7 solid">
  	<div style="font-size:14px;font-weight:bold;padding:5px;float:left">输入密码确认</div>
  	<div style="float:right;"><img src="{$vd['content']}images/icon_del.gif" onclick="disp('adddiv')" style="cursor:pointer"/></div>
  	<form name="form1" method="post" action="index.php?m=mod_agent&c=Loan" id="tform" style="clear:both">
  	<table border="0" cellspacing="0" cellpadding="0" width="100%">
      <tr>
        <td width="25%" height="35px" align="center">超级密码</td>
        <td width="75%"><input type="password" class="myinput" style="font-weight:normal" name="superpwd" size="24"/></td>
      </tr>
      <tr>
      	<td width="25%"></td>
        <td width="75%">
        	<input type="hidden" name="ordno" id="ordno" value="" />
        	<input type="hidden" name="a"  id="a" value=""/>
        	<input type="submit" value="提 交" class="button"/>
        	<input type="button" value="取 消" onclick="disp('adddiv')" class="button"/>
        </td>
      </tr>
    </table>
    </form>
    </div>
  </div>
	<table width="98%" border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<form name="form1" method="post" action="?Action=ToUpDisplay">
		<table class="table" width="100%" cellspacing="0" cellpadding="0" border="0">
		<tr class="tabletitle">
			<td width="14%" class="heardertop1">
        借据</td>
      <td width="9%" class="heardertop1">
        类型</td>
      <td width="9%" class="heardertop1">
        金额({$vd['lang']['moneyunit']})</td>
      <td width="10%" class="heardertop1">
        原因</td>
      <td width="8%" class="heardertop1">
        对方</td>
      <td width="11%" class="heardertop1">
        借款时间</td>
      <td width="11%" class="heardertop1">
        约定还款</td>
      <td width="9%" class="heardertop1">
        已还</td>
      <td width="11%" class="heardertop1">
        还款日期</td>
      <td width="8%" class="heardertop1">
        操作</td> 
    </tr>
    <!--foreach($vd['items'] as $item) {-->
    <tr class="stline" onmouseover="this.className='nd'" onmouseout="this.className='stline'">
    	<td>{$item['ordno']}</td>
      <td>{#TradeType($item['thisaction'])}</td>
      <td style="color:#0000ff;font-weight:bold">{$item['dollars']}</td>
      <td>{$item['reason']}&nbsp;</td>
      <td>{#DisplayCode($item['otherside'])}</td>
      <td>{$item['createdate']}&nbsp;</td>
      <td>{$item['deadline']}&nbsp;</td>
      <td style="color:#ff0000;font-weight:bold">{$item['payback']}&nbsp;</td>
      <td>{$item['paybackdate']}&nbsp;</td>
      <td>
        <!--if($item['thisaction'] == 21){-->
          <!--if($item['state'] == 0){-->
          <a href="#" onclick="setaction('{$item['ordno']}', 'CheckIn')"><font color="#ff00ff">同意</font> / <a href="#" onclick="setaction('{$item['ordno']}', 'Refuse')"><font color="#ff0000">拒绝</font></a>
          <!--}else if($item['state'] == 1){-->
          <a href="index.php?m=mod_agent&c=Loan&a=Urge&ordno={$item['ordno']}"><font color="#ff00ff">追债</font></a>
          <!--}else if($item['state'] == -1){-->
          <font color="#cccccc">已拒绝</font>
          <!--}else{-->
          <font color="#0000ff">已还款</font>
          <!--}-->
        <!--}else{-->
          <!--if($item['state'] == 0){-->
          <font color="#ff0000">等待</font>
          <!--}else if($item['state'] == 1){-->
          <a href="#" onclick="setaction('{$item['ordno']}', 'Repayment')"><font color="#ff00ff">还款</font></a>
          <!--}else if($item['state'] == -1){-->
          <font color="#cccccc">已拒绝</font>
          <!--}else{-->
          <font color="#0000ff">已还款</font>
          <!--}-->
        <!--}-->
        
        </font>
      </td>
    </tr>
    <!--}-->
		</table>
	</td>
	</tr>
	</table>
	<div id="page" align="right">
		{load(fpage)}
	</div>
	</form>
	
	<br>
	<br>
<script type="text/javascript">
	var $=function(id){
		return document.getElementById(id);
	}
	
	function setaction(ordno,act)
	{
		$("ordno").value = ordno;
		$("a").value = act;
		disp('adddiv');
	}
	
	function disp(idx)
	{
		$(idx).style.display = ($(idx).style.display == "") ? "none" : "";
	}
</script>
</body>
</html>

