This commit is contained in:
lb 2023-11-28 09:04:57 +08:00
джерело a18929a261
коміт 68d3b46bab
3 змінених файлів з 37 додано та 25 видалено

@ -19,7 +19,7 @@
</el-col>
</el-row>
<el-row style="border: 1px solid #ccc; display: flex">
<el-row v-if="filteredBomList.length" style="border: 1px solid #ccc; display: flex">
<el-col :span="8">
<div class="select-list">
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
@ -78,6 +78,7 @@
</div>
</el-col>
</el-row>
<div class="no-data-bg" v-else></div>
</div>
</template>
;

@ -218,34 +218,45 @@ export default {
this.total = 0;
}
this.selectedBoms = [];
// bom
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.equChose || 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;
});
} else {
})
.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.equChose ||
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;
});
} else {
this.bomList.splice(0);
this.selectedBoms = [];
}
})
.catch((err) => {
this.bomList.splice(0);
}
});
this.selectedBoms = [];
});
},
async handleAddEquipment() {
this.open = true;

@ -34,7 +34,7 @@
class="btn-refresh"
@click="handleUpdateLayout"
icon="el-icon-refresh">
刷新布局
保存布局
</el-button>
<el-button
type="primary"