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

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

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

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

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

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

// 付款
export const settlePayMoney = (params) => {
  return axios({
    url: `settle/pay/payBatch`,
    data: params,
    method: 'post'
  })
}

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

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