import request from '@/utils/request'

// 查询分销批次列表
export function listDistributeBatch(query) {
  return request({
    url: '/app/distributeBatch/list',
    method: 'get',
    params: query
  })
}

// 查询分销批次详细
export function getDistributeBatch(id) {
  return request({
    url: '/app/distributeBatch/' + id,
    method: 'get'
  })
}

// 查询可绑定吊钩的批次
export function getValidDistributeBatch(query) {
  return request({
    url: '/app/distributeBatch/getValidList',
    method: 'get',
    params: query
  })
}



// 新增分销批次
export function addDistributeBatch(data) {
  return request({
    url: '/app/distributeBatch',
    method: 'post',
    data: data
  })
}

// 批量新增分销批次
export function addDistributeBatchByBatch(data) {
  return request({
    url: '/app/distributeBatch/addBatch',
    method: 'post',
    data: data
  })
}

// 修改分销批次
export function updateDistributeBatch(data) {
  return request({
    url: '/app/distributeBatch',
    method: 'put',
    data: data
  })
}

// 删除分销批次
export function delDistributeBatch(id) {
  return request({
    url: '/app/distributeBatch/' + id,
    method: 'delete'
  })
}
