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

Merge branch 'feature_20260513_新建专业五金店' into uat(dev)

zhujindu 1 день назад
Родитель
Сommit
e9d4f5a9c8

+ 1 - 2
src/views/signApproval/newStoreApprovalDetail.vue

@@ -369,7 +369,7 @@ export default {
       rejectMsgShow: false,
       //退回原因详情列表
       rejectMsg: [],
-      activeNames: [0, 1],
+      activeNames: ['0', '1'],
       orderList: [],
       rejectReasonShow: false, //退回提交原因
       rejectMessage: '',
@@ -680,7 +680,6 @@ export default {
           } else {
             this.orderList = [];
           }
-          this.activeNames = ['1'];
         }
       });
     },

+ 29 - 14
src/views/storeManagement/storeAdd.vue

@@ -513,6 +513,7 @@
                   </van-row>
                 </van-checkbox-group>
                 <van-field
+                  v-if="fromValue.storeCategory != '126565'"
                   class="otherCompetitor"
                   v-model="otherCompetitor"
                   label="其他"
@@ -1333,6 +1334,7 @@ export default {
       if (value.text.indexOf('BMD') == -1) {
         this.displayImg = [];
       }
+      this.getTCompetitiveProduct();
     },
     setStoreNameFn() {
       if (this.fromValue.storeName.trim() == '') {
@@ -1672,7 +1674,12 @@ export default {
     },
     // 竞品品牌
     getTCompetitiveProduct() {
-      getDictOption({}, 'main_competitor_brands').then((res) => {
+      this.storeCompetitorList = [];
+      let zidian =
+        this.fromValue.storeCategory == '126565'
+          ? 'wj_main_competitor_brands'
+          : 'main_competitor_brands';
+      getDictOption({}, zidian).then((res) => {
         this.storeCompetitorlist = res.data;
       });
     },
@@ -2007,22 +2014,30 @@ export default {
           this.$toast('属性未填写');
           return;
         }
-        if (!this.storeCompetitorList.length && !this.otherCompetitor) {
-          this.$toast('主营竞品品牌未填写');
-          return;
-        }
-        this.activatedStoreCompetitor = JSON.parse(JSON.stringify(this.storeCompetitorList));
-        if (this.otherCompetitor) {
-          if (this.otherCompetitor.length < 2) {
-            this.$toast('主营竞品品牌其他文本信息最少2个字');
+        if (this.fromValue.storeCategory == '126565') {
+          if (!this.storeCompetitorList.length) {
+            this.$toast('主营竞品品牌未填写');
             return;
-          } else {
-            this.activatedStoreCompetitor.push(this.otherCompetitor);
           }
+          this.activatedStoreCompetitor = JSON.parse(JSON.stringify(this.storeCompetitorList));
+        } else {
+          if (!this.storeCompetitorList.length && !this.otherCompetitor) {
+            this.$toast('主营竞品品牌未填写');
+            return;
+          }
+          this.activatedStoreCompetitor = JSON.parse(JSON.stringify(this.storeCompetitorList));
+          if (this.otherCompetitor) {
+            if (this.otherCompetitor.length < 2) {
+              this.$toast('主营竞品品牌其他文本信息最少2个字');
+              return;
+            } else {
+              this.activatedStoreCompetitor.push(this.otherCompetitor);
+            }
+          }
+          this.fromValue.storeCompetitorList = JSON.parse(
+            JSON.stringify(this.activatedStoreCompetitor),
+          );
         }
-        this.fromValue.storeCompetitorList = JSON.parse(
-          JSON.stringify(this.activatedStoreCompetitor),
-        );
         // BMD-专业五金店-陈列照必须上传
         if (
           this.fromValue.storeCategory == '126565' &&

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

@@ -703,7 +703,7 @@ export default {
       rejectMsgShow: false,
       //退回原因
       rejectMsg: [],
-      activeNames: [],
+      activeNames: ['0', '1'],
       orderList: [],
       cityABStore: false, //同城分销A/B店
       displayImg: [],
@@ -1572,7 +1572,6 @@ export default {
           } else {
             this.orderList = [];
           }
-          this.activeNames = ['1'];
         }
       });
     },

+ 27 - 14
src/views/storeManagement/storeEdit.vue

@@ -451,6 +451,7 @@
                   </van-row>
                 </van-checkbox-group>
                 <van-field
+                  v-if="fromValue.storeCategory != '126565'"
                   name="otherCompetitor"
                   class="otherCompetitor"
                   v-model="fromValue.otherCompetitor"
@@ -890,7 +891,6 @@ export default {
     // 授权
     getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
       this.getTCFXList();
-      this.getTCompetitiveProduct();
       this.getSJSList();
       this.getQGJZist();
       this.getDetail();
@@ -1434,6 +1434,7 @@ export default {
         } else {
           this.$toast.fail(res.msg);
         }
+        this.getTCompetitiveProduct();
       });
     },
     newimgarr1(val) {
@@ -1569,7 +1570,11 @@ export default {
     },
     // 竞品品牌
     getTCompetitiveProduct() {
-      getDictOption({}, 'main_competitor_brands').then((res) => {
+      let zidian =
+        this.fromValue.storeCategory == '126565'
+          ? 'wj_main_competitor_brands'
+          : 'main_competitor_brands';
+      getDictOption({}, zidian).then((res) => {
         this.storeCompetitorlist = res.data;
       });
     },
@@ -1888,19 +1893,27 @@ export default {
           this.$toast('图片未上传');
           return;
         }
-        if (!fromValue.storeCompetitorList.length && !fromValue.otherCompetitor) {
-          this.$toast('主营竞品品牌未填写');
-          return;
-        }
-        this.activatedStoreCompetitor = JSON.parse(
-          JSON.stringify(this.fromValue.storeCompetitorList),
-        );
-        if (this.fromValue.otherCompetitor) {
-          if (this.fromValue.otherCompetitor.length < 2) {
-            this.$toast('主营竞品品牌其他文本信息最少2个字');
+        if (this.fromValue.storeCategory == '126565') {
+          if (!fromValue.storeCompetitorList.length) {
+            this.$toast('主营竞品品牌未填写');
             return;
-          } else {
-            this.activatedStoreCompetitor.push(this.fromValue.otherCompetitor);
+          }
+          this.activatedStoreCompetitor = JSON.parse(JSON.stringify(this.storeCompetitorList));
+        } else {
+          if (!fromValue.storeCompetitorList.length && !fromValue.otherCompetitor) {
+            this.$toast('主营竞品品牌未填写');
+            return;
+          }
+          this.activatedStoreCompetitor = JSON.parse(
+            JSON.stringify(this.fromValue.storeCompetitorList),
+          );
+          if (this.fromValue.otherCompetitor) {
+            if (this.fromValue.otherCompetitor.length < 2) {
+              this.$toast('主营竞品品牌其他文本信息最少2个字');
+              return;
+            } else {
+              this.activatedStoreCompetitor.push(this.fromValue.otherCompetitor);
+            }
           }
         }
         fromValue.storeCompetitorList = JSON.parse(JSON.stringify(this.activatedStoreCompetitor));