import request from '@/utils/request'

// 查询物料组列表
export function listMaterialGroup(query) {
	return request({
		url: '/quality/materialGroup/list',
		method: 'get',
		params: query
	});
}

// 查询物料树
export function materialTreeSelect() {
	return request({
		url: '/quality/materialGroup/materialTree',
		method: 'get'
	});
}

// 查询物料组详细
export function getMaterialGroup(id) {
	return request({
		url: '/quality/materialGroup/' + id,
		method: 'get'
		});
}

// 新增物料组
export function addMaterialGroup(data) {
	return request({
		url: '/quality/materialGroup',
		method: 'post',
		data: data
	});
}

// 修改物料组
export function updateMaterialGroup(data) {
	return request({
		url: '/quality/materialGroup',
		method: 'put',
		data: data
	});
}

// 删除物料组
export function delMaterialGroup(id) {
	return request({
		url: '/quality/materialGroup/' + id,
		method: 'delete'
	});
}
