import {
  myOrder
} from '@/assets/js/blockSort'
export const employee = () => {
  return [{
    field: 'selection',
    label: '多选',
    align: 'center',
  }, {
    field: 'waybillNo',
    label: '运单号',
    align: 'center',
    colWidth: '180px',
  }, {
    field: 'myStatus',
    label: '状态',
    align: 'center',
    options: myOrder()
  }, {
    field: 'senderAddressName',
    label: '寄件人',
    align: 'center',
  }, {
    field: 'consigneeAddressName',
    label: '收件人',
    align: 'center',
  }, {
    field: 'temperatureInterval',
    label: '温度要求',
    align: 'center',
    colWidth: '150px',
  }, {
    field: 'deliveryCondition',
    label: '配送要求',
    align: 'center',
  }, {
    field: 'cargoType',
    label: '货物类型',
    align: 'center',
  }, {
    field: 'quantity',
    label: '数量',
    align: 'center',
  }, {
    field: 'createdAt',
    label: '下单时间',
    align: 'center',
    colWidth: '180px',
  }, {
    field: 'action',
    label: '操作',
    colWidth: '400px',
    align: 'center',
    labelButton: [{
      type: 'pdf',
      label: '下载PDF',
      icon: 'el-icon-download',
      style: 'warning',
    }, {
      type: 'logs',
      label: '详情',
      icon: 'el-icon-tickets',
      style: 'success',
    }, {
      type: 'edit',
      label: '编辑',
      icon: 'el-icon-edit',
      style: 'primary',
    }, {
      type: 'humiture',
      label: '温湿度记录',
      icon: 'el-icon-picture-outline-round',
      style: 'warning',
    }, {
      type: 'del',
      label: '删除',
      icon: 'el-icon-delete',
      style: 'danger',
    }]
  }]
}
export const employeeil = () => {
  return [{
    field: 'waybillNo',
    label: '运单号',
    align: 'center',
  }, {
    field: 'status',
    label: '状态',
    align: 'center',
    options: myOrder()
  }, {
    field: 'senderAddressName',
    label: '寄件人',
    align: 'center',
  }, {
    field: 'consigneeAddressName',
    label: '收件人',
    align: 'center',
  }, {
    field: 'createdAt',
    label: '下单时间',
    align: 'center',
  }, {
    field: 'printUser.nickName',
    label: '制单人',
    align: 'center',
  }]
}
export const formRules = () => {
  return [{
    field: 'temperatureInterval',
    type: 'select',
    label: '温度需求',
    placeholder: '请选择',
    colWidth: 12,
    multiple: false,
    rules: [{
      required: true,
      message: '请选择',
      trigger: 'blur,change'
    }],
    options: [{
        label: '常温',
        value: '常温',
      },
      {
        label: '冷藏(2-8℃)',
        value: '冷藏(2-8℃)',
      },
      {
        label: '冷藏(0-5℃)',
        value: '冷藏(0-5℃)',
      },
      {
        label: '冷冻(0℃以下)',
        value: '冷冻(0℃以下)',
      }
    ],
  }, {
    field: 'deliveryCondition',
    type: 'select',
    label: '配送要求',
    placeholder: '请选择',
    colWidth: 12,
    multiple: false,
    rules: [{
      required: true,
      message: '请选择',
      trigger: 'blur,change'
    }],
    options: [{
        label: '保温箱',
        value: '保温箱',
      },
      {
        label: '冷藏车',
        value: '冷藏车',
      },
      {
        label: '航空',
        value: '航空',
      },
      {
        label: '医药整车',
        value: '医药整车',
      },
      {
        label: '零担物流',
        value: '零担物流',
      }
    ],
  }, {
    field: 'cargoType',
    type: 'select',
    label: '货物类型',
    placeholder: '请选择',
    colWidth: 12,
    multiple: false,
    rules: [{
      required: true,
      message: '请选择',
      trigger: 'blur,change'
    }],
    options: [{
        label: '药品',
        value: '药品',
      },
      {
        label: '试剂',
        value: '试剂',
      },
      {
        label: '血液制品',
        value: '血液制品',
      },
      {
        label: '疫苗',
        value: '疫苗',
      },
      {
        label: '其它',
        value: '其它',
      }
    ],
  }, {
    field: 'quantity',
    type: 'input',
    label: '数量',
    placeholder: '请输入数量',
    colWidth: 12,
    rules: [{
      required: true,
      message: '请输入数量',
      trigger: 'blur,change'
    }],
  }, {
    field: 'remark',
    label: '备注',
    placeholder: '备注',
    type: 'textarea',
    colWidth: 24,
  }, ]
}
