Browse Source

非管理员限制修改企业、账户信息

yangc 7 years ago
parent
commit
678778d5ff

+ 4 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -406,6 +406,10 @@ define(['app/app'], function (app) {
          * 变更到更新状态
          */
         $scope.changeToUpdate = function (isUpdate) {
+            if ($rootScope.userInfo.userUU != $rootScope.userInfo.enterprise.enAdminuu) {
+                toaster.pop('error', '您无该模块的编辑权限,请联系企业管理员进行编辑维护!');
+                return;
+            }
             $scope.updateState = isUpdate;
             if ($scope.updateState == false) {
                 $scope.enterpriseInfo = angular.copy($scope.enterpriseInfoBackup);

+ 4 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_store_maintain_ctrl.js

@@ -140,6 +140,10 @@ define(['app/app'], function (app) {
 		 * @param module	模块名称
 		 */
 		$scope.showEdit = function (module) {
+			if ($rootScope.userInfo.userUU != $rootScope.userInfo.enterprise.enAdminuu) {
+				toaster.pop('error', '您无该模块的编辑权限,请联系企业管理员进行编辑维护!');
+				return;
+			}
 			changeEditStatus(module, true);
 		};
 

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -924,7 +924,7 @@
                         <p class="basic_title"><span>企业信息</span>
                             <!--<span class="fr"><a href="#">修改</a><a href="#">提交</a><a href="#">删除</a></span>-->
                             <span class="fr">
-                                <button ng-if="userInfo.userUU == userInfo.enterprise.uu && !updateState"  ng-click="changeToUpdate(true)">修改</button>
+                                <button ng-if="!updateState"  ng-click="changeToUpdate(true)">修改</button>
                                 <button ng-if="updateState"  ng-click="saveUpdate()">保存</button>
                                 <button ng-if="updateState" ng-click="changeToUpdate(false)" style="color: #f00">取消</button>
                             </span>

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html

@@ -769,7 +769,7 @@
 				<div class="col-md-8 custom_col">
 					<h2>请完善以下信息,便于宣传展示</h2>
 				</div>
-				<div class="col-md-4 custom_col" ng-if="userInfo.userUU == userInfo.enterprise.uu">
+				<div class="col-md-4 custom_col">
 					<a href="javascript:void(0)" ng-click="showEdit('BASIC_INFO')">
 						<span style="text-align: right; color: #999;"><i class="fa fa-pencil" aria-hidden="true" style="font-size: 18px;"></i> 编辑</span>
 					</a>