marketingPeople.vue 9.77 KB
<template>
  <div>
    <!-- 大标题 -->
    <p class="topTitle">
      <span class="title">待定保客户</span>
      <span class="desc">下个月待定保客户</span>
    </p>
    <!-- 切换导航栏 -->
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="营销人群" name="first">
        <div class="pageContent">
          <div class="markPeople">
            <span>
              营销人群
            </span>
            <span v-if="itemArr.length > 4 && !closeFlag" @click="expandClick('expand')">
              展开营销人群
              <i class="el-icon-arrow-down color-58"></i>
            </span>
                        <span v-if="closeFlag" @click="expandClick('close')">
              收起营销人群
              <i class="el-icon-arrow-up color-58"></i>
            </span>
          </div>
          <el-divider></el-divider>
          <!-- 营销人群展示 -->
          <div class="bigMarketItem">
            <div class="marketItem" v-for="(item, idx) in itemArr" :key="idx">
              <p class="peopleName">人群名称</p>
              <div class="itemBox">
                <p class="peopleNum">
                  {{ item.num }}
                  <span>人</span>
                </p>
                <p class="peopledesc">{{ item.desc }}</p>
                <el-button class="createSOP">创建营销SOP</el-button>
              </div>
            </div>
          </div>
        </div>
        <div class="otherPageContent">
          <GLCombiForm :formObj="searchForm" :formData="marketPeopleFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
          <div class="leadList">
            <div>
              <span>N-3待定保客户</span>
            </div>
            <div>
              <el-button size="small" @click="handleExport">导出</el-button>
              <el-button class="marketSOP" size="small">营销SOP</el-button>
            </div>
          </div>
          <GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketPeople" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams"></GLTable>
        </div>
      </el-tab-pane>
      <el-tab-pane label="营销计划" name="second">
        <marketing-plan></marketing-plan>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import marketingPlan from './components/marketingPlan.vue'
export default {
  name: 'marketPeople',
  components: { marketingPlan },
  data() {
    return {
      activeName: 'first',
      searchForm: {},
      closeFlag:false,//展开收起
      itemArr: [
        { num: 562, desc: '不该他basdbajsda' },
        { num: 323, desc: '我顶着大太阳,只想为你撑伞' },
        { num: 1312, desc: '你专心在画睫毛,我专心在等你笑' },
        { num: 43133, desc: '气球在我手上,牵着你瞎逛' },
        // { num: 123213, desc: '城堡为爱守着秘密,而我为你守着爱情' },
        // { num: 1233, desc: '美人鱼的眼泪' },
        // { num: 1233, desc: '美人鱼的眼泪' }
      ],
      marketPeopleFormList: [
        {
          type: 'input',
          inputType: 'text',
          name: 'keyword',
          label: '车牌号'
        },
        {
          type: 'input',
          inputType: 'text',
          name: 'keyword',
          label: '车系'
        },
        {
          type: 'select',
          name: 'status',
          label: '跟进员工',
          optionLabel: 'label',
          optionId: 'value',
          optionList: [
            {
              label: '全部',
              value: ''
            },
            {
              label: '待跟进',
              value: 0
            },
            {
              label: '跟进中',
              value: 1
            },
            {
              label: '已完成',
              value: 2
            }
          ],
          placeholder: '请选择'
        },
        {
          type: 'input',
          inputType: 'text',
          name: 'keyword',
          label: '联系电话'
        },
        {
          type: 'input',
          inputType: 'text',
          name: 'keyword',
          label: '企微名称'
        },
        {
          type: 'input',
          inputType: 'text',
          name: 'userName',
          label: '客户名称'
        },
        {
          type: 'select',
          name: 'type',
          label: '是否已加企微',
          optionLabel: 'label',
          optionId: 'value',
          optionList: [
            {
              label: '全部',
              value: ''
            },
            {
              label: '救援服务',
              value: 3
            },
            {
              label: '新车询价',
              value: 4
            },
            {
              label: '试驾预约',
              value: 5
            },
            {
              label: '维保预约',
              value: 6
            }
          ],
          placeholder: '请选择'
        },
        {
          type: 'datePicker',
          name: 'daterange',
          label: '购车',
          valueFormat: 'yyyy-MM-dd',
          pickerOptions: {
            disabledDate(time) {
              return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
            }
          }
        },
        {
          type: 'datePicker',
          name: 'daterange',
          label: '车险到期时间',
          valueFormat: 'yyyy-MM-dd',
          pickerOptions: {
            disabledDate(time) {
              return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
            }
          }
        }
      ],
      pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
      tableParams: {
        listName: 'data',
        tableColumns: [
          {
            label: '客户名称',
            prop: 'customerName',
            addHtml: 'customerName',
            minWidth: 150
          },
          {
            label: '企微名称',
            prop: 'customerPhone',
            minWidth: 120
          },
          {
            label: '性别',
            prop: 'customerSex',
            addHtml: 'customerSex'
          },
          {
            label: '入群方式',
            prop: 'joinScene',
            addHtml: 'joinScene',
            minWidth: 140
          },
          {
            label: '邀请人',
            prop: 'invitorName',
            minWidth: 120
          },
          {
            label: '入群时间',
            prop: 'joinTime',
            width: 170
          }
        ],
        tableOption: {
          width: 60,
          btnList: [
            {
              name: '详情',
              pType: 'detail'
            }
          ]
        }
      }
      //   getListApi: getDetailQuitTableList,
    }
  },
  methods: {
    expandClick(val){
      if(val == 'expand'){
        this.closeFlag = true
      }else{
        this.closeFlag = false
      }
    },
    setTableFinishFun() {
      this.$refs.marketPeople.data.length ? (this.$refs.marketPeople.tableHeightValues = '') : this.$refs.marketPeople.setTableHeightFun()
    },
    setTableHeightEvent() {
      this.$refs.marketPeople.setTableHeightFun()
    },
    handleClick(tab) {
      console.log(tab)
    }
  }
}
</script>

