import http from '../http';

//删除物料信息
export async function deleteDataById(dataId) {
	let result = 0;
	await http.post('/api/Material/DeleteDataById', { FID: dataId }).then((data) => {
		result = data.Data;
	});
	return result;
}

//（对接）SAP物料同步
export async function dockSapMaterial(param) {
	let result = 0;
	await http.post('/api/Material/DockSapMaterial', param || {}).then((data) => {
		result = data.Data;
	});
	return result;
}


//下载视图
export async function DownMateialView(param) {
	let result = [];
	await http.post('/api/Material/DownMateialView', param).then((data) => {
		result = data;
	});
	return result;
}

//下载SAP视图
export async function DownSAP(param) {
	let result = [];
	await http.post('/api/Material/DownSAP', param).then((data) => {
		result = data;
	});
	return result;
}

//下载全部视图
export async function DownViewAll(param) {
	let result = [];
	await http.post('/api/Material/DownViewAll', param).then((data) => {
		result = data;
	});
	return result;
}