<template>
  <div class="page">
    <el-row>
      <el-form :model="headerForm" ref="headerForm" size="mini">
        <el-col :span="7">
          <el-form-item label="全宗号:" prop="fonds_no">
            <el-select filterable clearable style="width:163px" v-model="headerForm.fonds_no" size="mini">
              <el-option v-for="(item,key) in fondsList" :key="key" :label="item.fondsname" :value="item.fondscode">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item prop="type">
            <el-radio-group v-model="headerForm.type">
              <el-radio :label="0">未入库</el-radio>
              <el-radio :label="1">已入库</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label-width="150px" label="形成时间：" prop="dateRange">
            <el-date-picker v-model="headerForm.dateRange" type="daterange" unlink-panels value-format="yyyyMMdd"
              range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px">
            </el-date-picker>
          </el-form-item>
        </el-col>

        <!-- <div class="btn">
      </div> -->
      </el-form>
    </el-row>
    <el-row>
      <el-col :span="24">
        <el-button type="primary" size="mini" :disabled="disabled" @click="searchClick">
          查询
        </el-button>
        <el-button size="mini" @click="handleReset">重置</el-button>
        <el-button type="success" size="mini" :disabled="disabled" @click="handelExport">导出</el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    headerForm: {
      type: Object,
      default: () => {},
    },
    disabled: {
      type: Boolean,
      default: () => true,
    },
    fondsList: {
      type: Array,
      default: () => [],
    },
  },
  methods: {
    searchClick() {
      this.$emit("searchClick");
    },
    handleReset() {
      this.$refs.headerForm.resetFields();
      this.$emit("reset");
    },
    handelExport() {
      this.$emit("export");
    },
  },
};
</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;
  //     display: flex;
  //     justify-content: end;
  //   }
  // }
}
</style>
