Explorar o código

Merge remote-tracking branch 'origin/liuam-bind-enterprise-0413' into liuam-bind-enterprise-0413

yangc %!s(int64=7) %!d(string=hai) anos
pai
achega
1d9414dd6e

+ 8 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -13,6 +13,7 @@ define(['app/app'], function(app) {
         $scope.searchParams = {
             keyword: ''
         };
+        $scope.isAdmin = $rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? true : false;
         // $scope.userInfo.pwdEnable = false;
         // $scope.userInfo.haveUserQuestion = false;
         // $scope.userInfo.userEmail = null;
@@ -26,7 +27,13 @@ define(['app/app'], function(app) {
                 total : 0,
                 getData : function ($defer, params) {
                     var param = BaseService.parseParams(params.url());
-                    param.page = param.page;
+                    if ($scope.page.totalElements) {
+                        if (param.page < 1 || param.page > $scope.page.totalElements) {
+                            toaster.pop('error', '请输入正确的页数!');
+                            return;
+                        }
+                    }
+                    //param.page = param.page;
                     param.size = param.count;
                     param.spaceUU = $scope.userInfo.enterprise.uu;
                     if (!($scope.searchParams.keyword.trim() == '')) {

+ 1 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js

@@ -8,6 +8,7 @@ define(['app/app', 'calendar'], function(app) {
         $rootScope.active = 'index';
         $scope.count = 0;
         $scope.userInfo = $rootScope.userInfo;
+        console.log($scope.userInfo);
 
         // 申请
         $scope.auditApply = function (status, id, UU) {

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

@@ -437,7 +437,7 @@
       <ul class="fl">
         <li ng-class="{'active': tab=='base'}"><a ng-click="checkTab('base')">基本信息</a></li>
         <li ng-class="{'active': tab=='safe'}"><a ng-click="checkTab('safe')">安全设置</a></li>
-        <li ng-class="{'active': tab=='bind'}"><a ng-click="checkTab('bind')">申请绑定</a></li>
+        <li ng-class="{'active': tab=='bind'}"><a ng-click="checkTab('bind')" ng-if="isAdmin">申请绑定</a></li>
         <!--<li ng-class="{'active': tab=='logistic'}"><a href="#" ng-click="checkTab('logistic')">收货地址</a></li>-->
       </ul>
     </div>
@@ -465,7 +465,7 @@
                                                                   ng-model="enterpriseInfo.enName"/>
                 </div>
                 <div class="fr" ng-if="!updateState"><span
-                    ng-bind="enterpriseInfo.enName || '暂无信息'"></ span>
+                    ng-bind="enterpriseInfo.enName || '暂无信息'"></span>
                 </div>
               </li>
               <!--<li>
@@ -778,19 +778,22 @@
           </thead>
           <tbody>
           <tr class="default-row" ng-repeat="item in content">
-            <td class="user-name" ng-bind="item.user.vipName"></td>
-            <td style="text-align: left;" ng-bind="item.user.userUU"></td>
-            <td ng-bind="item.user.mobile"></td>
-            <td ng-bind="item.user.email"></td>
+            <td class="user-name" ng-bind="item.user.vipName || '-'"></td>
+            <td ng-bind="item.user.userUU || '-'"></td>
+            <td ng-bind="item.user.mobile || '-'"></td>
+            <td ng-bind="item.user.email || '-'"></td>
             <td>
               <a class="operate-btn" ng-click="auditApply(1, item.id, item.user.userUU)">同意</a>
               <a class="operate-btn" ng-click="auditApply(0, item.id, item.user.userUU)">|&nbsp;拒绝</a>
             </td>
           </tr>
           <tr class="num">
-            <td colspan="5">
+            <td colspan="5" ng-if="content[0].id">
               <span class="last-login pull-right">显示<span ng-bind="page.size * (page.number - 1) + 1"></span>-<span ng-bind="page.size * (page.number - 1) + page.numberOfElements"></span>条,共<span ng-bind="page.totalElements"></span>条</span>
             </td>
+            <td colspan="5" ng-if="!content[0].id">
+              <span class="last-login pull-right">暂无数据</span>
+            </td>
           </tr>
           </tbody>
         </table>

+ 5 - 5
src/main/webapp/resources/view/vendor/forstore/vendor_index.html

@@ -112,7 +112,7 @@
                 <!--<li><a href="#"><img src="static/img/vendor/images/notice04.png"/><p>缺货预警</p></a></li>-->
             <!--</ul>-->
         <!--</div>-->
-        <div class="data_analyze bind-enter">
+        <div class="data_analyze bind-enter" ng-if="isAdmin">
             <div class="com_menu01">
                 <span>企业绑定申请</span>
                 <a class="pull-right" ng-click="findMore()">查看更多</a>
@@ -129,10 +129,10 @@
                 </thead>
                 <tbody>
                 <tr ng-repeat="item in content" class="default-row">
-                    <td class="user-name" ng-bind="item.user.vipName"></td>
-                    <td ng-bind="item.user.userUU"></td>
-                    <td ng-bind="item.user.mobile"></td>
-                    <td ng-bind="item.user.email"></td>
+                    <td class="user-name" ng-bind="item.user.vipName || '-'"></td>
+                    <td ng-bind="item.user.userUU || '-'"></td>
+                    <td ng-bind="item.user.mobile || '-'"></td>
+                    <td ng-bind="item.user.email || '-'"></td>
                     <td class="operate">
                         <a class="operate-btn" ng-click="auditApply(1, item.id, item.user.userUU)">同意</a>
                         <a class="operate-btn" ng-click="auditApply(0, item.id, item.user.userUU)">|&nbsp;拒绝</a>