import request from '@/utils/request'

// 提交检查单
export function submitInspection(data) {
  return request({
    url: '/check/checkRecord/add',
    method: 'post',
    data: data
  })
}

// 获取检查单列表

export function getInspectionList(params = {}) {
  return request({
    url: '/check/checkRecord/list',
    method: 'get',
    params
  });
}

//获取检查记录详细信息
export function getInspectionListById(id) {
  return request({
    url: `/check/checkRecord/${id}`,   //  反引号
    method: 'get',
  });
}

//新增草稿检查记录

export function addDraftInspection(data) {
  return request({
    url: '/check/checkRecord/draft',
    method: 'post',
    data: data
  })
}

//修改检查记录
export function updateInspection(data) {
  return request({
    url: '/check/checkRecord',
    method: 'put',
    data: data
  })
}
