import request from '@/utils/request'

// 查询财务数据主列表
export function listFee(query) {
  return request({
    url: '/finance/contrast/list',
    method: 'get',
    params: query
  })
}

// 查询财务数据主详细
export function getFee(fId) {
  return request({
    url: '/finance/contrast/' + fId,
    method: 'get'
  })
}

// 新增财务数据主
export function addFee(data) {
  return request({
    url: '/finance/contrast/add',
    method: 'post',
    data: data
  })
}

// 修改财务数据主
export function updateFee(data) {
  return request({
    url: '/finance/contrast/add',
    method: 'post',
    data: data
  })
}

// 删除财务数据主
export function delFee(fId) {
  return request({
    url: '/finance/contrast/' + fId,
    method: 'delete'
  })
}

// 导出财务数据主
export function exportFee(query) {
  return request({
    url: '/finance/contrast/export',
    method: 'get',
    params: query
  })
}

// 导入搜索
export function importFee(TWareHouseFees) {
  return request({
    url: '/finance/contrast/contrastList',
    // url:'/finance/charge/chargeList',
    method: 'get',
    params: TWareHouseFees,
    tFee:TWareHouseFees,
    tFeeDo:TWareHouseFees
  })
}
// 确认对账
export function Cfee(TWareHouseFees) {
  return request({
    url:'/finance/contrast/confirm',
    method: 'post',
    data: TWareHouseFees
    // tFee:TWareHouseFees,
    // tFeeDo:TWareHouseFees
  })
}

// 删除财务数据主 是否有明细
export function detailFee(fId) {
  return request({
    url: '/finance/contrast/queryRemove/' + fId,
    method: 'delete'
  })
}

// 撤销对账
export function backFee(TWareHouseFees) {
  return request({
    url: '/finance/contrast/revoke',
    method: 'post',
    data: TWareHouseFees
  })
}

//撤销审批
export function RevocationApproval(data){
  return request({
    url:'/warehouse/paths/revoke',
    method:'post',
    data:data
  })
}

// 导出计算明细从表
export function exportWarehousebillsitems(fId) {
  return request({
    url: '/finance/contrast/exportItems/'+fId,
    method: 'get'
  })
}
