<?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" id="tixian">
		<div class="navrow">
			<ul class="navrow_ul">
				<li><a href="/seller/tiXian">申请提现</a></li>
				<li class="active"><a href="/seller/tiXianList">提现记录</a></li>
				<li><a href="javascript:void(0)" class="a_blue" onclick="TIXIAN.addAccount()">添加收款账号</a></li>
				<li>
					<span class="gray marr10">余额<b class="red2"><?php echo sprintf('%.2f',$shopBase['money']);?></b>元</span>
					<span class="gray">可提现金额<b class="red2"><?php echo sprintf('%.2f',$shopBase['money_av']);?></b>元</span>
				</li>
			</ul>
		</div>
		<div class="clear"></div>
		<div class="mart10">
			<form name="Sform" action="/seller/tiXianList" method="get">
				<div class="act_row">
					<span>提现时间：</span>
					<input type="text" name="time" value="<?php echo $Params['time'];?>" class="form-control timeLimit">
					<span>状态：</span>
					<select name="status" class="form-control">
						<?php foreach ($TimeArr as $K => $V) { ?>
							<option value="<?php echo $K;?>"<?php if($Params['status'] == $K){echo "selected";}?>><?php echo $V;?></option>
						<?php } ?>
					</select>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<button class="btn btn-primary" type="submit">查询</button>
				</div>
			</form>
			<div class="clear"></div>
			<table class="table table-bordered">
				<thead>
					<tr>
						<th width="50px">操作</th>
						<th width="60px">状态</th>
						<th width="80px">收款人</th>
						<th>收款账号</th>
						<th width="80px">提现金额</th>
						<th width="80px">到账金额</th>
						<th width="80px">佣金金额</th>
						<th width="130px">申请时间</th>
						<th width="130px">完成时间</th>
						<th width="100px">申请人</th>
					</tr>
				</thead>
				<tbody>
				<?php if(!empty($list)){ ?>
					<?php foreach ($list as  $v){ ?>
						<tr>
							<td><a href="/seller/tiXianDes?mowId=<?php echo $v['mow_id'];?>" class="a_blue" target="_blank">详细</a></td>
							<?php if($v['mow_status']==-1){?>
							<td>已关闭</td>
							<?php }elseif($v['mow_status']==1){?>
							<td>转账完成</td>
							<?php }else{?>
							<td>处理中</td>
							<?php }?>
							<td><?php echo $v['accName'];?></td>
							<td>
								<?php if($v['jsonArr']['acc_type'] == 1){?>
								支付宝：<?php echo $v['jsonArr']['acc_alipay_account'];?>
								<?php }else if($v['jsonArr']['acc_type'] == 2){?>
								<?php echo $v['jsonArr']['acc_bank_name'].'：'.$v['jsonArr']['acc_bank_card'];?>
								<?php }else{?>
									微信：<span title="昵称"><?php echo $v['jsonArr']['acc_weixin_info']['nickname'];?></span>【<span title="微信号"><?php echo $v['jsonArr']['acc_weixin'];?></span>】
								<?php }?>
							</td>
							<td><?php echo sprintf('%.2f',$v['mow_total_money']);?></td>
							<td><?php echo sprintf('%.2f',$v['mow_real_money']);?></td>
							<td><?php echo sprintf('%.2f',$v['mow_comm_money']);?></td>
							
							<td><?php echo date('Y-m-d H:i:s',$v['mow_atime']);?></td>
							<td><?php echo $v['mow_ok_time']?date('Y-m-d H:i:s',$v['mow_ok_time']):'';?></td>
							<td><?php echo $v['mow_by_uname'];?></td>
						</tr>
					<?php } ?>
				<?php }else{ ?>
					<tr>
						<td colspan="10" class="center warn">非常抱歉，未找到符合条件的提现记录</td>
					</tr>
				<?php } ?>

				</tbody>
			</table>
			<div class="padtb5"></div>
			<?php echo $Page;?>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="addAccount">
	<form id="ajaxAccountForm">
		<table class="table table-bordered" style="width:600px">
			<tbody>
				<tr>
					<th class="right w100"><i class="required">*</i>账号类型：</th>
					<td>
						<!--
						<label><input type="radio" name="acc_type" value="0" checked>微信</label>&nbsp;&nbsp;
						<label><input type="radio" name="acc_type" value="1">支付宝</label>&nbsp;&nbsp;
						-->
						<label><input type="radio" name="acc_type" value="2" checked>银行卡</label>&nbsp;&nbsp;
					</td>
				</tr>
				<tr class="acc_des acc_0">
					<th class="right">绑定步骤：</th>
					<td>
						<div class="addWxAcStep">
						<div class="mar10">
							<b class="red2">第一步：</b>
							<div class="WxEwm mar10">
								<div class="txt">关注宜配网公众号</div>
								<img src="/static/images/WeChat.jpg" alt="关注宜配网微信公众号">
								<div class="gray">（关注后10分钟生效）</div>
							</div>
						</div>
						<div class="mar10">
							<b class="red2">第二步：</b>
							<div class="mar10"><a href="<?php echo $wxBindurl;?>" class="btn btn-primary" role="button" target="_blank">绑定已实名认证的微信</a></div>
						</div>
					</td>
				</tr>
				<tr class="acc_des acc_1 acc_2">
					<th class="right w100"><i class="required">*</i>收款人：</th>
					<td>
					<?php if(!empty($idcardArr)){?>
						<?php foreach($idcardArr as $k=>$v){?>
						<label class="irCarRow"><input type="radio" name="acc_acb_id" value="<?php echo $v['acb_id'];?>" <?php if($k==0) echo ' checked';?>><span class="idname"><?php echo $v['acb_name'];?></span><span title="身份证号码"><?php echo $v['acb_idcard'];?></label>
						<?php }?>
					<?php }else{?>
						<div class="warn">请联系商城在线客服添加收款人信息</div>
					<?php }?>
					</td>
				</tr>
				<tr class="acc_des acc_1">
					<th class="right w100"><i class="required">*</i>支付宝账号：</th>
					<td><input type="text" class="form-control" name="acc_alipay_account" placeholder="输入支付宝账号，支持邮箱或手机号"/></td>
				</tr>
				<tr class="acc_des acc_2">
					<th class="right w100"><i class="required">*</i>银行名称：</th>
					<td>
						<select name="acc_bank_name"  class="form-control">
							<?php if(!empty($bankArr)){?>
							<?php foreach($bankArr as $v){?>
							<option name="<?php echo $v?>"><?php echo $v?></option>
							<?php }?>
							<?php }?>
						</select>
					</td>
				</tr>
				<tr class="acc_des acc_2">
					<th class="right w100"><i class="required">*</i>储蓄卡卡号：</th>
					<td><input type="text" class="form-control" name="acc_bank_card" placeholder="输入银行卡号"/><span style="padding-left: 10px;font-size: 14px;" class="red">对公账号</span></td>
				</tr>
				<tr class="acc_des acc_2">
					<th class="right w100"><i class="required">*</i>开户支行：</th>
					<td><input type="text" class="form-control" name="acc_bank_open" placeholder="输入开户银行支行"/></td>
				</tr>
			</tbody>
		</table>
	</form>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		//绑定时间控件
		laydate.render({
		  type: 'datetime'
		  ,range: true
		  ,elem: '.timeLimit'
		});
	});
</script>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footAll.php');?>