import { FormConfig } from "/@/components/PageSearch";
import { orderTypeOptions, statusOptions } from "./content.config";
import dayjs from "dayjs";

const now = new Date();
const current = dayjs(now).format("YYYY-MM-DD");

const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "date",
      type: "date_picker",
      defaultValue: [current, current],
      trigger: "change",
      otherOptions: {
        type: "daterange",
        startPlaceholder: "发货开始时间",
        endPlaceholder: "发货结束时间",
        valueFormat: "YYYY-MM-DD",
        startProp: "start",
        endProp: "end",
        clearable: false
      }
    },
    {
      field: "order_type",
      type: "select",
      trigger: "change",
      placeholder: '商品类型',
      options: orderTypeOptions
    },
    {
      field: "depart_id",
      type: "depart-query",
      placeholder: '订单创建人部门',
      trigger: "change"
    }
  ]
};

export default searchFormConfig;
