import request from '@/utils/request'
import Qs from 'qs'

export function listCustomerBillingDetail(query) {
  return request({
    method: 'post',
    params:{
      _gp: 'admin.customerbillingdetail',
      _mt: 'list',
      page: query.page,
      limit: query.limit,
      ...query
    }
  })
}

export function createCustomerBillingDetail(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'admin.customerbillingdetail',
      _mt: 'create',
      CustomerBillingDetailDTO: JSON.stringify(data)
    })
  })
}

export function updateCustomerBillingDetail(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'admin.customerbillingdetail',
      _mt: 'edit',
      CustomerBillingDetailDTO: JSON.stringify(data)
    })
  })
}

export function deleteCustomerBillingDetail(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.customerbillingdetail',
      _mt: 'delete',
      id: id
    }
  })
}
