export const tableRules = () => {
  return [{
    field: 'provCarInfo.carNo',
    label: '车牌号',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.transportTime',
    label: '道路运输证有效期',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.carNumber',
    label: '道路运输证编号',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.carLoadage',
    label: '车辆核定载货量',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.carNvq',
    label: '车辆资格证',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.typeTransport',
    label: '车辆运输类型',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.businessName',
    label: '业户名称',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.contactNumber',
    label: '联系电话',
    colWidth: '150',
    align: 'center',
  }, {
    field: 'provCarInfo.issueAuthority',
    label: '发证机关',
    colWidth: '200',
    align: 'center',
  }, {
    field: 'truckUserCarInfo.user.nickName',
    label: '绑定司机',
    colWidth: '200',
    align: 'center',
  }, {
    field: 'action',
    label: '操作',
    colWidth: '240px',
    align: 'center',
    labelButton: [{
      type: 'binding',
      label: '绑定司机',
      icon: 'el-icon-edit',
      style: 'primary',
    }, {
      type: 'edit',
      label: '编辑',
      icon: 'el-icon-edit',
      style: 'primary',
    }, {
      type: 'del',
      label: '删除',
      icon: 'el-icon-delete',
      style: 'danger',
    }]
  }]
}

export const rules = () => {
  return [{
    field: 'carNo',
    label: '车牌号',
    placeholder: '车牌号',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入车牌号',
      trigger: 'blur'
    }]
  }, {
    field: 'transportTime',
    label: '道路运输证有效期',
    placeholder: '道路运输证有效期',
    type: 'time',
    colWidth: 12,
    rules: [{
      type: 'string',
      required: true,
      message: '请选择道路运输证有效期',
      trigger: 'blur,change'
    }]
  }, {
    field: 'carNumber',
    label: '道路运输证编号',
    placeholder: '道路运输证编号',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入道路运输证编号',
      trigger: 'blur'
    }]
  }, {
    field: 'carLoadage',
    label: '车辆核定载货量',
    placeholder: '车辆核定载货量',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入车辆核定载货量',
      trigger: 'blur'
    }]
  }, {
    field: 'carNvq',
    label: '车辆资格证',
    placeholder: '车辆资格证',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入车辆资格证',
      trigger: 'blur'
    }]
  }, {
    field: 'typeTransport',
    label: '车辆运输类型',
    placeholder: '车辆运输类型',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入车辆运输类型',
      trigger: 'blur'
    }]
  }, {
    field: 'businessName',
    label: '业户名称',
    placeholder: '业户名称',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入业户名称',
      trigger: 'blur'
    }]
  }, {
    field: 'contactNumber',
    label: '联系电话',
    placeholder: '联系电话',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入联系电话',
      trigger: 'blur'
    }]
  }, {
    field: 'issueAuthority',
    label: '发证机关',
    placeholder: '发证机关',
    type: 'input',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入发证机关',
      trigger: 'blur'
    }]
  }, ]
}
export const vehicle = () => {
  return [{
    field: 'userId',
    type: 'searchSelect',
    label: '货车司机',
    placeholder: '请选择货车司机',
    colWidth: 24,
    labelWidth: '80px',
    rules: [{
      required: true,
      message: '请选择货车司机',
      trigger: 'change'
    }],
    options: [],
  }, ]
}
