From 40f2807b7cee7ae8e528f64a91937303199a30e1 Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期四, 10 九月 2026 14:49:36 +0800
Subject: [PATCH] feat(erp/mes/hrm): 新增采购订单/销售订单/计量器具导入弹窗;导入完成自动关闭
---
src/views/wls/materialstock/components/import-form.vue | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/views/wls/materialstock/components/import-form.vue b/src/views/wls/materialstock/components/import-form.vue
index cbe0d00..b5518a7 100644
--- a/src/views/wls/materialstock/components/import-form.vue
+++ b/src/views/wls/materialstock/components/import-form.vue
@@ -26,6 +26,7 @@
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
+ let shouldClose = false;
if (fileList.value.length === 0) {
message.warning('璇烽�夋嫨瑕佸鍏ョ殑鏂囦欢');
return;
@@ -39,13 +40,24 @@
// 瀹屾垚锛氳繘搴︽潯璧版弧
stopMockProgress();
progressPercent.value = 100;
- await delay(500);
- message.success('瀵煎叆瀹屾垚');
+ await delay(300);
emit('success');
+ const failedCount = Object.keys(importResult.value?.failureNames ?? {}).length;
+ if (failedCount > 0) {
+ message.warning(
+ `瀵煎叆瀹屾垚锛氭垚鍔� ${createCount.value} 鏉°�佽鐩� ${updateCount.value} 鏉★紝澶辫触 ${failedCount} 鏉★紝璇锋煡鐪嬩笅鏂瑰け璐ユ槑缁哷,
+ );
+ } else {
+ message.success('瀵煎叆瀹屾垚');
+ shouldClose = true;
+ }
} finally {
stopMockProgress();
importing.value = false;
modalApi.unlock();
+ if (shouldClose) {
+ await modalApi.close();
+ }
}
},
});
--
Gitblit v1.9.3