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: 'createTime'
   },
   {
    title: '订单状态',
    align:"center",
    dataIndex: 'status_dictText'
   },
   {
    title: '下单用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '订单图片',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '订单标题',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '客户姓名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '联系电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '订单价格',
    align:"center",
    dataIndex: 'price'
   },
   {
    title: '配送地址',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '地址明细',
    align:"center",
    dataIndex: 'addressDetail'
   },
   {
    title: '直推佣金',
    align:"center",
    dataIndex: 'oneMoney'
   },
   {
    title: '间推佣金',
    align:"center",
    dataIndex: 'twoMoney'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "订单状态",
      field: "status",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"order_state"
      },
      colProps: {span: 6},
 	},
	{
      label: "下单用户",
      field: "userId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"han_hai_member,nick_name,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '订单状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"order_state"
     },
  },
  {
    label: '下单用户',
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
  {
    label: '订单图片',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '订单标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '客户姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '联系电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '订单价格',
    field: 'price',
    component: 'InputNumber',
  },
  {
    label: '配送地址',
    field: 'address',
    component: 'Input',
  },
  {
    label: '地址明细',
    field: 'addressDetail',
    component: 'Input',
  },
  {
    label: '直推佣金',
    field: 'oneMoney',
    component: 'InputNumber',
  },
  {
    label: '间推佣金',
    field: 'twoMoney',
    component: 'InputNumber',
  },
];
