From b3383d96db5b39e03edfece495572a3120edcd61 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 12 十月 2026 13:14:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0

---
 src/views/mes/dv/machinery/modules/import-form.vue |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/views/mes/dv/machinery/modules/import-form.vue b/src/views/mes/dv/machinery/modules/import-form.vue
index b4cd717..eb6a01d 100644
--- a/src/views/mes/dv/machinery/modules/import-form.vue
+++ b/src/views/mes/dv/machinery/modules/import-form.vue
@@ -6,7 +6,7 @@
 import { useVbenModal } from '@vben/common-ui';
 import { downloadFileFromBlobPart } from '@vben/utils';
 
-import { Button, message, Upload } from 'ant-design-vue';
+import { Button, Upload } from 'ant-design-vue';
 
 import { useVbenForm } from '#/adapter/form';
 import {
@@ -14,6 +14,7 @@
   importMachineryTemplate,
 } from '#/api/mes/dv/machinery';
 import { $t } from '#/locales';
+import { notifyImportResult } from '#/utils';
 
 import { useImportFormSchema } from '../data';
 
@@ -44,14 +45,21 @@
     try {
       const result = await importMachinery(data.file, data.updateSupport);
       const importData = result as MesDvMachineryApi.MachineryImportRespVO;
-      let text = `涓婁紶鎴愬姛鏁伴噺锛�${importData.createCodes?.length || 0}锛沗;
-      text += `鏇存柊鎴愬姛鏁伴噺锛�${importData.updateCodes?.length || 0}锛沗;
-      text += `鏇存柊澶辫触鏁伴噺锛�${Object.keys(importData.failureCodes || {}).length}锛沗;
-      message.info(text);
-      // 鍏抽棴骞舵彁绀�
+      const createCount = importData.createCodes?.length || 0;
+      const updateCount = importData.updateCodes?.length || 0;
+
+      // 鍏抽棴骞舵寜瀵煎叆缁撴灉鎻愮ず锛氫粎鍦ㄧ‘鏈夋暟鎹啓鍏ユ椂閫氱煡鍒楄〃鍒锋柊
       await modalApi.close();
-      emit('success');
-      message.success($t('ui.actionMessage.operationSuccess'));
+      if (createCount + updateCount > 0) {
+        emit('success');
+      }
+      notifyImportResult({
+        subject: '璁惧',
+        createCount,
+        updateCount,
+        failures: importData.failureCodes,
+        masterDataHint: '銆愯澶囩被鍨嬨�戙�愯溅闂淬�戙�愬伐浣滅珯銆戜腑鐨勫搴旂紪鐮�',
+      });
     } finally {
       modalApi.unlock();
     }

--
Gitblit v1.9.3