import axios from '@/libs/axios.js'

//  应收对账单 - 分页查询客户列表数据
export const queryCustomerPage = (params) => {
  const url = `verify/queryCustomerPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}

//应收对账单 - 查找客户待结算订单列表
export const queryUnsettleSaleList = (params) => {
  const url = `verify/queryUnsettleSaleList`
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}

//应收对账单 - 发送对账单
export const insert = (params) => {
  const url = `verify/insert`
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}

// 应收对账单 - 历史对账单
export const queryPage = (params) => {
  const url = `verify/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}

// 应收对账单 - 历史对账单详情
export const findBySn = (params) => {
  const url = `verify/findBySn`
  return axios.request({
    url: url,
    data: params,
    method: 'post'
  })
}

//刷新历史对账单详情列表
export const flushBill = (params) => {
  return axios.request({
    url: `verify/flushBill`,
    data: params,
    method: 'post'
  })
}

//批量删除历史对账单详情列表
export const deleteDetails = (params) => {
  return axios.request({
    url: `verify/deleteDetails`,
    data: params,
    method: 'post'
  })
}

//校验确认收款弹窗
export const settleVerify = (params) => {
  return axios.request({
    url: `verify/settleVerify`,
    data: params,
    method: 'post'
  })
}
//确认收款
export const settle = (params) => {
  return axios.request({
    url: `verify/settle`,
    data: params,
    method: 'post'
  })
}