import { status_options } from "./configs";
import { FormConfig } from "/@/components/PageSearch";
import { tradeTypeOptions } from "./configs"


const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "create_timer",
      type: "date_picker",
      trigger: 'change',
      otherOptions: {
        type: "daterange",
        startProp: "start",
        endProp: "end",
        startPlaceholder: "交易开始时间",
        endPlaceholder: "交易结束时间"
      }
    },
    {
      type: 'select',
      placeholder: '回款类型',
      field: 'trade_type',
      options: tradeTypeOptions
    },
    // {
    //   field: 'companyNo',
    //   type: 'business-query',
    //   placeholder: '收款方公司'
    // },
    {
      type: "range",
      field: "gold-1",
      otherOptions: {
        startProp: "com_total_lower",
        endProp: "com_total_upper",
        startPlaceholder: "业务公司收入起始金额",
        endPlaceholder: "业务公司收入结束金额"
      }
    },
    {
      type: "range",
      field: "gold-2",
      otherOptions: {
        startProp: "plat_total_lower",
        endProp: "plat_total_upper",
        startPlaceholder: "平台公司收入起始金额",
        endPlaceholder: "平台公司收入结束金额"
      }
    },
    {
      placeholder: '客户机构名称',
      field:'name',
      type: 'input'
    },
    {
      placeholder: '客户PO',
      field: 'poCode',
      type: 'input'
    },
    {
      placeholder: '平台物料名称',
      field: 'goodName',
      type: 'input'
    },
    {
      field: "group",
      type_field: "group_type",
      type: "input_group",
      span: 8,
      selectWidth: '80px',
      otherOptions: {
        inputGroupOptions: [
          { value: "tradNo", label: "资金编号" },
          { value: "palt_po", label: "平台采购PO" },
          { value: "pcCode", label: "批次号" },
          // { value: "name", label: "客户机构名称" },
          // { value: "poCode", label: "客户PO" },
          { value: "NdCode", label: "客户DN" },
          { value: "skuCode", label: "泰e购SKU" },
          // { value: "goodName", label: "平台物料名称" },
          { value: "trade_used", label: "交易用途" }
        ]
      }
    }
  ]
};

export default searchFormConfig;
