Преглед изворни кода

同城分销店拆分、分销店对应多个经销商

zhujindu пре 11 месеци
родитељ
комит
d28a450442
2 измењених фајлова са 45 додато и 29 уклоњено
  1. 21 17
      src/views/storeManagement/storeAdd.vue
  2. 24 12
      src/views/storeManagement/storeDetail.vue

+ 21 - 17
src/views/storeManagement/storeAdd.vue

@@ -1531,6 +1531,7 @@ export default {
         this.ManagementModelList = ManagementModelList;
       });
     },
+    // 同城分销-属性信息
     getTCFXList() {
       getTCFXList({}).then((res) => {
         var TCFXList = [];
@@ -1843,8 +1844,8 @@ export default {
         fromValue.ifJzStoreType != 1 &&
         this.storeTypePOP &&
         fromValue.storeCategory != 'C917' &&
-        fromValue.storeCategory !== '129081' &&
-        fromValue.storeCategory !== '10131'
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        !this.verifyStoreType(this.fromValue.storeCategory).tcfx
       ) {
         this.$toast('图片未上传');
         return;
@@ -1852,7 +1853,8 @@ export default {
         this.$toast('请获取定位坐标');
         return;
       } else if (
-        (fromValue.storeCategory == '10131' ||
+        ((this.verifyStoreType(this.fromValue.storeCategory) &&
+          this.verifyStoreType(this.fromValue.storeCategory).tcfx) ||
           fromValue.storeCategory == 'sjs61' ||
           fromValue.storeCategory == 'zyjz63') &&
         fromValue.tcfxName == ''
@@ -1860,13 +1862,15 @@ export default {
         this.$toast('属性未填写');
         return;
       } else if (
-        (fromValue.storeCategory == '129081' || fromValue.storeCategory == '10131') &&
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        this.verifyStoreType(this.fromValue.storeCategory).tcfx &&
         fromValue.carShop == ''
       ) {
         this.$toast('请选择是否车铺开店');
         return;
       } else if (
-        (fromValue.storeCategory == '129081' || fromValue.storeCategory == '10131') &&
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        this.verifyStoreType(this.fromValue.storeCategory).tcfx &&
         fromValue.carShop == '1' &&
         fromValue.carShopImgList.length < 1
       ) {
@@ -1878,18 +1882,18 @@ export default {
         return;
       }
 
-      if (fromValue.storeCategory == '129081' && fromValue.attribute3 == '') {
-        this.$toast('属性未填写');
-        return;
-      }
-      if (
-        fromValue.storeCategory == '129081' &&
-        fromValue.attribute3 == '0' &&
-        fromValue.attribute5 == ''
-      ) {
-        this.$toast('属性未填写');
-        return;
-      }
+      // if (fromValue.storeCategory == '129081' && fromValue.attribute3 == '') {
+      //   this.$toast('属性未填写');
+      //   return;
+      // }
+      // if (
+      //   fromValue.storeCategory == '129081' &&
+      //   fromValue.attribute3 == '0' &&
+      //   fromValue.attribute5 == ''
+      // ) {
+      //   this.$toast('属性未填写');
+      //   return;
+      // }
       if (this.GZAttributeFormShow && fromValue.potentialCustomerType == '') {
         this.$toast('潜在客户类型未填写');
         return;

+ 24 - 12
src/views/storeManagement/storeDetail.vue

@@ -1252,7 +1252,10 @@ export default {
           } else {
             this.displayImg = [];
           }
-          if (this.list.storeCategory == '129081' || this.list.storeCategory == '10131') {
+          if (
+            this.verifyStoreType(this.list.storeCategory) &&
+            this.verifyStoreType(this.list.storeCategory).tcfx
+          ) {
             this.cityABStore = true;
           } else {
             this.cityABStore = false;
@@ -1278,7 +1281,10 @@ export default {
           } else {
             this.list.carShopImgList = [];
           }
-          if (this.list.storeCategory == '10131' || this.list.storeCategory == '129081') {
+          if (
+            this.verifyStoreType(this.list.storeCategory) &&
+            this.verifyStoreType(this.list.storeCategory).tcfx
+          ) {
             this.typeABshow = true;
           } else {
             this.typeABshow = false;
@@ -1298,15 +1304,18 @@ export default {
           } else {
             this.GZAttributeFormShow = false;
           }
-          if (this.list.storeCategory == '129081') {
-            this.dictTypeFormShow = true;
-            if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
-              this.list.tcfxName = this.list.attribute3;
-            } else {
-              this.list.tcfxName = this.list.attribute5;
-            }
-          }
-          if (this.list.storeCategory == '10131') {
+          // if (this.list.storeCategory == '129081') {
+          //   this.dictTypeFormShow = true;
+          //   if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
+          //     this.list.tcfxName = this.list.attribute3;
+          //   } else {
+          //     this.list.tcfxName = this.list.attribute5;
+          //   }
+          // }
+          if (
+            this.verifyStoreType(this.list.storeCategory) &&
+            this.verifyStoreType(this.list.storeCategory).tcfx
+          ) {
             this.dictTypeFormShow = true;
             for (var k = 0; k < this.TCFXList.length; k++) {
               if (this.TCFXList[k].dictCode == this.list.tcfxName) {
@@ -1561,7 +1570,10 @@ export default {
     },
     // 新建同城店铺提交审核
     submitApprovalFun() {
-      if (this.list.storeCategory !== '129081' && this.list.storeCategory !== '10131') {
+      if (
+        this.verifyStoreType(this.list.storeCategory) &&
+        !this.verifyStoreType(this.list.storeCategory).tcfx
+      ) {
         this.$dialog
           .confirm({
             title: '系统提示',