import request from '@/utils/request'

// 查询羊只销售记录列表
export function listSaleRecord(query) {
  return request({
    url: '/saleRecord/saleRecord/list',
    method: 'get',
    params: query
  })
}

// 查询羊只销售记录详细
export function getSaleRecord(id) {
  return request({
    url: '/saleRecord/saleRecord/' + id,
    method: 'get'
  })
}

// 新增羊只销售记录
export function addSaleRecord(data) {
  return request({
    url: '/saleRecord/saleRecord',
    method: 'post',
    data: data
  })
}

// 修改羊只销售记录
export function updateSaleRecord(data) {
  return request({
    url: '/saleRecord/saleRecord',
    method: 'put',
    data: data
  })
}

// 删除羊只销售记录
export function delSaleRecord(ids) {
  return request({
    url: '/saleRecord/saleRecord/' + ids,
    method: 'delete'
  })
}

// 导出羊只销售记录
export function exportSaleRecord(query) {
  return request({
    url: '/saleRecord/saleRecord/export',
    method: 'post',
    data: query
  })
}

// 根据耳号查询羊只信息
export function getSheepInfo(bsManageTags) {
  return request({
    url: '/saleRecord/saleRecord/getSheepInfo',
    method: 'get',
    params: { bsManageTags }
  })
}
