shish 3 years ago
parent
commit
f7d69bba51

+ 2 - 2
app-ghs/controllers/ProductController.php

@@ -406,13 +406,13 @@ class ProductController extends BaseController
 
         if ($warning == 1) {
             //库存预警
-            $field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,presellDate,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell,presellDate';
+            $field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,presellDate,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell';
             $itemInfoData = Product::find()->where("mainId={$this->mainId}")
                 ->andWhere('`stock`<`stockWarning`')
                 ->andWhere("delStatus=0")
                 ->select($field)->asArray()->all();
         } else {
-            $field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,presellDate,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell,presellDate';
+            $field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,presellDate,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell';
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
         }
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);

+ 2 - 1
app-hd/controllers/ProductController.php

@@ -147,7 +147,8 @@ class ProductController extends BaseController
         $where['delStatus'] = $delStatus;
 
         $level = 0;
-        $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");
+        $field = 'id,py,cover,name,ratio,cost,addPrice,classId,skMore,skPrice,itemId,smallUnit,smallRatio,presellDate,bigUnit,smallUnit,ratioType,variety,price,stock,stockWarning,discountPrice,presell';
+        $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
 
         $data = ProductService::assembleData($classIds, $itemInfoData, true);