From 35722562e9e13f0504acc15b740d042ecb810199 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期日, 20 九月 2026 09:06:11 +0800
Subject: [PATCH] feat(mes): 添加质检指标条目类型支持并实现报告生成功能
---
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