<?php include_once(mvc::$cfg['PATH_TPL'].'seller/publicHead.php');?>
<div class="maintb">
	<div class="main_middle" id="tixian">
		<div class="layui-tab layui-tab-card">
			<ul class="layui-tab-title">
				<li><a href="<?php echo mvc::$cfg['SELF_URL']; ?>seller/tiXian">申请提现</a></li>
				<li class="layui-this"><a href="<?php echo mvc::$cfg['SELF_URL']; ?>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 class="layui-tab-content" style="padding: 20px;">
				<form name="Sform" action="<?php echo mvc::$cfg['SELF_URL']; ?>seller/tiXianList" method="get">
					<div class="act_row">
						<span>提现时间：</span>
						<input type="text" name="time" value="<?php echo $Params['time'];?>" class="layui-input timeLimit">
						<span>状态：</span>
						<select name="status" class="layui-input" style="width:100px;">
							<?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="layui-btn" type="submit">查询</button>
					</div>
				</form>
				<div class="clear"></div>
				<table class="layui-table">
					<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 lay-href="<?php echo mvc::$cfg['SELF_URL']; ?>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 class="clear"></div>
</div>
<div id="addAccount">
	<form id="ajaxAccountForm">
		<table class="layui-table" style="width:600px;margin-bottom: 20px;">
			<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="<?php echo mvc::$cfg['SELF_URL'];?>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="layui-input" 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="layui-input">
							<?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" style="width:35%" class="layui-input" 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="layui-input" name="acc_bank_open" placeholder="输入开户银行支行"/></td>
				</tr>
			</tbody>
		</table>
	</form>
</div>
<script type="text/javascript">
	layui.use('laydate', function (){
		let laydate = layui.laydate

		laydate.render({
		  type: 'datetime'
		  ,range: true
		  ,elem: '.timeLimit'
		});
	});
</script>
<?php include_once(mvc::$cfg['PATH_TPL'].'public/footBase.php');?>