Browse Source

add table two three

GGican 8 years ago
parent
commit
29736c44ed

+ 41 - 1
app/Http/Controllers/Admin/TableController.php

xqd xqd xqd
@@ -125,6 +125,7 @@ class TableController extends CommonController
 
 //        save child_table
         if(isset($request)){
+            $request['status'] = '1';
             switch($table_type_id){
                 case 1:
                     $child = Table_one::create($request->except('_token'));
@@ -336,7 +337,7 @@ class TableController extends CommonController
                 case 1:
                     $table = DB::select('SELECT bzc_name ,SUM(home_area+money_bus_area) as area,SUM(total_money) as total_money,SUM(money_home_price+money_bus_price) as price,
 SUM(money_home_jchae+money_bus_jchae) as jchae ,SUM(money_home_tchae+money_bus_tchae) as tchae
-FROM table_one GROUP BY bzc_name');
+FROM table_one WHERE status > 5 GROUP BY bzc_name');
 
                     $table_name = '国有土地房屋征收与补偿安置单(货币化安置)';
                     $th = [
@@ -349,6 +350,45 @@ FROM table_one GROUP BY bzc_name');
                     ];
                     return view('admin.sta.sta_one',compact('table_name','table','th'));
                     break;
+
+                case 2:
+                    $table_name = '违章建筑自行拆除费用申领表';
+                    $th = [
+                        '1'=>'姓名',
+                        '2'=>'违章面积',
+                        '3'=>'拆除金额',
+                    ];
+                    $table = DB::select('SELECT bzc_name ,SUM(bzc_area) as area,SUM(chaichuje)as money
+FROM table_two WHERE status > 5 GROUP BY bzc_name');
+                    return view('admin.sta.sta_two',compact('table_name','table','th'));
+                    break;
+
+                case 3:
+                    $table_name = '残疾人房征补贴审批确认单';
+                    $th=[
+                        '1'=>'姓名',
+                        '2'=>'残疾人补贴',
+                        '3'=>'临时安置补贴	',
+                        '4'=>'搬迁补贴',
+                        '5'=>'合计'
+                    ];
+                    $table = DB::select('SELECT bzc_name ,SUM(canbu) as canbu,SUM(linshibu)as linshibu,SUM(banqianbu) as banqianbu,SUM(total) as total
+FROM table_three WHERE status > 5 GROUP BY bzc_name');
+                    return view('admin.sta.sta_three',compact('table_name','table','th'));
+                    break;
+
+                case 4:
+                    break;
+                case 5:
+                    break;
+                case 6:
+                    break;
+                case 7:
+                    break;
+                case 8:
+                    break;
+                case 9:
+                    break;
             }
         }else{
             return redirect('/');

+ 39 - 0
resources/views/admin/sta/sta_eight.blade.php

xqd
@@ -0,0 +1,39 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $num=>$data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->total_money }}</td>
+                                        <td>{{ $data->price }}</td>
+                                        <td>{{ $data->jchae }}</td>
+                                        <td>{{ $data->tchae }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 36 - 0
resources/views/admin/sta/sta_five.blade.php

xqd
@@ -0,0 +1,36 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->money }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 36 - 0
resources/views/admin/sta/sta_four.blade.php

xqd
@@ -0,0 +1,36 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->money }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 39 - 0
resources/views/admin/sta/sta_nine.blade.php

xqd
@@ -0,0 +1,39 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $num=>$data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->total_money }}</td>
+                                        <td>{{ $data->price }}</td>
+                                        <td>{{ $data->jchae }}</td>
+                                        <td>{{ $data->tchae }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 15 - 61
resources/views/admin/sta/sta_one.blade.php

xqd xqd xqd
@@ -1,29 +1,11 @@
-@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>{{ $table_name }}</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">
+
+@extends('layouts.datatable')
+    @section('table')
         <div class="row">
             <div class="col-md-12">
                 <div class="box box-primary">
                     <div class="box-header with-border">
-                        <h3 class="box-title">重组二维数组测试</h3>
+                        <h3 class="box-title">统计数据</h3>
                     </div>
                     <div class="box-body">
                         <div class="dataTables_wrapper form-inline dt-bootstrap">
@@ -36,16 +18,16 @@
                                 </tr>
                                 </thead>
                                 <tbody>
-                                    @foreach($table as $num=>$data)
-                                        <tr>
-                                            <td>{{ $data->bzc_name }}</td>
-                                            <td>{{ $data->area }}</td>
-                                            <td>{{ $data->total_money }}</td>
-                                            <td>{{ $data->price }}</td>
-                                            <td>{{ $data->jchae }}</td>
-                                            <td>{{ $data->tchae }}</td>
-                                        </tr>
-                                        @endforeach
+                                @foreach($table as $num=>$data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->total_money }}</td>
+                                        <td>{{ $data->price }}</td>
+                                        <td>{{ $data->jchae }}</td>
+                                        <td>{{ $data->tchae }}</td>
+                                    </tr>
+                                @endforeach
                                 </tbody>
                             </table>
                         </div>
@@ -54,32 +36,4 @@
                 </div>
             </div>
         </div>
-    </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
+    @endsection

+ 39 - 0
resources/views/admin/sta/sta_seven.blade.php

xqd
@@ -0,0 +1,39 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $num=>$data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->total_money }}</td>
+                                        <td>{{ $data->price }}</td>
+                                        <td>{{ $data->jchae }}</td>
+                                        <td>{{ $data->tchae }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 39 - 0
resources/views/admin/sta/sta_six.blade.php

xqd
@@ -0,0 +1,39 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $num=>$data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->total_money }}</td>
+                                        <td>{{ $data->price }}</td>
+                                        <td>{{ $data->jchae }}</td>
+                                        <td>{{ $data->tchae }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 38 - 0
resources/views/admin/sta/sta_three.blade.php

xqd
@@ -0,0 +1,38 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->canbu }}</td>
+                                        <td>{{ $data->linshibu }}</td>
+                                        <td>{{ $data->banqianbu }}</td>
+                                        <td>{{ $data->total }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 36 - 0
resources/views/admin/sta/sta_two.blade.php

xqd
@@ -0,0 +1,36 @@
+
+@extends('layouts.datatable')
+    @section('table')
+        <div class="row">
+            <div class="col-md-12">
+                <div class="box box-primary">
+                    <div class="box-header with-border">
+                        <h3 class="box-title">统计数据</h3>
+                    </div>
+                    <div class="box-body">
+                        <div class="dataTables_wrapper form-inline dt-bootstrap">
+                            <table id="table" class="table table-hover dataTable" role="grid" aria-describedby="example2_info">
+                                <thead>
+                                <tr role="row">
+                                    @foreach($th as $h)
+                                        <th>{{ $h }}</th>
+                                    @endforeach
+                                </tr>
+                                </thead>
+                                <tbody>
+                                @foreach($table as $data)
+                                    <tr>
+                                        <td>{{ $data->bzc_name }}</td>
+                                        <td>{{ $data->area }}</td>
+                                        <td>{{ $data->money }}</td>
+                                    </tr>
+                                @endforeach
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    {{-- /.boc-body--}}
+                </div>
+            </div>
+        </div>
+    @endsection

+ 54 - 0
resources/views/layouts/datatable.blade.php

xqd
@@ -0,0 +1,54 @@
+@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>{{ $table_name }}</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">
+
+        @yield('table')
+
+    </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