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

export const USE_STATUS = [
  {
    value: "0",
    label: "未对账"
  },
  {
    value: "1",
    label: "参与对账"
  },
  {
    value: "2",
    label: "参与核销对账"
  }
];

export const inv_open_status = [
  {
    value: "1",
    label: "未开票"
  },
  {
    value: "2",
    label: "部分开票"
  },
  {
    value: "3",
    label: "已开票"
  }
];

export const retrun_status = [
  {
    value: "1",
    label: "未回款"
  },
  {
    value: "2",
    label: "部分回款"
  },
  {
    value: "3",
    label: "已回款"
  }
];

export const good_type = [
  {
    value: "1",
    label: "库存品"
  },
  {
    value: "2",
    label: "非库存"
  },
  {
    value: "3",
    label: "咨询"
  }
];

export const good_source = [
  {
    value: "1",
    label: "直接下单"
  },
  {
    value: "2",
    label: "咨询"
  },
  {
    value: "3",
    label: "项目"
  },
  {
    value: "4",
    label: "平台"
  },
  {
    value: "5",
    label: "有赞"
  },
  {
    value: "6",
    label: "售后补换货"
  }
];

export const seend_type = [
  {
    value: "1",
    label: "未发货"
  },
  {
    value: "2",
    label: "部分发货"
  },
  {
    value: "3",
    label: "已发货"
  }
];

export const cat_status = [
  {
    value: "0",
    label: "未设置"
  },
  {
    value: "1",
    label: "已设置"
  }
];

const tag_type = [
  {
    value: "1",
    label: "开票标签"
  },
  {
    value: "2",
    label: "回款标签"
  },
  {
    value: "3",
    label: "开票或回款标签最少有一个"
  },
  {
    value: "4",
    label: "开票和回款标签同时有"
  }
];

const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "totalRange",
      type: "range",
      otherOptions: {
        startPlaceholder: "销售额最小值",
        endPlaceholder: "销售额最大值"
      }
    },
    {
      field: "order_timer",
      type: "date_picker",
      otherOptions: {
        type: "daterange",
        startPlaceholder: "下单起始时间",
        endPlaceholder: "下单结束时间"
      }
    },
    {
      field: "sequenceNo",
      type: "input",
      placeholder: "订单编号"
    },
    {
      field: "customer",
      type: "input",
      placeholder: "客户名称"
    },
    {
      field: "platName",
      type: "input",
      placeholder: "平台名称"
    },
    {
      field: "companyName",
      type: "input",
      placeholder: "业务公司名称"
    },
    {
      field: "department",
      type: "input",
      placeholder: "部门",
      span: 4
    },
    {
      field: "saler",
      type: "input",
      placeholder: "销售员",
      span: 4
    },
    {
      field: "inv_status",
      type: "select",
      placeholder: "开票状态",
      options: inv_open_status,
      span: 4
    },
    {
      field: "qrdtype",
      type: "select",
      placeholder: "商品类型",
      options: good_type,
      span: 4
    },
    {
      field: "qrdsource",
      type: "select",
      placeholder: "订单来源",
      options: good_source,
      span: 4
    },
    {
      field: "pay_status",
      type: "select",
      placeholder: "回款状态",
      options: retrun_status,
      span: 4
    },
    {
      field: "sendstatus",
      type: "select",
      placeholder: "发货状态",
      options: seend_type,
      span: 4
    },
    {
      field: "cat_status",
      type: "select",
      placeholder: "是否设置类目",
      options: cat_status,
      span: 4
    },
    {
      field: "status",
      type: "select",
      placeholder: "使用状态",
      options: USE_STATUS,
      span: 4
    },
    {
      field: "tag_id",
      type: "select",
      placeholder: "标签类型",
      options: tag_type,
      span: 4
    }
  ]
};

export default searchFormConfig;
