<template>
  <div>
    <el-form ref="searchForm" :model="searchForm" inline>
      <el-form-item label="报名点" prop="officeId">
        <el-input v-model="searchForm.officeId" placeholder="请输入报名点ID" clearable />
      </el-form-item>
      <el-form-item label="姓名/手机号" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入姓名" clearable />
      </el-form-item>
      <el-form-item label="身份证号" prop="idcard">
        <el-input v-model="searchForm.idcard" placeholder="请输入身份证号" clearable />
      </el-form-item>
      <el-form-item label="线索来源" prop="source">
        <el-input v-model="searchForm.source" placeholder="请输入线索来源" clearable />
      </el-form-item>
      <el-form-item label="成交日期" prop="dealDate">
        <el-date-picker clearable v-model="searchForm.dealDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择成交日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label-width="0">
        <el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import DMRadio from '@/components/DMRadio';
export default {
  components: {
    DMRadio
  },
  data() {
    return {
      searchForm: {},
      dateRange: []
    }

  },
  created() {
  },
  methods: {
    resetQuery() {
      this.searchForm = {
        officeId: undefined,
        name: undefined,
        idcard: undefined,
        source: undefined,
        dealDate: undefined
      };
      this.dateRange = []
    },
    pickDateChange() {
      this.addDateRange(this.searchForm, this.dateRange)
    }
  },
}
</script>

