import type { VbenFormProps } from '#/adapter/form';

import dayjs from 'dayjs';

export const formOptions: VbenFormProps = {
  // 默认展开
  collapsed: false,
  schema: [
    {
      component: 'Select',
      componentProps: {
        placeholder: '选择结算状态',
        options: [
          {
            label: '全部',
            value: '',
          },
          {
            label: '待审核',
            value: 1,
          },
          {
            label: '审核通过',
            value: 2,
          },
          {
            label: '审核拒绝',
            value: 3,
          },
          {
            label: '打款失败',
            value: 4,
          },
        ],
      },
      defaultValue: '',
      fieldName: 'check_status',
      label: '审核状态',
    },
    {
      component: 'RangePicker',
      componentProps: {
        format: 'YYYY-MM-DD', // 确保格式与你需要的一致
      },
      defaultValue: [dayjs().startOf('month'), dayjs()],
      fieldName: 'search_time',
      label: '时间范围',
    },
  ],
  // 控制表单是否显示折叠按钮
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  // 是否在字段值改变时提交表单
  // submitOnChange: true,
  // submitOnChange: true,
  // 按下回车时是否提交表单
  submitOnEnter: true,
};
