From c77086ad2d7949ab36dd0c4e0b59907e672dd64f Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 18 九月 2026 15:04:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/dev_pro2.0' into dev_宁夏_九泓化工

---
 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