zhujindu 8 ay önce
ebeveyn
işleme
7c3296c620

+ 2 - 2
src/views/agentList/visitHistory.vue

@@ -73,8 +73,8 @@ export default {
       this.$router.push({
         path: '/visitHistoryDetail',
         query: {
-          id: item.id,
-          ...this.urlParameter,
+          visitId: item.id,
+          // ...this.urlParameter,
         },
       });
     },

+ 26 - 20
src/views/agentList/visitHistoryDetail.vue

@@ -18,20 +18,18 @@
       </template>
     </van-nav-bar>
     <!--        主体内容-->
-    <div class="container">
+    <div class="container" v-if="list">
       <div class="lineGrey"></div>
       <div class="card mt10">
         <div class="title">
-          {{ urlParameter.chainName }}(<span style="color: #1989fa">{{
-            urlParameter.chainCode
-          }}</span
+          {{ list.chainName }}(<span style="color: #1989fa">{{ list.chainCode }}</span
           >)
         </div>
-        <div class="info">身份类型:{{ urlParameter.typeName2 }}</div>
-        <div class="info">实际经营者:{{ urlParameter.customerManager }}</div>
-        <div class="info">开户日期:{{ formatCompactDate(urlParameter.openDate) }}</div>
-        <div class="info">是否冻结:{{ urlParameter.freeze }}</div>
-        <div class="info">是否关户:{{ urlParameter.close }}</div>
+        <div class="info">身份类型:{{ list.typeName2 }}</div>
+        <div class="info">实际经营者:{{ list.customerManager }}</div>
+        <div class="info">开户日期:{{ formatCompactDate(list.openDate) }}</div>
+        <div class="info">是否冻结:{{ list.freeze }}</div>
+        <div class="info">是否关户:{{ list.close }}</div>
       </div>
       <van-collapse
         v-model="active"
@@ -99,12 +97,8 @@
           </template>
         </van-cell>
       </van-cell-group> -->
-      <div
-        style="padding: 10px 16px; font-size: 16px; font-weight: bold"
-        v-if="managerRemarkContents == null && remarkShow">
-        点评
-      </div>
-      <div class="comment" v-if="managerRemarkContents == null && remarkShow">
+      <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">点评</div>
+      <div class="comment">
         <van-field
           v-model="dataform.remarkContent"
           rows="4"
@@ -146,13 +140,12 @@ export default {
       CWShow: false,
       dataform: {
         remarkContent: '',
-        visitsId: 0,
       },
       updateTimeShow: false,
       insert: true,
       remarkShow: false,
       ListHistoryList: [],
-      list: '',
+      list: null,
       urlParameter: null,
       imgs: '',
     };
@@ -231,7 +224,11 @@ export default {
       if (this.dataform.remarkContent.trim() == '') {
         this.$toast('请填写点评内容!');
       } else {
-        insertVisitRemark(this.dataform).then((res) => {
+        insertVisitRemark({
+          ...this.dataform,
+          visitsId: this.$route.query.visitId,
+          remarkType: '1',
+        }).then((res) => {
           if (res.code == 200) {
             this.getVisitsDetailFn();
           }
@@ -244,7 +241,7 @@ export default {
       });
     },
     getVisitsDetailFn() {
-      getVisitsDetail({ visitsId: this.urlParameter.id }).then((res) => {
+      getVisitsDetail({ visitsId: this.urlParameter.visitId }).then((res) => {
         if (res.code == 200) {
           this.list = res.data;
           if (res.data.visitSource != 2) {
@@ -290,7 +287,16 @@ export default {
     historiStoreVisit(val, index) {
       this.$router.push({
         path: '/visitedTaskDetail',
-        query: { ...this.urlParameter, activatedIndex: index, taskType: val.taskType },
+        query: {
+          taskType: val.taskType,
+          PhotoType: val.photoType,
+          visitId: this.list.id,
+          taskId: val.taskId,
+          chainId: val.chainsId,
+          storeGroupId: this.list.storeGroupId,
+          activatedIndex: index,
+          taskType: val.taskType,
+        },
       });
       sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
     },

+ 1 - 1
src/views/agentList/visitedTaskDetail.vue

@@ -305,7 +305,7 @@ export default {
     this.urlParameter = this.$route.query;
     this.taskType = this.$route.query.taskType;
     this.PhotoType = this.$route.query.photoType;
-    this.visitId = this.$route.query.id + '';
+    this.visitId = this.$route.query.visitId + '';
     this.taskId = this.$route.query.taskId + '';
     this.chainId = this.$route.query.chainId + '';
     this.storeGroupId = this.$route.query.storeGroupId + '';

+ 30 - 14
src/views/home/visitCollapse.vue

@@ -1,12 +1,15 @@
 <template>
   <div class="visitCollapse">
     <div class="visitCollapse-box" v-for="(item, index) in visitCollapse" :key="index">
-      <div class="targetName" :style="setTargetNameStyle(item.targetName)" v-if="item.targetName">
+      <div class="targetName" v-if="item.targetName">
         {{ item.targetName }}
       </div>
       <div class="child" v-if="item.children">
         <div :class="['children-item']" v-for="(item1, index1) in item.children" :key="index1">
-          <div class="child-targetName" v-if="item1.targetName">
+          <div
+            class="child-targetName"
+            :style="setTargetNameStyle(item1.targetName)"
+            v-if="item1.targetName">
             {{ item1.targetName }}
           </div>
           <template v-if="item1.children">
@@ -62,10 +65,18 @@ export default {
   methods: {
     setTargetNameStyle(targetName) {
       let style = {};
-      if (targetName == '片区经销商') {
-        style.background = '#bd3124';
-      } else if (targetName == '非片经销商') {
-        style.background = '#cba43f';
+      if (targetName == '涂料片区') {
+        style.background = '#84ccc9';
+      } else if (targetName == '厨卫片区') {
+        style.background = '#f6b37f';
+      } else if (targetName == '质感外墙片区') {
+        style.background = '#88abda';
+      } else if (targetName == 'SAF片区') {
+        style.background = '#ff6565';
+      } else if (targetName == '工业漆片区') {
+        style.background = '#7ecef4';
+      } else if (targetName == '粉料片区') {
+        style.background = '#f19ec2';
       }
       return style;
     },
@@ -87,28 +98,33 @@ export default {
 .visitCollapse {
   .visitCollapse-box {
     .targetName {
-      width: 120px;
-      padding: 8px 10px;
-      color: #fff;
       text-align: center;
       border-radius: 3px;
-      font-size: 16px;
+      font-size: 18px;
+      color: #000;
+      font-weight: 600;
     }
     .child {
       padding-top: 10px;
     }
     .children-item {
       .child-targetName {
-        padding-bottom: 5px;
-        font-weight: 600;
-        color: #000;
+        display: inline-block;
+        color: #fff;
+        padding: 3px 5px;
+        border-radius: 6px;
+        margin-bottom: 5px;
       }
       .target-box {
         overflow: hidden;
         padding-bottom: 8px;
         .target {
-          width: 30%;
+          width: 33%;
           float: left;
+          text-align: center;
+          &:first-child {
+            text-align: left !important;
+          }
           .target-value {
             padding-left: 10px;
           }

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

@@ -21,7 +21,7 @@
       </div>
       <div class="container">
         <van-cell-group inset class="mtb10">
-          <van-cell title="我的历史拜访" is-link to="/infoHistorVisit">
+          <van-cell title="历史拜访" is-link to="/infoHistorVisit">
             <template #icon>
               <van-icon :name="history" class="zicon" />
             </template>

+ 0 - 291
src/views/info/infoHistorVisit copy.vue

@@ -1,291 +0,0 @@
-<template>
-  <div class="bgcolor infoHistorVisit">
-    <div class="header">
-      <van-nav-bar class="navBar" title="经销商拜访" left-arrow @click-left="onClickLeft" />
-    </div>
-    <div class="container">
-      <van-list
-        class="myList1"
-        v-model="loading"
-        :finished="finished"
-        finished-text="没有更多了"
-        @load="onLoad">
-        <div v-if="list.length > 0">
-          <div class="cellcontent" v-for="(item, index) in list" :key="index">
-            <van-cell>
-              <div class="card" style="position: relative" @click="detilsFn(item)">
-                <span v-if="item.visitSource == 2" class="stateAbnormal">异常拜访</span>
-                <span v-if="item.visitSource == 1" class="state">正常拜访</span>
-                <div class="title">
-                  <span>{{ item.chainName }}</span> (<span style="color: #0057ba">{{
-                    item.chainCode
-                  }}</span
-                  >)
-                </div>
-                <div class="info">经销商类型:{{ item.typeName2 }}</div>
-                <div class="info">拜访人:{{ item.nickName }}</div>
-                <div class="info">拜访时间:{{ item.visitsTime }}</div>
-              </div>
-            </van-cell>
-            <div class="lineGrey"></div>
-          </div>
-        </div>
-      </van-list>
-    </div>
-  </div>
-</template>
-
-<script>
-import { myChainsVisits } from '@/api/info';
-
-export default {
-  name: 'infoHistorVisit',
-  data() {
-    return {
-      list: [],
-      loading: false,
-      finished: true,
-      pageNum: 1, // 当前页码  int类型
-      pageSize: 10, // 当前每页条数  int类型
-    };
-  },
-  created() {
-    this.pageNum = 1;
-    this.list = [];
-    this.powerGrade = localStorage.getItem('powerGrade');
-    this.getVisitsListFn();
-  },
-  methods: {
-    onLoad() {
-      this.getVisitsListFn();
-    },
-    detilsFn(val) {
-      this.$router.push({
-        path: '/visitHistoryDetail',
-        query: {
-          id: val.id,
-          typeName2: val.typeName2,
-          chainId: val.chainId,
-          customerManager: val.customerManager,
-          close: val.close,
-          freeze: val.freeze,
-          visitId: val.visitId,
-          chainName: val.chainName,
-          chainCode: val.chainCode,
-          openDate: val.openDate,
-        },
-      });
-    },
-    onClickLeft() {
-      this.$router.go(-1);
-    },
-    getVisitsListFn() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '数据获取中...',
-        forbidClick: true,
-      });
-      if (this.refreshing) {
-        this.list = [];
-        this.refreshing = false;
-      }
-      myChainsVisits({
-        pageNum: this.pageNum,
-        pageSize: this.pageSize,
-      }).then((res) => {
-        loading1.clear();
-        if (res.code == 200) {
-          this.loading = false;
-          this.list = this.list.concat(res.rows);
-          if (this.list.length >= res.total) {
-            this.finished = true;
-          } else {
-            this.finished = false;
-          }
-          this.pageNum = this.pageNum + 1;
-        } else {
-          this.$toast.fail(res.msg);
-        }
-      });
-    },
-  },
-};
-</script>
-<style lang="scss">
-.searchDiv {
-  .van-search {
-    background: #fff;
-  }
-  .van-search__action {
-    font-size: 14px;
-    color: #1989fa;
-    font-weight: bold;
-    background: #f5f5f5;
-    border-bottom-right-radius: 60px;
-    border-top-right-radius: 60px;
-    border: 1px solid #ccc;
-    padding: 0 20px;
-  }
-
-  .van-search--show-action {
-    padding-right: 12px;
-  }
-
-  .van-search__content {
-    border: 1px solid #ccc;
-    border-bottom-left-radius: 60px;
-    border-top-left-radius: 60px;
-    background: #f5f5f5;
-    border-right: 0;
-  }
-}
-
-.myList1 {
-  .van-cell {
-    padding: 10px 16px;
-
-    &:after {
-      border-bottom: none;
-    }
-  }
-}
-.historAllVisit {
-  .TCFXListItem {
-    display: inline-block;
-    border: 1px solid #ccc;
-    padding: 3px 5px;
-    margin: 0 5px;
-    border-radius: 6px;
-  }
-}
-</style>
-<style lang="scss" scoped>
-.infoHistorVisit {
-  height: 100%;
-  width: 100%;
-  display: flex;
-  flex-direction: column;
-  overflow: hidden;
-}
-.bgcolor {
-  background-color: #f5f5f5;
-}
-
-.container {
-  overflow-y: auto;
-  flex: 1;
-  padding-bottom: 10px;
-}
-
-.monthNow {
-  height: 34px;
-  line-height: 34px;
-  text-align: left;
-  font-weight: bold;
-  padding: 0 16px;
-  box-sizing: border-box;
-  background-color: #f1f1f1;
-  border-radius: 20px;
-  margin: 8px;
-  border: 1px solid #ccc;
-  position: relative;
-  color: #333;
-  font-size: 14px;
-  .van-cell__left-icon,
-  .van-cell__right-icon {
-    line-height: 34px;
-  }
-  .CalendarIcon {
-    float: right;
-    font-size: 24px;
-    color: #1989fa;
-    margin-top: 6px;
-    position: absolute;
-    right: 12px;
-    img {
-      height: 0.8em;
-    }
-  }
-}
-.serchInput {
-  padding: 0 4px;
-}
-.selectcell {
-  width: 92%;
-}
-.card {
-  box-sizing: border-box;
-
-  .title {
-    font-size: 16px;
-    font-weight: bold;
-    color: #333;
-    line-height: 30px;
-    width: 78%;
-  }
-
-  .info {
-    font-size: 14px;
-    color: #909090;
-    line-height: 26px;
-  }
-}
-
-/**/
-.searcTime {
-  background-color: white;
-}
-.btnbox {
-  padding: 0 16px;
-}
-.cellcontent .centerBtn {
-  margin: 0 auto 10px;
-  display: block;
-  width: 92%;
-  border-radius: 5px;
-}
-
-.statstext {
-  background-color: #1c84c6;
-  position: absolute;
-  right: 0;
-  top: 16px;
-  padding: 2px 6px 2px 12px;
-  border-bottom-left-radius: 60px;
-  border-top-left-radius: 60px;
-  color: #fff;
-}
-
-.stateAbnormal {
-  position: absolute;
-  right: 0;
-  top: 0;
-  color: #fff;
-  background-color: red;
-  border-radius: 5px;
-  display: inline-block;
-  padding: 0 5px;
-}
-
-.state {
-  position: absolute;
-  right: 0;
-  top: 0;
-  color: #fff;
-  background-color: #1c84c6;
-  border-radius: 5px;
-  display: inline-block;
-  padding: 0 5px;
-}
-
-.navBarTOP {
-  position: fixed;
-  width: 100%;
-  z-index: 2;
-  top: 0;
-}
-.cellcontent .textRight {
-  float: right;
-  color: #0057ba;
-}
-</style>

+ 9 - 10
src/views/info/infoHistorVisit.vue

@@ -286,16 +286,15 @@ export default {
       this.$router.push({
         path: '/visitHistoryDetail',
         query: {
-          id: val.id,
-          typeName2: val.typeName2,
-          chainId: val.chainId,
-          customerManager: val.customerManager,
-          close: val.close,
-          freeze: val.freeze,
-          visitId: val.visitId,
-          chainName: val.chainName,
-          chainCode: val.chainCode,
-          openDate: val.openDate,
+          visitId: val.id,
+          // typeName2: val.typeName2,
+          // chainId: val.chainId,
+          // customerManager: val.customerManager,
+          // close: val.close,
+          // freeze: val.freeze,
+          // chainName: val.chainName,
+          // chainCode: val.chainCode,
+          // openDate: val.openDate,
         },
       });
     },