effect.vue 4.84 KB
<template>
  <div class="form-panel scrm-box-f">
    <el-form :inline="true" :model="tableSearchForm" class="follow-form-item">
      <el-form-item size="small" label="客户名称">
        <el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入客户名称"></el-input>
      </el-form-item>
      <el-form-item size="small" label="手机号">
        <el-input size="small" v-model="tableSearchForm.phone" placeholder="请输入手机号"></el-input>
      </el-form-item>
      <el-form-item size="small" label="领取状态">
        <el-select v-model="tableSearchForm.status" placeholder="请选择">
          <el-option v-for="item in optionstatus" :key="item.value" :label="item.label" :value="item.value"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item size="small" style="float: right">
        <el-button type="primary" @click="handleSearch">导出</el-button>
        <el-button @click="handleReset">重置</el-button>
        <el-button type="primary" @click="handleSearch">查询</el-button>
      </el-form-item>
    </el-form>
    <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
      <div class="table-btns" slot="optionBtns" slot-scope="scope">
        <el-button type="text" @click="handleDetail(scope.scope)">客户详情</el-button>
        <el-button type="text" @click="handleDetail(scope.scope)">短信内容</el-button>
      </div>
    </GLTable>
  </div>
</template>

<script>
export default {
  name: 'effect',
  data() {
    return {
      totalCount: 0,
      percentage: 0,
      optionstatus: [
        {
          value: '',
          label: '全部'
        },
        {
          value: '0',
          label: '未发送'
        },
        {
          value: '1',
          label: '已发送'
        }
      ],
      tableSearchForm: {},
      getListApi: this.$apis.overview.findAllMessageByPage,
      tableParams: {
        mutiSelectUniqueKey: 'id',
        mutiSelectName: 'emp',
        listName: 'data',
        tableOption: false,
        tableColumns: [
          {
            label: '客户名称',
            prop: 'phone'
          },
          {
            label: '手机号',
            prop: 'phone'
          },
          {
            label: '是否加企微',
            prop: 'phone'
          },
          {
            label: '手机号',
            prop: 'phone'
          },
          {
            label: '跟进员工',
            prop: 'statusName'
          },
          {
            label: '领取状态',
            prop: 'phone'
          },
          {
            label: '领取时间',
            prop: 'sendTime'
          },
          {
            label: '核销状态',
            prop: 'phone'
          },
          {
            label: '核销时间',
            prop: 'sendTime'
          },
          {
            label: '操作',
            prop: 'optionBtns',
            width: '160px',
            addHtml: 'optionBtns',
            fixed: 'right'
          }
        ]
      },
      pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
      baseData: {
        allMerchantList: [],
        roleList: [],
        staffStatusList: []
      }
    }
  },
  methods: {
    findMessageStatic() {
      this.$apis.overview.findMessageStatic({}).then(res => {
        this.totalCount = res.totalCount
        this.percentage = res.percentage
      })
    },
    handleReset() {
      this.tableSearchForm = {}
      this.handleSearch()
    },
    handleSearch() {
      this.$refs.employeeRef.refreshTable()
    },
    handleDetail(scope) {
      this.$alert(scope.content, { center: true })
    }
  },
  mounted() {
    this.findMessageStatic()
  }
}
</script> 

<style lang="scss" scoped>
.form-header {
  margin-bottom: 20px;
}
.form-panel {
  padding: 20px;
  .statistics-panel {
    display: flex;
    &-item {
      width: 33.33%;
      .statistics-title-h {
        font-size: 20px;
        font-weight: 600;
        color: #333333;
        line-height: 20px;
        letter-spacing: 1px;
        margin-bottom: 20px;
      }
      .statistics-title {
        font-size: 16px;
        font-weight: 500;
        color: #424242;
        line-height: 22px;
        img {
          width: 14px;
          height: 14px;
          margin-left: 10px;
          margin-top: 4px;
        }
      }
      .circle-box {
        margin: 20px 0px;
        display: flex;
        align-items: center;
        .circle-box-item {
          margin-left: 10px;
          font-size: 14px;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.65);
          line-height: 22px;
          .circle-item-num {
            font-size: 22px;
            font-weight: 600;
            color: #333333;
            line-height: 30px;
          }
        }
      }
    }
  }
}
</style>