import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

// 查询收回单
export function listReceipt(query) {
	return request({
		url: baseUrl + '/business/returnReceipt/list',
		method: 'get',
		params: query
	})
}

// 查询收回单
export function getReceipt(id) {
	return request({
		url: baseUrl + '/business/returnReceipt/' + id,
		method: 'get'
	})
}

// 新增收回单
export function addReceipt(data) {
	return request({
		url: baseUrl + '/business/returnReceipt',
		method: 'post',
		data: data
	})
}

// 修改收回单
export function updateReceipt(data) {
	return request({
		url: baseUrl + '/business/returnReceipt',
		method: 'put',
		data: data
	})
}
// 删除收回单
export function delReceipt(id) {
	return request({
		url: baseUrl + '/business/returnReceipt/' + id,
		method: 'delete'
	})
}

export function checkFurnace(data) {
	return request({
		url: baseUrl + '/business/returnReceipt/checkFurnace',
		method: 'post',
		data: data
	})
}
