<div style="margin: 10px 0;">
    <form action="{% url 'bee_django_user:user_list' %}" method="get">
        {{ search_form }}
        <input type="hidden" name="export" id="export">
        {#    <input type="submit" value="查询"/>#}

        <button class="" onclick="click_search()">查询</button>
        <button class="" onclick="click_export()">导出</button>
    </form>
</div>
{% block scripts %}
    <script>
        $(document).ready(function () {
            $.datetimepicker.setLocale('ch');
            $('#id_start_expire_date').datetimepicker({
                format: 'Y-m-d',
                timepicker: false,
                scrollMonth: false,
                scrollTime: false,
                scrollInput: false
            });
            $('#id_start_expire_date').attr("autocomplete", "off");
            $('#id_end_expire_date').datetimepicker({
                format: 'Y-m-d',
                timepicker: false,
                scrollMonth: false,
                scrollTime: false,
                scrollInput: false
            });
            $('#id_end_expire_date').attr("autocomplete", "off");
        });
        function click_search() {
            var $form = $("form");
            var $export = $("#export");
            $export.attr("value", "");
            $form.submit()

        }
        function click_export() {
            var $form = $("form");
            var $export = $("#export");
            $export.attr("value", "1");
            $form.submit()

        }
    </script>

{% endblock %}