Преглед на файлове

feature_20250805_拜访页面优化

zhujindu преди 4 месеца
родител
ревизия
6630d2ff7f
променени са 4 файла, в които са добавени 228 реда и са изтрити 69 реда
  1. 1 1
      src/views/deviceOutside/index.vue
  2. 82 26
      src/views/deviceOutside/suishenbangOutstoreVisit.vue
  3. 22 2
      src/views/deviceWithin/index.vue
  4. 123 40
      src/views/deviceWithin/storeVisit.vue

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

@@ -908,7 +908,7 @@ export default {
     linkList(val) {
       this.$router.push({
         path: '/pItem',
-        query: { id: val.storeId, detilId: 'a', from: 'outPlan',storeCode: val.storeCode },
+        query: { id: val.storeId, detilId: 'a', from: 'outPlan', storeCode: val.storeCode },
       });
     },
     linkimg(val) {

+ 82 - 26
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -13,8 +13,18 @@
       <div class="lineGrey"></div>
       <div class="card mt10">
         <div class="title f-blue">
-          {{ storeName }}(<span style="color: #0057ba">{{ urlParameter.storeCode }}</span
-          >)
+          <span
+            @click="goOtherSystem"
+            :class="{
+              'to-other-system': isToOtherSystem,
+            }">
+            {{ storeName }}
+            (
+            <span style="color: #0057ba">
+              {{ urlParameter.storeCode }}
+            </span>
+            )
+          </span>
         </div>
         <div class="info1 storeCategory" v-if="addressLine != null">
           <div class="storeType">类型:{{ storeCategory }}</div>
@@ -31,26 +41,16 @@
         <div class="info1" v-if="addressLine != 'null'">地址:{{ addressLine }}</div>
         <div class="info1" v-if="notes != null">上次拜访备注:{{ notes }}</div>
         <div class="info1">拜访时长:{{ showTime }}</div>
-        <div class="info1">
-          <span v-if="urlParameter.hisTime"
-            >上次拜访时间:{{ parseTime(urlParameter.hisTime) }}</span
-          ><span @click="shows = true" class="f-blue" v-if="visitsRemarks" style="font-weight: bold"
-            ><van-icon name="browsing-history-o" />查看最近三次</span
-          >
+        <div class="info1" v-if="urlParameter.hisTime">
+          上次拜访时间:{{ parseTime(urlParameter.hisTime) }}
         </div>
-        <div class="btnBox">
-          <!-- <van-button
-          type="info"
-          style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
-          size="small"
-          plain
-          class="centerBtn"
-          @click="visitFn(urlParameter.storeCode)">
-          经营情况
-        </van-button> -->
+        <div class="info1 visitsRemarks" v-if="visitsRemarks">
+          <span @click="shows = true" class="f-blue" style="font-weight: bold">
+            <van-icon name="browsing-history-o" />查看最近三次
+          </span>
           <van-button
             type="info"
-            style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
+            style="background: rgb(0, 87, 186); color: #fff; border-radius: 5px; width: 55px"
             size="small"
             plain
             v-if="showOrderButton"
@@ -58,7 +58,17 @@
             @click="overbookingFn(urlParameter)">
             去下单
           </van-button>
-          <!-- <van-button
+        </div>
+        <!-- <van-button
+          type="info"
+          style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
+          size="small"
+          plain
+          class="centerBtn"
+          @click="visitFn(urlParameter.storeCode)">
+          经营情况
+        </van-button> -->
+        <!-- <van-button
           type="info"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
           size="small"
@@ -67,7 +77,6 @@
           @click="wuliaoLog(urlParameter)">
           物料历史
         </van-button> -->
-        </div>
       </div>
       <div
         v-if="addShow1"
@@ -198,6 +207,7 @@ export default {
       timeN: null,
       wuliaoTable: false,
       wuliaoList: [],
+      isToOtherSystem: false,
     };
   },
   created() {},
