From 85a3578025c1fa732322613340cbb0bf2c31fdb3 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 02 九月 2026 16:56:39 +0800
Subject: [PATCH] feat(mes): 添加库存现有量导入功能
---
src/api/mes/wm/materialstock/index.ts | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/api/mes/wm/materialstock/index.ts b/src/api/mes/wm/materialstock/index.ts
index edbd6fe..06a2911 100644
--- a/src/api/mes/wm/materialstock/index.ts
+++ b/src/api/mes/wm/materialstock/index.ts
@@ -64,6 +64,29 @@
});
}
+/** 搴撳瓨鐜版湁閲忓鍏ョ粨鏋� */
+export interface ImportResult {
+ /** 鏂板缓搴撳瓨璁板綍鎴愬姛鐨勮锛屽厓绱犳牸寮忋�岀墿鏂欑紪鐮�-浠撳簱銆� */
+ createNames?: string[];
+ /** 宸插瓨鍦ㄥ簱瀛樿褰曡皟鏁存垚鍔熺殑琛岋紝鍏冪礌鏍煎紡銆岀墿鏂欑紪鐮�-浠撳簱銆� */
+ updateNames?: string[];
+ /** 瀵煎叆澶辫触鐨勮褰曪紝key 涓恒�岀墿鏂欑紪鐮�-浠撳簱銆嶏紝value 涓哄け璐ュ師鍥� */
+ failureNames?: Record<string, string>;
+}
+
+/** 涓嬭浇搴撳瓨鐜版湁閲忓鍏ユā鏉� */
+export function importMaterialStockTemplate() {
+ return requestClient.download('/mes/wm/material-stock/import-template');
+}
+
+/** 瀵煎叆搴撳瓨鐜版湁閲� */
+export function importMaterialStock(file: File) {
+ return requestClient.upload<MesWmMaterialStockApi.ImportResult>(
+ '/mes/wm/material-stock/import',
+ { file },
+ );
+}
+
/** 搴撳瓨璋冩暣锛堣嚜瀹氫箟鍑哄叆搴擄級- 鍏ュ簱 */
export interface MaterialStockAdjustInParams {
itemId: number; // 鐗╂枡ID
--
Gitblit v1.9.3