import { axios } from '@/utils/request'

// 列表
export const settleReceiptQuery = (params) => {
  return axios({
    url: `settle/receipt/queryPage/${params.pageNo}/${params.pageSize}`,
    data: params,
    method: 'post'
  })
}

// 不带分页列表
export const settleReceiptQueryAll = (params) => {
  return axios({
    url: `settle/receipt/queryList`,
    data: params,
    method: 'post'
  })
}

// 新建收款
export const settleReceiptSave = (params) => {
  return axios({
    url: `settle/receipt/save`,
    data: params,
    method: 'post'
  })
}

// 查询总计
export const settleReceiptQuerySum = (params) => {
  return axios({
    url: `settle/receipt/querySum`,
    data: params,
    method: 'post'
  })
}

// 根据类型查询总计
export const queryByTypeSum = (params) => {
  return axios({
    url: `settle/receipt/queryByType`,
    data: params,
    method: 'post'
  })
}

// 付款
export const settleReceiptMoney = (params) => {
  return axios({
    url: `settle/receipt/receiptBatch`,
    data: params,
    method: 'post'
  })
}

// 付款详情(凭证查询)
export const findReceiptDetail = (params) => {
  return axios({
    url: `settle/receipt/findById/${params.id}`,
    method: 'get'
  })
}

// 删除付款
export const delReceipt = (params) => {
  return axios({
    url: `settle/receipt/delete/${params.id}`,
    method: 'get'
  })
}
