فهرست منبع

Merge branch 'feature_20241209_门店列表点击名称和编号跳转好帮手门店详情'

zhujindu 11 ماه پیش
والد
کامیت
635fc6ebf2
2فایلهای تغییر یافته به همراه31 افزوده شده و 300 حذف شده
  1. 14 297
      src/views/deviceOutside/index.vue
  2. 17 3
      src/views/deviceOutside/rangeStore.vue

+ 14 - 297
src/views/deviceOutside/index.vue

@@ -36,9 +36,7 @@
           <van-cell>
             <div class="card">
               <div class="title titlero">
-                <span
-                  @click="goOtherSystem(item)"
-                  style="color: #0057ba; text-decoration: underline">
+                <span @click="goOtherSystem(item)" :style="setStroeNameStyle(item)">
                   <span>{{ item.storeName }}</span>
                   (<span>{{ item.storeCode }}</span
                   >)
@@ -693,7 +691,7 @@ export default {
           this.tabVal = '1';
         }
       } else {
-        this.tabVal = '1';
+        this.tabVal = localStorage.getItem('tabVal');
       }
     } else {
       this.tabVal = localStorage.getItem('tabVal');
@@ -718,6 +716,14 @@ export default {
     this.getMonth();
   },
   methods: {
+    setStroeNameStyle(item) {
+      // 是否为 家装或工装
+      if (item.sfaStoreType.jz || item.sfaStoreType.gz) {
+        return {};
+      } else {
+        return { color: '#0057ba', 'text-decoration': 'underline' };
+      }
+    },
     clearFn() {
       this.storeName = '';
       localStorage.setItem('outvstoreName', '');
@@ -740,19 +746,6 @@ export default {
         .then((response) => {
           if (response.status == 200) {
             qiyeData = response.data.data;
-            // wx.config({
-            //   beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-            //   debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-            //   appId: qiyeData.appId, // 必填,企业微信的corpID
-            //   timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-            //   nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-            //   signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-            //   jsApiList: ["ready", "invoke"]
-            // });
-            // wx.ready(function() {
-            //   wx.checkJsApi({
-            //     jsApiList: ["agentConfig", "launchMiniprogram"], // 需要检测的JS接口列表
-            //     success: function(res) {}})})
             wx.agentConfig({
               corpid: qiyeData.appId, // 必填,企业微信的corpid,必须与当前登录的企业一致
               agentid: qiyeData.agentId, // 必填,企业微信的应用id (e.g. 1000247)
@@ -990,93 +983,6 @@ export default {
             message: error,
           });
         });
-      // let loading1 = this.$toast.loading({
-      //   duration: 0,
-      //   message: '加载中...',
-      //   forbidClick: true,
-      // });
-      // let url = window.location.href;
-      // let wx = this.wx;
-      // var that = this;
-      // let qiyeData;
-      // const instance = axios.create();
-      // instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-      // instance
-      //   .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-      //     params: {
-      //       url: url,
-      //     },
-      //   })
-      //   .then((response) => {
-      //     if (response.status == 200) {
-      //       this.cont = 5;
-      //       var flat = true;
-      //       var times = setInterval(() => {
-      //         this.cont--;
-      //         if (this.cont == '0') {
-      //           if (flat) {
-      //             loading1.clear();
-      //             clearInterval(times);
-      //             that.$dialog.alert({
-      //               message: '定位失败,请开启企微定位权限',
-      //             });
-      //           } else {
-      //             clearInterval(times);
-      //           }
-      //         }
-      //       }, 1000);
-      //       qiyeData = response.data.data;
-      //       wx.config({
-      //         beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-      //         debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-      //         appId: qiyeData.appId, // 必填,企业微信的corpID
-      //         timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-      //         nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-      //         signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-      //         jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-      //       });
-      //       wx.ready(function () {
-      //         wx.getLocation({
-      //           type: 'gcj02',
-      //           success: function (res) {
-      //             flat = false;
-      //             loading1.clear();
-      //             var name = '我的';
-      //             if (that.tabVal != 1) {
-      //               name = '销售部';
-      //             }
-      //             that.buryingPoint({
-      //               systemModel: '计划外',
-      //               buryingPointType: 3,
-      //               buryingPointValue: name,
-      //               buryingPointName: '计划外',
-      //               buryingPointPosition: '进入地图',
-      //             });
-      //             that.$router.push({
-      //               path: '/rangeStore',
-      //               query: {
-      //                 lat: '',
-      //                 lon: '',
-      //                 tabVal: that.tabVal,
-      //               },
-      //             });
-      //           },
-      //           fail: function () {
-      //             loading1.clear();
-      //             that.$dialog.alert({
-      //               message: 'GPS未开启',
-      //             });
-      //           },
-      //         });
-      //       });
-      //       wx.error(function (res) {
-      //         loading1.clear();
-      //         that.$dialog.alert({
-      //           message: '定位失败,请开启企微定位权限',
-      //         });
-      //       });
-      //     }
-      //   });
     },
     //取消搜索
     cancelSearch() {
@@ -1180,113 +1086,6 @@ export default {
             message: error,
           });
         });
-      // // 本地开发 test 环境时 时跳过获取定位功能
-      // if (process.env.NODE_ENV === 'test') {
-      //   this.lat = 34.62188103091605;
-      //   this.lon = 112.45364302095416;
-      //   localStorage.setItem('lat', this.lat);
-      //   localStorage.setItem('lon', this.lon);
-      //   if (this.tabVal == 1) {
-      //     this.getUserOutPlaListFun();
-      //   } else {
-      //     this.getUserOrgStoreList();
-      //   }
-      //   return;
-      // }
-      // var that = this;
-      // let url = window.location.href;
-      // let wx = this.wx;
-      // let loadingmap = this.$toast.loading({
-      //   duration: 0,
-      //   message: '定位中...',
-      //   forbidClick: true,
-      // });
-      // let qiyeData;
-      // const instance = axios.create();
-      // instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-      // instance
-      //   .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-      //     params: {
-      //       url: url,
-      //     },
-      //   })
-      //   .then((response) => {
-      //     console.log('url=' + url);
-      //     loadingmap.clear();
-      //     if (response.status == 200) {
-      //       this.cont = 5;
-      //       var flat = true;
-      //       var times = setInterval(() => {
-      //         this.cont--;
-      //         if (this.cont == '0') {
-      //           if (flat) {
-      //             clearInterval(times);
-      //             if (val == 1) {
-      //               that.$dialog.alert({
-      //                 message: '定位失败,请开启企微定位权限',
-      //               });
-      //             }
-      //             loadingmap.clear();
-      //           } else {
-      //             clearInterval(times);
-      //           }
-      //         }
-      //       }, 1000);
-      //       qiyeData = response.data.data;
-      //       wx.config({
-      //         beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-      //         debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-      //         appId: qiyeData.appId, // 必填,企业微信的corpID
-      //         timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-      //         nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-      //         signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-      //         jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-      //       });
-      //       wx.ready(function () {
-      //         wx.getLocation({
-      //           type: 'gcj02',
-      //           success: function (res) {
-      //             flat = false;
-      //             loadingmap.clear();
-      //             console.log('处理前');
-      //             console.log(res.latitude, res.longitude);
-      //             var location = that.CJ02BD(res.latitude, res.longitude);
-      //             console.log('处理后');
-      //             console.log(location);
-      //             that.lat = location.lat;
-      //             that.lon = location.lon;
-      //             localStorage.setItem('lat', location.lat);
-      //             localStorage.setItem('lon', location.lon);
-      //             if (val == 1) {
-      //               if (that.tabVal == 1) {
-      //                 that.getUserOutPlaListFun();
-      //               } else {
-      //                 that.getUserOrgStoreList();
-      //               }
-      //             } else {
-      //               that.getUserOutPlaListFun();
-      //             }
-      //           },
-      //           fail: function () {
-      //             loadingmap.clear();
-      //             if (val == 1) {
-      //               that.$dialog.alert({
-      //                 message: 'GPS未开启',
-      //               });
-      //             }
-      //           },
-      //         });
-      //       });
-      //       wx.error(function (res) {
-      //         loadingmap.clear();
-      //         if (val == 1) {
-      //           that.$dialog.alert({
-      //             message: '定位失败,请开启企微定位权限',
-      //           });
-      //         }
-      //       });
-      //     }
-      //   });
     },
     getUserOutPlaListFun() {
       this.storeType = localStorage.getItem('storeType');
@@ -1341,79 +1140,6 @@ export default {
         }
       });
     },
