Browse Source

可自营的店铺默认自营

hulh 8 years ago
parent
commit
38456b08bb

+ 3 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -131,9 +131,9 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
             //获取店铺的信息
             StoreInfo.getStoreInfoByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
                 $scope.storeInfo = data;
-				if(!$scope.storeInfo || $scope.storeInfo.status != 'OPEN' || $scope.storeInfo.storeName.indexOf('优软测试二') > 0 || $scope.storeInfo.storeName.indexOf('优软商城') > 0) {
+				if (!$scope.storeInfo || $scope.storeInfo.status != 'OPENED' || $scope.storeInfo.storeName.indexOf('优软测试二') > 0 || $scope.storeInfo.storeName.indexOf('优软商城') > 0) {
 					$scope.$$nonProduct.canSelfSale = false;
-				}else {
+				} else {
 					$scope.$$nonProduct.canSelfSale = true;
 				}
             }, function(response) {
@@ -1739,6 +1739,7 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 				$scope.goods.productid = material.id;
 				$scope.goods.prodNum = material.prodNum;
 				$scope.goods.editPrices = [];
+				$scope.goods.editSelfSale = $scope.$$nonProduct.canSelfSale ? 1 : 2;
 				$scope.goods.editPrices.push({start : $scope.minReserve, end : $scope.maxReserve});
 				// $scope.goods.isSelfSupport = $scope.store.status == 'OPENED' ? 1 : 0;
 				material.selected = true;