From 564086c72a109babe216453df46a1501231fad6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Wed, 25 Mar 2026 17:22:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(wms=E6=8A=A5=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8DfetchLossList=E5=8F=82=E6=95=B0=E4=BC=A0=E9=80=92?= =?UTF-8?q?=E5=8F=8A=E8=A7=84=E6=A0=BC=E5=88=86=E5=89=B2=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复fetchLossList函数未正确处理传入的actionTypes参数问题,并添加时间参数。同时处理规格分割时的空值情况,避免报错。 --- klp-ui/src/views/wms/coil/do/correntAll.vue | 1494 +++++++++++++++++++ klp-ui/src/views/wms/report/js/fetch.js | 8 +- 2 files changed, 1499 insertions(+), 3 deletions(-) create mode 100644 klp-ui/src/views/wms/coil/do/correntAll.vue diff --git a/klp-ui/src/views/wms/coil/do/correntAll.vue b/klp-ui/src/views/wms/coil/do/correntAll.vue new file mode 100644 index 00000000..56611c9b --- /dev/null +++ b/klp-ui/src/views/wms/coil/do/correntAll.vue @@ -0,0 +1,1494 @@ + + + + + \ No newline at end of file diff --git a/klp-ui/src/views/wms/report/js/fetch.js b/klp-ui/src/views/wms/report/js/fetch.js index 243bb71a..3a9bb626 100644 --- a/klp-ui/src/views/wms/report/js/fetch.js +++ b/klp-ui/src/views/wms/report/js/fetch.js @@ -26,7 +26,7 @@ export async function fetchOutputList(queryParams) { (a, b) => new Date(b.createTime) - new Date(a.createTime) ).map(item => { // 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度 - const [thickness, width] = item.specification.split('*') + const [thickness, width] = item.specification?.split('*') || [0, 0] return { ...item, computedThickness: parseFloat(thickness), @@ -36,12 +36,14 @@ export async function fetchOutputList(queryParams) { return sortedList } -export async function fetchLossList(queryParams) { - const resultList = await Promise.all(this.actionTypes.map(actionType => { +export async function fetchLossList(actionTypes, queryParams) { + const resultList = await Promise.all(actionTypes.map(actionType => { return listPendingAction({ ...queryParams, actionStatus: 2, actionType, + startTime: queryParams.byCreateTimeStart, + endTime: queryParams.byCreateTimeEnd, pageSize: 99999, pageNum: 1, })