<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->

<!--{if $a == "run"}-->
<div class="oemarry_layout">
  <div class="oe_top_nav"><i></i>提现管理->提现列表</div>
  <div class="oe_content">
	
	<form id="serform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post">
	<div class="oe_txtwrap">
	  提现单号：<input type="text" name="swithno" id="swithno" class="input-150" value="<!--{$swithno}-->" />&nbsp;
	  提现会员：<input type="text" name="susername" id="susername" class="input-120" value="<!--{$susername}-->" />&nbsp;
	  提现店铺：<input type="text" name="sshopname" id="sshopname" class="input-120" value="<!--{$sshopname}-->" />&nbsp;
	  审核状态：
	  <select name="sflag" id="sflag">
	  <option value="">=全部=</option>
	  <option value="1"<!--{if $sflag == '1'}--> selected<!--{/if}-->>待处理</option>
	  <option value="2"<!--{if $sflag == '2'}--> selected<!--{/if}-->>提现成功</option>
	  <option value="3"<!--{if $sflag == '3'}--> selected<!--{/if}-->>提现失败</option>
	  </select>
	  &nbsp;&nbsp;<input type="submit" name="btn_search" id="btn_search" class="button_2" value="搜索" />
	</div>
	</form>

    <div class="oe_tools_bar clearfix">
      <a class="icon-checkbox-unchecked" href="javascript:;" id="selAll" onclick="oemarrySelectAll(this, 'selall');">全选/反选</a>
      <a class="icon-remove-2" onclick="oemarryDialogFormDel('myform');">删除</a>
    </div>
    
	<form id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&a=del" method="post">
    <table class="oe_table_list table_cs">
	  <tr>
	    <th width="8%">ID</th>
		<th width="18%">提现单</th>
		<th width="11%">会员</th>
		<th width="15%">店铺</th>
		<th width="8%">提现金额</th>
		<th width="8%">手续费</th>
		<th width="15%">申请时间</th>
		<th width="7%">状态</th>
		<th>操作</th>
	  </tr>
	  <!--{if empty($withdraw)}-->
	  <tr>
	    <td class="text_center" colspan="10">没有符合条件的信息！</td>
	  </tr>
	  <!--{else}-->
	  <!--{foreach $withdraw as $volist}-->
	  <tr>
	    <td class="text_center"><input type="checkbox" name="id[]" id="id[]" class="selall" value="<!--{$volist.withid}-->" /><!--{$volist.withid}--></td>
		<td><!--{$volist.withno}--></td>
		<td>
		<!--{if $volist.userid > 0}-->
		<!--{$volist.username}-->
		<!--{else}-->
		~
		<!--{/if}-->
		</td>
		<td>
		<!--{if $volist.shopid > 0}-->
		<!--{$volist.shopname}-->
		<!--{else}-->
		~
		<!--{/if}-->
		</td>
		
		<td>¥ <!--{doubleval($volist.amount)}--></td>
		<td>¥ <!--{doubleval($volist.poundage)}--></td>
		<td class="text_center"><!--{$volist.addtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
		<td class="text_center">
		<!--{if $volist.flag == '1'}-->
		<font color="green">成功</font>
		<!--{elseif $volist.flag == '2'}-->
		<font color="red">失败</font>
		<!--{else}-->
		<font color="gray">待处理</font>
		<!--{/if}-->
		</td>
		<td class="text_center">
		 <!--{if $volist.flag == '0'}-->
		 <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edit&id=<!--{$volist.withid}-->&<!--{$comeurl}-->" class="oe_ico_blue">操作</a>
		 <!--{else}-->
		 <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=view&id=<!--{$volist.withid}-->&<!--{$comeurl}-->" class="oe_ico_green">查看</a>
		 <!--{/if}-->
		 <a href="javascript:;" onclick="oemarryDialogUrlDel('<!--{$oefile}-->&c=<!--{$c}-->&a=del&id[]=<!--{$volist.withid}-->&<!--{$comeurl}-->');" class="oe_ico_red">删除</a>
		</td>
	  </tr>
	  <!--{/foreach}-->
	  <!--{/if}-->
	</table>
	</form>

	<div class="oe_page_box"><!--{$showpage}--></div>

  </div>
</div>
<!--{/if}-->

<!--{if $a == 'edit'}-->
<div class="oemarry_layout">
  <div class="oe_top_nav">
	<i></i>提现管理->操作
	<span><a href="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->">&lt;&lt;返回列表</a></span>
  </div>
  <div class="oe_content">
    <h6>操作提现单</h6>
	<form id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->" method="post" />
	<input type="hidden" name="a" id="a" value="saveedit" />
	<input type="hidden" name="id" id="id" value="<!--{$id}-->" />
    <table class="oe_table_wrap">
	  <tr>
	    <th width="15%">提现会员：<span class="f_red"></span></th>
		<td width="35%">
		<!--{if $withdraw.userid > 0}-->
		<!--{$withdraw.username}-->
		<!--{else}-->
		~
		<!--{/if}-->
		</td>
		<th width="15%">提现店铺：<span class="f_red"></span></th>
		<td width="35%">
		<!--{if $withdraw.shopid > 0}-->
		<!--{$withdraw.shopname}-->
		<!--{else}-->
		~
		<!--{/if}-->
		</td>
	  </tr>

	  <tr>
	    <th>提现金额：<span class="f_red"></span></th>
		<td>
		  <font color="green"><b>¥ <!--{doubleval($withdraw.amount)}--></b></font>
		</td>
		<th>手续费：<span class="f_red"></span></th>
		<td>
		  <font color="red">-¥ <!--{doubleval($withdraw.poundage)}--></font>
		</td>
	  </tr>

	  <tr>
	    <th>实际打款：<span class="f_red"></span></th>
		<td colspan="3">
		  <font color="blue"><b>¥ <!--{doubleval($withdraw.amount-$withdraw.poundage)}--></b></font>
		</td>
	  </tr>

	  <tr>
	    <th>提现单号：<span class="f_red"></span></th>
		<td><!--{$withdraw.withno}--></td>
		<th>提现状态：<span class="f_red"></span></th>
		<td>
		  <!--{if $withdraw.flag == '1'}-->
		  <font color="green">成功</font>
		  <!--{elseif $withdraw.flag == '2'}-->
		  <font color="red">失败</font>
		  <!--{else}-->
		  <font color="gray">待处理</font>
		  <!--{/if}-->
		</td>
	  </tr>
	  <tr>
	    <th>申请时间：<span class="f_red"></span></th>
		<td colspan="3"><!--{$withdraw.addtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
	  </tr>

	  <tr>
	    <th>收款人信息：<span class="f_red"></span></th>
		<td colspan="3">
		收款银行：<!--{$withdraw.bankname}-->&nbsp;&nbsp;&nbsp;
		收款帐号：<!--{$withdraw.bankaccount}-->&nbsp;&nbsp;&nbsp;
		收款人姓名：<!--{$withdraw.bankcontact}-->
		</td>
	  </tr>


	  <tr>
		<th>付款凭证：<br />（上传付款记录截图）</th>
		<td colspan="3">
		  <div class="oe_gallery_list">
		    <dl>
			  <dt>
			    <!--{if !empty($withdraw.certificate)}-->
			    <img id="img_preview" src="<!--{$urlpath}--><!--{$withdraw.certificate}-->" f="viewimg" />
				<!--{else}-->
				<img id="img_preview" src="<!--{$urlpath}-->tpl/static/images/waitimg.jpg" f="viewimg" />
				<!--{/if}-->
			  </dt>
			  <dd>
			    <label>上传凭证<input type="file" name="img" id="img" value="" /></label>
				<span style="cursor:pointer;" f="removeimg" data-preview="img_preview" data-draw="img_url">移除</span>
				<i id="img_loading" class="_loadimg_img"><img src="<!--{$urlpath}-->tpl/admin/images/loading.gif" /></i>
				<input type="hidden" id="img_thumb" name="img_thumb" value="" />
				<input type="hidden" id="img_url" name="certificate" value="<!--{$withdraw.certificate}-->" />
				<script type="text/javascript">
				$(function(){
				  $("#img").live("change", function(){
					oemarryUploadImg("img", "<!--{$oefile}-->&c=index&a=uploadimg&module=upload");
				  });
				});
				</script>
			  </dd>
			</dl>
			<div class="clear"></div>
		  </div>
		</td>
	  </tr>
	  <tr>
	    <th>处理时间：<span class="f_red"></span> </th>
		<td colspan="3">
		<input type="text" name="dealtime" id="dealtime" class="input-150" readonly="only" value="<!--{if $withdraw.dealtime > 0}--><!--{$withdraw.dealtime|date_format:"%Y-%m-%d %H:%M:%S"}--><!--{/if}-->" /> （填写处理、付款时间等）
		<script>
		laydate({
			elem: '#dealtime',
			format: 'YYYY-MM-DD hh:mm:ss',
			istime: true,
			choose: function(datas){ //选择日期完毕的回调
			}
		});
		</script>
		</td>
	  </tr>

	  <tr>
	    <th>结果备注：<span class="f_red"></span> </th>
		<td colspan="3"><textarea name="memo" id="memo" style="width:40%;height:60px;"><!--{$withdraw.memo}--></textarea></td>
	  </tr>
	  
	  <!--{if $withdraw.flag == '0'}-->
	  <tr>
	    <td>
		  操作提现单：
		  <br />（请谨慎操作，一旦执行不可逆回）
		</td>
		<td colspan="3">
		  <br />
		  <input type="button" id="btn_1" value="提现成功，完成付款" />
		  （确定您已经完成付款，提现申请状态将更改为：成功，一旦执行此操作不可逆回） <br /><br />
		  <input type="button" id="btn_2" value="提现失败，拒绝付款" />
		   （拒绝付款，提现申请状态将更改为：失败，一旦执行此操作不可逆回，提现冻结的资金和手续费将退回会员帐号余额）<br /><br /> 
		</td>
	  </tr>
	  <!--{/if}-->
	</table>
	<input type="hidden" name="type" id="type" value="0" />
	</form>
  </div>
</div>
<script type="text/javascript">
$(function(){
	$("#btn_1").bind("click", function(){
		$("#type").val("1");
		$("#myform").submit();
	});

	$("#btn_2").bind("click", function(){
		$("#type").val("2");
		$("#myform").submit();
	});
});
</script>
<!--{/if}-->

<!--{if $a == 'view'}-->
<div class="oemarry_layout">
  <div class="oe_top_nav">
	<i></i>提现管理->查看提现单
	<span><a href="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->">&lt;&lt;返回列表</a></span>
  </div>
  <div class="oe_content">
    <h6>查看提现单</h6>
    <table class="oe_table_wrap">
	  <tr>
	    <th width="15%">提现会员：<span class="f_red"></span></th>
		<td width="35%">
		<!--{if $withdraw.userid > 0}-->
		<!--{$withdraw.username}-->
		<!--{else}-->
		~
		<!--{/if}-->
		</td>
		<th width="15%">提现店铺：<span class="f_red"></span></th>
		<td width="35%">
		<!--{if $withdraw.shopid > 0}-->
		<!--{$withdraw.shopname}-->
		<!--{else}-->
		~
		<!--{/if}-->
		</td>
	  </tr>

	  <tr>
	    <th>提现金额：<span class="f_red"></span></th>
		<td>
		  <font color="green"><b>¥ <!--{doubleval($withdraw.amount)}--></b></font>
		</td>
		<th>手续费：<span class="f_red"></span></th>
		<td>
		  <font color="red">-¥ <!--{doubleval($withdraw.poundage)}--></font>
		</td>
	  </tr>
	  <tr>
	    <th>实际打款：<span class="f_red"></span></th>
		<td colspan="3">
		  <font color="blue"><b>¥ <!--{doubleval($withdraw.amount-$withdraw.poundage)}--></b></font>
		</td>
	  </tr>

	  <tr>
	    <th>提现单号：<span class="f_red"></span></th>
		<td><!--{$withdraw.withno}--></td>
		<th>提现状态：<span class="f_red"></span></th>
		<td>
		  <!--{if $withdraw.flag == '1'}-->
		  <font color="green">成功</font>
		  <!--{elseif $withdraw.flag == '2'}-->
		  <font color="red">失败</font>
		  <!--{else}-->
		  <font color="gray">待处理</font>
		  <!--{/if}-->
		</td>
	  </tr>
	  <tr>
	    <th>申请时间：<span class="f_red"></span></th>
		<td colspan="3"><!--{$withdraw.addtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
	  </tr>

	  <tr>
	    <th>收款人信息：<span class="f_red"></span></th>
		<td colspan="3">
		收款银行：<!--{$withdraw.bankname}-->&nbsp;&nbsp;&nbsp;
		收款帐号：<!--{$withdraw.bankaccount}-->&nbsp;&nbsp;&nbsp;
		收款人姓名：<!--{$withdraw.bankcontact}-->
		</td>
	  </tr>


	  <tr>
		<th>付款凭证：<br />（上传付款记录截图）</th>
		<td colspan="3">
			<!--{if !empty($withdraw.certificate)}-->
			<img id="img_preview" src="<!--{$urlpath}--><!--{$withdraw.certificate}-->" f="viewimg" />
			<!--{else}-->
			<img id="img_preview" src="<!--{$urlpath}-->tpl/static/images/waitimg.jpg" f="viewimg" />
			<!--{/if}-->
		</td>
	  </tr>
	  <tr>
	    <th>处理时间：<span class="f_red"></span> </th>
		<td colspan="3"><!--{if $withdraw.dealtime > 0}--><!--{$withdraw.dealtime|date_format:"%Y-%m-%d %H:%M:%S"}--><!--{else}-->~~<!--{/if}--></td>
	  </tr>

	  <tr>
	    <th>结果备注：<span class="f_red"></span> </th>
		<td colspan="3"><!--{$withdraw.memo}--></td>
	  </tr>
	</table>
  </div>
</div>
<!--{/if}-->
</body>
</html>