import request from '@/utils/request'

// 查询维修故障列表
export function listBreakdown(query) {
	return request({
		url: '/tpmMould/breakdown/list',
		method: 'get',
		params: query
	})
}

// 查询维修故障详细
export function getBreakdown(id) {
	return request({
		url: '/tpmMould/breakdown/' + id,
		method: 'get'
	})
}

// 新增维修故障
export function addBreakdown(data) {
	return request({
		url: '/tpmMould/breakdown',
		method: 'post',
		data: data
	})
}

// 修改维修故障
export function updateBreakdown(data) {
	return request({
		url: '/tpmMould/breakdown',
		method: 'put',
		data: data
	})
}

// 删除维修故障
export function delBreakdown(id) {
	return request({
		url: '/tpmMould/breakdown/' + id,
		method: 'delete'
	})
}

// 完成维修故障
export function finishBreakdown(ids) {
	return request({
		url: '/tpmMould/breakdown/finish',
		method: 'post',
		data: ids
	})
}