|
@@ -214,15 +214,18 @@ export default {
|
|
|
const workOrderMap = new Map(res.map((it) => [it.workOrderId, it]));
|
|
const workOrderMap = new Map(res.map((it) => [it.workOrderId, it]));
|
|
|
|
|
|
|
|
// 更新List中的每个项目
|
|
// 更新List中的每个项目
|
|
|
- this.List.forEach((item) => {
|
|
|
|
|
|
|
+ this.List.forEach((item,index) => {
|
|
|
if (workOrderMap.has(item.workOrderId)) {
|
|
if (workOrderMap.has(item.workOrderId)) {
|
|
|
// 直接从映射中获取数据,避免嵌套循环
|
|
// 直接从映射中获取数据,避免嵌套循环
|
|
|
this.$set(item, 'toWarehouseList', [
|
|
this.$set(item, 'toWarehouseList', [
|
|
|
JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
|
|
JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
|
|
|
]);
|
|
]);
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
this.$set(item, 'toWarehouseList', []);
|
|
this.$set(item, 'toWarehouseList', []);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|