ソースを参照

采购人管理

shish 2 年 前
コミット
a0382be773
1 ファイル変更10 行追加6 行削除
  1. 10 6
      app-ghs/controllers/PurchaseOrderController.php

+ 10 - 6
app-ghs/controllers/PurchaseOrderController.php

@@ -620,8 +620,8 @@ class PurchaseOrderController extends BaseController
     {
         $where = [];
         $get = Yii::$app->request->get();
-		$export = $get['export'] ?? 0;
-		$search = $get['search']??'';
+        $export = $get['export'] ?? 0;
+        $search = $get['search'] ?? '';
         $where['shopId'] = $this->shopId;
         $orderStatus = $get['status'] ?? '';
         if ($orderStatus) {
@@ -631,10 +631,10 @@ class PurchaseOrderController extends BaseController
         if (!empty($ghsId)) {
             $where['ghsId'] = $ghsId;
         }
-        if(!empty($search)){
-            if(is_numeric($search) && strlen($search)==4){
+        if (!empty($search)) {
+            if (is_numeric($search) && strlen($search) == 4) {
                 $where['orderSn'] = ['like', $search];
-            }else{
+            } else {
                 $where['ghsName'] = ['like', $search];
             }
         }
@@ -654,6 +654,10 @@ class PurchaseOrderController extends BaseController
             $period = dateUtil::formatTime($searchTime, $startTime, $endTime);
             $where['entryTime'] = ['between', [$period['startTime'], $period['endTime']]];
         }
+        $cgStaffId = $get['cgStaffId'] ?? 0;
+        if (!empty($cgStaffId)) {
+            $where['cgStaffId'] = $cgStaffId;
+        }
         if ($export == 1) {
             ini_set('memory_limit', '2045M');
             set_time_limit(0);
@@ -687,7 +691,7 @@ class PurchaseOrderController extends BaseController
             }
             //小向花卉采购控制
             if ($this->mainId == 23390) {
-                if (!in_array($this->adminId, [24586, 24115, 24759, 26390, 23960, 25011, 25004, 24655,28521])) {
+                if (!in_array($this->adminId, [24586, 24115, 24759, 26390, 23960, 25011, 25004, 24655, 28521])) {
                     util::fail('没有数据哦');
                 }
             }