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: "timer",
      type: "date_picker",
      otherOptions: {
        type: "daterange",
        startProp: "start",
        endProp: "end",
        startPlaceholder: "创建开始时间",
        endPlaceholder: "创建结束时间"
      }
    },
    {
      field: "last_timer",
      type: "date_picker",
      otherOptions: {
        type: "daterange",
        startProp: "last_start",
        endProp: "last_end",
        startPlaceholder: "最晚入库开始时间",
        endPlaceholder: "最晚入库结束时间"
      }
    },
    {
      field: "group",
      type_field: "group_type",
      type: "input_group",
      otherOptions: {
        inputGroupOptions: [
          { value: "cgdNo", label: "采购单编码" },
          { value: "good_code", label: "商品成本编号" },
          { value: "good_name", label: "商品名称" },
          { value: "apply_name", label: "商品创建人" },
          { value: "supplierNo", label: "采购供应商编号" },
          { value: "orderCode", label: "订单编号" },
          { value: "company_name", label: "商品创建人部门" }
        ]
      }
    }
  ]
};

export default searchFormConfig;
