|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
+use biz\admin\classes\AdminRoleClass;
|
|
|
use biz\shop\classes\ShopExtClass;
|
|
|
use common\components\printUtil;
|
|
|
use common\components\util;
|
|
|
@@ -15,6 +16,15 @@ class ShopExtController extends BaseController
|
|
|
//添加打印机 shish 20210712
|
|
|
public function actionAddPrint()
|
|
|
{
|
|
|
+
|
|
|
+ $shopAdmin = $this->shopAdmin;
|
|
|
+ $roleId = $shopAdmin['roleId'] ?? 0;
|
|
|
+ $role = AdminRoleClass::getById($roleId);
|
|
|
+ $roleName = $role['roleName'] ?? '';
|
|
|
+ if ($roleName == '员工') {
|
|
|
+ util::fail('没有权限操作哦');
|
|
|
+ }
|
|
|
+
|
|
|
$shopId = $this->shopId;
|
|
|
$ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
|
|
|
$get = Yii::$app->request->get();
|