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: 'userName'
   },
   {
    title: '工人名',
    align:"center",
    dataIndex: 'workName'
   },
   {
    title: '头像图片',
    align:"center",
    dataIndex: 'headPic',
    customRender:render.renderAvatar,
   },
   {
    title: '工作标题',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '公司名称',
    align:"center",
    dataIndex: 'companyName'
   },
   {
    title: '工人出发地址',
    align:"center",
    dataIndex: 'workerAddress'
   },
   {
    title: '出行方式 0出租车 1 网约车 2 公交地铁 3无',
    align:"center",
    dataIndex: 'travelType_dictText'
   },
   {
    title: '上班地址',
    align:"center",
    dataIndex: 'workAddress'
   },
   {
    title: '行业/工种',
    align:"center",
    dataIndex: 'industryName'
   },
   {
    title: '工人个人简介',
    align:"center",
    dataIndex: 'detail',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '工作内容',
    align:"center",
    dataIndex: 'workDetail',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '图片上传',
    align:"center",
    dataIndex: 'workPic',
    customRender:render.renderAvatar,
   },
   {
    title: '工人联系方式',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '招聘方联系方式',
    align:"center",
    dataIndex: 'bossPhone'
   },
   {
    title: '角色 0招聘方 1 求职方',
    align:"center",
    dataIndex: 'role_dictText'
   },
   {
    title: '年龄',
    align:"center",
    dataIndex: 'age'
   },
   {
    title: '性别',
    align:"center",
    dataIndex: 'gender_dictText'
   },
   {
    title: '期望日薪',
    align:"center",
    dataIndex: 'dayMoney'
   },
   {
    title: '时间范围',
    align:"center",
    dataIndex: 'startTime'
   },
   {
    title: '时间范围',
    align:"center",
    dataIndex: 'endTime'
   },
   {
    title: '工作时长',
    align:"center",
    dataIndex: 'workTime'
   },
   {
    title: '期望薪资最小值',
    align:"center",
    dataIndex: 'moneymin'
   },
   {
    title: '期望薪资最大值',
    align:"center",
    dataIndex: 'moneymax'
   },
   {
    title: '审核状态 0审核中 1 审核通过 2审核未通过',
    align:"center",
    dataIndex: 'auditStatus_dictText'
   },
   {
    title: '结算方式 0提前支付 1 试用后支付',
    align:"center",
    dataIndex: 'payType_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "用户名",
      field: "userName",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "工人名",
      field: "workName",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "公司名称",
      field: "companyName",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "工人联系方式",
      field: "phone",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "招聘方联系方式",
      field: "bossPhone",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户名',
    field: 'userName',
    component: 'Input',
  },
  {
    label: '工人名',
    field: 'workName',
    component: 'Input',
  },
  {
    label: '头像图片',
    field: 'headPic',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '工作标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '公司名称',
    field: 'companyName',
    component: 'Input',
  },
  {
    label: '工人出发地址',
    field: 'workerAddress',
    component: 'Input',
  },
  {
    label: '出行方式 0出租车 1 网约车 2 公交地铁 3无',
    field: 'travelType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"travel_type"
     },
  },
  {
    label: '上班地址',
    field: 'workAddress',
    component: 'Input',
  },
  {
    label: '行业/工种',
    field: 'industryName',
    component: 'Input',
  },
  {
    label: '工人个人简介',
    field: 'detail',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '工作内容',
    field: 'workDetail',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '图片上传',
    field: 'workPic',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '工人联系方式',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '招聘方联系方式',
    field: 'bossPhone',
    component: 'Input',
  },
  {
    label: '角色 0招聘方 1 求职方',
    field: 'role',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"user_role"
     },
  },
  {
    label: '年龄',
    field: 'age',
    component: 'InputNumber',
  },
  {
    label: '性别',
    field: 'gender',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"sex"
     },
  },
  {
    label: '期望日薪',
    field: 'dayMoney',
    component: 'InputNumber',
  },
  {
    label: '时间范围',
    field: 'startTime',
    component: 'Input',
  },
  {
    label: '时间范围',
    field: 'endTime',
    component: 'Input',
  },
  {
    label: '工作时长',
    field: 'workTime',
    component: 'Input',
  },
  {
    label: '期望薪资最小值',
    field: 'moneymin',
    component: 'InputNumber',
  },
  {
    label: '期望薪资最大值',
    field: 'moneymax',
    component: 'InputNumber',
  },
  {
    label: '审核状态 0审核中 1 审核通过 2审核未通过',
    field: 'auditStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"audit_status"
     },
  },
  {
    label: '结算方式 0提前支付 1 试用后支付',
    field: 'payType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"pay_type"
     },
  },
];
