Browse Source

Merge branch 'feature_20250805_拜访页面优化' into uat(dev)

# Conflicts:
#	src/views/deviceOutside/index.vue
zhujindu 4 months ago
parent
commit
c29bd4d120

+ 112 - 45
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div>
+  <div class="suishenbangOutstoreVisit">
     <!--        顶部条-->
     <!--        顶部条-->
     <div class="navBarTOP">
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft" />
       <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft" />
@@ -13,64 +13,70 @@
       <div class="lineGrey"></div>
       <div class="lineGrey"></div>
       <div class="card mt10">
       <div class="card mt10">
         <div class="title f-blue">
         <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>
+          <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>
-        <div class="info1" v-if="addressLine != null">类型:{{ storeCategory }}</div>
         <div class="info1" v-if="addressLine != 'null'">地址:{{ addressLine }}</div>
         <div class="info1" v-if="addressLine != 'null'">地址:{{ addressLine }}</div>
         <div class="info1" v-if="notes != null">上次拜访备注:{{ notes }}</div>
         <div class="info1" v-if="notes != null">上次拜访备注:{{ notes }}</div>
         <div class="info1">拜访时长:{{ showTime }}</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>
-        <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; border-radius: 5px; width: 55px"
+            size="small"
+            plain
+            v-if="showOrderButton"
+            class="centerBtn"
+            @click="overbookingFn(urlParameter)">
+            去下单
+          </van-button>
+        </div>
+        <!-- <van-button
           type="info"
           type="info"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
           size="small"
           size="small"
           plain
           plain
           class="centerBtn"
           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
+          @click="visitFn(urlParameter.storeCode)">
+          经营情况
+        </van-button> -->
+        <!-- <van-button
           type="info"
           type="info"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
           size="small"
           size="small"
           plain
           plain
           class="centerBtn"
           class="centerBtn"
-          @click="wuliaoLog(urlParameter)"
-          >物料历史</van-button
-        >
-        <van-button
-          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
-        >
+          @click="wuliaoLog(urlParameter)">
+          物料历史
+        </van-button> -->
       </div>
       </div>
       <div v-if="addShow1" style="padding: 10px; background-color: #f5f5f5">
       <div v-if="addShow1" style="padding: 10px; background-color: #f5f5f5">
         <!-- <van-icon name="info-o" /> -->
         <!-- <van-icon name="info-o" /> -->
@@ -207,6 +213,7 @@ export default {
       timeN: null,
       timeN: null,
       wuliaoTable: false,
       wuliaoTable: false,
       wuliaoList: [],
       wuliaoList: [],
+      isToOtherSystem: false,
     };
     };
   },
   },
   created() {},
   created() {},
