瀏覽代碼

rel: 处理店铺审核内容

wangcz 6 年之前
父節點
當前提交
581b766446

+ 7 - 3
src/main/webapp/resources/js/admin/controllers/StoreQualificationCtrl.js

@@ -37,7 +37,8 @@ define([ 'app/app' ], function(app) {
 		$scope.saveUpdate = saveUpdate;
 		$scope.isPdf = isPdf;
 		$scope.createShowUrl = createShowUrl;
-        $scope.storeType = 'ORIGINAL_FACTORY';
+        $scope.storeType = '';// 店铺类型
+        $scope.storeDefaultType = '';// 记录保存原始店铺类型
         $scope.editImg = false;
         $scope.newImg = {
             resourceUrl: '',
@@ -51,7 +52,7 @@ define([ 'app/app' ], function(app) {
          * 店铺类型切换
          */
 		$scope.setFilters = function(key) {
-			if ($scope.storeType === 'DISTRIBUTION') {
+			if ($scope.storeDefaultType === 'DISTRIBUTION') {
 				return false;
 			}
 			$scope.storeType = key
@@ -184,6 +185,7 @@ define([ 'app/app' ], function(app) {
 
                 apply.enType === 'HK' ? $scope.tab = 'HK' : $scope.tab = 'MAINLAND';
                 $scope.storeType = apply.type;
+                $scope.storeDefaultType = apply.type;
 				var qualifications = apply.qualifications || [];
 				$scope.brands = apply.brands || [];
 				$scope.brandsBackup = angular.copy($scope.brands);
@@ -406,7 +408,9 @@ define([ 'app/app' ], function(app) {
 			apply.type = $scope.storeType;
 			apply.qualifications = qualifications;
 			apply.enQualification = $scope.enQualification;
-			apply.brands = $scope.brands || null;
+			if($scope.storeType !== 'DISTRIBUTION') {
+                apply.brands = $scope.brands || null;
+			}
 			apply.reason = $scope.reason;
 
 			/*

+ 3 - 3
src/main/webapp/resources/view/admin/store_qualification_maintenance.html

@@ -373,17 +373,17 @@
 				<div class="col-sm-2">店铺类型</div>
 				<div class="col-sm-10 radio-block">
 					<label class="com-check-radio" style="margin-right:20px;font-weight: normal;color:#666;">
-						<input type="radio" id="ORIGINAL_FACTORY" name="date" ng-click="setFilters('ORIGINAL_FACTORY')" ng-checked="storeType == 'ORIGINAL_FACTORY'" ng-disabled="storeType == 'DISTRIBUTION'">
+						<input type="radio" id="ORIGINAL_FACTORY" name="date" ng-click="setFilters('ORIGINAL_FACTORY')" ng-checked="storeType == 'ORIGINAL_FACTORY'" ng-disabled="storeDefaultType == 'DISTRIBUTION'">
 						<label for="ORIGINAL_FACTORY"></label>
 						原厂
 					</label>
 					<label class="com-check-radio" style="margin-right:20px;font-weight: normal;color:#666;">
-						<input type="radio" id="AGENCY" name="date" ng-click="setFilters('AGENCY')" ng-checked="storeType == 'AGENCY'" ng-disabled="storeType == 'DISTRIBUTION'">
+						<input type="radio" id="AGENCY" name="date" ng-click="setFilters('AGENCY')" ng-checked="storeType == 'AGENCY'" ng-disabled="storeDefaultType == 'DISTRIBUTION'">
 						<label for="AGENCY"></label>
 						代理
 					</label>
 					<label class="com-check-radio" style="margin-right:20px;font-weight: normal;color:#666;">
-						<input type="radio" id="DISTRIBUTION" name="date" ng-click="setFilters('DISTRIBUTION')" ng-checked="storeType == 'DISTRIBUTION'" ng-disabled="storeType == 'ORIGINAL_FACTORY' || storeType == 'AGENCY'">
+						<input type="radio" id="DISTRIBUTION" name="date" ng-click="setFilters('DISTRIBUTION')" ng-checked="storeType == 'DISTRIBUTION'">
 						<label for="DISTRIBUTION"></label>
 						经销
 					</label>