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: 'dateId_dictText'
   },
   {
    title: '时间标识',
    align:"center",
    sorter: true,
    dataIndex: 'timeId_dictText'
   },
   {
    title: '技师',
    align:"center",
    sorter: true,
    dataIndex: 'tenId_dictText'
   },
   {
    title: '电话',
    align:"center",
    sorter: true,
    dataIndex: 'phone_dictText'
   },
   {
    title: '是否开启',
    align:"center",
    dataIndex: 'isDelete',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}])
     },
   },
   {
    title: '时间',
    align:"center",
    dataIndex: 'timeName_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "技师",
      field: "tenId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"msg_technician,title,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "电话",
      field: "phone",
      component: 'JSearchSelect',
      componentProps:{
         dict:"han_hai_member,phone,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '日期标识',
    field: 'dateId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"msg_date,name,id"
    },
  },
  {
    label: '时间标识',
    field: 'timeId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"msg_time,name,id"
    },
  },
  {
    label: '技师',
    field: 'tenId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"msg_technician,title,id"
    },
  },
  {
    label: '电话',
    field: 'phone',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,phone,id"
    },
  },
  {
    label: '是否开启',
    field: 'isDelete',
     component: 'JSwitch',
     componentProps:{
     },
  },
  {
    label: '时间',
    field: 'timeName',
    component: 'JSearchSelect',
    componentProps:{
       dict:"msg_time,name,name"
    },
  },
];
