Browse Source

未开店时隐藏 卖家部分信息

wangdy 8 years ago
parent
commit
b86c33787b

+ 3 - 1
src/main/webapp/resources/js/vendor/app.js

@@ -891,7 +891,9 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
         $scope.isCONSIGNMENT = false;
 
         StoreInfo.findShopOwnerApplyByNormalStatus({}, {}, function (result) {
-        	if (result.data.type == 'CONSIGNMENT' || result.data.status == 'PREPARE'){
+            if (!result.data) {
+                $scope.isCONSIGNMENT = true;
+            }else if (result.data.type == 'CONSIGNMENT' || result.data.status == 'PREPARE'){
             $scope.isCONSIGNMENT = true;
        		 }}, function (error) {
 

+ 10 - 5
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_logistics_ctrl.js

@@ -3,7 +3,7 @@
  */
 define(['app/app', 'calendar'], function (app) {
 	"use strict";
-	app.register.controller('vendorLogisticsCtrl', ['$scope', '$rootScope', '$http', 'ngTableParams', 'BaseService', 'ShippingAddress', 'toaster', 'SmoothScroll', '$modal','$stateParams','Purchase','Logistics','KdnLogistics','$filter', function($scope, $rootScope, $http, ngTableParams, BaseService, ShippingAddress, toaster, SmoothScroll, $modal, $stateParams, Purchase, Logistics, KdnLogistics, $filter) {
+	app.register.controller('vendorLogisticsCtrl', ['$scope', '$rootScope', '$http', 'ngTableParams', 'BaseService', 'ShippingAddress', 'toaster', 'SmoothScroll', '$modal','$stateParams','Purchase','Logistics','KdnLogistics','$filter','StoreInfo', function($scope, $rootScope, $http, ngTableParams, BaseService, ShippingAddress, toaster, SmoothScroll, $modal, $stateParams, Purchase, Logistics, KdnLogistics, $filter, StoreInfo) {
 		// 加密过滤器
 		var enIdFilter = $filter('EncryptionFilter');
 		$rootScope.active = 'vendor_logistics';
@@ -11,10 +11,15 @@ define(['app/app', 'calendar'], function (app) {
 		$scope.canAddTotal = 20;
         //是寄售店铺
         $scope.isCONSIGNMENT = false;
-        if ($rootScope.applyInfo.type == 'CONSIGNMENT' || $rootScope.applyStatus == 'PREPARE'){
-            $scope.isCONSIGNMENT = true;
-            $scope.storeType = 'mall';
-        }
+        StoreInfo.findShopOwnerApplyByNormalStatus({}, {}, function (result) {
+            if (!result.data) {
+                $scope.isCONSIGNMENT = true;
+                $scope.storeType = 'mall';
+            }else if (result.data.type == 'CONSIGNMENT' || result.data.status == 'PREPARE'){
+                $scope.isCONSIGNMENT = true;
+            }}, function (error) {
+
+        });
 		$scope.addressEx = {};
 
 		//地址的条数是否超过5条

+ 10 - 5
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_order_ctrl.js

@@ -4,7 +4,7 @@
  */
 define(['app/app'], function (app) {
     "use strict";
-    app.register.controller('vendorOrderCtrl', ['$scope', '$rootScope', 'Purchase', 'ngTableParams', 'BaseService', 'toaster', '$state', '$filter', 'Return', 'Change', '$modal', 'PuExProcess', 'Recommendation', 'DateUtil', 'Loading', 'bankInfoService', 'Logistics', 'Distributor', 'SessionService','Rate', function ($scope, $rootScope, Purchase, ngTableParams, BaseService, toaster, $state, $filter, Return, Change, $modal, PuExProcess, Recommendation, DateUtil, Loading, bankInfoService, Logistics, Distributor, SessionService, Rate) {
+    app.register.controller('vendorOrderCtrl', ['$scope', '$rootScope', 'Purchase', 'ngTableParams', 'BaseService', 'toaster', '$state', '$filter', 'Return', 'Change', '$modal', 'PuExProcess', 'Recommendation', 'DateUtil', 'Loading', 'bankInfoService', 'Logistics', 'Distributor', 'SessionService','Rate','StoreInfo', function ($scope, $rootScope, Purchase, ngTableParams, BaseService, toaster, $state, $filter, Return, Change, $modal, PuExProcess, Recommendation, DateUtil, Loading, bankInfoService, Logistics, Distributor, SessionService, Rate, StoreInfo) {
         $rootScope.active = 'vendor_order';
 
         // 加密过滤器
@@ -54,10 +54,15 @@ define(['app/app'], function (app) {
         if ($rootScope.store && ($scope.yrscStore == $rootScope.store.uuid)) {
             $scope.isYrscStore = true;
         }
-        if ($rootScope.applyInfo.type == 'CONSIGNMENT' || $rootScope.applyStatus == 'PREPARE'){
-            $scope.isCONSIGNMENT = true;
-            $scope.storeType = 'mall';
-        }
+        StoreInfo.findShopOwnerApplyByNormalStatus({}, {}, function (result) {
+            if (!result.data) {
+                $scope.isCONSIGNMENT = true;
+                $scope.storeType = 'mall';
+            }else if (result.data.type == 'CONSIGNMENT' || result.data.status == 'PREPARE'){
+                $scope.isCONSIGNMENT = true;
+                $scope.storeType = 'mall';
+            }}, function (error) {
+        });
 
         var unavailableReasons = {
             315: '已注销',

+ 0 - 1
src/main/webapp/resources/view/common/site-nav.html

@@ -170,7 +170,6 @@
         </li>
         <li><a href=".">商城首页</a></li>
         <li ng-if="userInfo"><a href="user#/home">买家中心</a></li>
-        <li ng-if="userInfo.enterprise.uu"><a href="vendor#/index">卖家中心</a></li>
         <li ng-if="userInfo.enterprise && userInfo.enterprise.isVendor == 313"><a href="vendor">卖家中心</a></li>
         <li ng-if="!userInfo.enterprise || userInfo.enterprise.isVendor != 313"><a href="./register-saler">卖家中心</a></li>
         <li><a href="help/home" target="_blank">帮助中心</a></li>