import axios from '@/utils/request'

/**
 * 获取单据列表
 * @param query
 * @returns {*}
 */
export function getThrInvOrders(query) {
  return axios({
    url: '/udiwms/thrsys/getThrInvOrders',
    method: 'get',
    params: query
  })
}

/**
 * 获取单据明细列表
 * @param query
 * @returns {*}
 */
export function getThrInvOrderDetails(query) {
  return axios({
    url: '/udiwms/thrsys/getThrInvOrderDetails',
    method: 'get',
    params: query
  })
}

/**
 * 删除明细行
 * @param query
 * @returns {*}
 */
export function delThrInvOrderDetail(query) {
  return axios({
    url: '/udiwms/thrsys/delThrInvOrderDetail',
    method: 'post',
    data: query
  })
}

/**
 * 删除单据
 * @param query
 * @returns {*}
 */
export function delThrInvOrder(query) {
  return axios({
    url: '/udiwms/thrsys/delThrInvOrder',
    method: 'post',
    data: query
  })
}

/**
 * 生成单据
 * @param query
 * @returns {*}
 */
export function generateOrder(query) {
  return axios({
    url: '/udiwms/thrsys/generateOrder',
    method: 'post',
    data: query
  })
}

/**
 * 生成单据
 * @param query
 * @returns {*}
 */
export function generateGhOrder(query) {
  return axios({
    url: '/udiwms/thrsys/generateGhOrder',
    method: 'post',
    data: query
  })
}

/**
 * 刷新单据
 * @param query
 * @returns {*}
 */
export function refreshBill(query) {
  return axios({
    url: '/udiwms/thrsys/refreshOrder',
    method: 'post',
    data: query
  })
}

/**
 * 刷新单据高耗
 * @param query
 * @returns {*}
 */
export function refreshGhBill(query) {
  return axios({
    url: '/udiwms/thrsys/refreshGhOrder',
    method: 'post',
    data: query
  })
}


/**
 * 下载收费出入库明细
 * @param query
 * @returns {AxiosPromise}
 */
export function dlThrInvFeeOrder(query) {
  return axios({
    url: '/udiwms/thrsys/downloadInvOrder',
    method: 'post',
    data: query
  })
}


/**
 * 下载高耗出入库明细
 * @param query
 * @returns {AxiosPromise}
 */
export function dlInvGhOrder(query) {
  return axios({
    url: '/udiwms/thrsys/downloadInvGhOrder',
    method: 'post',
    data: query
  })
}

/**
 * 下载普耗出入库明细
 * @param query
 * @returns {AxiosPromise}
 */
export function downloadInvPhOrder(query) {
  return axios({
    url: '/udiwms/thrsys/downloadInvPhOrder',
    method: 'post',
    data: query
  })
}


