cqpCow 1 year ago
parent
commit
f3fdcb9a2d
1 changed files with 13 additions and 0 deletions
  1. 13 0
      app/Service/ReturnExchangeOrderService.php

+ 13 - 0
app/Service/ReturnExchangeOrderService.php

@@ -275,6 +275,19 @@ class ReturnExchangeOrderService extends Service
             $id = $this->getDataId($search,$user,$data);
             $id = $this->getDataId($search,$user,$data);
             $model->whereIn('data_id',$id);
             $model->whereIn('data_id',$id);
         }
         }
+        if(! empty($data['time_type'])) {
+            if($data['time_type'] == 1) {
+                $start = strtotime('today');
+                $end = strtotime('tomorrow') - 1;
+            }elseif ($data['time_type'] == 2){
+                $start = strtotime('this week',strtotime('today'));
+                $end = strtotime('this week +6 days 23:59:59', strtotime('today'));
+            }
+            if(! empty($start) && ! empty($end)) {
+                $model->where('crt_time','>=',$start);
+                $model->where('crt_time','<=',$end);
+            }
+        }
 
 
         $list = $this->limit($model,'',$data);
         $list = $this->limit($model,'',$data);
         $list = $this->fillListData($list);
         $list = $this->fillListData($list);