shish 6 месяцев назад
Родитель
Сommit
926268f3cf
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      app-ghs/controllers/ItemController.php

+ 4 - 0
app-ghs/controllers/ItemController.php

@@ -415,6 +415,7 @@ class ItemController extends BaseController
         $requestType = $get['requestType'] ?? 'kd';
         $classId = $get['classId'] ?? 0;
         $lookStock = $get['lookStock'] ?? 0;
+        $onStock = $get['onStock'] ?? 0;
 
         $where['mainId'] = $this->mainId;
         if ($requestType == 'kd') {
@@ -428,6 +429,9 @@ class ItemController extends BaseController
             if ($lookStock == 2) {
                 $where['stock'] = 0;
             }
+            if($onStock == 1){
+                $where['onStock>'] = 0;
+            }
             unset($where['status']);
         } elseif ($requestType == 'changePrice') {
             $where['delStatus'] = 0;