import request from '/@/utils/request';

/**
 * 分页查询宿舍水电明细列表
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/waterdetail/page',
    method: 'get',
    params: query
  });
};

/**
 * 新增宿舍水电明细
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/waterdetail',
    method: 'post',
    data
  });
};

/**
 * 编辑宿舍水电明细
 */
export const putObj = (data: any) => {
  return request({
    url: '/stuwork/waterdetail/edit',
    method: 'post',
    data
  });
};

/**
 * 删除宿舍水电明细
 */
export const delObjs = (ids: string[]) => {
  return request({
    url: '/stuwork/waterdetail/delete',
    method: 'post',
    data: ids
  });
};

/**
 * 初始化本期水电补贴
 */
export const initWaterOrder = (data: { costMoney: number }) => {
  return request({
    url: '/stuwork/waterdetail/initWaterOrder',
    method: 'post',
    data
  });
};

