{load(fhead)}
<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="type">
		<ul>
			<li><span class="yuan">转款给下级</span></li>
			<li><a href="index.php?m=mod_agent&c=trade&tpl=history&tradetype=31,32"><span class="jl">转款记录</span></a></li>
		</ul>
	</div>
	<!--$item=$vd['item'];-->
	<div id="hearder"><span>转款给下级</span></div>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<form name="finance" method="post" action="index.php?m=mod_agent&c=funds&a=TranSave">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
    <tr>
      <td class="tableleft1">帐户名：</td>
      <td class="tableright1">{$item['aname']}</td>
    </tr>
    <tr>
      <td class="tableleft1">公司名：</td>
      <td class="tableright1">{$item['company']}</td>
    </tr>
    <tr>
      <td class="tableleft1">帐户可用余额：</td>
      <td class="tableright1" style="color:#ff0000">{$item['aremain']} {$vd['lang']['moneyunit']}</td>
    </tr>
    <tr>
      <td class="tableleft1"><span id="loanlable">转款金额</span>：</td>
      <td class="tableright1"><input type="text" class="input" style="font-weight:normal" name="dollars" size="24"/> {$vd['lang']['moneyunit']}</td>
    </tr>
    <tr>
      <td class="tableleft1"><span id="sidelable">对方编号</span>：</td>
      <td class="tableright1">
      	<!--if($item['parentid']>0){--><input type="radio" name="fundsto" value="0" onclick="setval(this)"/> 直属上级 <!--}-->
        <input type="radio" name="fundsto" value="1" onclick="setval(this)"/> 下级</td>
      </td>
    </tr>
    <tr id="underling" style="display:none">
      <td class="tableleft1">下级编号：</td>
      <td class="tableright1">
      	<select name="underlingid">
      	<option value="0">请选择您的下级编号</option>
      	<!--foreach($vd['agents'] as $item){-->
      	<option value="{$item['aid']}">{$item['company']}({#DisplayCode($item['aid'])})</option>
      	<!--}-->
        </select>
      </td>
    </tr>
    <tr>
      <td class="tableleft1">超级密码：</td>
      <td class="tableright1"><input type="password" class="input" style="font-weight:normal" name="superpwd" size="24"/></td>
    </tr>
    <tr>
      <td class="tableleft1">转款原因：</td>
      <td class="tableright1">
      	<textarea name="reason" cols="50" rows="5" scrolling="yes" style="padding:5px"></textarea>
      </td>
    </tr>
		<tr>
		<td height="30" class="tableleft1">&nbsp;</td>
		<td class="tableright1">
		<input type="submit" name="submit" class="button" value="我要转款">
		<input type="reset" name="reset" class="button" value="重新填写"></td>
		</tr>
		</table>
		</form>
	</td>
	</tr>
	</table>
	<script type="text/javascript">
	var $ = function(id){
		return document.getElementById(id);
	}
	
	function setval(obj){
		if(obj.value == 1)
		{
			$("underling").style.display = "";
		}
	  else
		{
			$("underling").style.display = "none";
		}
	}
</script>
</body>
</html>
