import { FormConfig } from "/@/components/PageSearch";
import {
  invoiceApplyStatusOptions,
  invoiceTypeList,
  useTypeOptions
} from "/@/utils/status";
// import { INV_OPEN_STATUS } from "/@/utils/details/inv-open";

const searchFormConfig: FormConfig = {
  colLayout: { span: 8 },
  formItems: [
    {
      field: "timer",
      type: "date_picker",
      otherOptions: {
        type: "daterange",
        startProp: "start",
        endProp: "end",
        startPlaceholder: "申请开始时间",
        endPlaceholder: "申请结束时间"
      }
    },
    {
      field: "status",
      type: "select",
      placeholder: "状态",
      span: 4,
      options: invoiceApplyStatusOptions
    },
    {
      field: "platform_type",
      type: "select",
      placeholder: "平台类型",
      span: 4,
      options: useTypeOptions
    },
    {
      field: "buyer_name",
      type: "input",
      placeholder: "客户名称"
    },
    {
      field: "invNo",
      type: "input",
      placeholder: "发票申请编码"
    },
    {
      field: "inv_number",
      type: "input",
      placeholder: "发票号码"
    },
    {
      field: "c",
      type: "range",
      otherOptions: {
        startProp: "inv_lower",
        endProp: "inv_uper",
        startPlaceholder: "申请额度上限",
        endPlaceholder: "申请额度下限"
      }
    },
    {
      field: "inv_type",
      type: "select",
      placeholder: "发票类型",
      options: invoiceTypeList,
      span: 4
    },
    {
      field: "apply_name",
      type: "input",
      placeholder: "申请人",
      span: 4
    }
  ]
};

export default searchFormConfig;
