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

/**
 * 分页查询
 * @param params 查询参数
 */
export function fetchList(params?: any) {
	return request({
		url: '/purchase/purchasingBusinessLeader/page',
		method: 'get',
		params
	});
}

/**
 * 通过id查询
 * @param id ID
 */
export function getObj(id: string | number) {
	return request({
		url: '/purchase/purchasingBusinessLeader/details',
		method: 'get',
		params: { id }
	});
}

/**
 * 新增业务分管校领导
 * @param obj 对象数据
 */
export function addObj(obj: any) {
	return request({
		url: '/purchase/purchasingBusinessLeader',
		method: 'post',
		data: obj
	});
}

/**
 * 修改业务分管校领导
 * @param obj 对象数据
 */
export function putObj(obj: any) {
	return request({
		url: '/purchase/purchasingBusinessLeader',
		method: 'put',
		data: obj
	});
}

/**
 * 删除业务分管校领导
 * @param ids ID数组
 */
export function delObjs(ids: string[] | number[]) {
	return request({
		url: '/purchase/purchasingBusinessLeader',
		method: 'delete',
		data: ids
	});
}