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: 'money'
   },
   {
    title: '满多少可用',
    align:"center",
    dataIndex: 'useMoney'
   },
   {
    title: '过期时间',
    align:"center",
    dataIndex: 'endTime'
   },
   {
    title: '优惠券备注',
    align:"center",
    dataIndex: 'type'
   },
   {
    title: '所送用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '是否使用',
    align:"center",
    dataIndex: 'state'
   },
   {
    title: '使用时间',
    align:"center",
    dataIndex: 'stateTime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "所送用户",
      field: "userId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"han_hai_member,nick_name,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '金额',
    field: 'money',
    component: 'InputNumber',
  },
  {
    label: '满多少可用',
    field: 'useMoney',
    component: 'InputNumber',
  },
  {
    label: '过期时间',
    field: 'endTime',
    component: 'Input',
  },
  {
    label: '优惠券备注',
    field: 'type',
    component: 'Input',
  },
  {
    label: '所送用户',
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
  {
    label: '是否使用',
    field: 'state',
    component: 'InputNumber',
  },
  {
    label: '使用时间',
    field: 'stateTime',
    component: 'Input',
  },
];
