import { statusOptions } from "./options";
import { FormConfig } from "/@/components/PageSearch";
import { convertOptions } from "/@/utils/column-helper";

const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "status",
      type: "select",
      placeholder: "状态",
      options: convertOptions(statusOptions)
    },
    {
      field: "supplierName",
      type: "input",
      placeholder: "企业客户"
    },
    {
      field: "group",
      type_field: "group_type",
      type: "input_group",
      otherOptions: {
        inputGroupOptions: [
          { value: "zxNo", label: "竞价单编号" },
          { value: "cpName", label: "商品名称" },
          { value: "salesman", label: "申请人" },
          { value: "company_name", label: "申请人部门" }
        ]
      }
    },
    {
      field: "timer",
      type: "date_picker",
      otherOptions: {
        type: "daterange",
        startProp: "start",
        endProp: "end",
        startPlaceholder: "开始时间",
        endPlaceholder: "结束时间"
      }
    }
  ]
};

export default searchFormConfig;
