import request from '@/utils/request'

// 查询单据明细列表
export function listDetail(query) {
  return request({
    url: '/order/detail/list',
    method: 'get',
    params: query
  })
}

// 查询单据明细详细
export function getDetail(id) {
  return request({
    url: '/order/detail/' + id,
    method: 'get'
  })
}

// 新增单据明细
export function addDetail(data) {
  return request({
    url: '/order/detail',
    method: 'post',
    data: data
  })
}

// 修改单据明细
export function updateDetail(data) {
  return request({
    url: '/order/detail',
    method: 'put',
    data: data
  })
}

// 删除单据明细
export function delDetail(id) {
  return request({
    url: '/order/detail/' + id,
    method: 'delete'
  })
}
