<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
  import { reviewStatusSelect, saleOrderProgressStatusEnum } from '@/enum/dict';
  export default {
    data() {
      return {};
    },
    computed: {
      // 表格列配置
      seekList() {
        return [
          {
            label: '关键字：',
            value: 'searchName',
            type: 'input',
            placeholder: '订单编码/客户名称/合同编号/产品名称'
          },
          {
            label: '订单编码：',
            value: 'orderNo',
            type: 'input',
            placeholder: ''
          },

          {
            label: '客户名称：',
            value: 'partaName',
            type: 'input',
            placeholder: ''
          },
          {
            label: '库存状态',
            value: 'hasStock',
            width: 380,
            type: 'select',
            planList: [
              {
                label: '有库存',
                value: 1
              },
              { label: '无库存', value: 0 }
            ]
          },

          {
            label: '合同编号：',
            value: 'contractNumber',
            width: 380,
            type: 'input',
            placeholder: ''
          },
          {
            label: '产品名称：',
            value: 'productName',
            width: 380,
            type: 'input',
            placeholder: ''
          },
          {
            label: '编码',
            value: 'productCode',
            width: 380,
            type: 'input',
            placeholder: '请输入'
          },
          {
            label: '生产编号',
            value: 'productionCodes',
            width: 380,
            type: 'input',
            placeholder: ''
          },
          // {
          //   label: '项目名称：',
          //   value: 'productCode',
          //   width: 380,
          //   type: 'input',
          //   width: 380,
          //   placeholder: ''
          // },
          {
            label: '订单类型',
            value: 'needProduce',
            width: 380,
            type: 'select',
            planList: [
              {
                label: '生产性订单',
                value: '1'
              },
              { label: '无客户生产性订单', value: '2' },
              { label: '库存式订单', value: '0' },
              { label: '不定向订单', value: '4' }
            ],
            width: 380,
            placeholder: ''
          },
          {
            label: '审核状态',
            value: 'orderStatus',
            type: 'select',
            planList: reviewStatusSelect,
            width: 380,
            placeholder: ''
          },
          {
            label: '订单进度',
            value: 'progress',
            type: 'select',
            planList: saleOrderProgressStatusEnum,
            width: 380,
            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>
