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: 'categorytwoId_dictText'
   },
   {
    title: '车辆型号',
    align:"center",
    dataIndex: 'model'
   },
   {
    title: '年限',
    align:"center",
    dataIndex: 'carTime',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '公里数',
    align:"center",
    dataIndex: 'mileage'
   },
   {
    title: '联系人',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '联系电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: '关联用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '关联二级分类id',
    field: 'categorytwoId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"carrent_categorytwo,name,id"
     },
  },
  {
    label: '车辆型号',
    field: 'model',
    component: 'Input',
  },
  {
    label: '年限',
    field: 'carTime',
    component: 'DatePicker',
  },
  {
    label: '公里数',
    field: 'mileage',
    component: 'InputNumber',
  },
  {
    label: '联系人',
    field: 'name',
    component: 'Input',
  },
  {
    label: '联系电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '关联用户',
    field: 'userId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"han_hai_member,nick_name,id"
     },
  },
];
