import axios from "@/utils/request";

export function listInnerOrder(query) {
  return axios({
    url: '/inv/inner/order/list',
    method: 'get',
    params: query
  })
}

export function auditListInnerOrder(query) {
  return axios({
    url: '/inv/inner/order/auditList',
    method: 'get',
    params: query
  })
}



export function listInnerOrderDetail(query) {
  return axios({
    url: '/inv/inner/order/list/detail',
    method: 'post',
    data: query
  })
}

export function getInnerOrder(id) {
  return axios({
    url: '/inv/inner/order/' + id,
    method: 'get'
  })
}

export function addInnerOrder(data) {
  return axios({
    url: '/inv/inner/order',
    method: 'post',
    data: data
  })
}


export function auditOrder(data) {
  return axios({
    url: '/inv/inner/order/auditOrder',
    method: 'post',
    data: data
  })
}



// 修改pur
export function updateInnerOrder(data) {
  return axios({
    url: '/inv/inner/order',
    method: 'put',
    data: data
  })
}

// 删除pur
export function delInnerOrder(id) {
  return axios({
    url: '/inv/inner/order/' + id,
    method: 'delete'
  })
}

export function inserThrOrderWeb(query) {
  return axios({
    url: "/inv/inner/order/postOrder",
    method: "post",
    data: query
  });
}


// 删除pur
export function delInnerOrderDetail(id) {
  return axios({
    url: '/inv/inner/order/detail/' + id,
    method: 'delete'
  })
}


// 添加打印详情
export function addOrderDetail(data) {
  return axios({
    url: '/inv/inner/order/insertDetail',
    method: 'post',
    data: data
  })
}
// 更新打印详情
export function updateOrderDetail(data) {
  return axios({
    url: '/inv/inner/order/updateDetail',
    method: 'post',
    data: data
  })
}

