fix(wms/report/template): 修复卷数据查询参数错误
将原有的coilIds查询参数替换为正确的actionIds来获取对应卷数据,修正了上报模板中待处理动作的查询逻辑
This commit is contained in:
@@ -466,6 +466,7 @@ export default {
|
|||||||
const res = await listPendingAction({ ...this.queryParams, actionType: this.actionType, actionStatus: 2 });
|
const res = await listPendingAction({ ...this.queryParams, actionType: this.actionType, actionStatus: 2 });
|
||||||
// 获取两层数据
|
// 获取两层数据
|
||||||
const lossIds = res.rows.filter(item => item.coilId).map(item => item.coilId);
|
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去重
|
// 使用new Set去重
|
||||||
const outIds = [...new Set(res.rows.filter(item => item.processedCoilIds).map(item => item.processedCoilIds))];
|
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([
|
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: '' }),
|
listCoilWithIds({ ...this.queryParams, coilIds: outIds.join(',') || '', startTime: '', endTime: '' }),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -240,6 +240,7 @@ export default {
|
|||||||
const res = await listPendingAction({ ...this.queryParams, actionType: this.actionType, actionStatus: 2 });
|
const res = await listPendingAction({ ...this.queryParams, actionType: this.actionType, actionStatus: 2 });
|
||||||
// 获取两层数据
|
// 获取两层数据
|
||||||
const lossIds = res.rows.map(item => item.coilId);
|
const lossIds = res.rows.map(item => item.coilId);
|
||||||
|
const lossActionIds = res.rows.map(item => item.actionId);
|
||||||
// 使用new Set去重
|
// 使用new Set去重
|
||||||
const outIds = [...new Set(res.rows.map(item => item.processedCoilIds))];
|
const outIds = [...new Set(res.rows.map(item => item.processedCoilIds))];
|
||||||
|
|
||||||
@@ -253,7 +254,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const [lossRes, outRes] = await Promise.all([
|
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: '' }),
|
listCoilWithIds({ ...this.queryParams, coilIds: outIds.join(',') || '', startTime: '', endTime: '' }),
|
||||||
]);
|
]);
|
||||||
this.lossList = lossRes.rows.map(item => {
|
this.lossList = lossRes.rows.map(item => {
|
||||||
|
|||||||
Reference in New Issue
Block a user