import {
  neurogen
} from '@/assets/js/blockSort'
import {
  urbanArea
} from '@/assets/js/districtCode'
export const employee = () => {
  return [{
    field: 'index',
    label: '编号',
    align: 'center',
  }, {
    field: 'station.name',
    operation: true,
    label: '充装气站',
    align: 'center',
  }, {
    field: 'company.name',
    label: '充装企业',
    align: 'center',
  }, {
    field: 'area',
    label: '所在区',
    align: 'center',
    options: urbanArea(),
  }, {
    field: 'city',
    label: '所在市',
    align: 'center',
    options: urbanArea(),
  }, {
    field: 'user.nickName',
    label: '充装人员',
    align: 'center',
  }, {
    field: 'tbFillData.innerCode',
    label: '气瓶单位内编码',
    align: 'center',
  }, {
    field: 'tbFillData.chipId',
    label: '高频编码',
    align: 'center',
  }, {
    field: 'tbFillData.productId',
    label: '产品类型',
    align: 'center',
  }, {
    field: 'tbFillData.productMediaId',
    label: '充装介质',
    align: 'center',
    colWidth: '100px',
    options: neurogen(),
  }, {
    field: 'tbFillData.fillTime',
    label: '充装时间',
    align: 'center',
    colWidth: '170px',
  }, {
    field: 'tbFillData.createTime',
    label: '创建时间',
    align: 'center',
    colWidth: '170px',
  }]
}

export const formRules = () => {
  return [{
    field: 'T_sn',
    label: '充装枪编号',
    placeholder: '充装枪编号',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入充装枪编号',
      trigger: 'blur'
    }]
  }, {
    field: 'T_sn',
    label: '芯片编号',
    placeholder: '芯片编号',
    type: 'input',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请输入芯片编号',
      trigger: 'blur'
    }]
  }, {
    field: 'T_online',
    type: 'select',
    label: '充装人员',
    placeholder: '请选择',
    colWidth: 24,
    rules: [{
      required: true,
      message: '请选择充装人员',
      trigger: 'change'
    }],
    options: [],
  }, {
    field: 'T_sn',
    label: '备注',
    placeholder: '地址',
    type: 'textarea',
    colWidth: 24,
  }, ]
}
