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: '站点id',
    align:"center",
    dataIndex: 'siteId'
   },
   {
    title: '业务金额（人民币）',
    align:"center",
    dataIndex: 'amount'
   },
   {
    title: 'google广告账号',
    align:"center",
    dataIndex: 'googleAccount'
   },
   {
    title: ' 1--新签 2--续充 ',
    align:"center",
    dataIndex: 'type'
   },
   {
    title: '公司名称',
    align:"center",
    dataIndex: 'companyName'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '站点id',
    field: 'siteId',
    component: 'Input',
  },
  {
    label: '业务金额（人民币）',
    field: 'amount',
    component: 'InputNumber',
  },
  {
    label: 'google广告账号',
    field: 'googleAccount',
    component: 'Input',
  },
  {
    label: ' 1--新签 2--续充 ',
    field: 'type',
    component: 'InputNumber',
  },
  {
    label: '公司名称',
    field: 'companyName',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  siteId: {title: '站点id',order: 0,view: 'text', type: 'string',},
  amount: {title: '业务金额（人民币）',order: 1,view: 'number', type: 'number',},
  googleAccount: {title: 'google广告账号',order: 2,view: 'text', type: 'string',},
  type: {title: ' 1--新签 2--续充 ',order: 3,view: 'number', type: 'number',},
  companyName: {title: '公司名称',order: 4,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}