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",
    sorter: true,
    dataIndex: 'createTime'
   },
   {
    title: '加油站',
    align:"center",
    dataIndex: 'shopId_dictText'
   },
   {
    title: '原价',
    align:"center",
    dataIndex: 'oldPrice'
   },
   {
    title: '支付价',
    align:"center",
    dataIndex: 'price'
   },
   {
    title: '用户标识',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '支付状态',
    align:"center",
    dataIndex: 'state_dictText'
   },
   {
    title: '头像',
    align:"center",
    dataIndex: 'userHead',
    customRender:render.renderAvatar,
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "加油站",
      field: "shopId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"cheer_shop,name,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "支付状态",
      field: "state",
      component: 'JSearchSelect',
      componentProps:{
         dict:",,water_state"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '加油站',
    field: 'shopId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"cheer_shop,name,id"
    },
  },
  {
    label: '原价',
    field: 'oldPrice',
    component: 'InputNumber',
  },
  {
    label: '支付价',
    field: 'price',
    component: 'InputNumber',
  },
  {
    label: '用户标识',
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
  {
    label: '支付状态',
    field: 'state',
    component: 'JSearchSelect',
    componentProps:{
       dict:"water_state"
    },
  },
  {
    label: '头像',
    field: 'userHead',
     component: 'JImageUpload',
     componentProps:{
      },
  },
];
