import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listScrap(query) {
	return request({
		url: '/mes/scrap/list',
		method: 'get',
		params: query
	});
}

export function listWuliao(query) {
  return request({
    url: '/mes/scrap/selectAllMaterial',
    method: 'get',
    params: query
  });
}


export function listMaterialName(query) {
  return request({
    url: '/mes/scrap/selectAllMaterial',
    method: 'get',
    params: query
  });
}

//查询工位名称
export function listPostName(query) {
  return request({
    url: '/mes/scrap/selectAllSysPost',
    method: 'get',
    params: query
  });
}

// 查询【请填写功能名称】详细
export function getScrap(id) {
	return request({
		url: '/mes/scrap/' + id,
		method: 'get'
		});
}

// 新增【请填写功能名称】
export function addScrap(data) {
	return request({
		url: '/mes/scrap',
		method: 'post',
		data: data
	});
}

// 修改【请填写功能名称】
export function updateScrap(data) {
	return request({
		url: '/mes/scrap',
		method: 'put',
		data: data
	});
}

// 删除【请填写功能名称】
export function delScrap(id) {
	return request({
		url: '/mes/scrap/' + id,
		method: 'delete'
	});
}
