{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>

    <form id="search_form" method="post" name="formSearch">
        <table class="search-form">
            <tbody>
            <tr>
                <th><label for="input_complain_accuser">{$Think.lang.complain_accuser}</label></th>
                <td><input class="txt" type="text" name="input_complain_accuser" id="input_complain_accuser" value="{$Request.get.input_complain_accuser}"></td>
                <th><label for="input_complain_subject_content">{$Think.lang.complain_subject_content}</label></th>
                <td colspan="2"><input class="txt2" type="text" name="input_complain_subject_content" id="input_complain_subject_content" value="{$Request.get.input_complain_subject_content}"></td>
            </tr>
            <tr>
                <th><label for="input_complain_accused">{$Think.lang.complain_accused}</label></th>
                <td><input class="txt" type="text" name="input_complain_accused" id="input_complain_accused" value="{$Request.get.input_complain_accused}"></td>
                <th><label for="time_from">{$Think.lang.complain_datetime}</label></th>
                <td><input id="time_from" class="txt date" type="text" name="input_complain_datetime_start" value="{$Request.get.input_complain_datetime_start}">
                    <label for="time_to">~</label>
                    <input id="time_to" class="txt date" type="text" name="input_complain_datetime_end" value="{$Request.get.input_complain_datetime_end}"></td>
                <td><a href="javascript:document.formSearch.submit();" class="btn-search " title="{$Think.lang.ds_query}"></a>
                    <?php if(!(empty($_GET['input_complain_accuser'])&&empty($_GET['input_complain_accused'])&&empty($_GET['input_complain_subject_content'])&&empty($_GET['input_complain_datetime_start'])&&empty($_GET['input_complain_datetime_end']))) { ?>
                    <a class="btns " href="{:url('complain/$op')}" title="{$Think.lang.ds_cancel_search}"><span>{$Think.lang.ds_cancel_search}</span></a>
                    <?php }?></td>
            </tr>
            </tbody>
        </table>
    </form>
    
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示" class="arrow"></span>
        </div>
        <ul>
            <li>{$Think.lang.complain_help1}</li>
            <li>{$Think.lang.complain_help2}</li>
            <li>{$Think.lang.complain_help3}</li>
        </ul>
    </div>
    
    <form method='post' id="list_form" action="{:url('voucherprice/voucher_price_drop')}">
        <table class="ds-default-table">
            <thead>
            <tr class="thead">
                <th class="w12">&nbsp;</th>
                <th>{$Think.lang.complain_accuser}</th>
                <th>{$Think.lang.complain_accused}</th>
                <th>{$Think.lang.complain_subject_content}</th>
                <th class="align-center">{$Think.lang.complain_datetime}</th>
                <th class="align-center">{$Think.lang.ds_handle}</th>
            </tr>
            </thead>
            <tbody>
            {notempty name="list"}
            {volist name="list" id="v"}
            <tr class="hover">
                <td>&nbsp;</td>
                <td>{$v.accuser_name}</td>
                <td>{$v.accused_name}</td>
                <td>{$v.complain_subject_content}</td>
                <td class="nowarp align-center">{$v.complain_datetime|date="Y-m-d H:i:s",###}</td>
                <td class="align-center"><a href="{:url('complain/complain_progress',['complain_id'=>$v.complain_id])}">{$Think.lang.complain_text_detail}</a></td>
            </tr>
            {/volist}
            {else /}
            <tr class="no_data">
                <td colspan="15">{$Think.lang.ds_no_record}</td>
            </tr>
            {/notempty}
            </tbody>

        </table>
        {notempty name="list"}
        {$show_page}
        {/notempty}
    </form>

</div>

<script type="text/javascript">
    $(document).ready(function(){
        //表格移动变色
        $("tbody .line").hover(
            function()
            {
                $(this).addClass("complain_highlight");
            },
            function()
            {
                $(this).removeClass("complain_highlight");
            });
        $('#time_from').datepicker({dateFormat: 'yy-mm-dd',onSelect:function(dateText,inst){
            var year2 = dateText.split('-') ;
            $('#time_to').datepicker( "option", "minDate", new Date(parseInt(year2[0]),parseInt(year2[1])-1,parseInt(year2[2])) );
        }});
        $('#time_to').datepicker({onSelect:function(dateText,inst){
            var year1 = dateText.split('-') ;
            $('#time_from').datepicker( "option", "maxDate", new Date(parseInt(year1[0]),parseInt(year1[1])-1,parseInt(year1[2])) );
        }});

    });
</script>