import request from '@/utils/request'

// 查询血码关系列表
export function listSlaughterRelation(query) {
  return request({
    url: '/app/slaughterRelation/list',
    method: 'get',
    params: query
  })
}
// 查询血码关系列表
export function supplierCodeSumList(query) {
  return request({
    url: '/app/slaughterRelation/supplierList',
    method: 'get',
    params: query
  })
}

// 查询血码关系详细
export function getSlaughterRelation(id) {
  return request({
    url: '/app/slaughterRelation/' + id,
    method: 'get'
  })
}

// 新增血码关系
export function addSlaughterRelation(data) {
  return request({
    url: '/app/slaughterRelation',
    method: 'post',
    data: data
  })
}

// 批量新增血码关系
export function addSlaughterRelationBatch(data) {
  return request({
    url: '/app/slaughterRelation/addBatch',
    method: 'post',
    data: data
  })
}

// 修改血码关系
export function updateSlaughterRelation(data) {
  return request({
    url: '/app/slaughterRelation',
    method: 'put',
    data: data
  })
}

// 删除血码关系
export function delSlaughterRelation(id) {
  return request({
    url: '/app/slaughterRelation/' + id,
    method: 'delete'
  })
}

//全部血码选择
export function getAllSlaughterRelation(query) {
  return request({
    url: '/app/slaughterRelation/optionselect',
    method: 'get',
    params: query
  })
}
