<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
import { accountType, whetherToEnable } from '@/enum/dict';
export default {
  data() {
    return {};
  },
  computed: {
    // 表格列配置
    seekList() {
      return [
        {
          label: '关键字：',
          value: 'searchName',
          type: 'input',
          placeholder: '银行账户/银行名称/开户行'
        },
        {
          label: '类型：',
          value: 'type',
          type: 'select',
          placeholder: '请选择',
          planList: accountType
        },
        {
          label: '银行账户：',
          value: 'account',
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '银行名称：',
          value: 'bankName',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '开户行名称：',
          value: 'branchName',
          width: 370,
          labelWidth:130,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '是否启用：',
          value: 'enabled',
          width: 380,
          type: 'select',
          placeholder: '请选择',
          planList: whetherToEnable
        },
        {
          label: '创建时间：',
          value: 'createTime',
          type: 'date',
          dateType: 'datetimerange',
          placeholder: '',
          width: 380,
          valueAr: ['createTimeStart', 'createTimeEnd']
        },
      ];
    }
  },
  methods: {
    /* 搜索 */
    search(e) {
      this.$emit('search', {
        ...e
      });
    }
  }
};
</script>
