From 29eab97af4f74640fa96277aa86f086d912f97e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Tue, 30 Jun 2026 10:02:49 +0800
Subject: [PATCH] =?UTF-8?q?refactor(wms=20report):=20=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E4=BA=A7=E7=BA=BF=E7=AD=9B=E9=80=89=E7=BB=84=E4=BB=B6=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E4=B8=8E=E9=BB=98=E8=AE=A4=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 将产线下拉选择替换为单选按钮组,提升筛选交互体验
2. 设置产线筛选默认值为酸轧线对应编码
3. 新增工序配置工具类与产线元数据工具类,统一管理工序与产线数据
---
klp-ui/src/utils/meta.js | 34 +++++++++++++++
klp-ui/src/views/wms/report/comparison.vue | 15 ++++---
klp-ui/src/views/wms/report/line.vue | 15 ++++---
klp-ui/src/views/wms/warehouse/processes.js | 48 +++++++++++++++++++++
4 files changed, 98 insertions(+), 14 deletions(-)
create mode 100644 klp-ui/src/utils/meta.js
create mode 100644 klp-ui/src/views/wms/warehouse/processes.js
diff --git a/klp-ui/src/utils/meta.js b/klp-ui/src/utils/meta.js
new file mode 100644
index 000000000..5bcc8e65d
--- /dev/null
+++ b/klp-ui/src/utils/meta.js
@@ -0,0 +1,34 @@
+// lockValue: 锁值,用于防止并发操作,不同的lockValue对应不同的锁
+// 1:分步加工 2. 退火 3. 酸轧 4. 酸轧分条 4. 合卷
+export const PROCESSES = [
+ { name: '酸连轧工序', actionType: 11, api: 'pendingAction', lockValue: 3 },
+ { name: '酸轧分条工序', actionType: 120, api: 'pendingAction', lockValue: 4 },
+ { name: '酸轧合卷', actionType: 201, api: 'pendingAction', lockValue: 5 },
+ { name: '镀锌合卷', actionType: 202, api: 'pendingAction', lockValue: 5 },
+ { name: '脱脂合卷', actionType: 203, api: 'pendingAction', lockValue: 5 },
+ { name: '拉矫平整合卷', actionType: 204, api: 'pendingAction', lockValue: 5 },
+ { name: '双机架合卷', actionType: 205, api: 'pendingAction', lockValue: 5 },
+ { name: '镀铬合卷', actionType: 206, api: 'pendingAction', lockValue: 5 },
+ { name: '镀锌工序', actionType: 501, api: 'specialSplit', lockValue: 1 },
+ { name: '脱脂工序', actionType: 502, api: 'specialSplit', lockValue: 1 },
+ { name: '拉矫平整工序', actionType: 503, api: 'specialSplit', lockValue: 1 },
+ { name: '双机架工序', actionType: 504, api: 'specialSplit', lockValue: 1 },
+ { name: '镀铬工序', actionType: 505, api: 'specialSplit', lockValue: 1 },
+ { name: '纵剪分条工序', actionType: 506, api: 'specialSplit', lockValue: 1 },
+ { name: '酸轧修复工序', actionType: 520, api: 'specialSplit', lockValue: 1 },
+ { name: '镀锌修复工序', actionType: 521, api: 'specialSplit', lockValue: 1 },
+ { name: '脱脂修复工序', actionType: 522, api: 'specialSplit', lockValue: 1 },
+ { name: '拉矫修复工序', actionType: 523, api: 'specialSplit', lockValue: 1 },
+ { name: '双机架修复工序', actionType: 524, api: 'specialSplit', lockValue: 1 },
+ { name: '镀铬修复工序', actionType: 525, api: 'specialSplit', lockValue: 1 },
+]
+
+export const PRODUCTION_LINES = [
+ { name: '镀锌线', id: 1, processes: '501,202,521', hasPendingAction: true },
+ { name: '酸轧线', id: 2, processes: '11,120,201,520', hasPendingAction: true },
+ { name: '脱脂线', id: 3, processes: '203,502,522', hasPendingAction: true },
+ { name: '镀铬线', id: 4, processes: '206,505,525', hasPendingAction: true },
+ { name: '双机架', id: 5, processes: '205,504,524', hasPendingAction: true },
+ { name: '退火线', id: 6, processes: '600', hasPendingAction: false },
+ { name: '拉矫线', id: 7, processes: '204,503,523', hasPendingAction: true },
+]
\ No newline at end of file
diff --git a/klp-ui/src/views/wms/report/comparison.vue b/klp-ui/src/views/wms/report/comparison.vue
index a48f853af..80ee399fb 100644
--- a/klp-ui/src/views/wms/report/comparison.vue
+++ b/klp-ui/src/views/wms/report/comparison.vue
@@ -2,13 +2,13 @@
+
+
+ 全部
+ {{ line.label }}
+
+
-
-
-
-
-
-
@@ -176,7 +176,7 @@ export default {
baseStartTime: baseMonthStart, baseEndTime: baseMonthEnd,
queryParams: { enterCoilNo: '', currentCoilNo: '', itemName: '', itemSpecification: '', itemMaterial: '', itemManufacturer: '', qualityStatusCsv: '' },
lossColumns: [], outputColumns: [],
- actionTypes: '',
+ actionTypes: '11,120,201,520',
lineOptions: [
{ label: '酸轧线', value: '11,120,201,520' }, { label: '镀锌线', value: '202,501,521' },
{ label: '双机架', value: '205,504,524' }, { label: '镀铬线', value: '206,505,525' },
@@ -355,6 +355,7 @@ export default {
.comparison-report { min-width: 900px; }
.filter-card { margin-bottom: 8px; }
.filter-card >>> .el-card__body { padding: 8px 12px 8px; }
+.line-tabs-row { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.filter-form { margin-bottom: 0; }
.filter-form .el-form-item { margin-bottom: 6px; margin-right: 4px; }
.filter-form >>> .el-form-item__label { font-size: 12px; }
diff --git a/klp-ui/src/views/wms/report/line.vue b/klp-ui/src/views/wms/report/line.vue
index be9f41996..add07597d 100644
--- a/klp-ui/src/views/wms/report/line.vue
+++ b/klp-ui/src/views/wms/report/line.vue
@@ -2,13 +2,13 @@
+
+
+ 全部
+ {{ line.label }}
+
+
-
-
-
-
-
-
.line-report { min-width: 900px; }
.filter-area { background: #fff; padding: 8px 12px; margin-bottom: 8px; border-bottom: 1px solid #e4e7ed; }
+.line-tabs-row { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.filter-form { margin-bottom: 0; }
.filter-form .el-form-item { margin-bottom: 6px; margin-right: 4px; }
.filter-form >>> .el-form-item__label { font-size: 12px; }
diff --git a/klp-ui/src/views/wms/warehouse/processes.js b/klp-ui/src/views/wms/warehouse/processes.js
new file mode 100644
index 000000000..40d7b62d9
--- /dev/null
+++ b/klp-ui/src/views/wms/warehouse/processes.js
@@ -0,0 +1,48 @@
+export const PROCESSES = [
+ { name: '酸连轧工序', actionType: 11, api: 'pendingAction', lockValue: 3 },
+ { name: '酸轧分条工序', actionType: 120, api: 'pendingAction', lockValue: 4 },
+ { name: '酸轧合卷', actionType: 201, api: 'pendingAction', lockValue: 5 },
+ { name: '镀锌合卷', actionType: 202, api: 'pendingAction', lockValue: 5 },
+ { name: '脱脂合卷', actionType: 203, api: 'pendingAction', lockValue: 5 },
+ { name: '拉矫平整合卷', actionType: 204, api: 'pendingAction', lockValue: 5 },
+ { name: '双机架合卷', actionType: 205, api: 'pendingAction', lockValue: 5 },
+ { name: '镀铬合卷', actionType: 206, api: 'pendingAction', lockValue: 5 },
+ { name: '镀锌工序', actionType: 501, api: 'specialSplit' },
+ { name: '脱脂工序', actionType: 502, api: 'specialSplit' },
+ { name: '拉矫平整工序', actionType: 503, api: 'specialSplit' },
+ { name: '双机架工序', actionType: 504, api: 'specialSplit' },
+ { name: '镀铬工序', actionType: 505, api: 'specialSplit' },
+ { name: '纵剪分条工序', actionType: 506, api: 'specialSplit' },
+ { name: '酸轧修复工序', actionType: 520, api: 'specialSplit' },
+ { name: '镀锌修复工序', actionType: 521, api: 'specialSplit' },
+ { name: '脱脂修复工序', actionType: 522, api: 'specialSplit' },
+ { name: '拉矫修复工序', actionType: 523, api: 'specialSplit' },
+ { name: '双机架修复工序', actionType: 524, api: 'specialSplit' },
+ { name: '镀铬修复工序', actionType: 525, api: 'specialSplit' },
+]
+
+/**
+ * 酸轧加工(actionType=11)、酸轧分条(actionType=120)、所有合卷(actionType 200-210)使用 addPendingAction
+ * 其他工序使用 startSpecialSplit
+ */
+export function getProcessApi(actionType) {
+ if (actionType === 11 || actionType === 120 || (actionType >= 200 && actionType <= 210)) {
+ return 'pendingAction'
+ }
+ return 'specialSplit'
+}
+
+export function getLockValue(actionType) {
+ if (actionType === 11) return 3
+ if (actionType === 120) return 4
+ if (actionType >= 200 && actionType <= 210) return 5
+ return undefined
+}
+
+export function getProcessByName(name) {
+ return PROCESSES.find(p => p.name === name)
+}
+
+export function getProcessByActionType(actionType) {
+ return PROCESSES.find(p => p.actionType === actionType)
+}