result.vue 3.17 KB
<template>
  <div class="result-container">
    <scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
      <template v-if="getCustomerFollow&&getCustomerFollow.length>0">
        <div class="result-container-content">
          <template v-for="(item, i) in getCustomerFollow">
            <div :key="i" class="result-container-content-item">
              <div class="title-info text-hide">{{ item.groupName }}</div>
              <div class="result-content flex-between">
                <div class="result-content-list flex-top" @click="goto('solicit.succeed', 2, item.groupId, item.groupName)">
                  <div class="sprite-icon icon-succeed"></div>
                  <div class="m-l-8">
                    <div class="font-14 color-3 fw5 line-22">成功到店</div>
                    <div class="font-12 color-2f m-t-4">客户:{{ item.successCustomerNums }}人</div>
                  </div>
                </div>
                <div class="result-content-list flex-top" @click="goto('solicit.succeed', 1, item.groupId, item.groupName)">
                  <div class="sprite-icon icon-fail"></div>
                  <div class="m-l-8">
                    <div class="font-14 color-3 fw5 line-22">战败分析</div>
                    <div class="font-12 color-2f m-t-4">客户:{{ item.defeatCustomerNums }}人</div>
                  </div>
                </div>
              </div>
            </div>
          </template>
        </div>
      </template>
      <template v-else>
        <empty description="暂无数据" />
      </template>
    </scroll-view>
  </div>
</template>
<script>
import { solicitApi } from '@/api'
export default {
  data() {
    return {
      getCustomerFollow: []
    }
  },
  created() {
    this.getCustomerFollowTotal()
  },
  methods: {
    // 跟进结果-成功到店与战败分析
    getCustomerFollowTotal() {
      const { activityId, staffId } = this.$store.state.solicit
      var params = {
        activityId,
        staffId
      }
      solicitApi.getCustomerFollowTotal(params).then(res => {
        this.getCustomerFollow = res.data
      })
    },
    goto(name, status, groupId, groupName) {
      this.$router.push({ name, query: { status, groupId, groupName } })
    },
    onReachBottom() {
      this.$refs.scrollView.loading = false
      this.$refs.scrollView.finished = true
    }
  }
}
</script>
<style lang="scss" scoped>
.result-container {
  /deep/ .van-list {
    background: #f7f7f7;
  }
  .content {
    height: calc(100vh - 82px);
  }
  &-content-item {
    background: #fff;
    height: 144px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0px 3px 10px 0px rgba(223, 228, 234, 0.81);
    border-radius: 4px;
    .title-info::before {
      content: '';
      width: 3px;
      height: 14px;
      background: #fff;
      border-radius: 1.5px;
      margin-right: 13px;
      display: inline-block;
    }
    .result-content {
      padding: 16px;
      &-list {
        width: 150px;
        height: 68px;
        background: #f7f7f7;
        border-radius: 6px;
        padding: 12px;
        box-sizing: border-box;
      }
    }
  }
  .custom-image {
    background: #fff;
    height: 100%;
  }
}
</style>