@@ -230,6 +240,7 @@ export default {
     this.visitModel = this.$route.query.visitModel + '';
     this.uType = localStorage.getItem('uType');
     this.list = [];
+    this.isToOtherSystem = false;
     if (localStorage.getItem('visitId') != null) {
       this.visitId = localStorage.getItem('visitId');
       setTimeout(() => {
@@ -269,6 +280,13 @@ export default {
           message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
         })
         .then(() => {
+          buryingPoint({
+            systemModel: '拜访页',
+            buryingPointType: 1,
+            buryingPointValue: this.storeName + '(' + this.storeCode + ')',
+            buryingPointName: '取消拜访',
+            buryingPointPosition: '拜访页',
+          });
           stopVisit({ visitsId: this.visitId }).then((res) => {
             if (res.code == 200) {
               localStorage.removeItem('visitId');
@@ -499,7 +517,6 @@ export default {
           getVisitTasks(params).then((res) => {
             loading2.clear();
             if (res.code == 200) {
-              debugger;
               localStorage.setItem('visitId', res.data.visitId);
               that.notes = res.data.notes;
               that.visitId = res.data.visitId;
@@ -509,6 +526,16 @@ export default {
               that.startTime = res.data.startTime;
               that.timeN = setInterval(that.animation, 16);
               that.visitsRemarks = res.data.visitsRemarks;
+              let sfaStoreType = res.data.sfaStoreType;
+              if (
+                (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
+                res.data.approvalStatus == null ||
+                res.data.approvalStatus == 0
+              ) {
+                that.isToOtherSystem = false;
+              } else {
+                that.isToOtherSystem = true;
+              }
             } else {
               that.$toast(res.msg);
             }
@@ -553,6 +580,16 @@ export default {
               that.timeN = setInterval(that.animation, 16);
               that.visitsRemarks = res.data.visitsRemarks;
               console.log(that.visitId);
+              let sfaStoreType = res.data.sfaStoreType;
+              if (
+                (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
+                res.data.approvalStatus == null ||
+                res.data.approvalStatus == 0
+              ) {
+                that.isToOtherSystem = false;
+              } else {
+                that.isToOtherSystem = true;
+              }
             } else {
               that.$toast(res.msg);
             }
@@ -718,6 +755,14 @@ export default {
     wuliaoTableClose() {
       this.wuliaoTable = false;
     },
+    // 跳转好帮手门店详情
+    goOtherSystem() {
+      if (this.isToOtherSystem) {
+        if (this.storeCode)
+          window.location.href =
+            process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + this.storeCode;
+      }
+    },
   },
   destroyed() {
     this.timeN = null;
@@ -902,16 +947,27 @@ export default {
   color: #0057ba;
 }
 .suishenbangOutstoreVisit {
+  .to-other-system {
+    color: #0057ba;
+    text-decoration: underline;
+  }
   .storeCategory {
-    position: relative;
     display: flex;
-    text-align: center;
     justify-content: space-between;
     .storeType {
+      flex: 1;
+      display: flex;
+      align-items: center;
     }
   }
-  .btnBox {
-    text-align: right;
+  .visitsRemarks {
+    display: flex;
+    justify-content: space-between;
+    .f-blue {
+      flex: 1;
+      display: flex;
+      align-items: center;
+    }
   }
 }
 </style>

+ 22 - 2
src/views/deviceWithin/index.vue

@@ -77,9 +77,9 @@
                   :src="require('@/assets/Icon/storeE.png')"
                   v-if="item.storeLabels.storeE" />
               </template>
-              <span @click="goOtherSystem(item)" style="color: #0057ba; text-decoration: underline">
+              <span @click="goOtherSystem(item)" :style="setStroeNameStyle(item)">
                 <span>{{ item.storeName }}</span>
-                (<span style="color: #0057ba">{{ item.storeCode }}</span
+                (<span>{{ item.storeCode }}</span
                 >)
               </span>
               <span class="btn" :data-clipboard-text="item.storeCode">
@@ -1479,8 +1479,28 @@ export default {
     listClick(val) {
       this.listActive = val;
     },
+    setStroeNameStyle(item) {
+      // 家装或工装 approvalStatus:是否结案 0:未结案,1:已结案
+      if (
+        (item.sfaStoreType && (item.sfaStoreType.jz || item.sfaStoreType.gz)) ||
+        item.approvalStatus == null ||
+        item.approvalStatus == 0
+      ) {
+        return {};
+      } else {
+        return { color: '#0057ba', 'text-decoration': 'underline' };
+      }
+    },
     // 跳转好帮手门店详情
     goOtherSystem(item) {
+      // 家装或工装 approvalStatus:是否结案 0:未结案,1:已结案
+      if (
+        (item.sfaStoreType && (item.sfaStoreType.jz || item.sfaStoreType.gz)) ||
+        item.approvalStatus == null ||
+        item.approvalStatus == 0
+      ) {
+        return false;
+      }
       if (item.storeCode) {
         window.location.href =
           process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + item.storeCode;

+ 123 - 40
src/views/deviceWithin/storeVisit.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="storeVisit">
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft"></van-nav-bar>
     </div>
@@ -11,20 +11,52 @@
       <div class="lineGrey"></div>
       <div class="card mt10">
         <div class="title f-blue">
-          {{ storeName }}(<span style="color: #0057ba">{{ urlParameter.storeCode }}</span
-          >)
+          <span
+            @click="goOtherSystem"
+            :class="{
+              'to-other-system': isToOtherSystem,
+            }">
+            {{ storeName }}
+            (
+            <span style="color: #0057ba">
+              {{ urlParameter.storeCode }}
+            </span>
+            )
+          </span>
+        </div>
+        <div class="info1 storeCategory" v-if="insert">
+          <div class="storeType">类型:{{ storeCategory }}</div>
+          <van-button
+            type="info"
+            style="background: #ed5565; border-color: #ed5565; color: #fff; border-radius: 5px"
+            size="small"
+            plain
+            class="centerBtn"
+            @click="onstopVisit">
+            取消拜访
+          </van-button>
         </div>
-        <div class="info1" v-if="insert">类型:{{ storeCategory }}</div>
         <div class="info1" v-if="addressLine != null">地址:{{ addressLine }}</div>
         <div class="info1" v-if="notes != null && insert">上次拜访备注:{{ notes }}</div>
         <div class="info1" v-if="timeShow">拜访时长:{{ showTime }}</div>
-        <div class="info1">
-          <span v-if="insert">上次拜访时间:{{ parseTime(urlParameter.genDate) }}</span
-          ><span @click="shows = true" class="f-blue" v-if="visitsRemarks" style="font-weight: bold"
-            ><van-icon name="browsing-history-o" />查看最近三次</span
-          >
+        <div class="info1" v-if="insert">上次拜访时间:{{ parseTime(urlParameter.genDate) }}</div>
+        <div class="info1 visitsRemarks" v-if="visitsRemarks">
+          <span @click="shows = true" class="f-blue" style="font-weight: bold">
+            <van-icon name="browsing-history-o" />查看最近三次
+          </span>
+          <van-button
+            type="info"
+            style="background: rgb(0, 87, 186); color: #fff; border-radius: 5px"
+            size="small"
+            plain
+            v-if="showOrderButton"
+            class="centerBtn"
+            @click="overbookingFn(urlParameter)">
+            去下单
+          </van-button>
         </div>
-        <van-button
+        <div class="btnBox">
+          <!-- <van-button
           type="info"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
           size="small"
@@ -32,18 +64,8 @@
           class="centerBtn"
           @click="visitFn(urlParameter.storeCode)"
           >经营情况</van-button
-        >
-        <van-button
-          type="info"
-          style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
-          size="small"
-          plain
-          v-if="showOrderButton"
-          class="centerBtn"
-          @click="overbookingFn(urlParameter)"
-          >去下单</van-button
-        >
-        <van-button
+        > -->
+          <!-- <van-button
           type="info"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
           size="small"
@@ -51,24 +73,8 @@
           class="centerBtn"
           @click="wuliaoLog(urlParameter)"
           >物料历史</van-button
-        >
-        <van-button
-          v-if="insert"
-          type="info"
-          style="
-            float: right;
-            background: #ed5565;
-            border-color: #ed5565;
-            color: #fff;
-            margin: 10px 0;
-            border-radius: 5px;
-          "
-          size="small"
-          plain
-          class="centerBtn"
-          @click="onstopVisit"
-          >取消拜访</van-button
-        >
+        > -->
+        </div>
       </div>
       <div
         v-if="addShow1"
@@ -214,6 +220,7 @@ export default {
       wuliaoTable: false,
       wuliaoList: [],
       urlParameter: {},
+      isToOtherSystem: false,
     };
   },
   created() {
@@ -257,6 +264,7 @@ export default {
     // this.list = [];
     this.uType = localStorage.getItem('uType');
     this.list = [];
+    this.isToOtherSystem = false;
     if (this.$route.query.type != 'edit') {
       this.timeShow = true;
       if (localStorage.getItem('visitId') != null) {
@@ -464,6 +472,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
+                let sfaStoreType = res.data.sfaStoreType;
+                if (
+                  (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
+                  res.data.approvalStatus == null ||
+                  res.data.approvalStatus == 0
+                ) {
+                  that.isToOtherSystem = false;
+                } else {
+                  that.isToOtherSystem = true;
+                }
               }
             });
           } else {
@@ -512,6 +530,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
+                let sfaStoreType = res.data.sfaStoreType;
+                if (
+                  (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
+                  res.data.approvalStatus == null ||
+                  res.data.approvalStatus == 0
+                ) {
+                  that.isToOtherSystem = false;
+                } else {
+                  that.isToOtherSystem = true;
+                }
               } else {
                 this.$toast(res.msg);
               }
@@ -562,6 +590,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
+                let sfaStoreType = res.data.sfaStoreType;
+                if (
+                  (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
+                  res.data.approvalStatus == null ||
+                  res.data.approvalStatus == 0
+                ) {
+                  that.isToOtherSystem = false;
+                } else {
+                  that.isToOtherSystem = true;
+                }
               } else {
                 that.$toast(res.msg);
               }
@@ -609,6 +647,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
+                let sfaStoreType = res.data.sfaStoreType;
+                if (
+                  (sfaStoreType && (sfaStoreType.jz || sfaStoreType.gz)) ||
+                  res.data.approvalStatus == null ||
+                  res.data.approvalStatus == 0
+                ) {
+                  that.isToOtherSystem = false;
+                } else {
+                  that.isToOtherSystem = true;
+                }
               } else {
                 that.$toast(res.msg);
               }
@@ -852,6 +900,16 @@ export default {
         }
       }
     },
+    // 跳转好帮手门店详情
+    goOtherSystem() {
+      if (this.isToOtherSystem) {
+        if (this.urlParameter.storeCode)
+          window.location.href =
+            process.env.VUE_APP_SSB_LINK +
+            '/order/storeDetail/index?shopCode=' +
+            this.urlParameter.storeCode;
+      }
+    },
   },
 };
 </script>
@@ -900,6 +958,7 @@ export default {
     line-height: 18px;
     padding: 4px 0;
     position: relative;
+    line-height: 22px;
     .arrow {
       float: right;
       display: inline-block;
@@ -937,6 +996,30 @@ export default {
 .card .f-blue {
   color: #0057ba;
 }
+.storeVisit {
+  .to-other-system {
+    color: #0057ba;
+    text-decoration: underline;
+  }
+  .storeCategory {
+    display: flex;
+    justify-content: space-between;
+    .storeType {
+      flex: 1;
+      display: flex;
+      align-items: center;
+    }
+  }
+  .visitsRemarks {
+    display: flex;
+    justify-content: space-between;
+    .f-blue {
+      flex: 1;
+      display: flex;
+      align-items: center;
+    }
+  }
+}
 </style>
 <style lang="scss">
 .van-dialog__confirm,