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

import {
  cg_order_type_options,
  cg_order_source_options,
  cgdStatusOptions,
  sendStatusOptions,
  orderTypeCgOptions,
  send_status_list
} 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: "cgder", label: "买入方采购员" }
        ]
      }
    },
    {
      field: "companyNo",
      type: "business-query"
    },
    {
      field: "status",
      type: "select",
      placeholder: "是否对账",
      options: cgdStatusOptions
    },
    {
      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: "is_comon",
      type: "select",
      placeholder: "业务类型",
      span: 4,
      options: orderTypeCgOptions
    },
    {
      field: 'total',
      type: 'select',
      placeholder: '总货款是否为零',
      defaultValue: '2',
      options: [
        { value: '2', label: '总货款不为零' },
        { value: '1', label: '总货款为零' },
      ]
    }
  ]
};

export default searchFormConfig;
