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: 'waresId_dictText'
   },
   {
    title: '关联收件人地址id',
    align:"center",
    dataIndex: 'addressId_dictText'
   },
   {
    title: '下单须知',
    align:"center",
    dataIndex: 'statement',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '产品数量',
    align:"center",
    dataIndex: 'number'
   },
   {
    title: '产品总价格',
    align:"center",
    dataIndex: 'price'
   },
   {
    title: '关联用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '订单状态(0-待支付 1-已支付 2-已完成)',
    align:"center",
    dataIndex: 'status'
   },
   {
    title: '收件人姓名',
    align:"center",
    dataIndex: 'userName'
   },
   {
    title: '收件人电话',
    align:"center",
    dataIndex: 'userPhone'
   },
   {
    title: '收件人地址',
    align:"center",
    dataIndex: 'userAddress'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '关联商品id',
    field: 'waresId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"travel_wares,wares_title,id"
     },
  },
  {
    label: '关联收件人地址id',
    field: 'addressId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"travel_address,address,id"
     },
  },
  {
    label: '下单须知',
    field: 'statement',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '产品数量',
    field: 'number',
    component: 'InputNumber',
  },
  {
    label: '产品总价格',
    field: 'price',
    component: 'InputNumber',
  },
  {
    label: '关联用户',
    field: 'userId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"han_hai_member,nick_name,id"
     },
  },
  {
    label: '订单状态(0-待支付 1-已支付 2-已完成)',
    field: 'status',
    component: 'InputNumber',
  },
  {
    label: '收件人姓名',
    field: 'userName',
    component: 'Input',
  },
  {
    label: '收件人电话',
    field: 'userPhone',
    component: 'Input',
  },
  {
    label: '收件人地址',
    field: 'userAddress',
    component: 'Input',
  },
];
