Просмотр исходного кода

Merge branch 'feature_20260211_同城分销店-主营竞品品牌' into uat(dev)

zhujindu 3 дней назад
Родитель
Сommit
41bddaff72
1 измененных файлов с 12 добавлено и 10 удалено
  1. 12 10
      src/views/storeManagement/storeAdd.vue

+ 12 - 10
src/views/storeManagement/storeAdd.vue

@@ -441,7 +441,7 @@
                 </van-checkbox-group>
                 </van-checkbox-group>
                 <van-field
                 <van-field
                   class="otherCompetitor"
                   class="otherCompetitor"
-                  v-model="otherCompetitor"
+                  v-model="fromValue.otherCompetitor"
                   label="其他"
                   label="其他"
                   maxlength="20"
                   maxlength="20"
                   autosize
                   autosize
@@ -828,6 +828,7 @@ export default {
         mainProjectType: '',
         mainProjectType: '',
         mainRelationFrom: '',
         mainRelationFrom: '',
         storeCompetitorList: [],
         storeCompetitorList: [],
+        otherCompetitor: '',
       },
       },
       location: {
       location: {
         lat: '34.6174',
         lat: '34.6174',
@@ -960,6 +961,7 @@ export default {
           mainProjectType: '',
           mainProjectType: '',
           mainRelationFrom: '',
           mainRelationFrom: '',
           storeCompetitorList: [],
           storeCompetitorList: [],
+          otherCompetitor: '',
         };
         };
         setTimeout(() => {
         setTimeout(() => {
           // this.getLocation()
           // this.getLocation()
@@ -1881,10 +1883,18 @@ export default {
           this.$toast('属性未填写');
           this.$toast('属性未填写');
           return;
           return;
         }
         }
-        if (!fromValue.storeCompetitorList.length && !this.otherCompetitor) {
+        if (!fromValue.storeCompetitorList.length && !fromValue.otherCompetitor) {
           this.$toast('主营竞品品牌未填写');
           this.$toast('主营竞品品牌未填写');
           return;
           return;
         }
         }
+        if (this.fromValue.otherCompetitor) {
+          if (this.fromValue.otherCompetitor.length < 2) {
+            this.$toast('主营竞品品牌其他文本信息最少2个字');
+            return;
+          } else {
+            this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
+          }
+        }
       } else {
       } else {
         // 非同城分销店 经销商必填校验
         // 非同城分销店 经销商必填校验
         if (
         if (
@@ -1901,14 +1911,6 @@ export default {
         this.$toast('潜在客户类型未填写');
         this.$toast('潜在客户类型未填写');
         return;
         return;
       }
       }
-      if (this.fromValue.otherCompetitor) {
-        if (this.fromValue.otherCompetitor.length < 2) {
-          this.$toast('主营竞品品牌其他文本信息最少2个字');
-          return;
-        } else {
-          this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
-        }
-      }
       // 同城分销建店添加去下单提示
       // 同城分销建店添加去下单提示
       if (
       if (
         this.verifyStoreType(this.fromValue.storeCategory) &&
         this.verifyStoreType(this.fromValue.storeCategory) &&