-    // 获取当前定位数据
-    getLocationFun() {
-      return new Promise((resolve, reject) => {
-        let url = window.location.href;
-        // let url = "https://ssbsfatest.nipponpaint.com.cn/mobile"
-        let wx = this.wx;
-        let qiyeData;
-        const instance = axios.create();
-        instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
-        instance
-          .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
-            params: {
-              url: url,
-            },
-          })
-          .then((response) => {
-            if (response.status == 200) {
-              this.cont = 5;
-              var flat = true;
-              var times = setInterval(() => {
-                this.cont--;
-                if (this.cont == '0') {
-                  if (flat) {
-                    clearInterval(times);
-                    this.$dialog
-                      .alert({
-                        message: '定位失败,请开启企微定位权限',
-                      })
-                      .then(() => {});
-                  } else {
-                    clearInterval(times);
-                  }
-                }
-              }, 1000);
-              qiyeData = response.data.data;
-              wx.config({
-                beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                appId: qiyeData.appId, // 必填,企业微信的corpID
-                timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
-                nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
-                signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
-                jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
-              });
-              wx.ready(() => {
-                wx.getLocation({
-                  type: 'gcj02',
-                  success: (res) => {
-                    flat = false;
-                    var location = this.CJ02BD(res.latitude, res.longitude);
-                    resolve({ location, res });
-                  },
-                  fail: () => {
-                    this.$dialog.alert({
-                      message: 'GPS未开启',
-                    });
-                    reject('GPS未开启');
-                  },
-                });
-              });
-              wx.error(() => {
-                this.$dialog
-                  .alert({
-                    message: '定位失败,请开启企微定位权限',
-                  })
-                  .then(() => {});
-
-                reject('定位失败,请开启企微定位权限');
-              });
-            }
-          });
-      });
-    },
     storeVisit(val) {
       localStorage.setItem('tabVal', this.tabVal);
       localStorage.removeItem('visitId');
@@ -2185,19 +1911,6 @@ export default {
                     this.$toast.fail(dataList.msg);
                   }
                 });
