{include file="public/seller_top" /} 
<div class="seller_main w1200">
    {include file="public/seller_left" /}
    <div class="seller_right">
        <div class="seller_items">
            {include file="public/seller_items" /}
        </div>

<form method="get" action="">
  <input type="hidden" name="lock" value="{$Think.param.lock}" />
  <table class="search-form">
    <tr>
      <td>&nbsp;</td>
      <th>{$Think.lang.refund_order_add_time}</th>
      <td class="w240">
          <input name="add_time_from" id="add_time_from" type="text" class="text w70" value="{$Think.get.add_time_from}" />
          <label class="add-on"><i class="icon-calendar"></i></label> &#8211; 
          <input name="add_time_to" id="add_time_to" type="text" class="text w70" value="{$Think.get.add_time_to}" />
          <label class="add-on"><i class="icon-calendar"></i></label>
      </td>
      <th class="w60">处理状态</th>
      <td class="w80">
          <select name="state">
              <option value="" {if condition="$Think.get.state eq ''"}selected{/if}>全部</option>
              <option value="1" {if condition="$Think.get.state eq '1'"}selected{/if}>{$Think.lang.refund_state_confirm}</option>
              <option value="2" {if condition="$Think.get.state eq '2'"}selected{/if}>{$Think.lang.refund_state_yes}</option>
              <option value="3" {if condition="$Think.get.state eq '3'"}selected{/if}>{$Think.lang.refund_state_no}</option>
          </select>
      </td>
      <th class="w120">
          <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="buyer_name" {if condition="$Think.get.type eq 'buyer_name'"}selected{/if}>{$Think.lang.refund_order_buyer}</option>
          </select>
      </th>
      <td class="w160"><input type="text" class="text" name="key" value="{$Request.param.key}" /></td>

      <td class="w70 tc">
          <label class="submit-border">
             <input type="submit" class="submit" value="{$Think.lang.ds_search}" />
          </label>
      </td>
    </tr>
  </table>
</form>
<table class="dssc-default-table">
  <thead>
    <tr>
      <th class="w10"></th>
      <th colspan="2">商品/订单号/退款号</th>
      <th class="w70">{$Think.lang.refund_order_refund}</th>
      <th class="w90">{$Think.lang.refund_order_buyer}</th>
      <th class="w120">{$Think.lang.refund_order_add_time}</th>
      <th class="w80">处理状态</th>
      <th class="w80">平台确认</th>
      <th class="w90">{$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></td>
		    <?php if ($val['goods_id'] > 0) { ?>
        <td class="w50"><div class="pic-thumb">
            <a href="{:url('/home/goods/index',['goods_id'=>$val.goods_id])}" target="_blank"><img src="<?php echo thumb($val, 60); ?>"/></a></div></td>
        <td class="tl" title="<?php echo $val['store_name']; ?>">
		<dl class="goods-name">
		    <dt><a href="{:url('/home/goods/index',['goods_id'=>$val.goods_id])}" target="_blank"><?php echo $val['goods_name']; ?></a></dt>
        <dd>{$Think.lang.refund_order_ordersn}{$Think.lang.ds_colon}<a href="{:url('/home/sellerorder/show_order',['order_id'=>$val.order_id])}" target="_blank"><?php echo $val['order_sn'];?></a></dd>
        <dd>{$Think.lang.refund_order_refundsn}{$Think.lang.ds_colon}<?php echo $val['refund_sn']; ?></dd></dl></td>
		    <?php } else { ?>
        <td class="tl" title="<?php echo $val['store_name']; ?>" colspan="2">
		<dl class="goods-name">
		    <dt><?php echo $val['goods_name']; ?></dt>
        <dd>{$Think.lang.refund_order_ordersn}{$Think.lang.ds_colon}<a href="{:url('/home/sellerorder/show_order',['order_id'=>$val.order_id])}" target="_blank"><?php echo $val['order_sn'];?></a></dd>
        <dd>{$Think.lang.refund_order_refundsn}{$Think.lang.ds_colon}<?php echo $val['refund_sn']; ?></dd></dl></td>
		    <?php } ?>
        <td>{$Think.lang.currency}<?php echo $val['refund_amount'];?></td>
      <td><?php echo $val['buyer_name']; ?></td>
      <td><?php echo date("Y-m-d H:i:s",$val['add_time']);?></td>
      <td><?php echo $state_array[$val['seller_state']]; ?></td>
      <td><?php echo $val['seller_state']==2 ? $admin_array[$val['refund_state']]:'无'; ?></td>
      <td class="nscs-table-handle"><?php if ($val['seller_state'] == 1) { ?>
    	<span><a href="{:url('/home/sellerrefund/edit',['refund_id'=>$val.refund_id])}" class="btn-blue"><i class="icon-edit"></i><p>处理</p></a></span>
    	<?php } else { ?>
    	<span><a href="{:url('/home/sellerrefund/view',['refund_id'=>$val.refund_id])}" class="btn-orange"><i class="icon-eye-open"></i><p>{$Think.lang.ds_view}</p></a></span><?php } ?>
       </td>
    </tr>
    <?php } ?>
    <?php } else { ?>
    <tr>
      <td colspan="20" class="norecord"><div class="warning-option"><i class="icon-warning-sign">&nbsp;</i><span>{$Think.lang.no_record}</span></div></td>
    </tr>
    <?php } ?>
  </tbody>
  <tfoot>
    <?php if (is_array($refund_list) && !empty($refund_list)) { ?>
    <tr>
      <td colspan="20"><div class="pagination">{$page}</div></td>
    </tr>
    <?php } ?>
  </tfoot>
</table>
<script>
	$(function(){
	    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
	    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
	});
</script>
        
        
        
        
        
        
        
    </div>
</div>
{include file="public/mall_footer" /}