import {
  orderStatus
} from '@/assets/js/blockSort'
export const employee = () => {
  return [{
      field: 'name',
      label: '名称',
      align: 'left',
    }, {
      field: 'companyAddress',
      label: '地址',
      align: 'center',
    }, {
      field: 'isIceReleaseCold',
      label: '冰排释冷',
      align: 'center',
      options: [{
        label: '已开启',
        value: true,
        bgcolor: '#67C23A',
      }, {
        label: '已关闭',
        value: false,
        bgcolor: '#F56C6C',
      }]
    }, {
      field: 'isCoolerReleaseCold',
      label: '保温箱预冷',
      align: 'center',
      options: [{
        label: '已开启',
        value: true,
        bgcolor: '#67C23A',
      }, {
        label: '已关闭',
        value: false,
        bgcolor: '#F56C6C',
      }]
    },
    // {
    //   field: 'isCoolerReleaseCold',
    //   label: '温湿度起讫时间',
    //   align: 'center',
    //   options: [{
    //     label: '已开启',
    //     value: true,
    //     bgcolor: '#67C23A',
    //   }, {
    //     label: '已关闭',
    //     value: false,
    //     bgcolor: '#F56C6C',
    //   }]
    // },
    {
      field: 'isOutStorage',
      label: '冷冻要求验证',
      align: 'center',
      options: [{
        label: '已开启',
        value: true,
        bgcolor: '#67C23A',
      }, {
        label: '已关闭',
        value: false,
        bgcolor: '#F56C6C',
      }]
    }, {
      field: 'remark',
      label: '备注',
      align: 'center',
    }, {
      field: 'action',
      label: '操作',
      colWidth: '330px',
      align: 'center',
      labelButton: [{
        type: 'subAdd',
        label: '新增子级',
        icon: 'el-icon-plus',
        style: 'primary',
      }, {
        type: 'edit',
        label: '编辑',
        icon: 'el-icon-edit',
        style: 'primary',
      }, {
        type: 'del',
        label: '删除',
        icon: 'el-icon-delete',
        style: 'danger',
      }]
    }
  ]
}

export const formRules = () => {
  return [{
    field: 'name',
    label: '名称',
    placeholder: '请输入名称',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入名称',
      trigger: 'blur'
    }]
  }, {
    field: 'companyAddress',
    label: '地址',
    placeholder: '请输入地址',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入地址',
      trigger: 'blur'
    }]
  }, {
    field: 'coldKey',
    label: '冷链3.0公司秘钥',
    placeholder: '请输入冷链3.0公司秘钥',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入冷链3.0公司秘钥',
      trigger: 'blur'
    }]
  }, {
    field: 'isIceReleaseCold',
    label: '冰排释冷',
    placeholder: '请选择冰排释冷',
    type: 'switch',
    colWidth: 6,
    rules: [{
      required: true,
      message: '请选择冰排释冷',
      trigger: 'blur'
    }]
  }, {
    field: 'isCoolerReleaseCold',
    label: '保温箱预冷',
    placeholder: '请选择是否开启保温箱预冷',
    type: 'switch',
    colWidth: 6,
    rules: [{
      required: true,
      message: '请选择是否开启保温箱预冷',
      trigger: 'blur'
    }]
  },
  // {
  //   field: 'isCoolerReleaseCold',
  //   label: '温湿度起讫时间',
  //   placeholder: '请选择是否开启温湿度起讫时间',
  //   type: 'switch',
  //   colWidth: 8,
  //   rules: [{
  //     required: true,
  //     message: '请选择是否开启温湿度起讫时间',
  //     trigger: 'blur'
  //   }]
  // },
  {
    field: 'isOutStorage',
    label: '冷冻要求验证',
    placeholder: '冷冻要求验证',
    type: 'switch',
    labelWidth:'170px',
    colWidth: 10,
    rules: [{
      required: true,
      message: '冷冻要求验证',
      trigger: 'blur'
    }]
  }, {
    field: 'remark',
    label: '备注',
    placeholder: '请输入备注',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: false,
    }]
  }, ]
}
