import request from '@/utils/request'

// 查询吊钩绑定列表
export function listHookBind(query) {
  return request({
    url: '/app/hookBind/list',
    method: 'get',
    params: query
  })
}

// 按批次查询吊钩绑定列表
export function listHookBindByBatch(query) {
  return request({
    url: '/app/hookBind/batchList',
    method: 'get',
    params: query
  })
}

// 查询吊钩绑定详细
export function getHookBind(query) {
  return request({
    url: '/app/hookBind/group',
    method: 'get',
    params: query
  })
}

// 查询吊钩绑定详细
export function getHookBindDetail(id) {
  return request({
    url: '/app/hookBind/detail/' + id,
    method: 'get'
  })
}

// 新增吊钩绑定
export function addHookBind(data) {
  return request({
    url: '/app/hookBind',
    method: 'post',
    data: data
  })
}

//新增吊钩批量绑定
export function addHookBindBatch(data) {
  return request({
    url: '/app/hookBind/addBatch',
    method: 'post',
    data: data
  })
}

// 修改吊钩绑定
export function updateHookBind(data) {
  return request({
    url: '/app/hookBind',
    method: 'put',
    data: data
  })
}

// 修改吊钩绑定
export function updateHookBindBatch(data) {
  return request({
    url: '/app/hookBind/editBatch',
    method: 'post',
    data: data
  })
}

// 删除吊钩绑定
export function delHookBind(id) {
  return request({
    url: '/app/hookBind/' + id,
    method: 'delete'
  })
}
