|
|
|
|
@ -998,12 +998,16 @@ export default {
|
|
|
|
|
// 如果是第一次加载,初始化选中状态
|
|
|
|
|
if (this.materialModal.selectedMaterialIds.size === 0) {
|
|
|
|
|
this.materialList.forEach(item => {
|
|
|
|
|
if (item.material_infos_plan_link &&
|
|
|
|
|
item.material_infos_plan_link.length > 0 &&
|
|
|
|
|
item.material_infos_plan_link[0].material_infos_plan_id === planId) {
|
|
|
|
|
console.log('item.id', item.id)
|
|
|
|
|
if (item.material_infos_plan_link && item.material_infos_plan_link.length > 0) {
|
|
|
|
|
// 遍历物资绑定的所有盘点计划
|
|
|
|
|
const hasMatchingPlan = item.material_infos_plan_link.some(link =>
|
|
|
|
|
link.material_infos_plan_id === planId
|
|
|
|
|
);
|
|
|
|
|
if (hasMatchingPlan) {
|
|
|
|
|
console.log('item.id', item.id);
|
|
|
|
|
this.materialModal.selectedMaterialIds.add(item.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|