import request from '@/utils/request'

//质量巡检----检查表
export function getInspecttemplateList(query) {
  return request({
    url: '/quality/inspecttemplate/',
    method: 'get',
    params: query
  })
}
export function createInspecttemplate(data) {
  return request({
    url: '/quality/inspecttemplate/',
    method: 'post',
    data
  })
}
export function updateInspecttemplate(id, data) {
  return request({
    url: `/quality/inspecttemplate/${id}/`,
    method: 'put',
    data
  })
}

export function deleteInspecttemplate(id, data) {
  return request({
    url: `/quality/inspecttemplate/${id}/`,
    method: 'delete',
    data
  })
}
//质量巡检-----检查项
export function getQualityinspectList(query) {
  return request({
    url: '/quality/inspectitem/',
    method: 'get',
    params: query
  })
}

export function getQualityinspect(id) {
  return request({
    url: `/quality/inspectitem/${id}/`,
    method: 'get'
  })
}

export function createQualityinspect(data) {
  return request({
    url: '/quality/inspectitem/',
    method: 'post',
    data
  })
}

export function updateQualityinspect(id, data) {
  return request({
    url: `/quality/inspectitem/${id}/`,
    method: 'put',
    data
  })
}

export function deleteQualityinspect(id, data) {
  return request({
    url: `/quality/inspectitem/${id}/`,
    method: 'delete',
    data
  })
}
export function creatInspectdept(data){
  return request({
    url: '/quality/inspectdept/',
    method: 'post',
    data
  })
}
export function deleteInspectdept(id, data) {
  return request({
    url: `/quality/inspectdept/${id}/`,
    method: 'delete',
    data
  })
}

