// 试剂列表查询表单
export const getSjSearchForm = () => {
  return {
    mc: {
      label: 'page.business.resource.sj.sjmc'
    },
    bh: {
      label: 'page.business.resource.sj.sjbh'
    },
    studyName: {
      label: 'page.business.resource.sj.sssy'
    }
  }
}
// 供试品列表查询表单
export const getGspSearchForm = () => {
  return {
    mc: {
      label: '名称/代号'
    },
    bh: {
      label: 'page.business.resource.sj.sjbh'
    },
    ph: {
      label: '物质批号'
    }
  }
}
// 给药制剂列表查询表单
export const getGyzjSearchForm = () => {
  return {
    mc: {
      label: 'page.business.resource.sj.sjmc'
    },
    bh: {
      label: 'page.business.resource.sj.sjbh'
    },
    studyMc: {
      label: 'page.business.resource.sj.sssy'
    }
  }
}
// 细胞列表查询表单
export const getXbSearchForm = () => {
  return {
    mc: {
      label: 'page.business.resource.sj.mc'
    },
    bh: {
      label: 'page.business.resource.sj.bh'
    },
    studyMc: {
      label: 'page.business.resource.sj.sssy'
    }
  }
}

// 试剂列表表格列
export const getSjColumns = () => {
  return [
    {
      prop: 'mc',
      label: 'page.business.resource.sj.sjmc'
    },
    {
      prop: 'bh',
      label: 'page.business.resource.sj.sjbh'
    },
    {
      prop: 'nd',
      label: 'page.business.resource.sj.sjnd'
    },
    {
      prop: 'nddw',
      label: 'page.business.resource.gsp.nddw'
    },
    {
      prop: 'sxr',
      label: 'page.business.resource.sj.sxr'
    },
    {
      prop: 'studyName',
      label: 'page.business.resource.sj.sssy'
    }
  ]
}
// 供试品列表表格列
export const getGspColumns = () => {
  return [
    {
      prop: 'mc',
      label: '名称/代号'
    },
    {
      prop: 'bh',
      label: 'page.business.resource.sj.sjbh'
    },
    {
      prop: 'yxq',
      label: '有效期'
    },
    {
      prop: 'ph',
      label: '物质批号'
    }
  ]
}
// 给药制剂列表表格列
export const getGyzjColumns = () => {
  return [
    {
      prop: 'mc',
      label: 'page.business.resource.sj.sjmc'
    },
    {
      prop: 'bh',
      label: 'page.business.resource.sj.sjbh'
    },
    {
      prop: 'nd',
      label: 'page.business.resource.sj.sjnd'
    },
    {
      prop: 'nddw',
      label: 'page.business.resource.gsp.nddw'
    },
    {
      prop: 'sxr',
      label: 'page.business.resource.sj.sxr'
    },
    {
      prop: 'studyName',
      label: 'page.business.resource.sj.sssy'
    }
  ]
}
// 细胞列表表格列
export const getXbColumns = () => {
  return [
    {
      prop: 'mc',
      label: '名称'
    },
    {
      prop: 'bh',
      label: '编号'
    },
    {
      prop: 'tj',
      label: '体积'
    },
    {
      prop: 'ly',
      label: '来源'
    },
    {
      prop: 'sxr',
      label: 'page.business.resource.sj.sxr'
    },
    {
      prop: 'studyName',
      label: 'page.business.resource.sj.sssy'
    }
  ]
}
// 检测板查询表单
export const getJcbSearchForm = () => {
  return {
    bh: {
      label: 'template.lba.lba002.jcbmc'
    },
    cjr: {
      label: 'template.lba.lba002.cjr'
    }
  }
}
// 检测板列表表格列
export const getJcbColumns = () => {
  return [
    {
      prop: 'bh',
      label: 'template.lba.lba002.jcbmc'
    },
    {
      prop: 'createTime',
      label: 'template.lba.lba002.cjsj'
    },
    {
      prop: 'cjr',
      label: 'template.lba.lba002.cjr'
    }
  ]
}
// 前序表单查询表单
export const getQxbdSearchForm = () => {
  return {
    bdmc: {
      label: 'template.yp.yp002.bdmc'
    },
    userMc: {
      label: 'template.yp.yp002.cjr'
    }
  }
}
// 前序表单列表表格列
export const getQxbdColumns = ($this) => {
  const locale = $this.$i18n.locale
  const configObj = {
    zh_CN: { 5: '已完成（经复核）', 7: '已完成' },
    en_US: { 5: 'Completed & Approved', 7: 'Completed' }
  }
  const o = configObj[locale]
  return [
    {
      prop: 'bdbh',
      label: 'template.yp.yp002.bdbh'
    },
    {
      prop: 'bdmc',
      label: 'template.yp.yp002.bdmc'
    },
    {
      prop: 'userMc',
      label: 'template.yp.yp002.cjr'
    },
    {
      prop: 'createTime',
      label: 'template.yp.yp002.cjsj'
    },
    {
      prop: 'bdzt',
      label: 'template.yp.yp002.bdzt',
      formatter: (row) => {
        return o[row.bdzt]
      }
    }
  ]
}
