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

export const reportFormProps: VbenFormProps = {
  wrapperClass: 'grid-cols-12',
  commonConfig: {
    formItemClass: 'col-span-12',
    componentProps: {
      class: 'w-full',
    },
  },
  layout: 'horizontal',
  schema: [
    {
      component: 'VbenInput',
      fieldName: 'id',
      label: 'ID',
      dependencies: {
        show: false,
        triggerFields: ['id'],
      },
    },
    {
      component: 'VbenInput',
      fieldName: 'warehouse_id',
      label: '仓库ID',
      dependencies: {
        show: false,
        triggerFields: ['warehouse_id'],
      },
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入开户人姓名',
      },
      fieldName: 'bank_user_name',
      label: '开户人姓名',
      rules: 'required',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入银行卡号',
      },
      fieldName: 'bank_card',
      label: '银行卡号',
      rules: 'required',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入开户行',
      },
      fieldName: 'bank_name',
      label: '开户行',
      rules: 'required',
    },
    {
      component: 'RadioGroup',
      componentProps: {
        options: [
          { label: '对公账户', value: '1' },
          { label: '法人账户', value: '2' },
          { label: '授权对公账户', value: '3' },
          { label: '授权个人账户', value: '4' },
        ],
      },
      fieldName: 'bank_account_type',
      label: '账户类型',
      defaultValue: '2',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入联行号',
      },
      fieldName: 'bank_no',
      label: '联行号',
    },
    {
      component: 'VbenInput',
      componentProps: {
        placeholder: '请输入证件号码',
      },
      fieldName: 'cert_no',
      label: '证件号码',
    },
    {
      component: 'UploadOssFile',
      componentProps: {
        maxCount: 1,
      },
      fieldName: 'attachment',
      label: '合同附件',
      rules: 'required',
    },
  ],
  showDefaultActions: false,
};
