import request from '@/utils/request'

// 查询委托列表
export function listEntrust(query) {
  return request({
    url: '/business/entrust/list',
    method: 'get',
    params: query
  })
}

// 查询委托详细
export function getEntrust(id) {
  return request({
    url: '/business/entrust/' + id,
    method: 'get'
  })
}

// 新增委托
export function addEntrust(data) {
  return request({
    url: '/business/entrust',
    method: 'post',
    data: data
  })
}

// 修改委托
export function updateEntrust(data) {
  return request({
    url: '/business/entrust',
    method: 'put',
    data: data
  })
}

// 删除委托
export function delEntrust(id) {
  return request({
    url: '/business/entrust/' + id,
    method: 'delete'
  })
}
