<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
import { reviewStatusSelect, paymentStatus } from '@/enum/dict';
export default {
  data() {
    return {};
  },
  computed: {
    // 表格列配置
    seekList() {
      return [
        {
          label: '关键字：',
          value: 'searchName',
          type: 'input',
          placeholder: '应收编码/发票编码/单位名称/来源编码'
        },
        {
          label: '应收编码：',
          value: 'code',
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '发票编码：',
          value: 'invoiceCode',
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '单位名称：',
          value: 'contactName',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '应收日期：',
          value: 'receivableDate',
          type: 'date',
          dateType: 'datetimerange',
          placeholder: '',
          width: 380,
          valueAr: ['createTimeStart', 'createTimeEnd']
        },
        {
          label: '应收金额：',
          value: 'receivableTotalPrice',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '已收金额：',
          value: 'receivedTotalPrice',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '来源金额：',
          value: 'unreceiveTotalPrice',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '来源编码：',
          value: 'sourceCode',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '会计科目：',
          value: 'accountingSubjectName',
          width: 380,
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '收款状态：',
          value: 'status',
          width: 380,
          type: 'select',
          placeholder: '请选择状态',
          planList: paymentStatus
        },
        {
          label: '审核状态：',
          value: 'approvalStatus',
          width: 380,
          type: 'select',
          placeholder: '请选择状态',
          planList: reviewStatusSelect
        },
        {
          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>
