import request from '@/utils/wms-request'

// 查询销售出库任务单列表
export function listTask(query) {
	return request({
		url: '/sale/out/task/list',
		method: 'get',
		params: query
	})
}

// 查询销售出库任务单详细
export function getTask(id) {
	return request({
		url: '/sale/out/task/' + id,
		method: 'get'
	})
}

// 新增销售出库任务单
export function addTask(data) {
	return request({
		url: '/sale/out/task',
		method: 'post',
		data: data
	})
}

//根据选择的上一级编码回显主子表
export function getOutBillBySourceCode(data) {
	return request({
		url: '/sale/out/out/getOutBillBySourceCode',
		method: 'post',
		data: data
	})
}

// 修改销售出库任务单
export function updateTask(data) {
	return request({
		url: '/sale/out/task',
		method: 'put',
		data: data
	})
}

// 删除销售出库任务单
export function delTask(id) {
	return request({
		url: '/sale/out/task/' + id,
		method: 'delete'
	})
}




// 查询销售拣货单列表
export function listPick(query) {
	return request({
		url: '/sale/out/pick/list',
		method: 'get',
		params: query
	})
}

// 查询销售拣货单详细
export function getPick(id) {
	return request({
		url: '/sale/out/pick/' + id,
		method: 'get'
	})
}

// 新增销售拣货单
export function addPick(data) {
	return request({
		url: '/sale/out/pick',
		method: 'post',
		data: data
	})
}

// 修改销售拣货单
export function updatePick(data) {
	return request({
		url: '/sale/out/pick',
		method: 'put',
		data: data
	})
}

// 删除销售拣货单
export function delPick(id) {
	return request({
		url: '/sale/out/pick/' + id,
		method: 'delete'
	})
}






// 查询销售出库单列表
export function listOut(query) {
	return request({
		url: '/sale/out/out/list',
		method: 'get',
		params: query
	})
}

// 查询销售出库单详细
export function getOut(id) {
	return request({
		url: '/sale/out/out/' + parseStrEmpty(id),
		method: 'get'
	})
}

// 查询批号分批详细
export function getListDetail(data) {
	return request({
		url: '/sale/out/out/detail',
		method: 'post',
		data: data
	})
}

// 新增销售出库单
export function addOut(data) {
	return request({
		url: '/sale/out/out',
		method: 'post',
		data: data
	})
}

// 修改销售出库单
export function updateOut(data) {
	return request({
		url: '/sale/out/out',
		method: 'put',
		data: data
	})
}

// 删除销售出库单
export function delOut(id) {
	return request({
		url: '/sale/out/out/' + id,
		method: 'delete'
	})
}

//根据选择的上一级编码回显主子表
export function getSaleOutDirectlyByTaskCode(data) {
	return request({
		url: '/sale/out/out/getSaleOutDirectlyByTaskCode',
		method: 'post',
		data: data
	})
}