|
@@ -387,13 +387,17 @@ class ProductController extends BaseController
|
|
|
//供货商产品的详情 ssh 20230111
|
|
//供货商产品的详情 ssh 20230111
|
|
|
public function actionGhsProductDetail()
|
|
public function actionGhsProductDetail()
|
|
|
{
|
|
{
|
|
|
- $id = Yii::$app->request->get('id', 0);
|
|
|
|
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
|
|
+ $ghsId = $get['ghsId'] ?? 0;
|
|
|
$product = ProductClass::getById($id);
|
|
$product = ProductClass::getById($id);
|
|
|
- if (!empty($product)) {
|
|
|
|
|
- $level = 1;
|
|
|
|
|
- $list = ProductClass::groupProductInfo([$product], $level);
|
|
|
|
|
- $product = current($list);
|
|
|
|
|
|
|
+ if (empty($product)) {
|
|
|
|
|
+ util::fail('没有花材信息');
|
|
|
}
|
|
}
|
|
|
|
|
+ $ghsInfo = GhsClass::getById($ghsId, true);
|
|
|
|
|
+ $level = $ghsInfo->giveLevel ? $ghsInfo->giveLevel : 1;
|
|
|
|
|
+ $list = ProductClass::groupProductInfo([$product], $level);
|
|
|
|
|
+ $product = current($list);
|
|
|
util::success($product);
|
|
util::success($product);
|
|
|
}
|
|
}
|
|
|
|
|
|