Browse Source

未上报数据销售优化

sunhao 5 years ago
parent
commit
76edcfbe40
1 changed files with 1 additions and 2 deletions
  1. 1 2
      app/Http/Controllers/Admin/CustReportController.php

+ 1 - 2
app/Http/Controllers/Admin/CustReportController.php

@@ -738,7 +738,6 @@ class custReportController extends Controller
738 738
         //销售团队
739 739
         $team_ids = Admin::getTeams();
740 740
         $ids = DB::table('admin_role')->where('user_id','!=',3)->where('role_name', '销售')->lists('user_id');
741
-        $ids = DB::table('admin')->whereIn('id', $ids)->where('is_use', 1)->whereIn('team_id', $team_ids)->lists('id');
742 741
         //销售名字
743 742
         $salers = DB::table('admin')->whereIn('id', $ids)->lists('realname', 'id');
744 743
  
@@ -754,7 +753,7 @@ class custReportController extends Controller
754 753
 
755 754
         $ret = array();
756 755
         foreach($data as $k=>$v){
757
-            $ids = DB::table('admin')->whereIn('id', $ids)->where('create_time','<',$k)->lists('id');
756
+            $ids = DB::table('admin')->whereIn('id', $ids)->where('is_use', 1)->whereIn('team_id', $team_ids)->where('create_time','<',$k)->lists('id');
758 757
             $diff = array_diff($ids, $v);
759 758
             if(!empty($diff)){
760 759
                 //名字带入