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: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '服务项目',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '服务时间',
    align:"center",
    dataIndex: 'times'
   },
   {
    title: '原价',
    align:"center",
    dataIndex: 'oldPrice'
   },
   {
    title: '现价',
    align:"center",
    dataIndex: 'price'
   },
   {
    title: '已出售',
    align:"center",
    dataIndex: 'payNum'
   },
   {
    title: '小标题',
    align:"center",
    dataIndex: 'subTitle'
   },
   {
    title: '分销商所得(一级)',
    align:"center",
    dataIndex: 'shopMoney'
   },
   {
    title: '技师所得（项目）',
    align:"center",
    dataIndex: 'tenMoney'
   },
   {
    title: '一级所得',
    align:"center",
    dataIndex: 'tenPrice'
   },
   {
    title: '二级所得',
    align:"center",
    dataIndex: 'tenMinPrice'
   },
   {
    title: '评价所得',
    align:"center",
    dataIndex: 'pinPrice'
   },
   {
    title: '排序',
    align:"center",
    dataIndex: 'sort'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "服务项目",
      field: "title",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '主图',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '服务项目',
    field: 'title',
    component: 'Input',
  },
  {
    label: '服务时间',
    field: 'times',
    component: 'InputNumber',
  },
  {
    label: '原价',
    field: 'oldPrice',
    component: 'InputNumber',
  },
  {
    label: '现价',
    field: 'price',
    component: 'InputNumber',
  },
  {
    label: '已出售',
    field: 'payNum',
    component: 'InputNumber',
  },
  {
    label: '小标题',
    field: 'subTitle',
    component: 'Input',
  },
  {
    label: '项目介绍',
    field: 'projectSub',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '下单说明',
    field: 'projectExplain',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
  {
    label: '分销商所得(一级)',
    field: 'shopMoney',
    component: 'InputNumber',
  },
  {
    label: '技师所得（项目）',
    field: 'tenMoney',
    component: 'InputNumber',
  },
  {
    label: '一级所得',
    field: 'tenPrice',
    component: 'InputNumber',
  },
  {
    label: '二级所得',
    field: 'tenMinPrice',
    component: 'InputNumber',
  },
  {
    label: '评价所得',
    field: 'pinPrice',
    component: 'InputNumber',
  },
  {
    label: '排序',
    field: 'sort',
    component: 'InputNumber',
  },
];
