This commit is contained in:
lb 2023-11-20 16:50:38 +08:00
父節點 ac041c2f4a
當前提交 20975948ef

查看文件

@ -191,14 +191,25 @@ export default {
}
// bom
this.http(
'/extend/process-flow-det/getEquipmentDetBySectionId?id=' + sectionId,
'post'
).then(({ code, data }) => {
this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
sectionId,
flowDetId: detId,
}).then(({ code, data }) => {
if (code == 0) {
this.bomList = data.map((eq) => {
eq.materialsBom = eq.materialsBom || [];
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.valuesBom.equipmentId = eq.id;
return eq;