import request from '@/utils/request'

// 查询cmc结算审批列表
export function listSettle(query) {
  return request({
    url: '/oa/settle/list',
    method: 'get',
    params: query
  })
}

// 查询cmc结算审批详细
export function getSettle(settleId) {
  return request({
    url: '/oa/settle/' + settleId,
    method: 'get'
  })
}

// 新增cmc结算审批
export function addSettle(data) {
  return request({
    url: '/oa/settle',
    method: 'post',
    data: data
  })
}

// 修改cmc结算审批
export function updateSettle(data) {
  return request({
    url: '/oa/settle',
    method: 'put',
    data: data
  })
}

// 删除cmc结算审批
export function delSettle(settleId) {
  return request({
    url: '/oa/settle/' + settleId,
    method: 'delete'
  })
}

// 结算统计
export function getSettleStatistic(query) {
  return request({
    url: '/oa/settle/statistic',
    method: 'get',
    params: query
  })
}

// 导入结算
export function uploadSettleSheet(data) {
  return request({
    url: '/oa/settle/uploadSheet',
    method: 'post',
    data: data
  })
}