This commit is contained in:
lb 2023-11-20 16:50:38 +08:00
parent ac041c2f4a
commit 20975948ef

View File

@ -191,14 +191,25 @@ export default {
} }
// bom // bom
this.http( this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
'/extend/process-flow-det/getEquipmentDetBySectionId?id=' + sectionId, sectionId,
'post' flowDetId: detId,
).then(({ code, data }) => { }).then(({ code, data }) => {
if (code == 0) { if (code == 0) {
this.bomList = data.map((eq) => { this.bomList = data.map((eq) => {
eq.materialsBom = eq.materialsBom || []; eq.materialsBom = eq.materialsBom || [];
eq.valuesBom = eq.valuesBom || []; eq.valuesBom = eq.valuesBom || [];
//
eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
if (eq.materialsBom.chosen || eq.valuesBom.chosen) {
this.selectedBoms.push({
equipmentId: eq.id,
equMaterialBomId: eq.materialsBom.chosen,
equValueBomId: eq.valuesBom.chosen,
});
}
// id
eq.materialsBom.equipmentId = eq.id; eq.materialsBom.equipmentId = eq.id;
eq.valuesBom.equipmentId = eq.id; eq.valuesBom.equipmentId = eq.id;
return eq; return eq;