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: 'name'
   },
   {
    title: '商品图',
    align:"center",
    dataIndex: 'pic',
    customRender:render.renderAvatar,
   },
   {
    title: '商家id',
    align:"center",
    dataIndex: 'shopId_dictText'
   },
   {
    title: '规格id',
    align:"center",
    dataIndex: 'skuId_dictText'
   },
   {
    title: '商品详情',
    align:"center",
    dataIndex: 'detail',
    customRender:render.renderAvatar,
   },
   {
    title: '是否上架 0否 1是',
    align:"center",
    dataIndex: 'upFlag_dictText'
   },
   {
    title: '排序',
    align:"center",
    dataIndex: 'sort'
   },
   {
    title: '是否删除 0否 1是',
    align:"center",
    dataIndex: 'delFlag_dictText'
   },
   {
    title: 'column10',
    align:"center",
    dataIndex: 'column10'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '商品名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '商品图',
    field: 'pic',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '商家id',
    field: 'shopId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '规格id',
    field: 'skuId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '商品详情',
    field: 'detail',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '是否上架 0否 1是',
    field: 'upFlag',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '排序',
    field: 'sort',
    component: 'InputNumber',
  },
  {
    label: '是否删除 0否 1是',
    field: 'delFlag',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: 'column10',
    field: 'column10',
    component: 'InputNumber',
  },
];
