import { FormConfig } from "/@/components/PageSearch";

import {
  cg_order_type_options,
  cg_order_source_options,
  cgdStatusOptions,
  sendStatusOptions,
  orderTypeOptions,
  orderTypeCgOptions,
  send_status_list,
  inv_status_list,
  payStatusOptions
} from "/@/utils/status";


const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "group",
      type_field: "group_type",
      type: "input_group",
      otherOptions: {
        inputGroupOptions: [
          { value: "sequenceNo", label: "采购单编码" },
          { value: "cxCode", label: "采购主单编码" },
          { value: "payNo", label: "对账编号" },
          { value: "qrdCode", label: "销售订单编码" },
          { value: "goodNo", label: "商品编码" },
          { value: "goodName", label: "商品名称" },
          { value: "bkCode", label: "备库单号" },
          { value: "cgder", label: "采购员名称" }
        ]
      }
    },
    {
      field: "supplierNo",
      type: "supplier-query"
    },
    {
      field: "status",
      type: "select",
      placeholder: "是否对账",
      options: cgdStatusOptions
    },
    {
      type: 'select',
      field: 'is_comon',
      placeholder: '业务类型',
      options: orderTypeCgOptions
    },
    {
      field: "sendstatus",
      type: "select",
      placeholder: "发货状态",
      options: send_status_list
    },
    {
      field: "cgd_status",
      type: "select",
      placeholder: "采购单状态",
      options: sendStatusOptions
    },
    {
      field: "cgdsource",
      type: "select",
      placeholder: "订单来源",
      options: cg_order_source_options
    },
    {
      field: "cgdtype",
      type: "select",
      placeholder: "商品类型",
      options: cg_order_type_options
    },
    {
      field: 'total',
      type: 'select',
      placeholder: '总货款是否为零',
      defaultValue: '2',
      options: [
        { value: '2', label: '总货款不为零' },
        { value: '1', label: '总货款为零' },
      ]
    }
    // {
    //   field: 'inv_status',
    //   type: 'select',
    //   placeholder: '开票状态',
    //   options: inv_status_list
    // },
    // {
    //   field: 'pay_status',
    //   type: 'select',
    //   placeholder: '付款状态',
    //   options: payStatusOptions
    // },
    // {
    //   field: 'timer',
    //   type: 'date_picker',
    //   otherOptions: {
    //     type: 'daterange',
    //     startProp: 'start',
    //     endProp: 'end',
    //     startPlaceholder: '开始时间',
    //     endPlaceholder: '结束时间'
    //   }
    // },
  ]
};

export default searchFormConfig;
