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/hrm/employee/contract/modules/import-form.vue | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/views/hrm/employee/contract/modules/import-form.vue b/src/views/hrm/employee/contract/modules/import-form.vue
index a9a1dca..78987ea 100644
--- a/src/views/hrm/employee/contract/modules/import-form.vue
+++ b/src/views/hrm/employee/contract/modules/import-form.vue
@@ -25,6 +25,7 @@
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
+ let shouldClose = false;
if (fileList.value.length === 0) {
message.warning('璇烽�夋嫨瑕佸鍏ョ殑鏂囦欢');
return;
@@ -41,13 +42,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