Переглянути джерело

Merge branch 'feature_20250430_计划内外筛选分销店请求接口添加参数' into uat(dev)

zhujindu 7 місяців тому
батько
коміт
53433d33c1

+ 7 - 2
src/components/filtrate.vue

@@ -143,11 +143,17 @@ export default {
       type: Boolean,
       default: false,
     },
+    entry: {
+      type: Number,
+    },
   },
   watch: {
     showFilter: {
       handler(val) {
         // this.CustomerName = '';
+        if (val) {
+          this.getStoreTypeList();
+        }
       },
       deep: true,
       immediate: true,
@@ -184,7 +190,6 @@ export default {
   created() {},
   mounted() {
     this.getStoreLabels();
-    this.getStoreTypeList();
   },
   methods: {
     closePopup(flag = false) {
@@ -263,7 +268,7 @@ export default {
       });
     },
     getStoreTypeList() {
-      getStoreTypeListlp({}).then((res) => {
+      getStoreTypeListlp({ entry: this.entry }).then((res) => {
         this.storeTypeLists = res.data;
         this.storeTypeList = res.data;
       });

+ 9 - 9
src/views/deviceOutside/index.vue

@@ -741,7 +741,6 @@ export default {
     }
     this.query = this.$route.query;
     localStorage.removeItem('visitId');
-    this.getStoreTypeList();
     this.getStoreLabels();
     var postType = localStorage.getItem('postType');
     if (postType == 'GZ') {
@@ -998,7 +997,7 @@ export default {
       this.onSearch();
     },
     getStoreTypeList() {
-      getStoreTypeListlp({}).then((res) => {
+      getStoreTypeListlp({ entry: this.tabVal == '0' ? 1 : 2 }).then((res) => {
         this.storeTypeLists = res.data;
         this.storeTypeList = res.data;
       });
@@ -1062,6 +1061,7 @@ export default {
     searchFn() {
       this.showPicker = true;
       this.CustomerName = '';
+      this.getStoreTypeList();
     },
     moreSearch() {
       this.onSearch();
@@ -1337,13 +1337,13 @@ export default {
           location.lon
         ).toFixed(2);
         // GZ:工装店铺 直接进入拜访
-        if (localStorage.getItem('postType') == 'GZ') {
-          localStorage.setItem('startTime', new Date());
-          localStorage.setItem('ORGName', val.deptName);
-          localStorage.setItem('chainNameR', val.storeName);
-          this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
-          return;
-        }
+        // if (localStorage.getItem('postType') == 'GZ') {
+        //   localStorage.setItem('startTime', new Date());
+        //   localStorage.setItem('ORGName', val.deptName);
+        //   localStorage.setItem('chainNameR', val.storeName);
+        //   this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
+        //   return;
+        // }
         // 门店校验 地址不通过
         if (response.code != 200) {
           // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访

+ 7 - 7
src/views/deviceOutside/rangeStore.vue

@@ -1824,13 +1824,13 @@ export default {
                                 .twoPointSum(location.lat, location.lon, location.lat, location.lon)
                                 .toFixed(2);
                               // GZ:工装店铺 直接进入拜访
-                              if (localStorage.getItem('postType') == 'GZ') {
-                                localStorage.setItem('startTime', new Date());
-                                localStorage.setItem('ORGName', val.deptName);
-                                localStorage.setItem('chainNameR', val.storeName);
-                                this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
-                                return;
-                              }
+                              // if (localStorage.getItem('postType') == 'GZ') {
+                              //   localStorage.setItem('startTime', new Date());
+                              //   localStorage.setItem('ORGName', val.deptName);
+                              //   localStorage.setItem('chainNameR', val.storeName);
+                              //   this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
+                              //   return;
+                              // }
                               // 门店编码校验门店地址不通过
                               if (response.code != 200) {
                                 // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访

+ 7 - 7
src/views/deviceOutside/topStore.vue

@@ -1715,13 +1715,13 @@ export default {
           location.lon
         ).toFixed(2);
         // GZ:工装店铺 直接进入拜访
-        if (localStorage.getItem('postType') == 'GZ') {
-          localStorage.setItem('startTime', new Date());
-          localStorage.setItem('ORGName', val.deptName);
-          localStorage.setItem('chainNameR', val.storeName);
-          this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
-          return;
-        }
+        // if (localStorage.getItem('postType') == 'GZ') {
+        //   localStorage.setItem('startTime', new Date());
+        //   localStorage.setItem('ORGName', val.deptName);
+        //   localStorage.setItem('chainNameR', val.storeName);
+        //   this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
+        //   return;
+        // }
         // 门店校验 地址不通过
         if (response.code != 200) {
           // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访

+ 12 - 8
src/views/deviceWithin/index.vue

@@ -360,7 +360,11 @@
         @cancel="show = false" />
     </van-popup>
     <!-- 筛选模块 -->
-    <filtrate v-show="showFilter" :showFilter="showFilter" @closePopup="closePopup"></filtrate>
+    <filtrate
+      v-show="showFilter"
+      :showFilter="showFilter"
+      @closePopup="closePopup"
+      :entry="0"></filtrate>
     <tab-bar tabBarActive="deviceWithin"></tab-bar>
   </div>
 </template>
@@ -864,13 +868,13 @@ export default {
           location.lon
         ).toFixed(2);
         // GZ:工装店铺 直接进入拜访
-        if (localStorage.getItem('postType') == 'GZ') {
-          localStorage.setItem('startTime', new Date());
-          localStorage.setItem('ORGName', val.deptName);
-          localStorage.setItem('chainNameR', val.storeName);
-          this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
-          return;
-        }
+        // if (localStorage.getItem('postType') == 'GZ') {
+        //   localStorage.setItem('startTime', new Date());
+        //   localStorage.setItem('ORGName', val.deptName);
+        //   localStorage.setItem('chainNameR', val.storeName);
+        //   this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
+        //   return;
+        // }
         // 门店校验 地址不通过
         if (response.code != 200) {
           // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访

+ 7 - 7
src/views/home/hintTabPage/noVisit.vue

@@ -216,13 +216,13 @@ export default {
         this.TXisBD.lon
       ).toFixed(2);
       // GZ:工装店铺 直接进入拜访
-      if (localStorage.getItem('postType') == 'GZ') {
-        localStorage.setItem('startTime', new Date());
-        localStorage.setItem('ORGName', this.activatStoreVal.deptName);
-        localStorage.setItem('chainNameR', this.activatStoreVal.storeName);
-        this.toSuishenbangOutstoreVisit(PointSumval);
-        return;
-      }
+      // if (localStorage.getItem('postType') == 'GZ') {
+      //   localStorage.setItem('startTime', new Date());
+      //   localStorage.setItem('ORGName', this.activatStoreVal.deptName);
+      //   localStorage.setItem('chainNameR', this.activatStoreVal.storeName);
+      //   this.toSuishenbangOutstoreVisit(PointSumval);
+      //   return;
+      // }
       checkStoreAddressByStoreCode({
         storeCode: this.activatStoreVal.storeCode,
         lon: this.TXisBD.lon,

+ 57 - 46
src/views/week/VisitSummaryAdd.vue

@@ -577,7 +577,7 @@ export default {
             //   }
             // }
             if (answerValue) {
-              let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
+              let findCompany = this.companyList.find((item) => item.deptCode == answerValue);
               this.onSalesRegionConfirm(findCompany);
             } else {
               this.onSalesRegionConfirm(this.regionList[0]);
@@ -587,7 +587,7 @@ export default {
           if (res.data.dept != null) {
             this.deptList = res.data.dept;
             if (answerValue) {
-              let findCompany = this.deptList.find((item) => item.deptCode == answerValue);
+              let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
               this.onSalesDepartmentConfirm(findCompany);
             } else {
               this.onSalesDepartmentConfirm(this.deptList[0]);
@@ -666,24 +666,29 @@ export default {
     onSalesRegionConfirm(val) {
       this.SalesRegionShow = false;
       this.regionCode = val.deptId;
-      if (this.index != '') {
-        this.collectionItemList[this.index].answerName = val.deptName;
-        this.collectionItemList[this.index].answerValue = val.deptCode;
-      } else {
-        for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
-          if (this.collectionItemList[k1].answerType == 'xsb') {
-            this.collectionItemList[k1].answerName = '';
-            this.collectionItemList[k1].answerValue = '';
-          }
-          if (this.collectionItemList[k1].answerType == 'dq') {
-            this.collectionItemList[k1].answerName = val.deptName;
-            this.collectionItemList[k1].answerValue = val.deptCode;
-          }
-          if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
-            this.getDeptInfo('dept', 'xsb', this.collectionItemList[k1].answerValue);
-          }
+      // if (this.index !== '') {
+      //   this.collectionItemList[this.index].answerName = val.deptName;
+      //   this.collectionItemList[this.index].answerValue = val.deptCode;
+      //   for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
+      //     if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
+      //       this.getDeptInfo('dept', 'xsb');
+      //     }
+      //   }
+      // } else {
+      for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
+        if (this.collectionItemList[k1].answerType == 'xsb') {
+          this.collectionItemList[k1].answerName = '';
+          this.collectionItemList[k1].answerValue = '';
+        }
+        if (this.collectionItemList[k1].answerType == 'dq') {
+          this.collectionItemList[k1].answerName = val.deptName;
+          this.collectionItemList[k1].answerValue = val.deptCode;
+        }
+        if (this.collectionItemList[k1].answerType == 'xsb' && val.deptId != '') {
+          this.getDeptInfo('dept', 'xsb');
         }
       }
+      // }
       // if (val.deptId != '') {
       //   this.getDeptInfo('dept', 'xsb');
       // }
@@ -691,41 +696,47 @@ export default {
     onregionConfirm(val) {
       this.RegionShow = false;
       this.companyCode = val.deptId;
-      if (this.index != '') {
-        this.collectionItemList[this.index].answerName = val.deptName;
-        this.collectionItemList[this.index].answerValue = val.deptCode;
-      } else {
-        for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
-          if (
-            this.collectionItemList[k1].answerType == 'xsb' ||
-            this.collectionItemList[k1].answerType == 'dq'
-          ) {
-            this.collectionItemList[k1].answerName = '';
-            this.collectionItemList[k1].answerValue = '';
-          }
-          if (this.collectionItemList[k1].answerType == 'gs') {
-            this.collectionItemList[k1].answerName = val.deptName;
-            this.collectionItemList[k1].answerValue = val.deptCode;
-          }
-          if (this.collectionItemList[k1].answerType == 'dq') {
-            this.getDeptInfo('dept', 'dq', this.collectionItemList[k1].answerValue);
-          }
+      // if (this.index !== '') {
+      //   this.collectionItemList[this.index].answerName = val.deptName;
+      //   this.collectionItemList[this.index].answerValue = val.deptCode;
+      //   for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
+      //     if (this.collectionItemList[k1].answerType == 'dq') {
+      //       this.getDeptInfo('dept', 'dq');
+      //     }
+      //   }
+      // } else {
+      for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
+        if (this.collectionItemList[k1].answerType == 'xsb') {
+          this.collectionItemList[k1].answerName = '';
+          this.collectionItemList[k1].answerValue = '';
+        }
+        if (this.collectionItemList[k1].answerType == 'xsb') {
+          this.collectionItemList[k1].answerName = '';
+          this.collectionItemList[k1].answerValue = '';
+        }
+        if (this.collectionItemList[k1].answerType == 'gs') {
+          this.collectionItemList[k1].answerName = val.deptName;
+          this.collectionItemList[k1].answerValue = val.deptCode;
+        }
+        if (this.collectionItemList[k1].answerType == 'dq') {
+          this.getDeptInfo('dept', 'dq');
         }
       }
+      // }
     },
     onSalesDepartmentConfirm(val) {
       this.SalesDepartmentShow = false;
-      if (this.index != '') {
-        this.collectionItemList[this.index].answerName = val.deptName;
-        this.collectionItemList[this.index].answerValue = val.deptCode;
-      } else {
-        for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
-          if (this.collectionItemList[k1].answerType == 'xsb') {
-            this.collectionItemList[k1].answerName = val.deptName;
-            this.collectionItemList[k1].answerValue = val.deptCode;
-          }
+      // if (this.index !== '') {
+      //   this.collectionItemList[this.index].answerName = val.deptName;
+      //   this.collectionItemList[this.index].answerValue = val.deptCode;
+      // } else {
+      for (var k1 = 0; k1 < this.collectionItemList.length; k1++) {
+        if (this.collectionItemList[k1].answerType == 'xsb') {
+          this.collectionItemList[k1].answerName = val.deptName;
+          this.collectionItemList[k1].answerValue = val.deptCode;
         }
       }
+      // }
     },
     onStartTimeConfirm(val) {
       this.formData.startTime = this.parseTime(new Date(val), '{y}-{m}-{d}') + '';