From 6f5d09beefaecbca8d873dbdbc7ad3bb361463bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E6=98=8A?=
<15984991+wwh2328692301@user.noreply.gitee.com>
Date: Sat, 23 May 2026 10:03:19 +0800
Subject: [PATCH] =?UTF-8?q?feat=20(wms/move)=EF=BC=9A=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E9=92=A2=E5=8D=B7=E5=8C=B9=E9=85=8D=E8=BF=9B=E5=BA=A6=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=20=E4=B8=BA=E5=85=A5=E5=BA=93=E9=92=A2=E5=8D=B7?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0=E5=8C=B9=E9=85=8D=E8=BF=9B?=
=?UTF-8?q?=E5=BA=A6=E7=95=8C=E9=9D=A2=E5=8F=8A=E5=AF=B9=E5=BA=94=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E3=80=81=E4=B8=9A=E5=8A=A1=E9=80=BB=E8=BE=91=EF=BC=8C?=
=?UTF-8?q?=E5=AE=9E=E6=97=B6=E5=B1=95=E7=A4=BA=E5=8C=B9=E9=85=8D=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E3=80=81=E8=BF=9B=E5=BA=A6=E5=8D=A0=E6=AF=94=E4=B8=8E?=
=?UTF-8?q?=E5=BD=93=E5=89=8D=E5=8C=B9=E9=85=8D=E9=A1=B9=E7=BB=93=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/wms/move/components/ImportCoil.vue | 96 +++++++++++++++++++
1 file changed, 96 insertions(+)
diff --git a/klp-ui/src/views/wms/move/components/ImportCoil.vue b/klp-ui/src/views/wms/move/components/ImportCoil.vue
index 8df49fa0..a008a614 100644
--- a/klp-ui/src/views/wms/move/components/ImportCoil.vue
+++ b/klp-ui/src/views/wms/move/components/ImportCoil.vue
@@ -98,6 +98,30 @@
+
+
+
+
+
+ {{ matchingProgress }} / {{ matchingTotal }}条
+
+ 当前: {{ currentMatchingText }}
+ 已匹配
+ 冲突
+ 未匹配
+
+
+
+
@@ -237,6 +261,11 @@
+
+
+ 匹配中 {{ matchingProgress }}/{{ matchingTotal }}...
+
+
导入中...
@@ -281,16 +310,27 @@ export default {
importLoading: false,
importProgress: 0,
importedCount: 0,
+ // 匹配进度
+ matchingTotal: 0,
+ matchingProgress: 0,
+ currentMatchingText: '',
+ lastMatchResult: '',
};
},
computed: {
isProcessing() {
return this.step === 'MATCHING' || this.step === 'IMPORTING';
},
+ matchingPercentage() {
+ if (this.matchingTotal === 0) return 0;
+ return Math.round((this.matchingProgress / this.matchingTotal) * 100);
+ },
dialogTitle() {
switch (this.step) {
case 'PARSED':
return '导入钢卷 - 数据预览 (' + this.parsedData.length + '条)';
+ case 'MATCHING':
+ return '导入钢卷 - 匹配中 (' + this.matchingProgress + '/' + this.matchingTotal + ')';
case 'REVIEW':
case 'IMPORTING':
case 'FINISHED':
@@ -410,11 +450,18 @@ export default {
this.matchedRows = [];
this.conflictRows = [];
this.unmatchedRows = [];
+ this.matchingTotal = this.parsedData.length;
+ this.matchingProgress = 0;
+ this.currentMatchingText = '';
+ this.lastMatchResult = '';
try {
// 逐行匹配
for (const row of this.parsedData) {
+ this.currentMatchingText = row.enterCoilNo || row.currentCoilNo;
+ this.lastMatchResult = '';
await this.matchOneRow(row);
+ this.matchingProgress++;
}
this.step = 'REVIEW';
// 自动切换到第一个有数据的tab
@@ -447,15 +494,19 @@ export default {
if (list.length === 1) {
// 场景1:精确匹配1条
this.matchedRows.push({ ...row, matchedCoil: list[0] });
+ this.lastMatchResult = 'matched';
} else if (list.length > 1) {
// 场景2:匹配到多条,需用户选择
this.conflictRows.push({ ...row, candidates: list, selectedCoilId: null });
+ this.lastMatchResult = 'conflict';
} else {
// 场景3:未匹配
this.unmatchedRows.push({ ...row, reason: '未找到匹配的钢卷' });
+ this.lastMatchResult = 'unmatched';
}
} catch (error) {
this.unmatchedRows.push({ ...row, reason: '查询失败:' + error.message });
+ this.lastMatchResult = 'unmatched';
}
},
@@ -536,6 +587,10 @@ export default {
this.unmatchedRows = [];
this.importProgress = 0;
this.importedCount = 0;
+ this.matchingTotal = 0;
+ this.matchingProgress = 0;
+ this.currentMatchingText = '';
+ this.lastMatchResult = '';
this.activeTab = 'matched';
this.$refs.upload && this.$refs.upload.clearFiles();
}
@@ -643,6 +698,47 @@ export default {
margin-top: 10px;
}
+/* 匹配进度区域 */
+.matching-progress-section {
+ padding: 30px 20px;
+}
+
+.matching-progress-header {
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+}
+
+.matching-progress-title {
+ font-size: 16px;
+ font-weight: bold;
+ color: #303133;
+ margin-left: 8px;
+}
+
+.matching-progress-percent {
+ font-size: 20px;
+ font-weight: bold;
+ color: #67c23a;
+ margin-left: auto;
+}
+
+.matching-progress-detail {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 12px;
+ color: #606266;
+ font-size: 14px;
+}
+
+.matching-current {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ color: #909399;
+}
+
/* 标签页区域 */
.tabs-section {
margin-top: 10px;