소스 검색

Merge branch 'feature_20251201_仿石漆服务商门店类型取消定位校验' into uat(dev)

# Conflicts:
#	src/views/deviceOutside/index.vue
#	src/views/deviceWithin/index.vue
zhujindu 4 일 전
부모
커밋
8b2c8fa653
2개의 변경된 파일87개의 추가작업 그리고 79개의 파일을 삭제
  1. 50 45
      src/views/deviceOutside/index.vue
  2. 37 34
      src/views/deviceWithin/index.vue

+ 50 - 45
src/views/deviceOutside/index.vue

@@ -1455,13 +1455,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' || /^FSQ/.test(val.storeCode)) {
+          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非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
@@ -1979,44 +1979,11 @@ export default {
                           let PointSum = that
                             .twoPointSum(that.lat, that.lon, location.lat, location.lon)
                             .toFixed(2);
-
-                          if (PointSum > 500 && localStorage.getItem('postType') != 'GZ') {
-                            that.$dialog
-                              .confirm({
-                                confirmButtonText: '确定',
-                                cancelButtonText: '取消',
-                                title: '系统提示',
-                                message: '定位距离偏差大',
-                                closeOnClickOverlay: true,
-                              })
-                              .then(() => {
-                                that.$router.push({
-                                  path: '/outabnormalVisit',
-                                  query: {
-                                    storeId: val.storeId,
-                                    rdId: val.rdId,
-                                    lat: that.lat,
-                                    lon: that.lon,
-                                    visitId: val.visitId,
-                                    pageType: 'out',
-                                    visitModel: '5',
-                                    storeCode: val.storeCode,
-                                    tabVal: that.tabVal,
-                                    latNew: location.lat,
-                                    lonNew: location.lon,
-                                    PointSum: PointSum,
-                                    marklat: res.latitude,
-                                    marklon: res.longitude,
-                                  },
-                                });
-                                localStorage.setItem('startTime', new Date());
-                                localStorage.setItem('ORGName', val.deptName);
-                                localStorage.setItem('chainNameR', val.storeName);
-                              })
-                              .catch(() => {
-                                // that.abnormalVisit(val)
-                              });
-                          } else {
+                          // 工装和仿石漆不用校验定位
+                          if (
+                            localStorage.getItem('postType') == 'GZ' ||
+                            /^FSQ/.test(val.storeCode)
+                          ) {
                             that.$router.push({
                               path: '/outabnormalVisit',
                               query: {
@@ -2039,6 +2006,44 @@ export default {
                             localStorage.setItem('startTime', new Date());
                             localStorage.setItem('ORGName', val.deptName);
                             localStorage.setItem('chainNameR', val.storeName);
+                          } else {
+                            if (PointSum > 500) {
+                              that.$dialog
+                                .confirm({
+                                  confirmButtonText: '确定',
+                                  cancelButtonText: '取消',
+                                  title: '系统提示',
+                                  message: '定位距离偏差大',
+                                  closeOnClickOverlay: true,
+                                })
+                                .then(() => {
+                                  that.$router.push({
+                                    path: '/outabnormalVisit',
+                                    query: {
+                                      storeId: val.storeId,
+                                      rdId: val.rdId,
+                                      lat: that.lat,
+                                      lon: that.lon,
+                                      visitId: val.visitId,
+                                      pageType: 'out',
+                                      visitModel: '5',
+                                      storeCode: val.storeCode,
+                                      tabVal: that.tabVal,
+                                      latNew: location.lat,
+                                      lonNew: location.lon,
+                                      PointSum: PointSum,
+                                      marklat: res.latitude,
+                                      marklon: res.longitude,
+                                    },
+                                  });
+                                  localStorage.setItem('startTime', new Date());
+                                  localStorage.setItem('ORGName', val.deptName);
+                                  localStorage.setItem('chainNameR', val.storeName);
+                                })
+                                .catch(() => {
+                                  // that.abnormalVisit(val)
+                                });
+                            }
                           }
                           addVisitsPosition({
                             storeId: val.storeId,

+ 37 - 34
src/views/deviceWithin/index.vue

@@ -561,7 +561,7 @@ export default {
       const maxMonth = today.getMonth();
       const maxDay = today.getDate() + 30;
       return new Date(maxYear, maxMonth, maxDay);
-    }
+    },
   },
   watch: {
     $route(to, from) {
@@ -990,13 +990,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' || /^FSQ/.test(val.storeCode)) {
+          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非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
@@ -1267,7 +1267,35 @@ export default {
                           .twoPointSum(that.lat, that.lon, location.lat, location.lon)
                           .toFixed(2);
                         if (val.lat == '' || val.lat == null) {
-                          if (localStorage.getItem('postType') != 'GZ') {
+                          if (
+                            localStorage.getItem('postType') == 'GZ' ||
+                            /^FSQ/.test(val.storeCode)
+                          ) {
+                            that.$router.push({
+                              path: '/storeGroup',
+                              query: {
+                                storeId: val.storeId,
+                                rdId: val.rdId,
+                                lat: that.lat,
+                                lon: that.lon,
+                                visitId: val.visitId,
+                                pageType: 'out',
+                                addressLine: val.addressLine,
+                                storeCategory: val.storeCategory,
+                                storeName: val.storeName,
+                                contactName: val.contactName,
+                                hisTime: val.hisTime,
+                                storeCode: val.storeCode,
+                                tabVal: that.tabVal,
+                                visitModel: '1',
+                                latNew: location.lat,
+                                lonNew: location.lon,
+                                PointSum: PointSum,
+                                marklat: res.latitude,
+                                marklon: res.longitude,
+                              },
+                            });
+                          } else {
                             that.$dialog
                               .confirm({
                                 confirmButtonText: '确定拜访',
@@ -1303,31 +1331,6 @@ export default {
                                   },
                                 });
                               });
-                          } else {
-                            that.$router.push({
-                              path: '/storeGroup',
-                              query: {
-                                storeId: val.storeId,
-                                rdId: val.rdId,
-                                lat: that.lat,
-                                lon: that.lon,
-                                visitId: val.visitId,
-                                pageType: 'out',
-                                addressLine: val.addressLine,
-                                storeCategory: val.storeCategory,
-                                storeName: val.storeName,
-                                contactName: val.contactName,
-                                hisTime: val.hisTime,
-                                storeCode: val.storeCode,
-                                tabVal: that.tabVal,
-                                visitModel: '1',
-                                latNew: location.lat,
-                                lonNew: location.lon,
-                                PointSum: PointSum,
-                                marklat: res.latitude,
-                                marklon: res.longitude,
-                              },
-                            });
                           }
                         } else {
                           that.$router.push({