/**
 * 物料相关接口
 */
import { request } from '../../utils/request'

/**
 * 获取物料详情
 * @param itemId 物料ID
 * @returns 
 */
export const getItemDetail = (itemId: string): Promise<any> => {
	return request({
		url: `/mobile/md/item/${itemId}`,
		method: 'GET'
	})
}

/**
 * 根据物料编码获取物料详情
 * @param itemCode 物料编码
 * @returns 
 */
export const getItemByCode = (itemCode: string): Promise<any> => {
	return request({
		url: `/mes/md/mditem/itemCode?itemCode=${itemCode}`,
		method: 'GET'
	})
}
