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

export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: { placeholder: '订单号', allowClear: true },
      fieldName: 'order_no',
      label: '订单号',
    },
    {
      component: 'VbenInput',
      componentProps: { placeholder: '主体用户ID', allowClear: true },
      fieldName: 'user_id',
      label: '用户ID',
    },
    {
      component: 'Select',
      componentProps: {
        allowClear: true,
        options: [
          { label: '诊所', value: 1 },
          { label: '平台', value: 2 },
          { label: '供应商', value: 3 },
        ],
        placeholder: '全部',
      },
      fieldName: 'user_type',
      label: '用户类型',
    },
    {
      component: 'VbenInput',
      componentProps: { placeholder: '来源类型 settle/withdraw…', allowClear: true },
      fieldName: 'source_type',
      label: '来源类型',
    },
    {
      component: 'RangePicker',
      componentProps: {
        format: 'YYYY-MM-DD HH:mm:ss',
        showTime: true,
        valueFormat: 'YYYY-MM-DD HH:mm:ss',
      },
      fieldName: 'search_time',
      label: '时间范围',
    },
  ],
  showCollapseButton: true,
  submitButtonOptions: { content: '查询' },
  submitOnChange: false,
  submitOnEnter: true,
};
