import request from '@/utils/request';

/**
 * 查询分项费用列表
 */
export function getItemExpenseList(params?: any) {
  return request({
    url: '/customer/pcCustomerExpenseType/list',
    method: 'get',
    params: params
  });
}

/**
 * 新增分项费用
 */
export function addItemExpense(data: any) {
  return request({
    url: '/customer/pcCustomerExpenseType',
    method: 'post',
    data: data
  });
}

/**
 * 修改分项费用
 */
export function updateItemExpense(data: any) {
  return request({
    url: '/customer/pcCustomerExpenseType',
    method: 'put',
    data: data
  });
}

/**
 * 删除分项费用
 */
export function deleteItemExpense(ids: number[]) {
  return request({
    url: `/customer/pcCustomerExpenseType/${ids.join(',')}`,
    method: 'delete'
  });
}
