Browse Source

feature_20260211_同城分销店-主营竞品品牌

zhujindu 3 days ago
parent
commit
46d68692f9

+ 11 - 2
src/views/storeManagement/storeAdd.vue

@@ -440,10 +440,13 @@
                   </van-row>
                   </van-row>
                 </van-checkbox-group>
                 </van-checkbox-group>
                 <van-field
                 <van-field
+                  name="otherCompetitor"
                   class="otherCompetitor"
                   class="otherCompetitor"
                   v-model="otherCompetitor"
                   v-model="otherCompetitor"
                   label="其他"
                   label="其他"
                   maxlength="20"
                   maxlength="20"
+                  autosize
+                  type="textarea"
                   placeholder="请输入" />
                   placeholder="请输入" />
               </div>
               </div>
             </div>
             </div>
@@ -1899,8 +1902,14 @@ export default {
         this.$toast('潜在客户类型未填写');
         this.$toast('潜在客户类型未填写');
         return;
         return;
       }
       }
-      if (this.fromValue.otherCompetitor)
-        this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
+      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) &&

+ 8 - 1
src/views/storeManagement/storeDetail.vue

@@ -406,11 +406,18 @@
                 v-model="item.text" />
                 v-model="item.text" />
             </template>
             </template>
             <template>
             <template>
-              <van-field readonly label="主营竞品品牌" v-model="storeCompetitorList" />
+              <van-field
+                readonly
+                label="主营竞品品牌"
+                autosize
+                type="textarea"
+                v-model="storeCompetitorList" />
               <van-field
               <van-field
                 v-if="list.otherCompetitor"
                 v-if="list.otherCompetitor"
                 readonly
                 readonly
                 label="其他"
                 label="其他"
+                autosize
+                type="textarea"
                 v-model="list.otherCompetitor" />
                 v-model="list.otherCompetitor" />
             </template>
             </template>
           </template>
           </template>

+ 11 - 2
src/views/storeManagement/storeEdit.vue

@@ -422,8 +422,11 @@
                   </van-row>
                   </van-row>
                 </van-checkbox-group>
                 </van-checkbox-group>
                 <van-field
                 <van-field
+                  name="otherCompetitor"
                   class="otherCompetitor"
                   class="otherCompetitor"
                   v-model="fromValue.otherCompetitor"
                   v-model="fromValue.otherCompetitor"
+                  autosize
+                  type="textarea"
                   label="其他"
                   label="其他"
                   maxlength="20"
                   maxlength="20"
                   placeholder="请输入" />
                   placeholder="请输入" />
@@ -1881,8 +1884,14 @@ export default {
       this.fromValue.myLat = this.location.lat;
       this.fromValue.myLat = this.location.lat;
       this.fromValue.myLon = this.location.lon;
       this.fromValue.myLon = this.location.lon;
       console.log(this.fromValue);
       console.log(this.fromValue);
-      if (this.fromValue.otherCompetitor)
-        this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
+      if (this.fromValue.otherCompetitor) {
+        if (this.fromValue.otherCompetitor.length < 2) {
+          this.$toast('主营竞品品牌其他文本信息最少2个字');
+          return;
+        } else {
+          this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
+        }
+      }
       updateStore(this.fromValue).then((res) => {
       updateStore(this.fromValue).then((res) => {
         loading1.clear();
         loading1.clear();
         if (res.code == 200) {
         if (res.code == 200) {