{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>{$Think.lang.refund_manage}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示" class="arrow"></span>
        </div>
        <ul>
            <li>系统初始化的原因不能删除</li>
            <li>排序显示规则为排序小的在前，新增的在前</li>
        </ul>
    </div>


    <table class="ds-default-table">
        <thead>
            <tr class="thead">
                <th>{$Think.lang.ds_sort}</th>
                <th>原因</th>
                <th class="align-center">{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
        <tbody>
            <?php if(!empty($reason_list) && is_array($reason_list)){ ?>
            <?php foreach($reason_list as $key => $val){ ?>
            <tr class="hover">
                <td class="w48 sort"><?php echo $val['sort'];?></td>
                <td><?php echo $val['reason_info'];?></td>
                <td class="w150 align-center"><a href="{:url('Refund/edit_reason',['reason_id'=>$val.reason_id])}">{$Think.lang.ds_edit}</a>
                    <?php if($val['reason_id'] > 99){?>
                    | <a href="javascript:if(confirm('{$Think.lang.ds_ensure_del}')) window.location = '{:url('Refund/del_reason',['reason_id'=>$val.reason_id])}';">{$Think.lang.ds_search}</a>
                    <?php } ?>
                </td>
            </tr>
            <?php } ?>
            <?php }else { ?>
            <tr class="no_data">
                <td colspan="15">{$Think.lang.ds_no_record}</td>
            </tr>
            <?php } ?>
        </tbody>
        <tfoot>
            <?php if(!empty($reason_list) && is_array($reason_list)){ ?>
            <tr class="tfoot">
                <td colspan="16">
                    {$show_page}
                </td>
            </tr>
            <?php } ?>
        </tfoot>
    </table>
</div>