import request from '@/utils/request'

// 查询提现列表
export function listWithdraw(query) {
  return request({
    url: '/ss/withdraw/list',
    method: 'get',
    params: query
  })
}

// 查询提现详细
export function getWithdraw(billId) {
  return request({
    url: '/ss/withdraw/' + billId,
    method: 'get'
  })
}

// 新增提现
export function addBill(data) {
  return request({
    url: '/system/bill',
    method: 'post',
    data: data
  })
}

// 修改提现
export function updateBill(data) {
  return request({
    url: '/system/bill',
    method: 'put',
    data: data
  })
}

// 删除提现
export function delWithdraw(billId) {
  return request({
    url: '/system/bill/' + billId,
    method: 'delete'
  })
}

// 提现审核通过
export function passWithDrawBill(data) {
  return request({
    url: '/system/bill/withdraw/pass',
    method: 'put',
    data: data
  })
}

// 提现审核拒绝
export function rejectWithDrawBill(data) {
  return request({
    url: '/system/bill/withdraw/reject',
    method: 'put',
    data: data
  })
}

// 提现打款
export function payWithDrawBill(billId) {
  return request({
    url: `/system/bill/withdraw/pay/${billId}`,
    method: 'put',
    data: {}
  })
}
