|
|
@@ -125,16 +125,18 @@ class ShopController extends BaseController
|
|
|
public function actionUpdate()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
- $adminId = $this->adminId;
|
|
|
$post['sjId'] = $this->sjId;
|
|
|
$id = $post['id'] ?? 0;
|
|
|
$shop = ShopService::getById($id);
|
|
|
if (empty($shop)) {
|
|
|
util::fail('没有找到门店');
|
|
|
}
|
|
|
- $ptSuperAdminId = \biz\admin\classes\AdminClass::getPtSuperAdminId();
|
|
|
- if ($adminId != $shop->adminId && $adminId != $ptSuperAdminId) {
|
|
|
- //util::fail('本店超管才能修改');
|
|
|
+ $staff = $this->shopAdmin;
|
|
|
+ if (isset($staff->finance) == false || $staff->finance == 0) {
|
|
|
+ util::fail('有财务权限才能修改门店');
|
|
|
+ }
|
|
|
+ if (isset($staff->super) == false || $staff->super == 0) {
|
|
|
+ util::fail('有改库存改价权限才能修改门店');
|
|
|
}
|
|
|
|
|
|
ShopClass::valid($shop, $this->sjId);
|