ソースを参照

经销商拜访

zhujindu 9 ヶ月 前
コミット
a3e81ae263

+ 65 - 0
src/components/deleteUploadImg.vue

@@ -0,0 +1,65 @@
+<template>
+  <div>
+    <van-row gutter="10">
+      <van-col span="4" v-for="(urls, index) in imgs" :key="index">
+        <div class="img-box">
+          <img :src="urls.fileUrl" @click="previewsImg(index)" />
+        </div>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import { ImagePreview } from 'vant';
+
+export default {
+  name: 'deleteUploadImg',
+  props: {
+    imgs: {
+      type: Array,
+      default() {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {};
+  },
+  created() {
+    console.log(this.imgs);
+  },
+  methods: {
+    deleteImg(index) {
+      this.imgs.splice(index, 1);
+      this.$emit('delimg', this.imgs);
+    },
+    previewsImg(index) {
+      var arrimg = [];
+      for (var imgi = 0; imgi < this.imgs.length; imgi++) {
+        arrimg.push(this.imgs[imgi].fileUrl);
+      }
+      ImagePreview({
+        images: arrimg,
+        startPosition: index,
+      });
+    },
+  },
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style lang="scss" scoped>
+.img-box {
+  width: 100%;
+  height: 50px;
+  position: relative;
+  display: inline-block;
+  border-radius: 6px;
+  overflow: hidden;
+  img {
+    width: 100%;
+    height: 100%;
+  }
+}
+</style>

+ 8 - 0
src/router/index.js

@@ -56,6 +56,14 @@ const router = new VueRouter({
             title: '拜访历史',
           },
         },
+        {
+          path: '/visitHistoryDetail',
+          name: 'visitHistoryDetail',
+          component: () => import('@/views/home/visitHistoryDetail.vue'),
+          meta: {
+            title: '拜访历史详情',
+          },
+        },
       ],
     },
     {

+ 7 - 6
src/views/home/visitHistory.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- 拜访历史 -->
   <div class="visitHistory">
     <div class="headers">
       <van-nav-bar class="navBar" :title="$route.meta.title" left-arrow @click-left="onClickLeft" />
@@ -9,12 +10,14 @@
           {{ data.storeName }}(<span style="color: #0057ba">{{ data.storeCode }}</span
           >)
         </div>
-        <div class="info1">类型:{{ data.storeCategory }}</div>
-        <div class="info1">地址:{{ data.addressLine }}</div>
-        <div class="info1">上次拜访备注:{{ data.notes }}</div>
+        <div class="info">客户分类:{{ data.storeCategory }}</div>
+        <div class="info">实际经营者:{{ data.storeCategory }}</div>
+        <div class="info">开户日期:{{ data.storeCategory }}</div>
+        <div class="info">是否冻结:{{ data.storeCategory }}</div>
+        <div class="info">是否关户:{{ data.storeCategory }}</div>
       </div>
       <div style="color: #999; font-size: 12px; padding: 10px; background-color: #f5f5f5">
-        <van-icon name="info-o" />&nbsp;今天拜访拍照内容,将同步传给部主管查阅
+        <van-icon name="info-o" />&nbsp;历史拜访
       </div>
       <div class="card">
         <div
@@ -24,8 +27,6 @@
           @click="examineHistory(item, index)"></div>
       </div>
     </div>
-    <!-- 拜访历史详情 -->
-    <div class="visitHistoryDetail"></div>
   </div>
 </template>
 

+ 207 - 0
src/views/home/visitHistoryDetail.vue

@@ -0,0 +1,207 @@
+<template>
+  <!-- 拜访历史详情 -->
+  <div class="visitHistoryDetail">
+    <div class="headers">
+      <van-nav-bar class="navBar" :title="$route.meta.title" left-arrow @click-left="onClickLeft">
+      </van-nav-bar>
+    </div>
+    <div class="container">
+      <div class="lineGrey"></div>
+      <div class="card mt10">
+        <div class="title">
+          {{ list.storeName }}(<span style="color: #1989fa">{{ list.storeCode }}</span
+          >)
+        </div>
+        <div class="info">客户分类:{{ list.storeCategory }}</div>
+        <div class="info">实际经营者:{{ list.storeCategory }}</div>
+        <div class="info">开户日期:{{ list.storeCategory }}</div>
+        <div class="info">是否冻结:{{ list.storeCategory }}</div>
+        <div class="info">是否关户:{{ list.storeCategory }}</div>
+      </div>
+      <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">任务</div>
+      <div class="card" v-if="list.visitSource != 2">
+        <div
+          class="info"
+          style="line-height: 44px; font-size: 14px"
+          v-for="(item, index) in list.sfaTaskList"
+          :key="index"
+          @click="historiStoreVisit(item, index)">
+          <p
+            style="
+              width: 94%;
+              margin: 0;
+              line-height: 24px;
+              padding: 10px 0;
+              display: inline-block;
+            ">
+            {{ item.taskName }}
+          </p>
+          <p class="arrowdetils1">
+            <van-icon name="arrow" />
+          </p>
+        </div>
+      </div>
+
+      <!-- <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">更多记录</div>
+      <van-cell-group>
+        <van-cell v-for="(item1, index1) in list.visitsMore" :key="index1">
+          <template #title>
+            <van-row>
+              <van-col span="6">拜访人:</van-col>
+              <van-col span="18" class="custom-titles">{{ item1.userName }}</van-col>
+            </van-row>
+          </template>
+          <template #right-icon>
+            <span>{{ item1.visitTime }}</span>
+          </template>
+        </van-cell>
+      </van-cell-group> -->
+    </div>
+  </div>
+</template>
+
+<script>
+import deleteUploadImg from '@/components/deleteUploadImg';
+import {
+  getVisitsDetail,
+  getPhotoTypeList1,
+  insertVisitRemark,
+  getCollectionShowHistory,
+} from '@/api/index';
+
+export default {
+  components: { deleteUploadImg },
+  data() {
+    return {
+      userShow: false,
+      visitsId: '',
+      imgs: '',
+      typeList: [],
+      sameDay: false,
+      ListHistoryTOTLE: '',
+      managerRemarkContent: '',
+      CWShow: false,
+      updateTimeShow: false,
+      insert: true,
+      list: '',
+    };
+  },
+  created() {
+    this.visitsId = this.$route.query.visitId;
+    this.getVisitsDetailFn();
+    this.getPhotoTypeList();
+  },
+  methods: {
+    getPhotoTypeList() {
+      getPhotoTypeList1({}).then((res) => {
+        this.typeList = res.data;
+      });
+    },
+    getVisitsDetailFn() {
+      getVisitsDetail({ visitsId: this.visitsId }).then((res) => {
+        if (res.code == 200) {
+          this.list = res.data;
+          if (res.data.stopTime != res.data.updateTime) {
+            this.updateTimeShow = true;
+          } else {
+            this.updateTimeShow = false;
+          }
+          if (localStorage.getItem('userId') == this.$route.query.userId) {
+            this.userShow = true;
+          } else {
+            this.userShow = false;
+          }
+          if (this.$route.query.taskId != null) {
+            this.CWShow = true;
+          } else {
+            this.CWShow = false;
+          }
+          this.sameDay = res.data.sameDay;
+
+          if (res.data.visitSource == 2) {
+            this.imgs = res.data.sysFileInfos;
+          }
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    historiStoreVisit(val, index) {
+      this.$router.push({
+        path: '/historiStoreVisit',
+        query: { visitId: this.visitsId, ids: index, taskType: val.taskType },
+      });
+      sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
+    },
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.visitHistoryDetail {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+  .container {
+    overflow-y: auto;
+    flex: 1;
+    margin-bottom: 10px;
+    background-color: white;
+    .custom-titles {
+      white-space: break-spaces;
+    }
+    .card {
+      background: #fff;
+      padding: 10px 15px;
+      box-sizing: border-box;
+      .title {
+        line-height: 30px;
+        font-size: 16px;
+        font-weight: bold;
+        color: #333;
+      }
+      .subtitle {
+        line-height: 24px;
+        font-size: 14px;
+        color: #7b7b7b;
+      }
+      .info {
+        font-size: 16px;
+        color: #484848;
+        line-height: 40px;
+        border-bottom: 1px solid #dedede;
+        position: relative;
+        &:last-child {
+          border-bottom: 0;
+        }
+        .arrow {
+          float: right;
+          display: inline-block;
+          height: 20px;
+          width: 20px;
+          line-height: 20px;
+          text-align: center;
+          border-radius: 50%;
+          background: #1989fa;
+          color: #fff;
+          font-weight: bold;
+          font-size: 14px;
+          margin-top: 9px;
+        }
+        .arrowdetils1 {
+          background: #fff;
+          position: absolute;
+          top: 50%;
+          color: #444;
+          right: 0;
+          margin-top: -22px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 11 - 1
src/views/home/visitPage.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- 拜访详情 -->
   <div class="visitPage">
     <div class="headers">
       <van-nav-bar class="navBar" :title="$route.meta.title" left-arrow @click-left="onClickLeft" />
@@ -17,7 +18,7 @@
           <span v-if="urlParameter.hisTime">
             上次拜访时间:{{ parseTime(urlParameter.hisTime) }}
           </span>
-          <span @click="shows = true" class="f-blue" v-if="visitsRemarks" style="font-weight: bold">
+          <span @click="openVisitHistory" class="f-blue" style="font-weight: bold">
             <van-icon :name="require('@/assets/icon/history.png')" />
             历史拜访记录
           </span>
@@ -581,6 +582,15 @@ export default {
         },
       });
     },
+    // 打开历史拜访
+    openVisitHistory() {
+      this.$router.push({
+        name: 'visitHistory',
+        query: {
+          storeId: this.storeId,
+        },
+      });
+    },
   },
   destroyed() {
     this.timeN = null;

+ 1 - 0
src/views/home/visitTask.vue

@@ -1,4 +1,5 @@
 <template>
+  <!-- 拜访任务 -->
   <div class="visitTask">
     <div class="headers">
       <van-nav-bar class="navBar" left-arrow :title="$route.meta.title" @click-left="onClickLeft">