<style lang="scss" scoped>
.topTitle {
  .title {
    color: #333333;
    font-size: 20px;
    font-weight: 600;
  }
  .desc {
    margin-left: 8px;
    font-size: 14px;
    color: #666666;
  }
}
/deep/.el-tabs__header {
  padding: 5px 0;
  .el-tabs__item {
    font-size: 16px;
  }
}
.pageContent {
  padding: 0 0 30px;
  box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
  background-color: #fff;
  .markPeople {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #333333;
    span:last-child {
      color: #5850ff;
    }
  }
  .bigMarketItem {
    padding: 0 20px;
    width: 100%;
    display: flex;
    
				flex-wrap: wrap;
    // overflow-x: auto;
    // white-space: nowrap;
    // overflow: hidden;
    .marketItem {
      margin-right: 16px;
      width: 23%;
      &:last-child {
        margin-right: 0;
      }
      .peopleName {
        height: 54px;
        line-height: 54px;
        background: #f7f7fc;
        font-size: 16px;
        font-weight: 600;
        padding-left: 16px;
        vertical-align: middle;
      }
      .itemBox {
        border-left: 1px solid #ededf0;
        border-right: 1px solid #ededf0;
        border-bottom: 1px solid #ededf0;
        padding: 0 16px;
        box-sizing: border-box;
        .peopleNum {
          padding: 24px 0;
          font-size: 26px;
          font-weight: 600;
          color: #333333;
          span {
            font-size: 14px;
            font-weight: 400;
          }
        }
        .peopledesc {
          font-size: 14px;
          color: #666666;
        }
        .createSOP {
          margin: 24px 0;
          border-radius: 4px;
          border: 1px solid #5850ff;
          width: 100%;
          color: #5850ff;
          padding: 9px 20px;
        }
      }
    }
  }
}
.otherPageContent {
  padding: 20px 20px 30px;
  margin-top: 16px;
  box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
  background-color: #fff;
  .leadList {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    div {
      text-align: center;
      span:nth-child(1) {
        font-weight: 600;
        font-size: 20px;
      }
    }
    /deep/ .el-button {
      color: #5850ff;
      border: 1px solid #5850ff;
    }
    .marketSOP {
      color: #666666;
      border: 1px solid #696969;
    }
  }
}
.PageContent2 {
  padding: 20px 20px 30px;
  box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
  background-color: #fff;
}
</style>