import request from '@/utils/request'

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

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

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

// 修改财务数据主
export function updateCharge(data) {
  return request({
    url: '/finance/payment',
    method: 'put',
    data: data
  })
}

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

// 导出财务数据主
export function exportCharge(query) {
  return request({
    url: '/finance/payment/export',
    method: 'get',
    params: query
  })
}
// 导入搜索
export function search(queryParameter) {
  return request({
    url: '/finance/payment/paymentList',
    method: 'get',
    params: queryParameter
  })
}

// 查询客户详情列表
export function listCorps(query) {
  return request({
    url: '/basicdata/corps/list',
    method: 'get',
    params: query
  })
}

// 确认收费
export function collectFee(queryParameter) {
  return request({
    url: '/finance/payment/confirm',
    method: 'post',
    data:queryParameter
  })
}
//删除前的判断
export function delCharge_s(fId) {
  return request({
    url: '/finance/payment/queryRemove/' + fId,
    method: 'delete'
  })
}
// 撤销收费C
export function backCharge(queryParameter) {
  return request({
    url: '/finance/payment/revoke',
    method: 'post',
    data: queryParameter
  })
}
// 撤销审批
export function revocation(data) {
  return request({
    url: '/warehouse/payment/revoke',
    method: 'post',
    data: data
  })
}
