import request from '@/utils/request'

// 分页查询换购记录列表
export function pageListRecord(query) {
  return request({
    url: '/exchange/record/pageList',
    method: 'get',
    params: query
  })
}

// 查询换购记录列表
export function listRecord(query) {
  return request({
    url: '/exchange/record/list',
    method: 'get',
    params: query
  })
}

// 查询换购记录详细
export function getRecord(id) {
  return request({
    url: '/exchange/record/' + id,
    method: 'get'
  })
}

// 新增换购记录
export function addRecord(data) {
  return request({
    url: '/exchange/record',
    method: 'post',
    data: data
  })
}

// 修改换购记录
export function updateRecord(data) {
  return request({
    url: '/exchange/record',
    method: 'put',
    data: data
  })
}

// 删除换购记录
export function delRecord(id) {
  return request({
    url: '/exchange/record/' + id,
    method: 'delete'
  })
}

// 导出换购记录
export function exportRecord(query) {
  return request({
    url: '/exchange/record/' + 'export',
    method: 'post',
    params: query
  })
}
