|
|
@@ -115,19 +115,25 @@ class ProductController extends BaseController
|
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
|
$shopId = $get['shopId'] ?? 0;
|
|
|
- if (empty($id)) {
|
|
|
- if (!empty($this->shopId)) {
|
|
|
- $ghs = GhsClass::build($shopId, $this->shopId, $this->sjId);
|
|
|
- $sjId = $ghs['ghsSjId'] ?? 0;
|
|
|
+ $ghsShopAdminId = isset($get['ghsShopAdminId']) && !empty($get['ghsShopAdminId']) ?? 0;
|
|
|
+ if (!empty($ghsShopAdminId)) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ if (empty($id)) {
|
|
|
+ if (!empty($this->shopId)) {
|
|
|
+ $ghs = GhsClass::build($shopId, $this->shopId, $this->sjId);
|
|
|
+ $sjId = $ghs['ghsSjId'] ?? 0;
|
|
|
+ } else {
|
|
|
+ $shop = ShopClass::getShopInfo($shopId);
|
|
|
+ $sjId = $shop['merchantId'] ?? 0;
|
|
|
+ }
|
|
|
} else {
|
|
|
- $shop = ShopClass::getShopInfo($shopId);
|
|
|
- $sjId = $shop['merchantId'] ?? 0;
|
|
|
+ $ghs = GhsClass::getGhsInfo($id);
|
|
|
+ $sjId = $ghs['ghsSjId'] ?? 0;
|
|
|
}
|
|
|
- } else {
|
|
|
- $ghs = GhsClass::getGhsInfo($id);
|
|
|
- $sjId = $ghs['ghsSjId'] ?? 0;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//获取所有当前供应商的分类 (全部、常用)
|
|
|
//根据分类组装分类下的花材信息
|
|
|
$classIds = ItemClassClass::getGhsItemClassAll($sjId);
|