Browse Source

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

zhujindu 4 days ago
parent
commit
785336fad0

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

@@ -1760,6 +1760,12 @@ export default {
       this.fromValue.orderProductStoreList = arrList;
       this.toastLoading(0, '上传中...', true);
       var fromValue = this.fromValue;
+      if (
+        this.fromValue.storeCompetitorList == null ||
+        this.fromValue.storeCompetitorList == undefined
+      ) {
+        this.fromValue.storeCompetitorList = [];
+      }
       var telrg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
       if (fromValue.orgId == '') {
         this.$toast('部门未选择');
@@ -1892,6 +1898,8 @@ export default {
         this.$toast('潜在客户类型未填写');
         return;
       }
+      if (this.fromValue.otherCompetitor)
+        this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
       // 同城分销建店添加去下单提示
       if (
         this.verifyStoreType(this.fromValue.storeCategory) &&
@@ -1927,8 +1935,6 @@ export default {
               })
               .then(() => {
                 this.toastLoading(0, '上传中...', true);
-                if (this.fromValue.otherCompetitor)
-                  this.fromValue.storeCompetitorList.push(this.fromValue.otherCompetitor);
                 this.addStoreFun();
               });
           }

+ 23 - 7
src/views/storeManagement/storeDetail.vue

@@ -397,12 +397,22 @@
                 label="紧急联系人电话" />
             </div>
           </template>
-          <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow" v-else>
-            <van-field
-              readonly
-              label="属性"
-              v-if="item.dictValue == list.tcfxName"
-              v-model="item.text" />
+          <template v-else>
+            <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow">
+              <van-field
+                readonly
+                label="属性"
+                v-if="item.dictValue == list.tcfxName"
+                v-model="item.text" />
+            </template>
+            <template>
+              <van-field readonly label="主营竞品品牌" v-model="storeCompetitorList" />
+              <van-field
+                v-if="list.otherCompetitor"
+                readonly
+                label="其他"
+                v-model="list.otherCompetitor" />
+            </template>
           </template>
         </van-tab>
       </van-tabs>
@@ -707,6 +717,7 @@ export default {
       orderList: [],
       cityABStore: false, //同城分销A/B店
       displayImg: [],
+      storeCompetitorList: '',
     };
   },
   watch: {
@@ -825,7 +836,7 @@ export default {
             styleId: 'abc',
             position: new TMap.LatLng(
               this.maplist[val].location.lat,
-              this.maplist[val].location.lng
+              this.maplist[val].location.lng,
             ),
           },
         ]);
@@ -1384,6 +1395,11 @@ export default {
               this.lon = res.data.lon;
             }
             this.list = res.data;
+            if (this.list.storeCompetitorList) {
+              this.storeCompetitorList = this.list.storeCompetitorList.join(',');
+            } else {
+              this.list.storeCompetitorList = [];
+            }
             if (this.list.imgSed && this.list.imgSed != '') {
               this.displayImg = this.list.imgSed.split(',');
             } else {

+ 6 - 0
src/views/storeManagement/storeEdit.vue

@@ -1737,6 +1737,12 @@ export default {
         }
       }
       var fromValue = this.fromValue;
+      if (
+        this.fromValue.storeCompetitorList == null ||
+        this.fromValue.storeCompetitorList == undefined
+      ) {
+        this.fromValue.storeCompetitorList = [];
+      }
       var telrg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
       if (fromValue.orgId == '') {
         this.$toast('部门未选择');