projects/mes-lb #97

Merged
g7hoo merged 14 commits from projects/mes-lb into projects/mes-test 2023-11-21 16:09:15 +08:00
Showing only changes of commit 20975948ef - Show all commits

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;