import request from '@/utils/request'

// 打印
export function printPrepareByCode(workorderCode) {
  return request({
    url: '/mes/prepareDetail/printPrepareByCode/' + workorderCode,
    method: 'get'
  });
}

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

// 查询mes备料单明细详细
export function getPrepareDetail(recordId) {
	return request({
		url: '/mes/prepareDetail/' + recordId,
		method: 'get'
		});
}

// 新增mes备料单明细
export function addPrepareDetail(data) {
	return request({
		url: '/mes/prepareDetail',
		method: 'post',
		data: data
	});
}

// 修改mes备料单明细
export function updatePrepareDetail(data) {
	return request({
		url: '/mes/prepareDetail',
		method: 'put',
		data: data
	});
}

// 删除mes备料单明细
export function delPrepareDetail(recordId) {
	return request({
		url: '/mes/prepareDetail/' + recordId,
		method: 'delete'
	});
}
