@extends('layouts.admin')
@section('content')
    <!--左侧菜单栏-->
 @include('admin.left-sidebar')

<link rel="stylesheet" type="text/css" href="{{ url('/css/jquery.dataTables.min.css') }}">
<script type="text/javascript" charset="utf8" src="{{ url('/js/jquery.dataTables.min.js') }}"></script>
    <!-- 内容 -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                案件追踪
                <small> </small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{{ url('/')}}"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">搜索结果</a></li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            {{--search--}}
            <div class="row">
                <div class="col-md-2"></div>
                <form action="{{ url('/search') }}">
                <div class="col-md-8 input-group">
                        <input name="search" class="form-control" placeholder="请输入您要查询的关键字">
                        <span class="input-group-btn">
                            <button type="submit"  id="search-btn" class="btn btn-flat">
                                <i class="fa fa-search"></i>
                            </button>
                        </span>
                </div>
                </form>
                <div class="col-md-2"></div>
            </div>
            <!-- Default box -->
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">案件列表</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                        <div class="row">
                            <div class="col-sm-6"></div>
                            <div class="col-sm-6"></div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12">
                                <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
                                    <thead>
                                    <tr role="row">
                                        <th>ID</th>
                                        <th>姓名</th>
                                        <th>身份证</th>
                                        <th>地址</th>
                                        <th>室内面积(㎡)</th>
                                        <th>房型</th>
                                        <th>联系方式</th>
                                        <th>用途</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    @foreach($re as $list)
                                    <tr role="row" class="odd">
                                        <td>{{ $list->id }}</td>
                                        <td>{{ $list->bzc_name }}</td>
                                        <td>{{ $list->bzc_cardid }}</td>
                                        <td>{{ $list->bzc_addr }}</td>
                                        <td>{{ $list->bzc_area }}</td>
                                        <td>{{ $list->house_type }}</td>
                                        <td>{{ $list->bzc_tel }}</td>
                                        <td>{{ $list->used }}</td>
                                        <td><a href="{{ url('/table/'.$list->id.'/edit') }}" class="btn btn-primary btn-sm">
                                                <i class="fa fa-search"></i> 查看</a>
                                            {{--@if($user->role>5)--}}
                                                {{--<a href="{{ url('/table/'.$list->id.'/edit') }}" class="btn btn-success btn-sm">--}}
                                                    {{--<i class="fa fa-pencil"></i> 编辑</a>--}}
                                            {{--@endif--}}
                                        </td>
                                    </tr>
                                        @endforeach
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-5">
                                <div class="dataTables_info" id="example2_info" role="status" aria-live="polite">显示 0 - 10 </div>
                            </div>
                            <div class="col-sm-7">
                                <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
                                    <ul class="pagination">

                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->

        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->


<script>
    $(document).ready(function() {
        $('#table').dataTable({
            "aLengthMenu": [[10, 20, 50, -1], ["10", "20", "50", "所有"]],
            "oLanguage": {
                "sLengthMenu": "每页显示 _MENU_ 条记录",
                "sZeroRecords": "对不起，没有匹配的数据",
                "sInfo": "第 _START_ - _END_ 条 / 共 _TOTAL_ 条数据",
                "sInfoEmpty": "没有匹配的数据",
                "sInfoFiltered": "(数据表中共 _MAX_ 条记录)",
                "sProcessing": "正在加载中...",
                "sSearch": "全文搜索：",
                "oPaginate": {
                    "sFirst": "第一页",
                    "sPrevious": " 上一页 ",
                    "sNext": " 下一页 ",
                    "sLast": " 最后一页 "
                }
            }
        });
    });
</script>

@endsection