import request from '@/utils/request'

// 查询凭证导入列表
export function listProof(query) {
  return request({
    url: '/finance/proof/list',
    method: 'get',
    params: query
  })
}

// 查询凭证导入列表详情
export function listProofDetail(query) {
  return request({
    url: '/finance/proof/listDetail',
    method: 'get',
    params: query
  })
}

// 导出凭证导入
export function exportProof(query) {
  return request({
    url: '/finance/proof/export',
    method: 'get',
    params: query
  })
}

// 导出凭证导入
export function exportProofDetail(query) {
  return request({
    url: '/finance/proof/export2',
    method: 'get',
    params: query
  })
}

// 查询凭证导入详细
export function getProof(id) {
  return request({
    url: '/finance/proof/get/' + id,
    method: 'get'
  })
}

// 新增凭证导入
export function addProof(data) {
  return request({
    url: '/proof/proof/add',
    method: 'post',
    data: data
  })
}

// 修改凭证导入
export function updateProof(data) {
  return request({
    url: '/finance/proof/edit',
    method: 'post',
    data: data
  })
}

// 删除凭证导入
export function delProof(id) {
  return request({
    url: '/finance/proof/remove/' + id,
    method: 'get'
  })
}


//模板下载
export function importTemplate(){
  return request({
    url: '/finance/proof/importTemplate',
    method: 'get',
  })
}

//模板下载
export const importData = () => {
  return request({
    url: '/finance/proof/importData',
    method: 'get',
  })
}

//记账
export function jz (data){
  return request({
    url: '/finance/proof/jz',
    method: 'post',
    data: data
  })
}

//结账
export function balanceCarryOverTo12() {
  return request({
    url: '/finance/proof/carryOver',
    method: 'post',
  })
}
