Browse Source

新粉月销售额梯形图报表修改问题

shensong 4 years ago
parent
commit
8f39864cf5
1 changed files with 1 additions and 2 deletions
  1. 1 2
      app/Http/Controllers/Admin/StatisticsController.php

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

5710
             $etime = date("Y-m", strtotime('-1 month'));
5710
             $etime = date("Y-m", strtotime('-1 month'));
5711
         }
5711
         }
5712
 
5712
 
5713
-        $result = DB::table('cust_month_remain')
5713
+        $result = DB::table('cust_month_remain')->where('team_id',$team_id)
5714
             ->where(function($query) use($stime, $etime, $team_id){
5714
             ->where(function($query) use($stime, $etime, $team_id){
5715
                 if($stime) $query->where('idate','>=', $stime.'-01');
5715
                 if($stime) $query->where('idate','>=', $stime.'-01');
5716
                 if($etime) $query->where('idate','<=', $etime.'-01');
5716
                 if($etime) $query->where('idate','<=', $etime.'-01');
5717
-                if($team_id >0) $query->where('team_id',$team_id);
5718
             })->orderBy('idate', 'asc')->orderBy('month_time', 'asc')->get();
5717
             })->orderBy('idate', 'asc')->orderBy('month_time', 'asc')->get();
5719
 
5718
 
5720
         #获取列
5719
         #获取列