GGican преди 8 години
родител
ревизия
4e75792104

+ 15 - 1
app/Http/Controllers/Admin/SearchController.php

xqd
@@ -1068,7 +1068,21 @@ class SearchController extends CommonController
                         '备注',
                     ];
 
-                    return view('admin.sta.sta_all',compact('th','table_name','user_data'));
+                    $result = Tablelist::query();
+
+                    $data = $request->all();
+
+                    $result = $result->where('status', '>', '0');
+
+                    $result = $data['name'] != '' ? $result->where('bzc_name','like', '%'.$data['name'].'%') : $result;
+
+                    $result = $data['project_name'] != '' ? $result->where('project_name', $data['project_name']) : $result;
+
+                    $result = $data['start_time'] != '' ? $result->where('updated_at', '>', $data['start_time']) : $result;
+
+                    $result = $data['end_time'] != '' ? $result->where('updated_at', '<', $data['end_time']) : $result;
+
+                    return view('admin.sta.sta_all',compact('th','table_name','user_data','table'));
                     break;
             }
         } else {

+ 11 - 0
public/css/style.css

xqd
@@ -0,0 +1,11 @@
+.count_table{
+
+    table-layout: fixed;
+
+}
+
+.count_table > td {
+
+    word-break: break-all;
+
+}

+ 115 - 0
public/js/AJAX.js

xqd
@@ -0,0 +1,115 @@
+/**
+@param {string} [sName]
+@param {string} [location]
+@return {XMLHttpRequest}
+*/
+ActiveXObject = function(sName,location) {};
+
+/**
+@static
+@type {number}
+@const
+*/
+XMLHttpRequest.UNSENT = 0;
+/**
+@static
+@type {number}
+@const
+*/
+XMLHttpRequest.OPENED = 1;
+/**
+@static
+@type {number}
+@const
+*/
+XMLHttpRequest.HEADERS_RECEIVED = 2;
+/**
+@static
+@type {number}
+@const
+*/
+XMLHttpRequest.LOADING = 3;
+/**
+@static
+@type {number}
+@const
+*/
+XMLHttpRequest.DONE = 4;
+/**
+@type {Function}
+*/
+Object.defineProperty(XMLHttpRequest, "onreadystatechange", { set: function(value) {} });
+/**
+@type {number}
+*/
+XMLHttpRequest.prototype.readyState = 0;
+/**
+@type {string}
+@const
+*/
+XMLHttpRequest.prototype.responseText = null;
+/**
+@type {string}
+@const
+*/
+XMLHttpRequest.prototype.statusText = null;
+/**
+@type {number}
+@const
+*/
+XMLHttpRequest.prototype.status = 0;
+/**
+@type {Document}
+*/
+XMLHttpRequest.prototype.responseXML = 0;
+/**
+@param {...Object} [options]
+@constructor
+*/
+function XMLHttpRequest(options) {}
+XMLHttpRequest.prototype.abort = function() {};
+/**
+@return {string}
+*/
+XMLHttpRequest.prototype.getAllResponseHeaders = function() {};
+/**
+@param {string} headerName
+@return {string}
+*/
+XMLHttpRequest.prototype.getResponseHeader = function(headerName) {};
+/**
+@param {string} method
+@param {string} url
+@param {boolean} [async]
+@param {string} [user]
+@param {string} [password]
+*/
+XMLHttpRequest.prototype.open = function(method,url,async,user,password) {};
+/**
+@param {String|ArrayBuffer|Blob|Document|FormData} [data]
+*/
+XMLHttpRequest.prototype.send = function(data) {};
+/**
+@param {string} header
+@param {string} value
+*/
+XMLHttpRequest.prototype.setRequestHeader = function(header,value) {};
+
+/**
+@static
+@type {number}
+@const
+*/
+XMLHttpRequestException.NETWORK_ERR = 101;
+/**
+@static
+@type {number}
+@const
+*/
+XMLHttpRequestException.ABORT_ERR = 102;
+/**
+@type {number}
+@const
+*/
+XMLHttpRequestException.prototype.code = 0;
+XMLHttpRequestException = {};

+ 9 - 3
resources/views/admin/sta/sta_all.blade.php

xqd xqd xqd
@@ -2,16 +2,17 @@
 @extends('layouts.datatable')
     @section('table')
 
+        <link rel="stylesheet" href="{{asset('css/style.css')}}">
 
 
         <div class="row">
-            <div class="col-md-12">
-                <div class="box box-primary" id="print">
+            <div class="col-md-12" id="print">
+                <div class="box box-primary">
                     <div class="box-header with-border" style="text-align: center">
                         <h1 class="box-title">成本审计汇总表</h1>
                     </div>
                     <div class="box-body">
-                        <table class="table table-bordered" >
+                        <table class="table table-bordered">
                             <thead>
                             <tr>
                                 <th>合同编号</th>
@@ -370,11 +371,13 @@
                 </div>
             </div>
         </div>
+
         <button class="btn btn-success" onclick="printed('print')">打印</button>
 
         <script>
             function printed(printpage)
             {
+
                 var headstr = "<html><head><title></title></head><body>";
                 var footstr = "</body>";
                 var newstr = document.all.item(printpage).innerHTML;
@@ -384,6 +387,9 @@
                 document.body.innerHTML = oldstr;
                 return false;
             }
+            function excel(){
+                saveAs
+            }
         </script>
 
 

+ 3 - 1
resources/views/layouts/datatable.blade.php

xqd
@@ -20,7 +20,9 @@
     <!-- Main content -->
     <section class="content">
 
-        @include('layouts.search')
+        @if($table_name != '成本审计汇总表')
+            @include('layouts.search')
+        @endif
 
         @yield('table')