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

/**
 * 平台仓品审核搜索
 * audit_status 默认空字符串：后端按待审过滤；选「已审核」可看历史
 */
export const formOptions: VbenFormProps = {
  collapsed: false,
  schema: [
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '输入药品名称',
        allowClear: true,
      },
      fieldName: 'drug_name',
      label: '药品名称',
    },
    {
      component: 'Select',
      componentProps: {
        allowClear: true,
        placeholder: '默认待审核',
        options: [
          // value 空串：后端 auditList 默认按待审过滤
          { label: '待审核', value: '' },
          { label: '已审核', value: 1 },
        ],
      },
      defaultValue: '',
      fieldName: 'audit_status',
      label: '审核状态',
    },
  ],
  showCollapseButton: true,
  submitButtonOptions: {
    content: '查询',
  },
  submitOnChange: true,
  submitOnEnter: false,
};
