import request from '@/utils/request'

// 查询申领记录列表
export function listSparePartsApplicationRecord(query) {
	return request({
		url: '/device/sparePartsApplicationRecord/list',
		method: 'get',
		params: query
	});
}

// 查询申领记录详细
export function getSparePartsApplicationRecord(applyId) {
	return request({
		url: '/device/sparePartsApplicationRecord/' + applyId,
		method: 'get'
		});
}

// 新增申领记录
export function addSparePartsApplicationRecord(data) {
	return request({
		url: '/device/sparePartsApplicationRecord',
		method: 'post',
		data: data
	});
}

// 修改申领记录
export function updateSparePartsApplicationRecord(data) {
	return request({
		url: '/device/sparePartsApplicationRecord',
		method: 'put',
		data: data
	});
}

// 删除申领记录
export function delSparePartsApplicationRecord(applyId) {
	return request({
		url: '/device/sparePartsApplicationRecord/' + applyId,
		method: 'delete'
	});
}

// 查询当前维修单备件申领记录列表
export function listRepairSparePartsRecord(query) {
  return request({
    url: '/device/sparePartsApplicationRecord/listRepairSparePartsRecord',
    method: 'get',
    params: query
  });
}
