Administrator 4 éve
szülő
commit
4852dba3e3

+ 28 - 2
src/main/resources/static/js/supplier-center/shop/release.js

@@ -193,7 +193,7 @@ var releaseContainer = new Vue({
                     _this.classificationThreeList = data.tinyTypeName;
                     if(data.commodityType !=null||data.commodityType != ''){
                         _this.releaseParams.commodityType = data.commodityType;
-                        _this.GetFistClassFn(_this.releaseParams.commodityTyp);
+                        _this.GetFistClassFn(data.commodityType);
                     }
                     if(_this.classificationTwoList!=''){
                         _this.GetTwoClassFn(data.bigTypeID);
@@ -420,6 +420,10 @@ var releaseContainer = new Vue({
             _this.releaseParams.bigTypeID = option.bigTypeID
             _this.selectText.smallTypeID='请选择二级分类';
             _this.selectText.tinyTypeID = '请选择三级分类';
+            _this.releaseParams.smallTypeID ='';
+            _this.releaseParams.tinyTypeID ='';
+            _this.classificationTwoList=[];
+            _this.classificationThreeList =[];
             _this.isSelectActive = 0;
             if(_this.releaseParams.bigTypeID!=''){
                  _this.GetTwoClassFn(_this.releaseParams.bigTypeID);
@@ -669,7 +673,7 @@ var releaseContainer = new Vue({
                 },2000);
                 return;
             }
-            if(_this.releaseParams.smallTypeID == ''){
+            if(_this.releaseParams.bigTypeID == ''){
                 _this.vShow_TinyTypeID = true;
                 _this.fromMessage = '请选择商品分类';
                 _this.scrollIntoView();
@@ -678,6 +682,28 @@ var releaseContainer = new Vue({
                 },2000);
                 return;
             }
+            if(_this.classificationTwoList.length>0){
+                if(_this.releaseParams.smallTypeID == ''){
+                    _this.vShow_TinyTypeID = true;
+                    _this.fromMessage = '请选择二级分类';
+                    _this.scrollIntoView();
+                    setTimeout(function(){
+                        _this.vShow_TinyTypeID = false;
+                    },2000);
+                      return;
+                }
+            }
+            if(_this.classificationThreeList.length>0){
+                if(_this.releaseParams.tinyTypeID == ''){
+                    _this.vShow_TinyTypeID = true;
+                    _this.fromMessage = '请选择三级分类';
+                    _this.scrollIntoView();
+                    setTimeout(function(){
+                        _this.vShow_TinyTypeID = false;
+                    },2000);
+                     return;
+                }
+            }
             if(_this.releaseParams.brandID == ''){
                 _this.vShow_BrandID = true;
                 _this.fromMessage = '请选择商品品牌';