@@ -239,6 +246,7 @@ export default {
     this.visitModel = this.$route.query.visitModel + '';
     this.visitModel = this.$route.query.visitModel + '';
     this.uType = localStorage.getItem('uType');
     this.uType = localStorage.getItem('uType');
     this.list = [];
     this.list = [];
+    this.isToOtherSystem = false;
     if (localStorage.getItem('visitId') != null) {
     if (localStorage.getItem('visitId') != null) {
       this.visitId = localStorage.getItem('visitId');
       this.visitId = localStorage.getItem('visitId');
       setTimeout(() => {
       setTimeout(() => {
@@ -278,6 +286,13 @@ export default {
           message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
           message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
         })
         })
         .then(() => {
         .then(() => {
+          buryingPoint({
+            systemModel: '拜访页',
+            buryingPointType: 1,
+            buryingPointValue: this.storeName + '(' + this.storeCode + ')',
+            buryingPointName: '取消拜访',
+            buryingPointPosition: '拜访页',
+          });
           stopVisit({ visitsId: this.visitId }).then((res) => {
           stopVisit({ visitsId: this.visitId }).then((res) => {
             if (res.code == 200) {
             if (res.code == 200) {
               localStorage.removeItem('visitId');
               localStorage.removeItem('visitId');
@@ -508,7 +523,6 @@ export default {
           getVisitTasks(params).then((res) => {
           getVisitTasks(params).then((res) => {
             loading2.clear();
             loading2.clear();
             if (res.code == 200) {
             if (res.code == 200) {
-              debugger;
               localStorage.setItem('visitId', res.data.visitId);
               localStorage.setItem('visitId', res.data.visitId);
               that.notes = res.data.notes;
               that.notes = res.data.notes;
               that.visitId = res.data.visitId;
               that.visitId = res.data.visitId;
@@ -518,6 +532,16 @@ export default {
               that.startTime = res.data.startTime;
               that.startTime = res.data.startTime;
               that.timeN = setInterval(that.animation, 16);
               that.timeN = setInterval(that.animation, 16);
               that.visitsRemarks = res.data.visitsRemarks;
               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 {
             } else {
               that.$toast(res.msg);
               that.$toast(res.msg);
             }
             }
@@ -562,6 +586,16 @@ export default {
               that.timeN = setInterval(that.animation, 16);
               that.timeN = setInterval(that.animation, 16);
               that.visitsRemarks = res.data.visitsRemarks;
               that.visitsRemarks = res.data.visitsRemarks;
               console.log(that.visitId);
               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 {
             } else {
               that.$toast(res.msg);
               that.$toast(res.msg);
             }
             }
@@ -727,6 +761,14 @@ export default {
     wuliaoTableClose() {
     wuliaoTableClose() {
       this.wuliaoTable = false;
       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() {
   destroyed() {
     this.timeN = null;
     this.timeN = null;
@@ -791,6 +833,7 @@ export default {
     line-height: 18px;
     line-height: 18px;
     padding: 4px 0;
     padding: 4px 0;
     position: relative;
     position: relative;
+    line-height: 24px;
     .arrow {
     .arrow {
       float: right;
       float: right;
       display: inline-block;
       display: inline-block;
@@ -909,6 +952,30 @@ export default {
 .card .f-blue {
 .card .f-blue {
   color: #0057ba;
   color: #0057ba;
 }
 }
+.suishenbangOutstoreVisit {
+  .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>
 <style lang="scss">
 <style lang="scss">
 .navBarOverlay .van-nav-bar__left .van-icon {
 .navBarOverlay .van-nav-bar__left .van-icon {

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

@@ -77,9 +77,9 @@
                   :src="require('@/assets/Icon/storeE.png')"
                   :src="require('@/assets/Icon/storeE.png')"
                   v-if="item.storeLabels.storeE" />
                   v-if="item.storeLabels.storeE" />
               </template>
               </template>
-              <span @click="goOtherSystem(item)" style="color: #0057ba; text-decoration: underline">
+              <span @click="goOtherSystem(item)" :style="setStroeNameStyle(item)">
                 <span>{{ item.storeName }}</span>
                 <span>{{ item.storeName }}</span>
-                (<span style="color: #0057ba">{{ item.storeCode }}</span
+                (<span>{{ item.storeCode }}</span
                 >)
                 >)
               </span>
               </span>
               <span class="btn" :data-clipboard-text="item.storeCode">
               <span class="btn" :data-clipboard-text="item.storeCode">
@@ -1490,8 +1490,28 @@ export default {
     listClick(val) {
     listClick(val) {
       this.listActive = 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) {
     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) {
       if (item.storeCode) {
         window.location.href =
         window.location.href =
           process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + item.storeCode;
           process.env.VUE_APP_SSB_LINK + '/order/storeDetail/index?shopCode=' + item.storeCode;

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

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <div>
+  <div class="storeVisit">
     <div class="navBarTOP">
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft"></van-nav-bar>
       <van-nav-bar class="navBar" title="拜访" left-arrow @click-left="onClickLeft"></van-nav-bar>
     </div>
     </div>
@@ -11,20 +11,52 @@
       <div class="lineGrey"></div>
       <div class="lineGrey"></div>
       <div class="card mt10">
       <div class="card mt10">
         <div class="title f-blue">
         <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>
-        <div class="info1" v-if="insert">类型:{{ storeCategory }}</div>
         <div class="info1" v-if="addressLine != null">地址:{{ addressLine }}</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="notes != null && insert">上次拜访备注:{{ notes }}</div>
         <div class="info1" v-if="timeShow">拜访时长:{{ showTime }}</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>
         </div>
-        <van-button
+        <div class="btnBox">
+          <!-- <van-button
           type="info"
           type="info"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px 0; border-radius: 5px"
           size="small"
           size="small"
@@ -32,18 +64,8 @@
           class="centerBtn"
           class="centerBtn"
           @click="visitFn(urlParameter.storeCode)"
           @click="visitFn(urlParameter.storeCode)"
           >经营情况</van-button
           >经营情况</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"
           type="info"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
           style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
           size="small"
           size="small"
@@ -51,24 +73,8 @@
           class="centerBtn"
           class="centerBtn"
           @click="wuliaoLog(urlParameter)"
           @click="wuliaoLog(urlParameter)"
           >物料历史</van-button
           >物料历史</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>
       <div v-if="addShow1" style="padding: 10px; background-color: #f5f5f5">
       <div v-if="addShow1" style="padding: 10px; background-color: #f5f5f5">
         <!-- <van-icon name="info-o" /> -->
         <!-- <van-icon name="info-o" /> -->
@@ -220,6 +226,7 @@ export default {
       wuliaoTable: false,
       wuliaoTable: false,
       wuliaoList: [],
       wuliaoList: [],
       urlParameter: {},
       urlParameter: {},
+      isToOtherSystem: false,
     };
     };
   },
   },
   created() {
   created() {
@@ -263,6 +270,7 @@ export default {
     // this.list = [];
     // this.list = [];
     this.uType = localStorage.getItem('uType');
     this.uType = localStorage.getItem('uType');
     this.list = [];
     this.list = [];
+    this.isToOtherSystem = false;
     if (this.$route.query.type != 'edit') {
     if (this.$route.query.type != 'edit') {
       this.timeShow = true;
       this.timeShow = true;
       if (localStorage.getItem('visitId') != null) {
       if (localStorage.getItem('visitId') != null) {
@@ -470,6 +478,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
                 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 {
           } else {
@@ -518,6 +536,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
                 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 {
               } else {
                 this.$toast(res.msg);
                 this.$toast(res.msg);
               }
               }
@@ -568,6 +596,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
                 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 {
               } else {
                 that.$toast(res.msg);
                 that.$toast(res.msg);
               }
               }
@@ -615,6 +653,16 @@ export default {
                 that.startTime = res.data.startTime;
                 that.startTime = res.data.startTime;
                 that.timeN = setInterval(that.animation, 16);
                 that.timeN = setInterval(that.animation, 16);
                 that.visitsRemarks = res.data.visitsRemarks;
                 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 {
               } else {
                 that.$toast(res.msg);
                 that.$toast(res.msg);
               }
               }
@@ -858,6 +906,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>
 </script>
@@ -906,6 +964,7 @@ export default {
     line-height: 18px;
     line-height: 18px;
     padding: 4px 0;
     padding: 4px 0;
     position: relative;
     position: relative;
+    line-height: 22px;
     .arrow {
     .arrow {
       float: right;
       float: right;
       display: inline-block;
       display: inline-block;
@@ -943,6 +1002,30 @@ export default {
 .card .f-blue {
 .card .f-blue {
   color: #0057ba;
   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>
 <style lang="scss">
 <style lang="scss">
 .van-dialog__confirm,
 .van-dialog__confirm,