import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API

// 查询外协单从列表
export function listDetail(query) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/list',
		method: 'get',
		params: query
	})
}

// 查询外协单从详细
export function getDetail(id) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/' + id,
		method: 'get'
	})
}
// 查询外协单从详细
export function getReturnReceiptDetail(query) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/getReturnReceiptDetail',
		method: 'get',
		params:query
	})
}
export function checkReturnReceiptDetail(data) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/checkReturnReceiptDetail',
		method: 'post',
		data: data
	})
}
// 新增收回单明细
export function addReceiptDetail(data) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail',
		method: 'post',
		data: data
	})
}
export function delReceiptDetail(id) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/' + id,
		method: 'delete'
	})
}
// 新增收回单明细
export function saveOrUpdateDetail(data) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/saveOrUpdateDetail',
		method: 'post',
		data: data
	})
}
// 新增收回单明细
export function saveDetailsForAdd(data) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/saveDetailsForAdd',
		method: 'post',
		data: data
	})
}
// 新增收回单明细
export function saveDetails(data) {
	return request({
		url: baseUrl + '/business/returnReceiptDetail/saveDetails',
		method: 'post',
		data: data
	})
}