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: 'nickName'
   },
   {
    title: '用户头像',
    align:"center",
    dataIndex: 'headImage',
    customRender:render.renderAvatar,
   },
   {
    title: '真实姓名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '手机号码',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '登录账号',
    align:"center",
    dataIndex: 'account'
   },
   {
    title: '登录密码',
    align:"center",
    dataIndex: 'password'
   },
   {
    title: '登录盐',
    align:"center",
    dataIndex: 'passwordSalt'
   },
   {
    title: '店铺名称备注',
    align:"center",
    dataIndex: 'shopName'
   },
   {
    title: '角色',
    align:"center",
    dataIndex: 'role'
   },
   {
    title: 'ID标识号码',
    align:"center",
    dataIndex: 'cardId'
   },
   {
    title: '是否冻结',
    align:"center",
    dataIndex: 'frozenFlag'
   },
   {
    title: '是否删除',
    align:"center",
    dataIndex: 'deleteFlag'
   },
   {
    title: '登录TOEKN',
    align:"center",
    dataIndex: 'token'
   },
   {
    title: '公众号openid',
    align:"center",
    dataIndex: 'officialOpenid'
   },
   {
    title: '小程序标识',
    align:"center",
    dataIndex: 'appletOpenid'
   },
   {
    title: 'APP标识',
    align:"center",
    dataIndex: 'appOpenid'
   },
   {
    title: '微信UNIONID',
    align:"center",
    dataIndex: 'wxUnionid'
   },
   {
    title: '公众号appid',
    align:"center",
    dataIndex: 'officialAppid'
   },
   {
    title: '身份证号码',
    align:"center",
    dataIndex: 'idCard'
   },
   {
    title: '发薪平台密码',
    align:"center",
    dataIndex: 'idCardPassword'
   },
   {
    title: '发薪平台加密盐',
    align:"center",
    dataIndex: 'idCardSalt'
   },
   {
    title: '是否实名认证',
    align:"center",
    dataIndex: 'idCardOpen'
   },
   {
    title: 'intentionNum',
    align:"center",
    dataIndex: 'intentionNum'
   },
   {
    title: 'successNum',
    align:"center",
    dataIndex: 'successNum'
   },
   {
    title: 'addNum',
    align:"center",
    dataIndex: 'addNum'
   },
   {
    title: 'shareId',
    align:"center",
    dataIndex: 'shareId'
   },
   {
    title: '邀请人',
    align:"center",
    dataIndex: 'vid'
   },
   {
    title: '邀请时间',
    align:"center",
    dataIndex: 'vtime',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '兼兼街会员',
    align:"center",
    dataIndex: 'isPay'
   },
   {
    title: '是否关注公众号',
    align:"center",
    dataIndex: 'follow'
   },
   {
    title: 'payRole',
    align:"center",
    dataIndex: 'payRole'
   },
   {
    title: '余额',
    align:"center",
    dataIndex: 'balance'
   },
   {
    title: '积分',
    align:"center",
    dataIndex: 'integerPrice'
   },
   {
    title: '小程序appid',
    align:"center",
    dataIndex: 'appletAppid'
   },
   {
    title: '性别',
    align:"center",
    dataIndex: 'sex'
   },
   {
    title: '是否分销商',
    align:"center",
    dataIndex: 'isDai'
   },
   {
    title: '团长等级',
    align:"center",
    dataIndex: 'leaderLevelId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '昵称',
    field: 'nickName',
    component: 'Input',
  },
  {
    label: '用户头像',
    field: 'headImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '真实姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '手机号码',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '登录账号',
    field: 'account',
    component: 'Input',
  },
  {
    label: '登录密码',
    field: 'password',
    component: 'Input',
  },
  {
    label: '登录盐',
    field: 'passwordSalt',
    component: 'Input',
  },
  {
    label: '店铺名称备注',
    field: 'shopName',
    component: 'Input',
  },
  {
    label: '角色',
    field: 'role',
    component: 'Input',
  },
  {
    label: 'ID标识号码',
    field: 'cardId',
    component: 'Input',
  },
  {
    label: '是否冻结',
    field: 'frozenFlag',
    component: 'Input',
  },
  {
    label: '是否删除',
    field: 'deleteFlag',
    component: 'Input',
  },
  {
    label: '登录TOEKN',
    field: 'token',
    component: 'Input',
  },
  {
    label: '公众号openid',
    field: 'officialOpenid',
    component: 'Input',
  },
  {
    label: '小程序标识',
    field: 'appletOpenid',
    component: 'Input',
  },
  {
    label: 'APP标识',
    field: 'appOpenid',
    component: 'Input',
  },
  {
    label: '微信UNIONID',
    field: 'wxUnionid',
    component: 'Input',
  },
  {
    label: '公众号appid',
    field: 'officialAppid',
    component: 'Input',
  },
  {
    label: '身份证号码',
    field: 'idCard',
    component: 'Input',
  },
  {
    label: '发薪平台密码',
    field: 'idCardPassword',
    component: 'Input',
  },
  {
    label: '发薪平台加密盐',
    field: 'idCardSalt',
    component: 'Input',
  },
  {
    label: '是否实名认证',
    field: 'idCardOpen',
    component: 'Input',
  },
  {
    label: 'intentionNum',
    field: 'intentionNum',
    component: 'InputNumber',
  },
  {
    label: 'successNum',
    field: 'successNum',
    component: 'InputNumber',
  },
  {
    label: 'addNum',
    field: 'addNum',
    component: 'InputNumber',
  },
  {
    label: 'shareId',
    field: 'shareId',
    component: 'Input',
  },
  {
    label: '邀请人',
    field: 'vid',
    component: 'Input',
  },
  {
    label: '邀请时间',
    field: 'vtime',
    component: 'DatePicker',
  },
  {
    label: '兼兼街会员',
    field: 'isPay',
    component: 'InputNumber',
  },
  {
    label: '是否关注公众号',
    field: 'follow',
    component: 'InputNumber',
  },
  {
    label: 'payRole',
    field: 'payRole',
    component: 'InputNumber',
  },
  {
    label: '余额',
    field: 'balance',
    component: 'InputNumber',
  },
  {
    label: '积分',
    field: 'integerPrice',
    component: 'InputNumber',
  },
  {
    label: '小程序appid',
    field: 'appletAppid',
    component: 'Input',
  },
  {
    label: '性别',
    field: 'sex',
    component: 'Input',
  },
  {
    label: '是否分销商',
    field: 'isDai',
    component: 'Input',
  },
  {
    label: '团长等级',
    field: 'leaderLevelId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"teambuy_level,title,id"
     },
  },
];
