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

//  提现列表  有分页
export const queryMerchantCashOutPage = (params) => {
  const url = `/merchant/queryMerchantCashOutPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  申请提现
export const saveMerchantCashOut = (params) => {
  return axios({
    url: '/merchant/saveMerchantCashOut',
    data: params,
    method: 'post'
  })
}
// 账户明细
export const queryTradeFlowPage = (params) => {
  const url = `/merchant/queryTradeFlowPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}

export const merchantCashOut = params => {
  return axios({
    url: `/shelf/findShelfSettleRuleByShelfSn/${params.shelfSn}`,
    method: 'get'
  })
}
export const merchantCashOutDetail = (params) => {
  return axios({
    url: '/merchant/queryMerchantAccount',
    data: {},
    method: 'get'
  })
}

// 结算管理列表
export const queryShelfSettleRulePage = (params) => {
  const url = `/merchant/queryShelfSettleRulePage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 结算管理合计
export const queryShelfSettleRuleCount = (params) => {
  const url = `/merchant/queryShelfSettleRuleCount`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}

// 结算历史列表
export const querySettleBillPage = (params) => {
  const url = `/merchant/querySettleBillPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 待结明细列表
export const queryOrderBillDetailPage = (params) => {
  const url = `/merchant/queryOrderBillDetailPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 待结明细合计
export const queryOrderBillDetailCount = (params) => {
  const url = `/merchant/queryOrderBillDetailCount`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
