|
|
@@ -441,11 +441,11 @@ class ProductController extends BaseController
|
|
|
//根据分类组装分类下的花材信息
|
|
|
$shop = ShopClass::getById($shopId, true);
|
|
|
$mainId = $shop->mainId ?? 0;
|
|
|
- $open = $shop->open??1;
|
|
|
+ $open = $shop->open ?? 1;
|
|
|
|
|
|
- if($open == 0){
|
|
|
+ if ($open == 0) {
|
|
|
//九江云朵、丽子鲜花休店不让看花材
|
|
|
- if(in_array($mainId,[26374,1496])){
|
|
|
+ if (in_array($mainId, [26374, 1496])) {
|
|
|
util::fail('已休店');
|
|
|
}
|
|
|
}
|
|
|
@@ -467,7 +467,16 @@ class ProductController extends BaseController
|
|
|
$myProduct = ProductClass::getAllByCondition(['mainId' => $this->mainId, 'delStatus' => 0], null, 'id,stock,onStock,stockWarning,itemId', 'itemId');
|
|
|
if (!empty($itemInfoData)) {
|
|
|
$myShop = $this->shop;
|
|
|
- $myDisplay = isset($myShop->pfShopId) && $myShop->pfShopId > 0 ? 1 : 0;
|
|
|
+ $myDisplay = 0;
|
|
|
+ if (isset($myShop->pfShopId) && $myShop->pfShopId > 0) {
|
|
|
+ $pfShopId = $myShop->pfShopId;
|
|
|
+ $pfShop = ShopClass::getById($pfShopId, true);
|
|
|
+ //如果批发店是自己的,也不显示
|
|
|
+ if ($pfShop->mainId != $mainId) {
|
|
|
+ $myDisplay = 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
foreach ($itemInfoData as $key => $val) {
|
|
|
$ptItemId = $val['itemId'] ?? 0;
|
|
|
$myStock = $myProduct[$ptItemId]['stock'] ?? 0;
|