<template>
  <div class="page">
    <el-form :model="search" ref="headerForm" label-width="100px" size="mini">
      <el-form-item label="保管期限：" style="width:25%">
        <el-select style="width:80%" v-model="search.retention" clearable placeholder="请选择保管期限">
          <el-option v-for="(item, index) in findLIst" :key="index" :label="item.label" :value="item.label">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="归档年度：" style="width:25%">
        <el-date-picker style="width:80%" v-model="search.filingYear" type="year" placeholder="选择年">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="盒号：" style="width:25%">
        <el-input style="width:80%" v-model="search.caseNo" placeholder="请输入盒号" clearable></el-input>
      </el-form-item>
      <el-form-item label="机构：" style="width:25%">
        <el-input style="width:80%" v-model="search.archiveCtgNo" placeholder="请输入机构" clearable></el-input>
      </el-form-item>
      <el-form-item label="档案盒类型：" style="width:25%">
        <el-select style="width:80%" v-model="search.fileboxId" clearable size="mini" placeholder="请选择">
          <el-option v-for="(item, index) in boxLIst" :key="index" :label="item.boxName" :value="item.id">
          </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="状态：" style="width:25%">
        <el-select style="width:80%" v-model="search.state" clearable placeholder="请选择状态">
          <el-option label="未入库" value="0"></el-option>
          <el-option label="已入库" value="1"></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="info" size="mini" @click="resetClick"><i class="iconfont icon-sousuo"></i>重置</el-button>
      </div>
    </el-form>
  </div>
</template>

<script>
  export default {
    data() {
      return {};
    },
    props: {
      search: {
        type: Object,
        default: () => {},
      },
      findLIst: {
        type: Array,
        default: () => [],
      },
      boxLIst: {
        type: Array,
        default: () => [],
      },
    },
    methods: {
      searchClick() {
        this.$emit("searchClick");
      },
      resetClick() {
        this.$emit("resetClick");
      }
    },
  };

</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 {
        width: 13%;
        text-align: right;
      }
    }
  }

</style>
