import { FormConfig } from "/@/components/PageSearch";
import dayjs from "dayjs";
import { xs_order_type_options } from "/@/utils/status";

const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "date",
      type: "date_picker",
      trigger: "change",
      otherOptions: {
        type: "daterange",
        startPlaceholder: "下单开始时间",
        endPlaceholder: "下单结束时间",
        valueFormat: "YYYY-MM-DD",
        startProp: "start",
        endProp: "end"
      }
    },
    {
      field: "date2",
      type: "date_picker",
      trigger: "change",
      otherOptions: {
        type: "daterange",
        startPlaceholder: "发货开始时间",
        endPlaceholder: "发货结束时间",
        valueFormat: "YYYY-MM-DD",
        startProp: "start_sendtime",
        endProp: "end_sendtime"
      }
    },
    {
      field: "status",
      type: 'select',
      trigger: 'change',
      placeholder: '发货单状态',
      options: [
        { value: '0', label: '待采购备货' },
        { value: '1', label: '待库管发货' },
        { value: '2', label: '已发货待收货' },
        { value: '3', label: '已收货' },
        { value: '4', label: '已全部退货' },
        { value: '5', label: '已取消' },
      ]
    },
    {
      field: "order_type",
      type: 'select',
      trigger: 'change',
      placeholder: '商品类型',
      options: xs_order_type_options
    },
    {
      field: "depart_id",
      type: "depart-query",
      trigger: "change"
    }
  ]
};

export default searchFormConfig;
