diff --git a/klp-ui/src/views/wms/report/template/action.vue b/klp-ui/src/views/wms/report/template/action.vue index 8124bac4..2c39118e 100644 --- a/klp-ui/src/views/wms/report/template/action.vue +++ b/klp-ui/src/views/wms/report/template/action.vue @@ -466,6 +466,7 @@ export default { const res = await listPendingAction({ ...this.queryParams, actionType: this.actionType, actionStatus: 2 }); // 获取两层数据 const lossIds = res.rows.filter(item => item.coilId).map(item => item.coilId); + const lossActionIds = res.rows.filter(item => item.actionId).map(item => item.actionId); // 使用new Set去重 const outIds = [...new Set(res.rows.filter(item => item.processedCoilIds).map(item => item.processedCoilIds))]; @@ -479,7 +480,7 @@ export default { } const [lossRes, outRes] = await Promise.all([ - listCoilWithIds({ ...this.queryParams, coilIds: lossIds.join(',') || '', startTime: '', endTime: '' }), + listCoilWithIds({ ...this.queryParams, actionIds: lossActionIds.join(',') || '', startTime: '', endTime: '' }), listCoilWithIds({ ...this.queryParams, coilIds: outIds.join(',') || '', startTime: '', endTime: '' }), ]); diff --git a/klp-ui/src/views/wms/report/template/merge.vue b/klp-ui/src/views/wms/report/template/merge.vue index 077e540f..f770b22c 100644 --- a/klp-ui/src/views/wms/report/template/merge.vue +++ b/klp-ui/src/views/wms/report/template/merge.vue @@ -240,6 +240,7 @@ export default { const res = await listPendingAction({ ...this.queryParams, actionType: this.actionType, actionStatus: 2 }); // 获取两层数据 const lossIds = res.rows.map(item => item.coilId); + const lossActionIds = res.rows.map(item => item.actionId); // 使用new Set去重 const outIds = [...new Set(res.rows.map(item => item.processedCoilIds))]; @@ -253,7 +254,7 @@ export default { } const [lossRes, outRes] = await Promise.all([ - listCoilWithIds({ ...this.queryParams, coilIds: lossIds.join(',') || '', startTime: '', endTime: '' }), + listCoilWithIds({ ...this.queryParams, actionIds: lossActionIds.join(',') || '', startTime: '', endTime: '' }), listCoilWithIds({ ...this.queryParams, coilIds: outIds.join(',') || '', startTime: '', endTime: '' }), ]); this.lossList = lossRes.rows.map(item => {