<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
import { reconciliationType, reviewStatusSelect, receiptType } from '@/enum/dict';
export default {
  data() {
    return {};
  },
  computed: {
    // 表格列配置
    seekList() {
      return [
        {
          label: '关键字：',
          value: 'searchName',
          type: 'input',
          placeholder: '对账单编码/客户名称/总金额'
        },
        {
          label: '对账单编码：',
          value: 'statementNo',
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '客户名称：',
          value: 'contactName',
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '对账方式：',
          value: 'dateType',
          width: 380,
          type: 'select',
          planList:reconciliationType,
          placeholder: '请选择'
        },
        {
          label: '对账开始日期：',
          value: 'startDate',
          width: 360,
          type: 'date',
          labelWidth: 120,
          dateType: 'datetimerange',
          valueAr: ['createTimeStart', 'createTimeEnd']
        },
        {
          label: '对账结束日期：',
          value: 'endDate',
          width: 360,
          type: 'date',
          labelWidth: 120,
          dateType: 'datetimerange',
          valueAr: ['createTimeStart', 'createTimeEnd']
        },
        {
          label: '总金额：',
          value: 'amountTotalPrice',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '应收金额：',
          value: 'amountReceivablePrice',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '应付金额：',
          value: 'amountPayablePrice',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '状态：',
          value: 'reviewStatus',
          width: 380,
          type: 'select',
          planList: reviewStatusSelect,
          placeholder: '请选择'
        },
        {
          label: '是否回执：',
          value: 'replied',
          width: 380,
          type: 'select',
          planList:receiptType,
          placeholder: '请选择'
        },
        {
          label: '创建人：',
          value: 'createUserName',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '创建时间：',
          value: 'createTime',
          type: 'date',
          dateType: 'datetimerange',
          placeholder: '',
          width: 380,
          valueAr: ['createTimeStart', 'createTimeEnd']
        },
      ];
    }
  },
  methods: {
    /* 搜索 */
    search(e) {
      this.$emit('search', {
        ...e
      });
    }
  }
};
</script>
