wesley 6 years ago
parent
commit
c932768558

+ 6 - 16
resources/views/admin/call/records/index.blade.php

xqd xqd xqd xqd xqd
@@ -34,7 +34,7 @@
                         <th> 过滤条件</th>
                         <form method="GET" action="" accept-charset="UTF-8" id="filter_records">
                             <th>
-                                <select name="ip" class="form-control filter_records">
+                                <select name="ip" class="form-control" onchange="filter_records()">
                                     <option value="">拨打IP</option>
                                     <option value="172.31.20.133">172.31.20.133</option>
                                     <option value="172.31.20.134">172.31.20.134</option>
@@ -45,7 +45,7 @@
                             </th>
 
                             <th>
-                                <select name="term_status" class="form-control filter_records">
+                                <select name="term_status" class="form-control" onchange="filter_records()">
                                     <option value="">接听状态</option>
                                     <option value="200">已接通</option>
                                     <option value="408">未接通</option>
@@ -58,8 +58,8 @@
                                            placeholder="请输入电话号码"
                                            name="phone">
                                     <span class="input-group-append">
-                                                <span class="btn btn-sm btn-default filter_records"
-                                                      style="height: 100%">搜索</span>
+                                                <span class="btn btn-sm btn-default"
+                                                      style="height: 100%" onclick="filter_records()">搜索</span>
                                             </span>
                                 </div>
                             </th>
@@ -132,7 +132,7 @@
         })
 
         /*通话纪录筛选*/
-        $('.filter_records').change(function () {
+        function filter_records(){
             data = $('#filter_records').serialize()
             $.ajax({
                 type: 'get',
@@ -140,17 +140,7 @@
             }).done(function (data) {
                 $('#records-list').html(data.html)
             })
-        })
-
-        $('.filter_records').click(function () {
-            data = $('#filter_records').serialize()
-            $.ajax({
-                type: 'get',
-                data: data,
-            }).done(function (data) {
-                $('#records-list').html(data.html)
-            })
-        })
+        }
 
         /*Ajax分页*/
         $('body').on('click', '.pagination a', function (e) {

+ 12 - 21
resources/views/admin/company/info/index.blade.php

xqd xqd xqd xqd xqd xqd xqd
@@ -32,14 +32,14 @@
                             <th> 过滤条件</th>
                             <form method="GET" action="" accept-charset="UTF-8" id="filter_company">
                                 <th>
-                                    <select name="district" class="form-control filter_company">
+                                    <select name="district" class="form-control" onchange="filter_company()">
                                         <option value="">所在地区</option>
                                         <option value="成都">成都</option>
                                         <option value="上海">上海</option>
                                     </select>
                                 </th>
                                 <th>
-                                    <select name="industry" class="form-control filter_company">
+                                    <select name="industry" class="form-control" onchange="filter_company()">
                                         <option value="">所属行业</option>
                                         <option value="软件开发">软件开发</option>
                                         <option value="信息传输">信息传输</option>
@@ -49,7 +49,7 @@
                                     </select>
                                 </th>
                                 <th>
-                                    <select name="regCapital" class="form-control filter_company">
+                                    <select name="regCapital" class="form-control" onchange="filter_company()">
                                         <option value="">注册资本</option>
                                         <option value="-50">小于50万</option>
                                         <option value="50-100">50~100万</option>
@@ -59,14 +59,14 @@
                                     </select>
                                 </th>
                                 <th>
-                                    <select name="startDate" class="form-control filter_company">
+                                    <select name="startDate" class="form-control" onchange="filter_company()">
                                         <option value="">成立年限</option>
                                         <option value="2014">2014</option>
                                         <option value="2017">2017</option>
                                     </select>
                                 </th>
                                 <th>
-                                    <select name="entType" class="form-control filter_company">
+                                    <select name="entType" class="form-control" onchange="filter_company()">
                                         <option value="">企业类型</option>
                                         <option value="有限责任公司">有限责任公司(中外合资)</option>
                                         <option value="有限责任公司(中外合资)">有限责任公司(中外合资)</option>
@@ -74,7 +74,7 @@
                                     </select>
                                 </th>
                                 <th>
-                                    <select name="openStatus" class="form-control filter_company">
+                                    <select name="openStatus" class="form-control" onchange="filter_company()">
                                         <option value="">企业状态</option>
                                         <option value="开业">开业</option>
                                         <option value="">企业状态</option>
@@ -83,12 +83,12 @@
 
                                 <th>
                                     <div class="input-group">
-                                        <input type="text" class="form-control" value="{{Request::get('keyword')}}"
+                                        <input type="text" class="form-control" value="{{Request::get('companyName')}}"
                                                placeholder="请输入企业名称"
-                                               name="keyword">
+                                               name="companyName">
                                         <span class="input-group-append">
-                                                <span class="btn btn-sm btn-default filter_company"
-                                                      style="height: 100%">搜索</span>
+                                                <span class="btn btn-sm btn-default"
+                                                      style="height: 100%" onclick="filter_company()">搜索</span>
                                             </span>
                                     </div>
                                 </th>
@@ -108,7 +108,7 @@
 
 @section('js')
     <script type="text/javascript">
-        $('.filter_company').change(function () {
+        function filter_company(){
             data = $('#filter_company').serialize()
             $.ajax({
                 type: 'get',
@@ -116,16 +116,7 @@
             }).done(function (data) {
                 $('#company-list').html(data.html)
             })
-        })
-        $('.filter_company').click(function () {
-            data = $('#filter_company').serialize()
-            $.ajax({
-                type: 'get',
-                data: data,
-            }).done(function (data) {
-                $('#company-list').html(data.html)
-            })
-        })
+        }
 
         $('body').on('click', '.pagination a', function (e) {
             e.preventDefault();

+ 5 - 14
resources/views/admin/user/threads/index.blade.php

xqd xqd xqd xqd
@@ -29,7 +29,7 @@
                         <th> 过滤条件</th>
                         <form method="GET" action="" accept-charset="UTF-8" id="filter_threads">
                             <th>
-                                <select name="process" class="form-control filter_threads">
+                                <select name="process" class="form-control" onchange="filter_threads()">
                                     <option value="">有无跟进</option>
                                     <option value="1">有</option>
                                     <option value="2">无</option>
@@ -71,8 +71,8 @@
                                            placeholder="请输入企业名称"
                                            name="keyword">
                                     <span class="input-group-append">
-                                                <span  class="btn btn-sm btn-default filter_threads"
-                                                        style="height: 100%">搜索</span>
+                                                <span  class="btn btn-sm btn-default"
+                                                        style="height: 100%" onclick="filter_threads()">搜索</span>
                                             </span>
                                 </div>
 
@@ -147,17 +147,8 @@
         })
 
         /*线索筛选*/
-        $('.filter_threads').change(function () {
-            data = $('#filter_threads').serialize()
-            $.ajax({
-                type: 'get',
-                data: data,
-            }).done(function (data) {
-                $('#threads-list').html(data.html)
-            })
-        })
 
-        $('.filter_threads').click(function () {
+        function filter_threads(){
             data = $('#filter_threads').serialize()
             $.ajax({
                 type: 'get',
@@ -165,7 +156,7 @@
             }).done(function (data) {
                 $('#threads-list').html(data.html)
             })
-        })
+        }
 
         /*Ajax 分页*/
         $('body').on('click', '.pagination a', function(e) {