import request from '@/utils/request'

// 查询备料单列表
export function listPrepare(query) {
	return request({
		url: '/mes/prepare/list',
		method: 'get',
		params: query
	});
}

// 查询备料单详细
export function getPrepare(prepareId) {
	return request({
		url: '/mes/prepare/' + prepareId,
		method: 'get'
		});
}

// 新增备料单
export function addPrepare(data) {
	return request({
		url: '/mes/prepare',
		method: 'post',
		data: data
	});
}

// 修改备料单
export function updatePrepare(data) {
	return request({
		url: '/mes/prepare',
		method: 'put',
		data: data
	});
}

// 删除备料单
export function delPrepare(prepareId) {
	return request({
		url: '/mes/prepare/' + prepareId,
		method: 'delete'
	});
}
