From c9742b08cf67d904a1a42f047c4fca9fa4a2cd6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Fri, 17 Apr 2026 15:10:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(wms):=20=E4=BF=AE=E5=A4=8D=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E5=88=86=E5=89=B2=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF=E5=B9=B6=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 处理规格分割时可能出现的空值问题,使用可选链操作符和默认值 同时增加多个报表页面的分页大小限制 --- klp-ui/src/views/wms/coil/do/correct.vue | 5 ++--- klp-ui/src/views/wms/report/delivery.vue | 4 ++-- klp-ui/src/views/wms/report/merge/index.vue | 2 +- klp-ui/src/views/wms/report/receive.vue | 4 ++-- klp-ui/src/views/wms/report/template/merge.vue | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/klp-ui/src/views/wms/coil/do/correct.vue b/klp-ui/src/views/wms/coil/do/correct.vue index 12790593..0f6d39fc 100644 --- a/klp-ui/src/views/wms/coil/do/correct.vue +++ b/klp-ui/src/views/wms/coil/do/correct.vue @@ -292,9 +292,9 @@ import { getCoilTagPrintType } from '@/views/wms/coil/js/coilPrint' export default { name: 'DoPage', - dicts: ['action_type', 'coil_abnormal_code', 'coil_abnormal_position', 'coil_abnormal_degree', 'coil_quality_status'], + dicts: ['action_type', 'coil_abnormal_code', 'coil_abnormal_position', 'coil_abnormal_degree', 'coil_quality_status', 'coil_business_purpose'], props: { - label: { + label: { type: String, default: () => '酸连轧工序' }, @@ -314,7 +314,6 @@ export default { RawMaterialSelect, CoilTraceResult, }, - dicts: ['coil_business_purpose'], data() { return { traceOpen: false, diff --git a/klp-ui/src/views/wms/report/delivery.vue b/klp-ui/src/views/wms/report/delivery.vue index 3b6b985d..084f3cad 100644 --- a/klp-ui/src/views/wms/report/delivery.vue +++ b/klp-ui/src/views/wms/report/delivery.vue @@ -118,7 +118,7 @@ export default { list: [], queryParams: { pageNum: 1, - pageSize: 9999, + pageSize: 99999, status: 1, dataType: 1, byExportTimeStart: startTime, @@ -170,7 +170,7 @@ export default { }).then(res => { this.list = res.rows.map(item => { // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 - const [thickness, width] = item.specification.split('*') + const [thickness, width] = item.specification?.split('*') || [] return { ...item, computedThickness: parseFloat(thickness), diff --git a/klp-ui/src/views/wms/report/merge/index.vue b/klp-ui/src/views/wms/report/merge/index.vue index 78334400..4a90aac7 100644 --- a/klp-ui/src/views/wms/report/merge/index.vue +++ b/klp-ui/src/views/wms/report/merge/index.vue @@ -256,7 +256,7 @@ export default { ]); this.lossList = lossRes.rows.map(item => { // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 - const [thickness, width] = item.specification.split('*') + const [thickness, width] = item.specification?.split('*') || [] return { ...item, computedThickness: parseFloat(thickness), diff --git a/klp-ui/src/views/wms/report/receive.vue b/klp-ui/src/views/wms/report/receive.vue index 4d26c512..71e67ee6 100644 --- a/klp-ui/src/views/wms/report/receive.vue +++ b/klp-ui/src/views/wms/report/receive.vue @@ -186,7 +186,7 @@ export default { // actionStatus: 2, warehouseId: this.queryParams.planId, actionType: 401, - pageSize: 9999, + pageSize: 99999, pageNum: 1, startTime: this.queryParams.byCreateTimeStart, endTime: this.queryParams.byCreateTimeEnd, @@ -209,7 +209,7 @@ export default { }).then(res => { this.list = res.rows.map(item => { // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 - const [thickness, width] = item.specification.split('*') + const [thickness, width] = item.specification?.split('*') || [] return { ...item, computedThickness: parseFloat(thickness), diff --git a/klp-ui/src/views/wms/report/template/merge.vue b/klp-ui/src/views/wms/report/template/merge.vue index a835dfaa..88294be8 100644 --- a/klp-ui/src/views/wms/report/template/merge.vue +++ b/klp-ui/src/views/wms/report/template/merge.vue @@ -267,7 +267,7 @@ export default { }); this.outList = outRes.rows.map(item => { // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 - const [thickness, width] = item.specification.split('*') + const [thickness, width] = item.specification?.split('*') || [] return { ...item, computedThickness: parseFloat(thickness),