
<?php
        $url = Request::url();
        $table_type_id = substr($url, -1);
?>

<div class='box'>
    <div class="box-header">
        <h3 class="box-title">案件搜索</h3>
    </div>
    <div class="box-body">
        <div class="row">
            <form action="{{ url('/table_search/'.$table_type_id) }}">
                <div class="col-sm-3">
                    <select class="form-control" name="user_id">
                        <option value="">选择收录人</option>
                        @foreach($user_data as $u)
                            <option value="{{ $u->id }}">{{ $u->surname }}</option>
                        @endforeach
                    </select>
                </div>
                <div class="col-sm-3">
                    <select class="form-control" name="project_id">
                        <option value="">选择项目</option>
                        @foreach($project as $pro)
                            <option value="{{ $pro->id }}">{{ $pro->project_name }}</option>
                        @endforeach
                    </select>
                </div>
                <div class="col-sm-3">
                    <input id="startTime" type="text" name="start_time"  readonly class="form-control form_datetime" placeholder="开始日期，不输入则显示全部">
                </div>
                <div class="col-sm-3" style="margin-bottom: 1%">
                    <input id="endTime" type="text" name="end_time" readonly class="form-control form_datetime" placeholder="结束日期，不输入则显示全部">
                </div>
                <div style="text-align: center">
                    <button id="sub" type="submit" class="btn btn-primary">搜索</button>
                </div>

                <script type="text/javascript">

                    $(".form_datetime").datetimepicker({
                        language: 'zh',
                        format: 'yyyy-mm-dd',
                        minView:'month'
                    }).on('changeDate',function(){
                        $(".datetimepicker").hide();
                    });
                </script>
            </form>
        </div>
    </div>
</div>