// 质检
import request from '@/utils/request'

// 质检表格
export const getQualityData = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionBatchController/getRecordList',
      method: 'post',
      data: params.data,
      params: params.params,
    })
  }
  
  // 删除质检批次
  export const deleteRecord = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionBatchController/deleteRecord',
      method: 'post',
      params
    })
  }
  
  // 获取质检-检查信息
  export const getBatchStatusRecord = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionBatchArchivesRelationController/showCurrentArchiveInspectItemAndValueAndStatus',
      method: 'post',
      params
    })
  }
  
  // 质检-检查-更新状态
  export const updateBatchStatus = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionBatchArchivesRelationController/updateCurrentArchiveCheckedStatus',
      method: 'post',
      params
    })
  }
  
  // 质检-检查-保存错误信息
  export const saveErrorInfo = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionArchivesIssueController/insertRecord',
      method: 'post',
      params: params.params,
      data: params.data
    })
  }
  
  // 质检-检查-获取错误信息
  export const getErrorInfo = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionArchivesIssueController/getArchivesIssuesByBatchInfoIdAndRecId',
      method: 'post',
      params
    })
  }
  
  // 质检-检查-获取原文信息
  export const getOriginInfo = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionBatchArchivesRelationController/getImagesSimpleInformation',
      method: 'post',
      params
    })
  }

  // 质检-检查-保存原文错误信息
  export const saveOriginError = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionFileIssueController/insertRecord',
      method: 'post',
      params: params.params,
      data: params.data
    })
  }

  // 质检-检查-获取原文错误信息
  export const getOriginErrorInfo = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionFileIssueController/getFileIssuesByBatchInfoIdAndRecIdAndFileId',
      method: 'post',
      params
    })
  }

  // 质检-问题记录列表
  export const getQuesData = params => {
    return request({
      url: '/point-strategy/v/QualityInspectionBatchArchivesRelationController/getComprehensiveMixErrorResult',
      method: 'post',
      params
    })
  }

    // 质检-检查前判断是否设置质检项
  export const qualityHaveSet = params => {
      return request({
        url: '/point-strategy/v/QualityInspectionItemController/haveSet',
        method: 'post',
        params
      })
  }