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: 'overdueTime'
   },
   {
    title: '兑换码',
    align:"center",
    dataIndex: 'code'
   },
   {
    title: '使用状态',
    align:"center",
    dataIndex: 'status_dictText'
   },
   {
    title: '兑换积分数量',
    align:"center",
    sorter: true,
    dataIndex: 'score'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "兑换码",
      field: "code",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "使用状态",
      field: "status",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"exchangeCode_status"
      },
      colProps: {span: 6},
 	},
	{
      label: "兑换积分数量",
      field: "score",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '过期时间',
    field: 'overdueTime',
    component: 'Input',
  },
  {
    label: '兑换码',
    field: 'code',
    component: 'Input',
  },
  {
    label: '使用状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"exchangeCode_status"
     },
  },
  {
    label: '兑换积分数量',
    field: 'score',
    component: 'InputNumber',
  },
];
