import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '用户id',
    align:"center",
    dataIndex: 'userId'
   },
   {
    title: '余额',
    align:"center",
    dataIndex: 'balance'
   },
   {
    title: '用户余额',
    align:"center",
    dataIndex: 'userBalance'
   },
   {
    title: '类型 0交易 1提现',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '状态 0未审核 1已审核未打款 2已打款 3审核未通过',
    align:"center",
    dataIndex: 'status_dictText'
   },
   {
    title: '是否删除 0否 1是',
    align:"center",
    dataIndex: 'delFlag_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户id',
    field: 'userId',
    component: 'Input',
  },
  {
    label: '余额',
    field: 'balance',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入余额!'},
          ];
     },
  },
  {
    label: '用户余额',
    field: 'userBalance',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入用户余额!'},
          ];
     },
  },
  {
    label: '类型 0交易 1提现',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '状态 0未审核 1已审核未打款 2已打款 3审核未通过',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '是否删除 0否 1是',
    field: 'delFlag',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入是否删除 0否 1是!'},
          ];
     },
  },
];
