import request from "@/utils/request";

// 获取项目组列表
export function getBusinessGroupAll() {
  return request({
    url: "/erp/businessGroup/all"
  });
}

/**
 * 新增项目组
 * @param {*} data  {"businessGroupName": 项目组名称, "remark":"备注"}
 * @returns 
 */
export function addBusinessGroup(data) {
  return request({
    url: "/erp/businessGroup",
    method: "POST",
    data: data
  });
}

/**
 * 修改项目组
 * @param {*} data {id: number, "businessGroupName": 项目组名称, "remark":"备注"}
 * @returns 
 */
export function updateBusinessGroup(props) {
  let { id, ...data } = props
  return request({
    url: `/erp/businessGroup/${id}`,
    method: "PUT",
    data: data
  });
}
