sunhao 5 years ago
parent
commit
0ab40d7c77
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/Http/Controllers/Admin/CustReportController.php

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

@@ -14,6 +14,7 @@ use App\CustDetail;
14 14
 use App\AdCost;
15 15
 use App\Oplog;
16 16
 use App\Order;
17
+use App\Admin;
17 18
 use Illuminate\Http\Request;
18 19
 use Illuminate\Support\Facades\DB;
19 20
 
@@ -734,8 +735,10 @@ class custReportController extends Controller
734 735
     public function noReportSaler(){
735 736
         $today = date('Y-m-d');
736 737
         //销售列表
738
+        //销售团队
739
+        $team_ids = Admin::getTeams();
737 740
         $ids = DB::table('admin_role')->where('user_id','!=',3)->where('role_name', '销售')->lists('user_id');
738
-        $ids = DB::table('admin')->whereIn('id', $ids)->where('is_use', 1)->lists('id');
741
+        $ids = DB::table('admin')->whereIn('id', $ids)->where('is_use', 1)->whereIn('team_id', $team_ids)->lists('id');
739 742
         //销售名字
740 743
         $salers = DB::table('admin')->whereIn('id', $ids)->lists('realname', 'id');
741 744