shish 3 年之前
父節點
當前提交
fe1b88d1b3
共有 1 個文件被更改,包括 10 次插入5 次删除
  1. 10 5
      app-ghs/controllers/ProductController.php

+ 10 - 5
app-ghs/controllers/ProductController.php

@@ -264,14 +264,19 @@ class ProductController extends BaseController
             $itemInfoData = ProductClass::simpleGroup($itemInfoData, $level);
         } elseif ($requestType == 'check') {
             //盘点花材列表
-            $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,stockWarning,presell,ratioType,smallUnit,bigUnit,ratio';
+            if (in_array($this->mainId, [52, 1459, 2126, 2128])) {
+                //惠雅鲜花的不列出frontHide字段,因为他花材太多很慢了
+                $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,stockWarning,presell,ratioType,smallUnit,bigUnit,ratio';
+            } else {
+                $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,stockWarning,presell,ratioType,smallUnit,bigUnit,ratio,frontHide';
+            }
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
             $itemInfoData = ProductClass::checkItemGroup($itemInfoData, $level);
         } elseif ($requestType == 'break') {
             //报损花材
             if (in_array($this->mainId, [52, 1459, 2126, 2128])) {
                 $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,stockWarning,presell,ratioType,smallUnit,bigUnit,ratio';
-            }else{
+            } else {
                 $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,stockWarning,presell,ratioType,smallUnit,bigUnit,ratio,frontHide';
             }
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
@@ -286,7 +291,7 @@ class ProductController extends BaseController
             if (in_array($this->mainId, [52, 1459, 2126, 2128])) {
                 //惠雅鲜花的不列出frontHide字段,因为他花材太多很慢了
                 $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,stockWarning,presell,ratioType,smallUnit,bigUnit,ratio,smallRatio';
-            }else{
+            } else {
                 $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,stockWarning,presell,ratioType,smallUnit,bigUnit,ratio,smallRatio,frontHide';
             }
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
@@ -296,7 +301,7 @@ class ProductController extends BaseController
             if (in_array($this->mainId, [52, 1459, 2126, 2128])) {
                 //惠雅鲜花的不列出frontHide字段,因为他花材太多很慢了
                 $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,presell,ratioType,smallUnit,bigUnit,ratio,weight';
-            }else{
+            } else {
                 $field = 'id,py,cover,name,itemId,classId,variety,price,discountPrice,stock,presell,ratioType,smallUnit,bigUnit,ratio,weight,frontHide';
             }
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
@@ -306,7 +311,7 @@ class ProductController extends BaseController
             if (in_array($this->mainId, [52, 1459, 2126, 2128])) {
                 //惠雅鲜花的不列出frontHide字段,因为他花材太多很慢了
                 $field = 'id,py,cover,name,cost,itemId,classId,skPrice,variety,price,discountPrice,stock,actualSold,presell,bigUnit,stockWarning,status';
-            }else{
+            } else {
                 $field = 'id,py,cover,name,cost,itemId,classId,skPrice,variety,price,discountPrice,stock,actualSold,presell,bigUnit,stockWarning,status,frontHide';
             }
             $itemInfoData = Product::find()->where("mainId={$this->mainId}")