<div class="wrap">
    <h2>客户列表</h2>
    <form method="get">
        <input type="hidden" name="page" value="customerList">
        <div id="search_form">
            <label for="status" class="hidden"></label>
            <select name="status" id="status">
                <option value="-1">状态</option>
                {% for item in status %}
                <option {{ item.id == status_id ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
                {% endfor %}
            </select>
            <label for="customer_type" class="hidden"></label>
            <select name="customer_type" id="customer_type">
                <option value="-1">客户类型</option>
                {% for item in customer_type %}
                <option {{ item.id == customer_type_id ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
                {% endfor %}
            </select>
            <label for="demand_type" class="hidden"></label>
            <select name="demand_type" id="demand_type">
                <option value="-1">需求类型</option>
                <option value="0">新房</option>
                <option value="1">二手房</option>
                <option value="2">租房</option>
            </select>
            <input type="text" placeholder="请输入姓名" name="search_name" value="{{ search_name }}">
            <input type="text" placeholder="请输入置业顾问" name="search_consultant_name" value="{{ search_consultant_name }}">
            <input type="text" placeholder="请输入电话" name="search_phone" value="{{ search_phone }}">
        </div>
        <div style="margin-top: 10px;">
            <span>日期</span>
            <label for="search_min_time" class="hidden"></label>
            <input type="date" name="search_min_time" id="search_min_time" value="{{ search_min_time }}">
            —
            <label for="search_max_time" class="hidden"></label>
            <input type="date" name="search_max_time" id="search_max_time" value="{{ search_max_time }}">
            <input type="submit" id="submit" class="button action" value="搜索">
        </div>
        {{ function("addCustomerTable") }}
    </form>
</div>
<script>
    $(document).ready(function () {
        $('#demand_type').val('{{ demand_type }}');
        search_form_set_page();
    });
</script>