import request from '@/utils/request'

// 列表
export function list(data) {
  return request({
    url: '/money/index',
    method: 'get',
    params: data
  })
}

// 明细
export function detail(data) {
  return request({
    url: '/money/detail',
    method: 'get',
    params: data
  })
}

// 充值
export function save(data) {
  return request({
    url: '/money/income',
    method: 'post',
    data
  })
}

// 扣款
export function withhold(data) {
  return request({
    url: '/money/deductions',
    method: 'post',
    data
  })
}

// 导出
export function toExport(params) {
  return request({
    url: '/money/export',
    method: 'get',
    params
  })
}

// 导入
export function toImport(data) {
  return request({
    url: '/money/import',
    method: 'post',
    data
  })
}

// 获取转账方式
export function getStyle() {
  return request({
    url: '/money/get_income_style',
    method: 'get'
  })
}

// 保存转账方式
export function saveStyle(data) {
  return request({
    url: '/money/add_income_style',
    method: 'post',
    data
  })
}

// 删除转账方式
export function deleteStyle(data) {
  return request({
    url: '/money/delete_income_style',
    method: 'post',
    data
  })
}

