|
|
@@ -118,7 +118,7 @@ class ProductController extends BaseController
|
|
|
if ($version == 0) {
|
|
|
util::fail('请先升级版本到1.0.70以上');
|
|
|
}
|
|
|
- $classIds = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
+ $classInfo = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
$mainId = $this->mainId ?? 0;
|
|
|
$where['mainId'] = $mainId;
|
|
|
if ($py) {
|
|
|
@@ -136,7 +136,7 @@ class ProductController extends BaseController
|
|
|
$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';
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
|
|
|
- $data = ProductService::assembleItemData($classIds, $itemInfoData, true);
|
|
|
+ $data = ProductService::assembleItemData($classInfo, $itemInfoData, true);
|
|
|
util::success($data);
|
|
|
}
|
|
|
|
|
|
@@ -148,7 +148,7 @@ class ProductController extends BaseController
|
|
|
if ($version == 0) {
|
|
|
util::fail('请先升级版本到1.0.70以上');
|
|
|
}
|
|
|
- $classIds = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
+ $classInfo = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
$mainId = $this->mainId ?? 0;
|
|
|
$where['mainId'] = $mainId;
|
|
|
if ($py) {
|
|
|
@@ -166,7 +166,7 @@ class ProductController extends BaseController
|
|
|
$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';
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
|
|
|
- $data = ProductService::assembleData($classIds, $itemInfoData, true);
|
|
|
+ $data = ProductService::assembleData($classInfo, $itemInfoData, true);
|
|
|
util::success($data);
|
|
|
}
|
|
|
|
|
|
@@ -185,15 +185,15 @@ class ProductController extends BaseController
|
|
|
//获取所有当前供货商的分类 (全部、常用)
|
|
|
//根据分类组装分类下的花材信息
|
|
|
//中央ID
|
|
|
- $classIds = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
+ $classInfo = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
|
|
|
$where['mainId'] = $this->mainId;
|
|
|
if ($py) {
|
|
|
$pyName = strtolower($py);
|
|
|
$where['py'] = $pyName;
|
|
|
}
|
|
|
+ //改价和全部库存列表
|
|
|
if ($requestType == 'hasStock') {
|
|
|
- //改价只显示库存大于0的
|
|
|
$where['stock>'] = 0;
|
|
|
}
|
|
|
if (!empty($status)) {
|
|
|
@@ -222,7 +222,7 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
|
|
|
|
|
|
- $data = ProductService::assembleItemData($classIds, $itemInfoData, true);
|
|
|
+ $data = ProductService::assembleItemData($classInfo, $itemInfoData, true);
|
|
|
|
|
|
util::success($data);
|
|
|
}
|
|
|
@@ -241,7 +241,7 @@ class ProductController extends BaseController
|
|
|
//获取所有当前供货商的分类 (全部、常用)
|
|
|
//根据分类组装分类下的花材信息
|
|
|
//中央ID
|
|
|
- $classIds = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
+ $classInfo = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
|
|
|
$where['mainId'] = $this->mainId;
|
|
|
if ($py) {
|
|
|
@@ -278,7 +278,7 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData, $level);
|
|
|
|
|
|
- $data = ProductService::assembleData($classIds, $itemInfoData, true);
|
|
|
+ $data = ProductService::assembleData($classInfo, $itemInfoData, true);
|
|
|
|
|
|
util::success($data);
|
|
|
}
|