<div class="wrap">
    <h2>业绩列表</h2>
    <form method="get">
        <input type="hidden" name="page" value="quotaList">
        {% include 'selectOrganization.html' %}
        <div id="search_form">
            <select name="year" id="year">
                <option value="2015">2015</option>
                <option value="2016">2016</option>
            </select>
            <input type="submit" id="submit" class="button action" value="搜索">
            <!--
            <select name="month" id="month">
                <option value="1">一月</option>
                <option value="2">二月</option>
                <option value="3">三月</option>
                <option value="4">四月</option>
                <option value="5">五月</option>
                <option value="6">六月</option>
                <option value="7">七月</option>
                <option value="8">八月</option>
                <option value="9">九月</option>
                <option value="10">十月</option>
                <option value="11">十一月</option>
                <option value="12">十二月</option>
            </select>
            -->
        </div>
    </form>
    {{function("QuotaYearList::displayYearTable")}}
</div>
<script>
    $(document).ready(function () {
        {% if req %}
            $("#year").val({{req.year}});
        {% endif %}

        $('form').submit(function () {
            var organization = getOrganization();
            var select = $('select[data-depth]:not(.hidden)');
            if (select.length > 1 && organization == -1) {
                alert('请选择门店');
                return false;
            } else {
                $(this).append('<input type="hidden" name="organization" value="' + organization + '">');
            }
        });
    });
</script>