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: '创建日期',
    align:"center",
    dataIndex: 'createTime'
   },
   {
    title: '昵称',
    align:"center",
    dataIndex: 'nickName'
   },
   {
    title: '用户头像',
    align:"center",
    dataIndex: 'headImage',
    customRender:render.renderAvatar,
   },
   {
    title: '邀请人',
    align:"center",
    dataIndex: 'shareId_dictText'
   },
   {
    title: '用户角色',
    align:"center",
    dataIndex: 'isPay_dictText'
   },
   {
    title: '余额',
    align:"center",
    dataIndex: 'price'
   },
   {
    title: '可提现金额',
    align:"center",
    dataIndex: 'money'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "昵称",
      field: "nickName",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "邀请人",
      field: "shareId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"han_hai_member,nick_name,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "用户角色",
      field: "isPay",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"member_role"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '昵称',
    field: 'nickName',
    component: 'Input',
  },
  {
    label: '用户头像',
    field: 'headImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '邀请人',
    field: 'shareId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
  {
    label: '用户角色',
    field: 'isPay',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"member_role"
     },
  },
  {
    label: '余额',
    field: 'price',
    component: 'InputNumber',
  },
  {
    label: '可提现金额',
    field: 'money',
    component: 'InputNumber',
  },
];
