<?php include_once(mvc::$cfg['PATH_TPL'].'public/topSeller.php');?>
<div class="maintb">
	<?php include_once(mvc::$cfg['PATH_TPL'].'seller/leftMenu.php');?>
	<div class="main_middle">
		<div class="mod-main">
			<form name="Sform" action="/seller/capital" method="get">
				<input type="hidden" name="type" value="<?php echo $Params['type'];?>"/>
				<div class="act_row">
					&nbsp;&nbsp;<a href="/seller/capital"<?php if(empty($Params['type'])){ ?>class="active"<?php } ?>><b>所有</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a href="/seller/capital?type=income"<?php if($Params['type']=='income'){ ?>class="active"<?php } ?>><b>收入</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a href="/seller/capital?type=refund" <?php if($Params['type']== 'refund'){ ?>class="active"<?php } ?>><b>退款</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a href="/seller/capital?type=withdraw" <?php if($Params['type']== 'withdraw'){ ?>class="active"<?php } ?>><b>提现</b></a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a href="/seller/capital?type=brokerage" <?php if($Params['type']== 'brokerage'){ ?>class="active"<?php } ?>><b>佣金</b></a>&nbsp;&nbsp;&nbsp;&nbsp;
					<select name="time" onchange="Sform.submit()" class="form-control">
						<?php foreach ($TimeArr as $K => $V) { ?>
							<option value="<?php echo $K;?>"<?php if($Params['time'] == $K){echo "selected";}?>><?php echo $V;?></option>
						<?php } ?>
					</select>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span class="marr5">账户余额：<b class="red2"><?php echo sprintf('%.2f',$shopBase['money']);?></b> 元</span>
					<?php if($shopBase['money_unav'] > 0){?><span class="marr10">不可用金额：<a href="/seller/moneyUnav" class="blue"><b><?php echo sprintf('%.2f',$shopBase['money_unav']);?></b></a> 元</span><?php }?>
					<a href="/seller/tiXian" class="btn btn-primary marr5" role="button">提 现</a>
					<a href="/seller/tiXianList" class="blue">提现记录</a>
				</div>
			</form>
			<div class="clear"></div>
			<table class="table table-bordered">
				<thead>
					<tr>
						<th width="150px">日期</th>
						<th width="70px">余额变化</th>
						<th>明细</th>
						<th>操作人</th>
					</tr>
				</thead>
				<tbody>
				<?php if(!empty($ListArr)){ ?>
					<?php foreach ($ListArr as  $V){ ?>
						<tr>
							<td><?php echo date('Y-m-d H:i:s', $V['mon_atime']);?></td>
							<td>
								<b <?php if($V['mon_stype']>0){echo 'class="green"';}else{echo 'class="red"';}?>>
								<?php echo sprintf('%.2f',$V['mon_money']);?></b>
							</td>
							<td><?php echo $V['mon_title'];?></td>
							<td><?php echo $V['mon_by_uname'];?></td>
						</tr>
					<?php } ?>
				<?php }else{ ?>
					<tr>
						<td colspan="5" class="center warn">非常抱歉，未找到符合条件的资金记录</td>
					</tr>
				<?php } ?>
				</tbody>
			</table>
			<div class="padtb5"></div>
			<?php echo $Page;?>
		</div>
	</div>
	<div class="clear"></div>
</div>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footAll.php');?>