update
This commit is contained in:
parent
ac041c2f4a
commit
20975948ef
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user