<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
import { reviewStatusSelect, purchaseOrderProgressStatusEnum, requirementSourceType } from '@/enum/dict';

export default {
  data() {
    return {};
  },
  computed: {
    // 表格列配置
    seekList() {
      return [
        {
          label: '关键字：',
          value: 'searchName',
          type: 'input',
          placeholder: '订单编码/采购联系人/名称/编码'
        },
        {
          label: '订单编码：',
          value: 'orderNo',
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '供应商名称：',
          value: 'partbName',
          type: 'input',
          placeholder: '请输入'
        },
        {
          label: '合同编码：',
          value: 'contractNo',
          type: 'input',
          width: 380,
          placeholder: '请输入'
        },
        {
          label: '产品名称：',
          value: 'productName',
          type: 'input',
          width: 380,
          placeholder: '请输入'
        },
        {
          label: '订单类型',
          value: 'sourceType',
          type: 'select',
          planList: requirementSourceType,
          width: 380,
          placeholder: ''
        },
        {
          label: '审核状态',
          value: 'orderStatus',
          type: 'select',
          planList: reviewStatusSelect,
          width: 380,
          placeholder: ''
        },
        {
          label: '订单进度',
          value: 'progress',
          type: 'select',
          planList: purchaseOrderProgressStatusEnum,
          width: 380,
          placeholder: ''
        },
        {
          label: '创建时间：',
          value: 'createTime',
          type: 'date',
          dateType: 'datetimerange',
          placeholder: '',
          width: 380,
          valueAr: ['createTimeStart', 'createTimeEnd']
        }
      ];
    }
  },
  methods: {
    search(e) {
      this.$emit('search', {
        ...e
      });
    }
  }
};
</script>