-              // this.$router.push({path: "/outabnormalVisit", query: {
-              // storeId:"179792",
-              //  rdId:"null",
-              //  lat:"31.1882020000",
-              //  lon:"120.6801770000",
-              //  visitId:"null",
-              //  visitModel:"5",
-              //  storeCode:"0190141901",
-              //  tabVal:"0",
-              //  latNew:34.621855582632264,
-              //  lonNew:112.45382530736684,
-              //  PointSum:857246.44
-              // 	}})
               localStorage.setItem('startTime', new Date());
               localStorage.setItem('ORGName', val.deptName);
               localStorage.setItem('chainNameR', val.storeName);
@@ -2398,6 +2111,10 @@ export default {
     },
     // 跳转好帮手门店详情
     goOtherSystem(item) {
+      // 是否为 家装或工装
+      if (item.sfaStoreType.jz || item.sfaStoreType.gz) {
+        return false;
+      }
       if (item.storeCode) {
         window.location.href =
           process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + item.storeCode;

+ 17 - 3
src/views/deviceOutside/rangeStore.vue

@@ -154,9 +154,11 @@
         <div class="maplit" :class="{ maplitactive: listpoint.length > 1 }">
           <div v-for="(info, index) in listpoint" :key="index" class="maplistitem">
             <p style="font-weight: bold; font-size: 16px">
-              <span @click="goOtherSystem(info)" style="color: #0057ba; text-decoration: underline">
-                <span @click="checkfn(info)">{{ info.storeName }}</span>
-                (<span @click="checkfn(info)"> {{ info.storeCode }} </span>)
+              <span @click="goOtherSystem(info)" :style="setStroeNameStyle(info)">
+                <span>{{ info.storeName }}</span>
+                (<span> {{ info.storeCode }} </span>)
+                <!-- <span @click="checkfn(info)">{{ info.storeName }}</span>
+                (<span @click="checkfn(info)"> {{ info.storeCode }} </span>) -->
               </span>
               <span class="btn" :data-clipboard-text="info.storeCode">
                 <van-icon
@@ -781,6 +783,14 @@ export default {
     });
   },
   methods: {
+    setStroeNameStyle(item) {
+      // 是否为 家装或工装
+      if (item.sfaStoreType.jz || item.sfaStoreType.gz) {
+        return {};
+      } else {
+        return { color: '#0057ba', 'text-decoration': 'underline' };
+      }
+    },
     async getMapRange() {
       let mapRangeOption = await getDictOption({}, 'out_plan_map_range');
       this.mapRange = mapRangeOption.data || [];
@@ -1974,6 +1984,10 @@ export default {
     },
     // 跳转好帮手门店详情
     goOtherSystem(item) {
+      // 是否为 家装或工装
+      if (item.sfaStoreType.jz || item.sfaStoreType.gz) {
+        return false;
+      }
       if (item.storeCode) {
         window.location.href =
           process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + item.storeCode;