import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Form';

export const formSchemas: FormSchema[] = [
  {
    label: '电梯编号',
    field: 'elevatorNum',
    component: 'Input',
  },
  {
    label: '电梯名称',
    field: 'elevatorName',
    component: 'Input',
  },
  {
    label: '电梯地址',
    field: 'elevatorAddress',
    component: 'Input',
  },


  {
    label: '保险公司名称',
    field: 'insuranceName',
    component: 'Input',
  },
  {
    label: '客户名称',
    field: 'clientName',
    component: 'Input',
  },
  {
    label: '保费',
    field: 'premium',
    component: 'Input',
  },

  {
    label: '保单截止日期',
    field: 'expirationTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
    },
  },

];

export const columns: BasicColumn[] = [
  {
    title: '主键id',
    dataIndex: 'id',
    ifShow:false
  },
  {
    title: '电梯编号',
    dataIndex: 'elevatorNum',
  },
  {
    title: '电梯名称',
    dataIndex: 'elevatorName',
  },
  {
    title: '电梯地址',
    dataIndex: 'elevatorAddress',
  },


  {
    title: '保险公司名称',
    dataIndex: 'insuranceName',
  },
  {
    title: '客户名称',
    dataIndex: 'clientName',
  },
  {
    title: '保费',
    dataIndex: 'premium',
  },
  {
    title: '合同链接',
    dataIndex: 'contract',
  },
  {
    title: '保单截止日期',
    dataIndex: 'expirationTime',
  },
 
];

export const modalSchemas: FormSchema[] = [
  {
    label: '主键id',
    field: 'id',
    required: false,
    component: 'Input',
    show: false,
  },
  {
    label: '电梯编号',
    field: 'elevatorNum',
    required: true,
    component: 'Input',
  },
  {
    label: '电梯名称',
    field: 'elevatorName',
    required: false,
    component: 'Input',
    show: false
  },
  {
    label: '电梯地址',
    field: 'elevatorAddress',
    required: false,
    component: 'Input',
    show: false
  },
  {
    label: '电梯id',
    field: 'elevatorId',
    required: false,
    component: 'Input',
    show: false
  },
  {
    label: '保险公司',
    field: 'insuranceId',
    required: true,
    component: 'TreeSelect',
    helpMessage: ['注意绑定的角色要带相应的部门权限, 否则无法正常登录'],
  },
  {
    label: '保险公司名称',
    field: 'insuranceName',
    required: true,
    component: 'Input',
  },
  {
    label: '客户名称',
    field: 'clientName',
    required: true,
    component: 'Input',
  },
  {
    label: '保费',
    field: 'premium',
    required: true,
    component: 'InputNumber',
  },
  {
    label: '合同链接',
    field: 'contract',
    required: true,
    component: 'Input',
  },
  {
    label: '保单截止日期',
    field: 'expirationTime',
    required: true,
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
    },
  },
  {
    label: '部门id',
    field: 'deptId',
    required: false,
    component: 'Input',
    show: false,
  },
];
