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

export function getInMat(data) {
	return wmsRequest({
		url: '/produce/product/task/getMatDetail',
		method: 'post',
		data: data
	})
}

export function addConversion(data) {
	return request({
		url: '/mes/conversion',
		method: 'post',
		data: data
	})
}

// 查询物料库存信息列表
export function listStock(query) {
	return request({
		url: '/mes/stock/list',
		method: 'get',
		params: query
	})
}


export function customizeConvert(data) {
	return request({
		url: '/produce/transfer/customizeConvert',
		method: 'post',
		data: data
	})
}

/**
 * @param {Object} query
 * 查询生产工单列表(模糊查询产品)
 */
export function listPwoLike(query) {
	return request({
		url: '/mes/pwo/listLike',
		method: 'get',
		params: query
	})
}

// 查询生产工单作业列表(模糊查询产品)
export function listPwoJobLike(query) {
	return request({
		url: '/mes/pwoJob/listLike',
		method: 'get',
		params: query
	})
}

/**
 * 查询生产工单详细
 * @param {Object} pwoCode
 */
export function getPwoByCode(pwoCode) {
	return request({
		url: '/mes/pwo/pwoCode/' + pwoCode,
		method: 'get'
	})
}
/**
 * 查询生产工单详细明细
 * @param {Object} data
 */
export function getDetailData(data) {
	return request({
		url: '/mes/conversion/getDetailData',
		method: 'post',
		data: data
	})
}