Browse Source

首页增加提示类tab,B类指标页优化,我的-增加业务员日常工作统计

zhujindu 1 year ago
parent
commit
2765369817

+ 9 - 0
src/api/index.js

@@ -888,3 +888,12 @@ export function selectUserStoreNoVisits(data) {
     data: data,
   });
 }
+
+// 提示类建店详情接口
+export function selectPendingCasesInfo(query) {
+  return request({
+    url: '/mobile/storeStatistics/selectPendingCasesInfo',
+    method: 'get',
+    params: query,
+  });
+}

+ 3 - 3
src/router/index.js

@@ -62,10 +62,10 @@ const router = new VueRouter({
         //     component: () => import("@/views/home/logincs.vue")
         // },
         {
-          path: '/noVIsit',
-          name: 'noVIsit',
+          path: '/noVisit',
+          name: 'noVisit',
           meta: { title: '未拜访门店' },
-          component: () => import('@/views/home/hintTabPage/noVIsit.vue'),
+          component: () => import('@/views/home/hintTabPage/noVisit.vue'),
         },
         {
           path: '/hintDetail',

+ 3 - 1
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -261,7 +261,9 @@ export default {
                   message: '拜访中任务结束成功!',
                 })
                 .then(() => {
-                  window.location.replace(window.location.origin + '/mobile/outsidelist/index');
+                  // this.$router.replace({});
+                  this.onClickLeft();
+                  // window.location.replace(window.location.origin + '/mobile/outsidelist/index');
                 });
             } else {
               this.$dialog.alert({

+ 72 - 12
src/views/home/hintTabPage/hintDetail.vue

@@ -67,7 +67,12 @@
   </div>
 </template>
 <script>
-import { selectNoVisitsInfo, getReportMaterialType, getReportMaterial } from '@/api/index';
+import {
+  selectNoVisitsInfo,
+  selectPendingCasesInfo,
+  getReportMaterialType,
+  getReportMaterial,
+} from '@/api/index';
 import { mapState } from 'vuex';
 export default {
   name: 'hintDetail',
@@ -82,7 +87,7 @@ export default {
       deptId: null,
       fromType: null,
       activeTabName: 'noVisit',
-      activaPantoneName: 0,
+      activaPantoneName: '',
       tabsItem: [
         {
           title: '未拜访',
@@ -150,7 +155,7 @@ export default {
           childredColumn: [
             {
               label: '(45天未结案)',
-              prop: 'notVisited',
+              prop: 'keKongAbnormalNum',
             },
           ],
         },
@@ -159,11 +164,11 @@ export default {
           childredColumn: [
             {
               label: '(7天未完工)',
-              prop: 'notVisited',
+              prop: 'jinPaiAbnormalNum',
             },
             {
               label: '(30天未结案)',
-              prop: 'notVisited',
+              prop: 'jinPaiUnfinishedNum',
             },
           ],
         },
@@ -172,7 +177,7 @@ export default {
           childredColumn: [
             {
               label: '(30天未结案)',
-              prop: 'notVisited',
+              prop: 'tongAAbnormalNum',
             },
           ],
         },
@@ -181,7 +186,7 @@ export default {
           childredColumn: [
             {
               label: '(30天未结案)',
-              prop: 'notVisited',
+              prop: 'tongBAbnormalNum',
             },
           ],
         },
@@ -234,6 +239,7 @@ export default {
           ],
         },
       ],
+      materialCode: null, //色卡物料来源
     };
   },
   watch: {
@@ -259,27 +265,32 @@ export default {
   methods: {
     initData(resolve, tree) {
       if (this.fromType == 'noVisit') {
+        // 未拜访
         if (tree) this.deptId = tree.onlyId;
         this.firstProp = 'onlyName';
         this.selectNoVisitsInfoFun(resolve);
       } else if (this.fromType == 'createStore') {
+        // 建店
+        if (tree) this.deptId = tree.onlyId;
+        this.firstProp = 'onlyName';
+        this.selectPendingCasesInfoFun(resolve);
       } else if (this.fromType == 'pantone') {
+        // 色卡
         this.firstProp = 'warehouseName';
         let empLevel = tree ? tree.empLevel : null;
         this.getPantoneData(resolve, empLevel);
       }
     },
     tabChange(val) {
-      this.tableList = [];
-      // this.tableColumn = this[val];
+      this.tableList = []; // 清楚tab数
+      this.tabsItemPantone = {}; // 清楚色卡tab数据
       this.fromType = val;
       this.initData();
       this.toggleIndex = this.toggleIndex++;
     },
     tabChangePantone(val) {
-      // this.fromType = val;
-      this.materialCode = this.tabsItemPantone[val].materialCode;
       this.tableList = [];
+      this.materialCode = this.tabsItemPantone[val].materialCode;
       this.initData();
       this.toggleIndex = this.toggleIndex++;
     },
@@ -305,15 +316,36 @@ export default {
         }
       });
     },
+    // 建店
+    selectPendingCasesInfoFun(resolve) {
+      selectPendingCasesInfo({ deptId: this.deptId }).then((res) => {
+        res.data.forEach((val) => {
+          if (val.onLevel < 3) val.hasChildren = true;
+        });
+        // 是否是子级
+        if (resolve) {
+          resolve && resolve(res.data);
+        } else {
+          this.tableList = res.data;
+        }
+      });
+    },
     // 色卡tab
     getPantoneData(resolve, empLevel) {
       if (JSON.stringify(this.tabsItemPantone) != '{}') {
+        // this.tabsItemPantone != {} 不是初次获取tab数据不需要在赋值
         this.getReportMaterialTypeFun(resolve, empLevel);
       } else {
         getReportMaterial().then((res) => {
           this.tabsItemPantone = res.data;
           delete this.tabsItemPantone.tip;
-          this.getReportMaterialTypeFun(null, null);
+          // 初次获取tab数据延迟等待this.activaPantoneName当前激活tab赋值成功,获取其物料code
+          this.$nextTick(() => {
+            this.materialCode = this.materialCode
+              ? this.materialCode
+              : this.tabsItemPantone[this.activaPantoneName].materialCode;
+            this.getReportMaterialTypeFun(null, null);
+          });
         });
       }
     },
@@ -345,6 +377,34 @@ export default {
 }
 </style>
 <style lang="scss">
+#app {
+  width: 100%;
+  height: 100%;
+  .bgcolor {
+    width: 100%;
+    height: 100%;
+    .hintDetail {
+      width: 100%;
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      .content {
+        flex: 1;
+        overflow: hidden;
+        .el-table {
+          overflow: hidden;
+          height: 100%;
+          display: flex;
+          flex-direction: column;
+          .el-table__body-wrapper {
+            overflow: auto;
+            flex: 1;
+          }
+        }
+      }
+    }
+  }
+}
 .hintDetail {
   .el-table__head .el-table__body {
     overflow: hidden;

+ 23 - 26
src/views/home/hintTabPage/index.vue

@@ -37,7 +37,7 @@
                   class="popoverConten"
                   v-for="(item, index) in createStore.tipsPopoverlabel"
                   :key="index">
-                  {{ item.label }}:{{ item.prop }}
+                  {{ item }}
                 </div>
                 <div slot="reference" class="hintIconBox">
                   <img class="hintIcon" :src="hintIcon" />
@@ -46,7 +46,7 @@
             </div>
           </template>
           <visitPage
-            fromType="noVisit"
+            fromType="createStore"
             :empLevel="empLevel"
             :contentData="createStore.contentData"
             :maskShow="createStore.collapseLosding"
@@ -187,7 +187,7 @@ export default {
   },
   data() {
     return {
-      empLevel: '3', //员工级别,1大区主管2销售部主管3业务员4其他 ***其他级别4,不显示日报、周报、半月报和色卡
+      empLevel: '', //员工级别,1大区主管2销售部主管3业务员4其他 ***其他级别4,不显示日报、周报、半月报和色卡
       hintIcon: hintIcon,
       activeNames: ['1', '2', '3', '4', '5'],
       visitCollapse: {
@@ -286,21 +286,22 @@ export default {
         contentData: [
           {
             title: '可控店',
+            titleProp: 'keKong',
             bagColor: '#eb6877',
             visitDetail: [
               {
                 leftTable: '本月累计:',
-                leftValue: '',
+                leftProp: 'month',
                 leftUnit: '%',
                 leftIsClick: false,
               },
               {
                 leftTable: '今年累计:',
-                leftValue: '',
+                leftProp: 'year',
                 leftUnit: '%',
                 leftIsClick: false,
                 rightTable: '45天未结案:',
-                rightValue: '',
+                rightProp: 'keKongAbnormalNum',
                 rightUnit: '家',
                 rightIsClick: true,
               },
@@ -308,25 +309,26 @@ export default {
           },
           {
             title: '金牌店',
+            titleProp: 'jinPai',
             bagColor: '#f1b789',
             visitDetail: [
               {
                 leftTable: '本月累计:',
-                leftValue: '',
+                leftProp: 'month',
                 leftUnit: '%',
                 leftIsClick: false,
                 rightTable: '7天未完工:',
-                rightValue: '',
+                rightProp: 'jinPaiAbnormalNum',
                 rightUnit: '家',
                 rightIsClick: true,
               },
               {
                 leftTable: '今年累计:',
-                leftValue: '',
+                leftProp: 'year',
                 leftUnit: '%',
                 leftIsClick: false,
                 rightTable: '30天未结案:',
-                rightValue: '',
+                rightProp: 'jinPaiUnfinishedNum',
                 rightUnit: '家',
                 rightIsClick: true,
               },
@@ -334,21 +336,22 @@ export default {
           },
           {
             title: '同A店',
+            titleProp: 'tongA',
             bagColor: '#88abda',
             visitDetail: [
               {
                 leftTable: '本月累计:',
-                leftValue: '',
+                leftProp: 'month',
                 leftUnit: '%',
                 leftIsClick: false,
               },
               {
                 leftTable: '今年累计:',
-                leftValue: '',
+                leftProp: 'year',
                 leftUnit: '%',
                 leftIsClick: false,
                 rightTable: '30天未结案:',
-                rightValue: '',
+                rightProp: 'tongAAbnormalNum',
                 rightUnit: '家',
                 rightIsClick: true,
               },
@@ -356,21 +359,22 @@ export default {
           },
           {
             title: '同B店',
+            titleProp: 'tongB',
             bagColor: '#8f82bc',
             visitDetail: [
               {
                 leftTable: '本月累计:',
-                leftValue: '',
+                leftProp: 'month',
                 leftUnit: '%',
                 leftIsClick: false,
               },
               {
                 leftTable: '今年累计:',
-                leftValue: '',
+                leftProp: 'year',
                 leftUnit: '%',
                 leftIsClick: false,
                 rightTable: '30天未结案:',
-                rightValue: '',
+                rightProp: 'tongBAbnormalNum',
                 rightUnit: '家',
                 rightIsClick: true,
               },
@@ -412,9 +416,9 @@ export default {
     },
     getSelectBuildingStore() {
       selectBuildingStore().then((res) => {
-        this.visitCollapse.resData = res.data;
-        this.visitCollapse.tipsPopoverlabel = res.data.reminderContent;
-        this.visitCollapse.collapseLosding = false;
+        this.createStore.resData = res.data;
+        this.createStore.tipsPopoverlabel = res.data.reminderContent;
+        this.createStore.collapseLosding = false;
       });
     },
     getReportData() {
@@ -425,13 +429,6 @@ export default {
       } else if (this.empLevel == '3') {
         this.report.title = '日报';
       }
-      // let resData = {
-      //   commentNum: '',
-      //   empLevel: '2',
-      //   tip: '下述指标:本人填写/审批情况',
-      //   approvalRate: '0.00%',
-      //   fillingRate: '0.00%',
-      // };
       getReportTarget().then((res) => {
         this.report.reportData = res.data || {};
       });

+ 266 - 74
src/views/home/hintTabPage/noVIsit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="noVIsit">
+  <div class="noVisit">
     <div class="header">
       <van-nav-bar class="navBar" title="未拜访门店" left-arrow @click-left="onClickLeft" />
     </div>
@@ -30,16 +30,18 @@
               <div
                 class="statstext"
                 :style="{
-                  'background-color': item.visitsStatus == '未拜访' ? '#ed5c68' : 'white',
+                  'background-color': item.stateString == '未拜访' ? '#ed5c68' : 'white',
                 }">
                 <van-icon
-                  v-if="item.visitsStatus == '拜访中'"
+                  v-if="item.stateString == '拜访中'"
                   :name="times"
                   color="#ee0a24"
                   size="32" />
-                {{ item.visitsStatus == '未拜访' ? '未拜访' : '' }}
+                {{ item.stateString == '未拜访' ? '未拜访' : '' }}
+              </div>
+              <div class="toVisit" @click="storeVisit(item)">
+                进入拜访 <van-icon name="arrow" />
               </div>
-              <div class="toVisit" @click="enterVisit">进入拜访 <van-icon name="arrow" /></div>
             </div>
           </div>
         </van-collapse-item>
@@ -48,101 +50,286 @@
   </div>
 </template>
 <script>
-import { selectUserStoreNoVisits } from '@/api/index';
+import {
+  selectUserStoreNoVisits,
+  mobileReposition,
+  checkVisit,
+  addVisitsPosition,
+} from '@/api/index';
+import { checkStoreAddressByStoreCode } from '@/api/visitstore';
 import { getPosition, getTicketFun } from '@/utils/TXApiFun';
 import sbpmdh from '@/assets/sbpmdh.png';
 import times from '@/assets/Icon/times.png';
 export default {
-  name: 'noVIsit',
+  name: 'noVisit',
   data() {
     return {
       sbpmdh: sbpmdh,
       times: times,
       activeName: '',
       list: {},
+      TXPiont: {}, //腾讯定位数据
+      TXisBD: {}, // 腾讯定位数据转百度
+      activatStoreVal: {}, //当前点击门店数据
+      visitRoutePath: '', //拜访页面路径
+      clickIsFlage: true,
     };
   },
   filters: {
     storeType(value) {
       let type = '';
-      if (value == 'jinPai') {
+      if (value == 'keKong') {
+        type = '可控店';
+      } else if (value == 'jinPai') {
         type = '金牌店';
-      } else if (value == 'tongB') {
-        type = '同城B';
       } else if (value == 'tongA') {
         type = '同城A';
-      } else if (value == 'keKong') {
-        type = '可控店';
+      } else if (value == 'tongB') {
+        type = '同城B';
       }
       return type;
     },
   },
-  created() {
+  activated() {
+    // 授权
+    getTicketFun().then(() => {
+      // 获取定位
+      getPosition()
+        .then((res) => {
+          let { TXisBD } = res;
+          this.getList(TXisBD);
+        })
+        .catch((error) => {
+          this.$dialog.alert({
+            message: error,
+          });
+        });
+    });
     this.activeName = this.$route.query.activeName;
-    this.getList();
   },
   methods: {
-    getList() {
-      let resData = {
-        jinPai: {
-          storeList: [
-            {
-              distance: 733122,
-              storeName: '溧阳市南渡益民建材商店',
-              storeCategory: 'JinPai',
-              storeId: 254801,
-              addressLine: '江苏省常州市溧阳市苏浙皖边界市场A区一层31-32号',
-              visitsStatus: '未拜访',
-            },
-          ],
-          storeNum: 1,
-        },
-        tongB: {
-          storeList: [
-            {
-              distance: 735948,
-              storeName: '王明建材店',
-              storeCategory: 'TongB',
-              storeId: 311790,
-              addressLine: '江苏省常州市溧阳市建业街12号',
-              visitsStatus: '未拜访',
-            },
-          ],
-          storeNum: 1,
-        },
-        tongA: {
-          storeList: [
-            {
-              distance: 722628,
-              storeName: '大牛建材',
-              storeCategory: 'TongA',
-              storeId: 311846,
-              addressLine: '江苏省常州市溧阳市公园路与永兴大道交叉口正东方向126米左右',
-              visitsStatus: '未拜访',
-            },
-          ],
-          storeNum: 1,
-        },
-        keKong: {
-          storeList: [
-            {
-              distance: 746334,
-              storeName: '常州市溧阳市边界市场立邦专卖店',
-              storeCategory: 'KeKong',
-              storeId: 244305,
-              addressLine: '江苏省溧阳市苏浙皖边界市场建材区B区二层31-32号',
-              visitsStatus: '未拜访',
-            },
-          ],
-          storeNum: 1,
-        },
-      };
-      this.list = resData;
-      // selectUserStoreNoVisits().then((res) => {});
+    getList(TXisBD) {
+      selectUserStoreNoVisits({
+        lat: TXisBD.lat,
+        lon: TXisBD.lon,
+      }).then((res) => {
+        this.list = res.data;
+        console.log(this.list);
+      });
     },
     tabChange(val) {},
     // 进入拜访
-    enterVisit() {},
+    storeVisit(val) {
+      if (!this.clickIsFlage) return;
+      this.clickIsFlage = false;
+      this.toastLoading(0, '加载中...', true);
+      // 删除拜访id
+      localStorage.removeItem('visitId');
+      checkVisit({ storeId: val.storeId }).then((res) => {
+        if (res.code == 200) {
+          if (val.stateString.indexOf('拜访中') != -1) {
+            this.toSuishenbangOutstoreVisit(0);
+          } else {
+            // 拜访时重新获取定位
+            getPosition()
+              .then((res) => {
+                let { TXisBD, resData } = res;
+                this.TXisBD = TXisBD;
+                this.TXPiont = resData;
+                localStorage.setItem('lat', TXisBD.lat);
+                localStorage.setItem('lon', TXisBD.lon);
+                this.activatStoreVal = val;
+                // 拜访页面分为 计划外、计划内; 0计划内 1计划外
+                this.visitRoutePath =
+                  this.activatStoreVal.visitEntry == '1'
+                    ? '/suishenbangOutstoreVisit'
+                    : '/storeVisitpage';
+                this.checkStoreAddressByStoreCodeFun();
+              })
+              .catch((error) => {
+                this.clickIsFlage = true;
+                this.$dialog.alert({
+                  message: error,
+                });
+              });
+          }
+        } else {
+          this.toastLoading().clear();
+          this.clickIsFlage = true;
+          this.$dialog.alert({
+            message: res.msg,
+          });
+        }
+      });
+    },
+    checkStoreAddressByStoreCodeFun() {
+      this.toastLoading(0, '加载中...', true);
+      let PointSumval = this.twoPointSum(
+        this.TXisBD.lat,
+        this.TXisBD.lon,
+        this.TXisBD.lat,
+        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;
+      }
+      checkStoreAddressByStoreCode({
+        storeCode: this.activatStoreVal.storeCode,
+        lon: this.TXisBD.lon,
+        lat: this.TXisBD.lat,
+      })
+        .then((response) => {
+          this.clickIsFlage = true;
+          // 门店校验 地址不通过
+          if (response.code != 200) {
+            this.toastLoading().clear();
+            // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
+            if (response.data) {
+              if (response.data.updateAddress == 0) {
+                // 非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
+                this.$dialog
+                  .confirm({
+                    confirmButtonText: '确定拜访',
+                    cancelButtonText: '取消拜访',
+                    title: '系统提示',
+                    message:
+                      '该客户没有经纬度,此次拜访会保存定位点作为客户经纬度,下次拜访时判断是否偏差过大。',
+                    closeOnClickOverlay: true,
+                  })
+                  .then(() => {
+                    this.toSuishenbangOutstoreVisit(PointSumval);
+                  });
+              } else if (response.data.updateAddress == 1) {
+                // 同城AB+金牌,去修改地址
+                // addressUpdateTimesOver: true=已经达到最大次数,不让修改; false=没有达到可以修改
+                if (!response.data.addressUpdateTimesOver) {
+                  this.$dialog
+                    .confirm({
+                      title: '系统提示',
+                      message: response.msg + '请立即修改后再拜访',
+                      messageAlign: 'left',
+                      confirmButtonText: '立即修改',
+                      cancelButtonText: '取消',
+                    })
+                    .then(() => {
+                      this.$router.push({
+                        path: '/storeDetail',
+                        query: {
+                          id: this.activatStoreVal.storeId,
+                          type: 'address',
+                          storeAddressId: this.activatStoreVal.storeAddressId,
+                        },
+                      });
+                    });
+                } else {
+                  this.$dialog.confirm({
+                    title: '系统提示',
+                    message: '已经达到最大修改次数',
+                    messageAlign: 'left',
+                    confirmButtonText: '确定',
+                  });
+                }
+              } else if (response.data.updateAddress == 2) {
+                // 1.非金牌店铺,非同城店铺 位置偏差过大 重置经纬度
+                this.resetCoord(PointSumval);
+                return;
+              }
+            } else {
+              this.$dialog.confirm({
+                title: '系统提示',
+                message: response.msg,
+                showCancelButton: false,
+                confirmButtonText: '确定',
+              });
+            }
+          } else {
+            // 门店编码校验门店地址通过 进入拜访
+            this.toSuishenbangOutstoreVisit(PointSumval);
+          }
+        })
+        .catch((error) => {
+          this.clickIsFlage = true;
+        });
+    },
+    // 进入拜访
+    toSuishenbangOutstoreVisit(PointSumval) {
+      addVisitsPosition({
+        storeId: this.activatStoreVal.storeId,
+        visitsId: '',
+        lon: this.TXPiont.longitude,
+        lat: this.TXPiont.latitude,
+        sourceLon: this.TXisBD.lon,
+        sourceLat: this.TXisBD.lat,
+        positionDesc: '',
+        accuracy: this.TXPiont.accuracy,
+      });
+      this.clickIsFlage = true;
+      this.toastLoading().clear();
+      this.$router.push({
+        path: this.visitRoutePath,
+        query: {
+          storeId: this.activatStoreVal.storeId,
+          rdId: this.activatStoreVal.rdId,
+          lat: this.TXisBD.lat,
+          lon: this.TXisBD.lon,
+          visitId: this.activatStoreVal.visitId,
+          pageType: 'out',
+          addressLine: this.activatStoreVal.addressLine,
+          storeCategory: this.activatStoreVal.storeCategory,
+          storeName: this.activatStoreVal.storeName,
+          hisTime: this.activatStoreVal.hisTime,
+          contactName: this.activatStoreVal.contactName,
+          storeCode: this.activatStoreVal.storeCode,
+          tabVal: this.tabVal,
+          visitModel: '1',
+          latNew: this.TXisBD.lat,
+          lonNew: this.TXisBD.lon,
+          PointSum: PointSumval,
+          marklat: this.TXPiont.latitude,
+          marklon: this.TXPiont.longitude,
+          from: 'outPlan',
+        },
+      });
+    },
+    // 重置经纬度
+    resetCoord(PointSumval) {
+      this.$dialog
+        .confirm({
+          confirmButtonText: '初始化定位',
+          cancelButtonText: '取消拜访',
+          title: '系统提示',
+          message: '偏差过大,不允许拜访。可修改本店定位.',
+          closeOnClickOverlay: true,
+        })
+        .then(() => {
+          mobileReposition({
+            storeId: this.activatStoreVal.storeId,
+            lat: this.TXisBD.lat,
+            lon: this.TXisBD.lon,
+          }).then((response) => {
+            if (response.code == 200) {
+              this.$dialog
+                .alert({
+                  title: '系统提示',
+                  message: '本信息定位已更新成功!',
+                })
+                .then(() => {
+                  this.toSuishenbangOutstoreVisit(PointSumval);
+                });
+              localStorage.setItem('startTime', new Date());
+              localStorage.setItem('ORGName', this.activatStoreVal.deptName);
+              localStorage.setItem('chainNameR', this.activatStoreVal.storeName);
+            } else {
+              this.$toast(response.msg);
+            }
+          });
+        });
+    },
     onClickLeft() {
       this.$router.go(-1);
     },
@@ -150,7 +337,7 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.noVIsit {
+.noVisit {
   .content {
     padding: 8px 10px;
     .item {
@@ -217,7 +404,7 @@ export default {
 }
 </style>
 <style lang="scss">
-.noVIsit {
+.noVisit {
   .van-cell__title {
     font-size: 15px;
     font-weight: bold;
@@ -232,5 +419,10 @@ export default {
   .van-collapse-item__wrapper {
     border-top: 1px solid #dcdcdc;
   }
+  .van-collapse-item__title--expanded {
+    position: sticky;
+    top: 0px;
+    z-index: 10;
+  }
 }
 </style>

+ 21 - 5
src/views/home/hintTabPage/visitPage.vue

@@ -6,11 +6,13 @@
         <div class="temList" v-for="(list, ind) in item.visitDetail" :key="ind">
           <div class="itemLeft">
             <div class="label">{{ list.leftTable }}</div>
-            <div class="label">{{ resData[item.titleProp][list.leftProp] }}</div>
+            <div class="label">
+              {{ resData[item.titleProp][list.leftProp] }}
+            </div>
           </div>
           <div class="itemRight">
             <div class="label">{{ list.rightTable }}</div>
-            <div class="label" :style="labelStyle(list)" @click="onClick(item)">
+            <div class="label" :style="labelStyle(list)" @click="onClick(item, list)">
               {{ resData[item.titleProp][list.rightProp] }}{{ list.rightUnit }}
             </div>
           </div>
@@ -25,21 +27,26 @@
 export default {
   name: 'visitPage',
   props: {
+    // 折叠数据label
     contentData: {
       type: Array,
       default: [],
     },
+    // 遮罩层
     maskShow: {
       type: Boolean,
       default: false,
     },
+    // 接口返回折叠数据
     resData: {
       type: Object,
       default: () => {},
     },
+    // 用户等级
     empLevel: {
       type: String,
     },
+    // 来源类型 'noVisit':未拜访; 'createStore':建店;
     fromType: {
       type: String,
     },
@@ -55,10 +62,19 @@ export default {
       };
     },
     // 跳转详情
-    onClick(item) {
-      // 业务员进入未拜访列表
+    onClick(item, list) {
+      // 等级3(销售员):点击未拜访;进入未拜访列表(noVIsit);点击建店:进入我的-我的客户(storemanagementlist)
+      // 等级2或1(销售部主管和大区负责人):进入统页面(hintDetail)
       if (this.empLevel == '3') {
-        this.$router.push({ path: '/noVIsit', query: { activeName: item.titleProp } });
+        if (this.fromType == 'noVisit') {
+          // 进入未拜访列表(noVIsit)
+          this.$router.push({ path: '/noVisit', query: { activeName: item.titleProp } });
+        } else if (this.fromType == 'createStore') {
+          // 进入我的-我的客户(storemanagementlist)
+          // 1:未完工;2:未结案
+          let storeStatus = list.rightTable.indexOf('未完工') ? '1' : '2';
+          this.$router.push({ path: '/storemanagementlist', query: { storeStatus: storeStatus } });
+        }
       } else {
         // 销售部主管和大区负责人跳转统计页面
         this.$router.push({ path: '/hintDetail', query: { fromType: this.fromType } });