|
|
@@ -1257,7 +1257,7 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
|
|
|
//判断这个花材能否被修改单位比和重量,同步参考ShopController actionMyShop方法,关键词has_right_shop_list
|
|
|
- //判断当前登录的人,在自己有财务权限的main里面,是否包括了这个花材所属的平台id,同个平台id所有花材的main
|
|
|
+ //判断当前登录的人,在自己有财务权限的main里面,是否包括了这个花材所属的平台id,在这个平台id下所有花材的main
|
|
|
$adminId = $this->adminId;
|
|
|
$staffList = ShopAdminClass::getAllByCondition(['adminId' => $adminId], null, '*', null, true);
|
|
|
$hasMainList = [];
|
|
|
@@ -1268,13 +1268,9 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
$sameList = ProductClass::getAllByCondition(['itemId' => $ptItemId], null, 'id,itemId,mainId');
|
|
|
$sameMainList = array_column($sameList, 'mainId');
|
|
|
- echo "<pre>";
|
|
|
- print_r($sameMainList);
|
|
|
- print_r($hasMainList);
|
|
|
$hasNot = array_diff($sameMainList, $hasMainList);
|
|
|
- print_r($hasNot);
|
|
|
- die;
|
|
|
$hasRightChange = empty($hasNot) ? 1 : 0;
|
|
|
+ //是否允许修改花材单位比、单位和重量等
|
|
|
$respond['hasRightChange'] = $hasRightChange;
|
|
|
|
|
|
$respond['cpInfo'] = $cpInfo;
|