wesley há 6 anos atrás
pai
commit
e9339d38b9

+ 5 - 0
app/Http/Controllers/Admin/Company/InfoController.php

xqd
@@ -57,6 +57,11 @@ class InfoController extends Controller
         return view('admin.company.info.index', compact('list'));
     }
 
+    public function collection()
+    {
+
+    }
+
 
     /**
      * 添加

+ 1 - 1
app/Http/Controllers/Admin/User/ThreadsController.php

xqd
@@ -179,6 +179,6 @@ class ThreadsController extends Controller
         $threads =  UserThreadsModel::whereIn('id',$thread_ids)->get();
 
 
-        return Excel::download(new ThreadsExport($threads),'invoices.xlsx');
+        return Excel::download(new ThreadsExport($threads),'我的线索.xlsx');
     }
 }

+ 31 - 35
resources/views/admin/call/records/index.blade.php

xqd xqd xqd
@@ -18,8 +18,6 @@
                             <div class="col-sm-8 pull-right">
                                     <span id="addCallList" class="btn btn-primary pull-right fa fa-phone"
                                           style="display: none">添加到电话列表</span>
-                                <span id="export_call" class="btn btn-success pull-right fa fa-table"
-                                      style="display: none">导出到Excel</span>
                             </div>
                         @endif
                         {{--@if(role('Call/Records/create'))--}}
@@ -82,38 +80,36 @@
 @section('js')
     <script type="text/javascript">
         /*电话全选功能*/
-        var items = $('.contacts');
 
-        $('#checkAll').click(function () {
+        $('body').on('click', '#checkAll', function () {
+            items = $('.contacts');
 
             isChecked = $(this).prop('checked')
             items.prop('checked', isChecked)
             if (isChecked == true) {
                 $('#addCallList').show()
-                $('#export_call').show()
             } else {
                 $('#addCallList').hide()
-                $('#export_call').hide()
             }
         })
 
-        items.click(function () {
+        $('body').on('click','.contacts',function () {
+            items = $('.contacts');
+
             checkedLength = $('.contacts:checked').length
             if (checkedLength) {
                 $('#addCallList').show()
-                $('#export_call').show()
             } else {
                 $('#addCallList').hide()
-                $('#export_call').hide()
             }
             if (items.length == checkedLength) {
                 $('#addCallList').show()
-                $('#export_call').show()
             } else {
                 $('#checkAll').prop('checked', false)
             }
         })
 
+
         /*添加选择的电话到拨打列表*/
         $('#addCallList').click(function () {
             contact_phones = [];
@@ -142,31 +138,31 @@
         });
 
         /*导出通话纪录到excel*/
-        $('#export_call').click(function () {
-            call_ids = [];
-            csrf_token = "{{ csrf_token() }}";
-            $('.contacts:checked').each(function () {
-                call_ids.push($(this).val())
-            });
-
-            $.ajax({
-                type: 'post',
-                url: '{{ U('Call/Records/export_call') }}',
-                data: {call_ids: call_ids, _token: csrf_token},
-                success: function (data) {
-                    if (data == 200) {
-                        layer.msg('导入成功', {
-                            icon: 1,
-                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
-                        }, function () {
-                            window.location.href = window.location.href
-                        });
-
-                    }
-                }
-
-            })
-        });
+        {{--$('#export_call').click(function () {--}}
+        {{--call_ids = [];--}}
+        {{--csrf_token = "{{ csrf_token() }}";--}}
+        {{--$('.contacts:checked').each(function () {--}}
+        {{--call_ids.push($(this).val())--}}
+        {{--});--}}
+
+        {{--$.ajax({--}}
+        {{--type: 'post',--}}
+        {{--url: '{{ U('Call/Records/export_call') }}',--}}
+        {{--data: {call_ids: call_ids, _token: csrf_token},--}}
+        {{--success: function (data) {--}}
+        {{--if (data == 200) {--}}
+        {{--layer.msg('导入成功', {--}}
+        {{--icon: 1,--}}
+        {{--time: 2000 //2秒关闭(如果不配置,默认是3秒)--}}
+        {{--}, function () {--}}
+        {{--window.location.href = window.location.href--}}
+        {{--});--}}
+
+        {{--}--}}
+        {{--}--}}
+
+        {{--})--}}
+        {{--});--}}
 
         /*通话纪录筛选*/
         function filter_records() {

+ 10 - 9
resources/views/admin/user/threads/index.blade.php

xqd xqd
@@ -98,20 +98,21 @@
 @section('js')
     <script type="text/javascript">
         /*电话全选功能*/
-        var items = $('.contacts')
-        $('#checkAll').click(function () {
-            isChecked = $(this).prop('checked')
-            items.prop('checked', isChecked)
+        $('body').on('click','#checkAll',function () {
+            items = $('.contacts');
+            isChecked = $(this).prop('checked');
+            items.prop('checked', isChecked);
             if (isChecked == true) {
-                $('#addCallList').show()
+                $('#addCallList').show();
                 $('#export_threads').show()
             } else {
-                $('#addCallList').hide()
+                $('#addCallList').hide();
                 $('#export_threads').hide()
             }
-        })
+        });
 
-        items.click(function () {
+        $('body').on('click','.contacts',function () {
+            items = $('.contacts');
             checkedLength = $('.contacts:checked').length
             if (checkedLength) {
                 $('#addCallList').show()
@@ -126,7 +127,7 @@
             } else {
                 $('#checkAll').prop('checked', false)
             }
-        })
+        });
 
         /*添加选择的电话到拨打列表*/
         $('#addCallList').click(function () {