新增耗材导入导出

This commit is contained in:
gyq
2024-07-11 17:28:49 +08:00
parent d0a43f7f43
commit eead4de81f
2 changed files with 154 additions and 240 deletions

View File

@@ -360,3 +360,37 @@ export function tbConCheckGet(data) {
}
});
}
/**
* 耗材导出
* @returns
*/
export function tbConsInfodownload(data) {
return request({
url: "/api/tbConsInfo/download",
method: "get",
params: {
shopId: localStorage.getItem("shopId"),
...data
},
responseType: "blob"
});
}
/**
* 导入耗材
* @returns
*/
export function tbConsInfoinputStock(file) {
const formData = new FormData();
formData.append("file", file);
formData.append("shopId", localStorage.getItem("shopId"));
return request({
url: "/api/tbConsInfo/inputStock",
method: "post",
data: formData,
Headers: {
"Content-Type": "multipart/form-data"
}
});
}