{include file="public/mall_top" /} 
{include file="public/mall_header" /}

<link rel="stylesheet" href="{$Think.config.url_domain_root}static/home/css/member.css">
<div class="dsm-container">
    {include file="public/member_left" /}
    
    <div class="right-layout">
        <div class="tabmenu">
            {include file="public/member_items" /}
        </div>
        
        <form method="get" action="">
            <table class="ncm-search-table">
                <tr>
                    <td>&nbsp;</td>
                    <th>{$Think.lang.refund_buyer_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>
                        &nbsp;&#8211;&nbsp;
                        <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><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="goods_name" {if condition="$Think.get.type eq 'goods_name'"}selected{/if}>商品名称</option>
                        </select></th>
                    <td class="w160"><input type="text" class="text w150" name="key" value="{$Think.get.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="dsm-default-table order">
            <thead>
                <tr>
                    <th class="w10"></th>
                    <th colspan="2">商品</th>
                    <th class="w100">{$Think.lang.refund_order_refund}（元）</th>
                    <th class="w100">{$Think.lang.refund_state}</th>
                    <th class="w100">平台确认</th>
                    <th class="w100">{$Think.lang.ds_handle}</th>
                </tr>
            </thead>
            <tbody>
                <?php if (is_array($refund_list) && !empty($refund_list)) { ?>
                {foreach name="refund_list" item="val" key="key" }
                <tr>
                    <td colspan="20" class="sep-row"></td>
                </tr>
                <tr>
                    <th colspan="20"> <span class="ml10">{$Think.lang.refund_order_refundsn}{$Think.lang.ds_colon}</span><span>{$Think.lang.refund_buyer_add_time}{$Think.lang.ds_colon}<?php echo date("Y-m-d H:i:s",$val['add_time']);?></span>

                        <!-- store_name -->
                        <span> <a href="{:url('/home/store/index',['store_id'=>$val.store_id])}" target="_blank" title="<?php echo $val['store_name'];?>"><?php echo $val['store_name']; ?></a></span>

                        <!-- QQ -->
                        <span member_id="<?php echo $store_list[$val['store_id']]['member_id'];?>">
                            <?php if(!empty($store_list[$val['store_id']]['store_qq'])){?>
                            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo $store_list[$val['store_id']]['store_qq'];?>&site=qq&menu=yes" title="QQ: <?php echo $store_list[$val['store_id']]['store_qq'];?>"><img border="0" src="http://wpa.qq.com/pa?p=2:<?php echo $store_list[$val['store_id']]['store_qq'];?>:52" style=" vertical-align: middle;"/></a>
                            <?php }?>

                            <!-- wang wang -->
                            <?php if(!empty($store_list[$val['store_id']]['store_ww'])){?>
                            <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=<?php echo $store_list[$val['store_id']]['store_ww'];?>&site=cntaobao&s=2&charset=utf-8"  class="vm" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=<?php echo $store_list[$val['store_id']]['store_ww'];?>&site=cntaobao&s=2&charset=utf-8" alt="Wang Wang"  style=" vertical-align: middle;"/></a>
                            <?php }?>
                        </span></th>
                </tr>
                <tr class="bd-line" >
                    <td class="bdl"></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"><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/memberorder/show_order',['order_id'=>$val.order_id])}" target="_blank"><?php echo $val['order_sn'];?></a></dd>
                        </dl></td>
                    <?php } else { ?>
                    <td class="tl" 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/memberorder/show_order',['order_id'=>$val.order_id])}" target="_blank"><?php echo $val['order_sn'];?></a></dd>
                        </dl></td>
                    <?php } ?>
                    <td><?php echo $val['refund_amount'];?></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="bdr"><a href="{:url('/home/memberrefund/view',['refund_id'=>$val.refund_id])}" class="dsm-btn">{$Think.lang.ds_view} </a></td>
                </tr>
                {/foreach}
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="20"><div class="pagination">{$page}</div></td>
                </tr>
            </tfoot>
            <?php } else { ?>
            <tbody>
                <tr>
                    <td colspan="20" class="norecord"><div class="warning-option"><i>&nbsp;</i><span>{$Think.lang.no_record}</span></div></td>
                </tr>
            </tbody>
            <?php } ?>
        </table>
    </div>
</div>
<script type="text/javascript">
	$(function(){
	    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
	    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
	});
</script>
{include file="public/mall_server" /}
{include file="public/mall_footer" /}