<template>
  <div class="page">
    <el-form :model="search" ref="headerForm" label-width="100px" size="mini">
      <el-form-item label="申请日期：" style="width:300px">
        <el-date-picker clearable v-model="search.applyTime" type="date" placeholder="选择日期" style="width:90%">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="借阅用户：" style="width:300px">
        <el-input v-model="search.applyName" placeholder="请输入借阅用户" clearable></el-input>
      </el-form-item>
      <el-form-item label="状态：" style="width:300px">
        <el-select v-model="search.borrowStatus" placeholder="请选择状态" clearable>
          <el-option label="借阅中" value="1"></el-option>
          <el-option label="已归还" value="2"></el-option>
          <el-option label="逾期未还" value="3"></el-option>
        </el-select>
      </el-form-item>
      <div class="btn">
        <el-button type="primary" size="mini" @click="searchClick"><i class="iconfont icon-sousuo"></i>查询</el-button>
        <el-button type="warning" size="mini" @click="refreshClick"><i class="iconfont icon-sousuo"></i>重置</el-button>
      </div>
    </el-form>
  </div>
</template>
<script>
  export default {
    data() {
      return {};
    },
    props: {
      search: {
        type: Object,
        default: () => {},
      },
    },
    methods: {
      searchClick() {
        this.$emit("searchClick");
      },
      refreshClick() {
        this.$emit("refreshClick");
      }
    },
  };

</script>

<style lang="scss" scoped>
  .page {
    width: 100%;
    background-color: #fff;
    padding: 10px 10px 0 10px;
    box-sizing: border-box;

    .el-form {
      display: flex;
      flex-wrap: wrap;

      .el-form-item {
        margin-bottom: 10px;
      }

      .btn {
        margin-left: 10px;
      }
    }
  }

</style>
