From 6edc6e11005c88e26fe9b7edf29440f1546d17a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com>
Date: Sat, 13 Jun 2026 11:15:38 +0800
Subject: [PATCH] =?UTF-8?q?feat(wms-report):=20=E6=96=B0=E5=A2=9E=E5=AF=B9?=
=?UTF-8?q?=E6=AF=94=E6=8A=A5=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=92=8C=E5=B0=BA?=
=?UTF-8?q?=E5=AF=B8=E5=BC=82=E5=B8=B8=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 新增comparison.vue对比报表页面,支持基期/当期数据对比、快速环比查询、明细表格查看和列配置
2. 在action.vue报表中添加尺寸异常统计模块,统计长度和厚度异常的卷数、总重及占比
3. 新增告警阈值配置获取逻辑,从系统配置中读取长度和厚度异常阈值
---
klp-ui/src/views/wms/report/comparison.vue | 385 ++++++++++++++++++
.../src/views/wms/report/template/action.vue | 66 ++-
2 files changed, 450 insertions(+), 1 deletion(-)
create mode 100644 klp-ui/src/views/wms/report/comparison.vue
diff --git a/klp-ui/src/views/wms/report/comparison.vue b/klp-ui/src/views/wms/report/comparison.vue
new file mode 100644
index 00000000..14ff5cda
--- /dev/null
+++ b/klp-ui/src/views/wms/report/comparison.vue
@@ -0,0 +1,385 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 基期
+
+ —
+
+ 当期
+
+ —
+
+
+ 日环比
+ 周环比
+ 月环比
+ 年环比
+
+ 查询
+ 列配置
+
+
+
+
+
+
+ 口径:数值环比 = (当期−基期)/|基期|×100%(红增/绿降);百分比环比 = 当期百分点−基期百分点。 M卷(currentCoilNo含M且不在前五位)不计入产出。
+
+
+
+
+
+
环比对比统计
+
+
+
+
{{ item.label }}
+
+ {{ item.base }}
+ →
+ {{ item.current }}
+
+
{{ item.rate }}
+
+
+
+
+
+
+
已处理M统计信息对比
+
+
+
+
{{ item.label }}
+
+ {{ item.base }}
+ →
+ {{ item.current }}
+
+
{{ item.rate }}
+
+
+
+
+
+
+
异常库位统计对比
+
+
+
+
{{ item.label }}
+
+ {{ item.base }}
+ →
+ {{ item.current }}
+
+
{{ item.rate }}
+
+
+
+
+
+
+
+
+
+
+ 投入明细
+ 产出明细
+
+
+
+
+
+
+
+
+
diff --git a/klp-ui/src/views/wms/report/template/action.vue b/klp-ui/src/views/wms/report/template/action.vue
index 864a2016..f033308d 100644
--- a/klp-ui/src/views/wms/report/template/action.vue
+++ b/klp-ui/src/views/wms/report/template/action.vue
@@ -265,6 +265,17 @@
+
+
+ {{ sizeAbnormalSummary.length.count }}
+ {{ sizeAbnormalSummary.length.weight }}t
+ {{ sizeAbnormalSummary.length.countRate }}
+ {{ sizeAbnormalSummary.length.weightRate }}
+ {{ sizeAbnormalSummary.thickness.count }}
+ {{ sizeAbnormalSummary.thickness.weight }}t
+ {{ sizeAbnormalSummary.thickness.countRate }}
+ {{ sizeAbnormalSummary.thickness.weightRate }}
+
@@ -344,6 +355,17 @@
+
+
+ {{ sizeAbnormalSummary.length.count }}
+ {{ sizeAbnormalSummary.length.weight }}t
+ {{ sizeAbnormalSummary.length.countRate }}
+ {{ sizeAbnormalSummary.length.weightRate }}
+ {{ sizeAbnormalSummary.thickness.count }}
+ {{ sizeAbnormalSummary.thickness.weight }}t
+ {{ sizeAbnormalSummary.thickness.countRate }}
+ {{ sizeAbnormalSummary.thickness.weightRate }}
+
@@ -547,7 +569,9 @@ export default {
],
lossColumns: [],
outputColumns: [],
- actionIds: ''
+ actionIds: '',
+ lengthThreshold: 0,
+ thicknessThreshold: 0
}
},
computed: {
@@ -610,6 +634,41 @@ export default {
customExportStorageKey() {
return `coil-report-action-${this.actionType}`
},
+ sizeAbnormalSummary() {
+ const totalCount = this.outList.length
+ const totalWeight = this.outList.reduce((acc, cur) => acc + (parseFloat(cur.netWeight) || 0), 0)
+
+ const lengthAbnormal = this.outList.filter(row => {
+ const lengthDiff = (row.actualLength || 0) - (row.theoreticalLength || 0)
+ const theoreticalLength = row.theoreticalLength || 1
+ return Math.abs(lengthDiff) / theoreticalLength > this.lengthThreshold
+ })
+
+ const thicknessAbnormal = this.outList.filter(row => {
+ const thicknessDiff = (row.theoreticalThickness || 0) - (row.computedThickness || 0)
+ return thicknessDiff > this.thicknessThreshold
+ })
+
+ const laCount = lengthAbnormal.length
+ const laWeight = lengthAbnormal.reduce((acc, cur) => acc + (parseFloat(cur.netWeight) || 0), 0)
+ const taCount = thicknessAbnormal.length
+ const taWeight = thicknessAbnormal.reduce((acc, cur) => acc + (parseFloat(cur.netWeight) || 0), 0)
+
+ return {
+ length: {
+ count: laCount,
+ weight: laWeight.toFixed(2),
+ countRate: totalCount > 0 ? (laCount / totalCount * 100).toFixed(2) + '%' : '0.00%',
+ weightRate: totalWeight > 0 ? (laWeight / totalWeight * 100).toFixed(2) + '%' : '0.00%',
+ },
+ thickness: {
+ count: taCount,
+ weight: taWeight.toFixed(2),
+ countRate: totalCount > 0 ? (taCount / totalCount * 100).toFixed(2) + '%' : '0.00%',
+ weightRate: totalWeight > 0 ? (taWeight / totalWeight * 100).toFixed(2) + '%' : '0.00%',
+ }
+ }
+ },
},
watch: {
warehouseOptions: {
@@ -625,6 +684,7 @@ export default {
this.initDateByReportType()
this.handleQuery()
this.loadColumns()
+ this.getAlarmThreshold()
},
methods: {
initDateByReportType() {
@@ -1102,6 +1162,10 @@ export default {
this.loading = false
})
},
+ getAlarmThreshold() {
+ this.getConfigKey('material.warning.length').then(response => { this.lengthThreshold = parseFloat(response.msg) || 0 })
+ this.getConfigKey('material.warning.thickness').then(response => { this.thicknessThreshold = parseFloat(response.msg) || 0 })
+ },
loadColumns() {
this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || []
this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || []