import request from '@/utils/wms-request'
// import { parseStrEmpty } from "@/utils/ruoyi";

// 查询退料收货单列表
export function listReceive(query) {
	return request({
		url: '/produce/back/receive/list',
		method: 'get',
		params: query
	})
}

// 查询退料收货单详细
export function getReceive(id) {
	return request({
		url: '/produce/back/receive/' + id,
		method: 'get'
	})
}

// 新增退料收货单
export function addReceive(data) {
	return request({
		url: '/produce/back/receive',
		method: 'post',
		data: data
	})
}

// 修改退料收货单
export function updateReceive(data) {
	return request({
		url: '/produce/back/receive',
		method: 'put',
		data: data
	})
}

// 删除退料收货单
export function delReceive(id) {
	return request({
		url: '/produce/back/receive/' + id,
		method: 'delete'
	})
}

// 导出退料收货单
export function exportReceive(query) {
	return request({
		url: '/produce/back/receive/export',
		method: 'get',
		params: query
	})
}

/**根据任务单号获取单据信息以新增*/
export function getRcvByTask(data) {
	return request({
		url: '/produce/back/receive/getRcvByTask',
		method: 'post',
		data: data
	})
}

// 查询退料任务单明细列表
export function listDetail(query) {
	return request({
		url: '/produce/back/task/taskDetail/list',
		method: 'get',
		params: query
	})
}

// 查询收货单明细信息
export function listReceiveDetail(data) {
	return request({
		url: '/produce/back/receive/selectBackReceiveDetail',
		method: 'get',
		params: data
	})
}

// 修改产品收货单明细
export function updateReceiveDetail(data) {
	return request({
		url: '/produce/back/receive/updateReceiveDetail',
		method: 'put',
		data: data
	})
}