{include file="public/header" /}
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>虚拟订单退款</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
  <div class="fixed-empty"></div>
  <form method="get" action="" name="formSearch" id="formSearch">
    <table class="search-form">
      <tbody>
        <tr>
        <th><select name="type">
            <option value="order_sn" {if condition="$Think.get.type eq 'order_sn'"}selected{/if}>{$Think.lang.refund_order_ordersn}</option>
            <option value="refund_sn" {if condition="$Think.get.type eq 'refund_sn'"}selected{/if}>{$Think.lang.refund_order_refundsn}</option>
            <option value="store_name" {if condition="$Think.get.type eq 'store_name'"}selected{/if}>{$Think.lang.refund_store_name}</option>
            <option value="goods_name" {if condition="$Think.get.type eq 'goods_name'"}selected{/if}><?php echo '商品名称'; ?></option>
            <option value="buyer_name" {if condition="$Think.get.type eq 'buyer_name'"}selected{/if}>{$Think.lang.refund_order_buyer}</option>
          </select></th>
        <td><input type="text" class="text" name="key" value="{$Think.get.key}" /></td>
          <th><label for="add_time_from">申请时间</label></th>
          <td><input class="txt date" type="text" value="{$Think.get.add_time_from}" id="add_time_from" name="add_time_from">
            <label for="add_time_to">~</label>
            <input class="txt date" type="text" value="{$Think.get.add_time_to}" id="add_time_to" name="add_time_to"/></td>
          <td><a href="javascript:document.formSearch.submit();" class="btn-search " title="{$Think.lang.ds_query}"></a>
            </td>
        </tr>
      </tbody>
    </table>
  </form>
  <table class="ds-default-table">
    <thead>
      <tr class="thead">
        <th>{$Think.lang.refund_order_ordersn}</th>
        <th>{$Think.lang.refund_order_refundsn}</th>
        <th>{$Think.lang.refund_store_name}</th>
        <th>商品名称</th>
        <th>{$Think.lang.refund_order_buyer}</th>
        <th class="align-center">{$Think.lang.refund_buyer_add_time}</th>
        <th class="align-center">{$Think.lang.refund_order_refund}</th>
        <th class="align-center">平台审核</th>
        <th class="align-center">{$Think.lang.ds_handle}</th>
      </tr>
    </thead>
    <tbody>
      <?php if (is_array($refund_list) && !empty($refund_list)) { ?>
      <?php foreach ($refund_list as $key => $val) { ?>
      <tr class="bd-line" >
        <td><a href="{:url('vrorder/show_order',['order_id'=>$val.order_id])}"><?php echo $val['order_sn'];?></a></td>
        <td><?php echo $val['refund_sn'];?></td>
        <td><?php echo $val['store_name']; ?></td>
        <td><a href="{:url('/Home/Goods/index',['goods_id'=>$val.goods_id])}" target="_blank"><?php echo $val['goods_name']; ?></a></td>
        <td><?php echo $val['buyer_name']; ?></td>
        <td class="align-center"><?php echo date('Y-m-d H:i:s',$val['add_time']);?></td>
        <td class="align-center"><?php echo $val['refund_amount'];?></td>
        <td class="align-center"><?php echo $admin_array[$val['admin_state']]; ?></td>
        <td class="align-center"><a href="{:url('vrrefund/view',['refund_id'=>$val.refund_id])}"> {$Think.lang.ds_view} </a></td>
      </tr>
      <?php } ?>
    </tbody>
    <?php } else { ?>
    <tbody>
      <tr class="no_data">
        <td colspan="20">{$Think.lang.no_record}</td>
      </tr>
    </tbody>
    <?php } ?>
      <?php if (is_array($refund_list) && !empty($refund_list)) { ?>
    <tfoot>
      <tr>
        <td colspan="20">{$show_page}</td>
      </tr>
    </tfoot>
    <?php } ?>
  </table>
</div>
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
