import request from '/@/utils/request';


export function Add(data:object){
	return request({
		url: '/data/global/item/info/add',
		method: 'post',
		data
	})
}
export function update(params: string) {
	return request({
		url: '/data/global/item/info/update',
		method: 'post',
		data: params,
	});
}
export function deleteId(params: string) {
	return request({
		url: '/data/global/item/info/delete',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		data: params,
	});
}
export function detail2(params: string) {
	return request({
		url: '/data/global/item/info/detail2',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		data: params,
	});
}
export function list(params: object) {
	return request({
		url: '/data/global/item/info/list',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		params,
	});
}

export function listByGlobalItemCode(params: object) {
	return request({
		url: '/item/clearance/vs/xll/listByGlobalItemCode',
		method: 'post',
		params,
	});
}

export function saveMapper(params: object) {
	return request({
		url: '/item/clearance/vs/xll/saveMapper',
		method: 'post',
		data: params,
	});
}
/**
 * 获取物品分类1的列表
 * @returns 
 */
export function getItemClassificationOneOptions() {
	return request({
		url: "/data/global/item/info/listAllType1",
		method: "post"
	})
}