// 生物样品分析方法学样品制备表-表格配置
// selectKey:编号选择的数据源key
// isXsy是否时稀释液：稀释液的名称不一样
// showKbjz 是否显示空白机制的列:生物样品分析方法学样品制备表（Matrix effect）-生物样品分析方法学样品制备表（基质效应）
export const getSWYPFXFFXYPZBBTableConfig = (
  $this,
  selectKey,
  isXsy,
  showKbjz
) => {
  let arr = [
    {
      label: 'template.sp.sp008.bh',
      prop: 'bh',
      bodyType: 'select',
      bodyOptions: $this.getDictOptions(selectKey),
      otherCode: 'bhOther',
      otherLabel: 'template.sp.sp016.bs',
      bodySubType: 'span',
      bodySubKey: 'bhCode',
      bodyFillType: 'preFill',
      width: 280
    },
    {
      label: 'template.sp.sp008.ysry',
      prop: 'ysry',
      bodyType: 'input',
      bodyFillType: 'preFill',
      width: 280
    },
    {
      label: 'template.sp.sp008.sjry',
      prop: 'sjry',
      bodyType: 'clickable',
      bodyFillType: 'actFill',
      width: 280
    },
    {
      label: 'template.sp.sp008.yjryxql',
      prop: 'yjryxql',
      width: 320,
      headerSelectKey: 'yjryxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'preFill',
      bodyMaxlength: 10
    },
    {
      label: 'template.sp.sp008.sjryxql',
      prop: 'sjryxql',
      width: 300,
      headerSelectKey: 'sjryxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'actFill',
      bodyMaxlength: 10,
      compareTo: 'yjryxql',
      copyFrom: 'yjryxql'
    },
    {
      label: isXsy ? 'template.sp.sp011.yjxsyxql' : 'template.sp.sp008.yjjzxql',
      prop: 'yjjzxql',
      width: isXsy ? 350 : 280,
      headerSelectKey: 'yjjzxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'preFill',
      bodyMaxlength: 10
    },
    {
      label: isXsy ? 'template.sp.sp011.sjxsyxql' : 'template.sp.sp008.sjjzxql',
      prop: 'sjjzxql',
      width: isXsy ? 350 : 280,
      headerSelectKey: 'sjjzxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'actFill',
      bodyMaxlength: 10,
      compareTo: 'yjjzxql',
      copyFrom: 'yjjzxql'
    },
    {
      label: 'template.sp.sp008.hhwznd',
      prop: 'hhwznd',
      width: 280,
      headerSelectKey: 'hhwzndUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_nddw'),
      bodyType: 'inputNumber',
      bodyFillType: 'preFill',
      bodyMaxlength: 10
    }
  ]
  if (showKbjz) {
    arr.splice(5, 0, {
      label: 'template.sp.sp013.kbjzbh',
      prop: 'kbjzbh',
      bodyType: 'clickable',
      bodyFillType: 'actFill',
      width: 280
    })
  }
  return arr
}

// 提取回收率-溶液稀释
export const getSWYPFXFFXYPZBBTQHSLTableConfig = ($this, selectKey) => {
  let arr = [
    {
      label: 'template.sp.sp008.bh',
      prop: 'bh',
      bodyType: 'select',
      bodyOptions: $this.getDictOptions(selectKey),
      bodySubType: 'span',
      bodySubKey: 'bhCode',
      bodyFillType: 'preFill',
      width: 280
    },
    {
      label: 'template.sp.sp008.ysry',
      prop: 'ysry',
      bodyType: 'input',
      bodyFillType: 'preFill',
      width: 280
    },
    {
      label: 'template.sp.sp008.sjry',
      prop: 'sjry',
      bodyType: 'clickable',
      bodyFillType: 'actFill',
      width: 280
    },
    {
      label: 'template.sp.sp008.yjryxql',
      prop: 'yjryxql',
      width: 320,
      headerSelectKey: 'yjryxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'preFill',
      bodyMaxlength: 10
    },
    {
      label: 'template.sp.sp008.sjryxql',
      prop: 'sjryxql',
      width: 300,
      headerSelectKey: 'sjryxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'actFill',
      bodyMaxlength: 10,
      compareTo: 'yjryxql',
      copyFrom: 'yjryxql'
    },
    {
      label: 'template.sp.sp009.yjgzyxql',
      prop: 'yjgzyxql',
      width: 350,
      headerSelectKey: 'yjgzyxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'preFill',
      bodyMaxlength: 10
    },
    {
      label: 'template.sp.sp009.sjgzyxql',
      prop: 'sjgzyxql',
      width: 350,
      headerSelectKey: 'sjgzyxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'actFill',
      bodyMaxlength: 10,
      compareTo: 'yjgzyxql',
      copyFrom: 'yjgzyxql'
    },
    {
      label: 'template.sp.sp009.yjxsyxql',
      prop: 'yjxsyxql',
      width: 350,
      headerSelectKey: 'yjxsyxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'preFill',
      bodyMaxlength: 10
    },
    {
      label: 'template.sp.sp009.sjxsyxql',
      prop: 'sjxsyxql',
      width: 350,
      headerSelectKey: 'sjxsyxqlUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_tjdw'),
      bodyType: 'inputNumber',
      bodyFillType: 'actFill',
      bodyMaxlength: 10,
      compareTo: 'yjxsyxql',
      copyFrom: 'yjxsyxql'
    },
    {
      label: 'template.sp.sp008.hhwznd',
      prop: 'hhwznd',
      width: 280,
      headerSelectKey: 'hhwzndUnit',
      fillType: 'preFill',
      headerOptions: $this.getDictOptions('business_nddw'),
      bodyType: 'inputNumber',
      bodyFillType: 'preFill',
      bodyMaxlength: 10
    }
  ]
  return arr
}
