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: 'title'
   },
   {
    title: '金额',
    align:"center",
    dataIndex: 'money'
   },
   {
    title: '用户原本金额',
    align:"center",
    dataIndex: 'userMoney'
   },
   {
    title: '备注说明',
    align:"center",
    dataIndex: 'info'
   },
   {
    title: '支付时间',
    align:"center",
    dataIndex: 'payTime'
   },
   {
    title: '用户Id',
    align:"center",
    dataIndex: 'memberId'
   },
   {
    title: '类型 0支出  1支入',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '订单id',
    align:"center",
    dataIndex: 'orderId'
   },
   {
    title: '服务费',
    align:"center",
    dataIndex: 'serviceCharge'
   },
   {
    title: '退款订单号',
    align:"center",
    dataIndex: 'refundRechargeId'
   },
   {
    title: '提现审核 0未审核 1已审核 2已打款 3审核未通过',
    align:"center",
    dataIndex: 'state_dictText'
   },
   {
    title: '商家批次单号',
    align:"center",
    dataIndex: 'outBatchNo'
   },
   {
    title: '真实姓名',
    align:"center",
    dataIndex: 'realName'
   },
   {
    title: '微信批次单号',
    align:"center",
    dataIndex: 'batchId'
   },
   {
    title: '审核说明',
    align:"center",
    dataIndex: 'checkInfo'
   },
   {
    title: '提现id',
    align:"center",
    dataIndex: 'withdrawalId'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "用户Id",
      field: "memberId",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '金额',
    field: 'money',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入金额!'},
          ];
     },
  },
  {
    label: '用户原本金额',
    field: 'userMoney',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入用户原本金额!'},
          ];
     },
  },
  {
    label: '备注说明',
    field: 'info',
    component: 'Input',
  },
  {
    label: '支付时间',
    field: 'payTime',
    component: 'Input',
  },
  {
    label: '用户Id',
    field: 'memberId',
    component: 'Input',
  },
  {
    label: '类型 0支出  1支入',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"rec_type"
     },
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入类型 0支出  1支入!'},
          ];
     },
  },
  {
    label: '订单id',
    field: 'orderId',
    component: 'Input',
  },
  {
    label: '服务费',
    field: 'serviceCharge',
    component: 'InputNumber',
  },
  {
    label: '退款订单号',
    field: 'refundRechargeId',
    component: 'Input',
  },
  {
    label: '提现审核 0未审核 1已审核 2已打款 3审核未通过',
    field: 'state',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"rec_state"
     },
  },
  {
    label: '商家批次单号',
    field: 'outBatchNo',
    component: 'Input',
  },
  {
    label: '真实姓名',
    field: 'realName',
    component: 'Input',
  },
  {
    label: '微信批次单号',
    field: 'batchId',
    component: 'Input',
  },
  {
    label: '审核说明',
    field: 'checkInfo',
    component: 'Input',
  },
  {
    label: '提现id',
    field: 'withdrawalId',
    component: 'Input',
  },
];
