diff --git a/src/views/mes/materialBom/addBom.vue b/src/views/mes/materialBom/addBom.vue index f51798a..8ca6352 100644 --- a/src/views/mes/materialBom/addBom.vue +++ b/src/views/mes/materialBom/addBom.vue @@ -45,6 +45,7 @@ (); const materialBomFormRef = ref(); @@ -223,4 +225,5 @@ const handleRowClick = (row) =>{ onMounted(() => { getList(); }); +defineExpose({tableRef}) diff --git a/src/views/mes/planInfo/index.vue b/src/views/mes/planInfo/index.vue index 572b1f2..8c8ed9b 100644 --- a/src/views/mes/planInfo/index.vue +++ b/src/views/mes/planInfo/index.vue @@ -333,7 +333,7 @@ const shiftList = ref([]); const classTeamList = ref([]); const materialOpen = ref(false); -const bomSelectRef = ref>(); +const bomSelectRef = ref(); /*获取班次下拉框*/ const getShiftSelect = async () => { @@ -576,19 +576,20 @@ const handleExport = () => { /** 新增按钮操作 */ const handleMaterialAdd = () => { materialOpen.value = true; - bomSelectRef.value.open(); + // bomSelectRef.value.open(); } /** 提交物料信息按钮 */ const submitMaterialForm = () => { - console.log("bomSelectRef.value",bomSelectRef.value); - let selectedRow = bomSelectRef.value.selectedRow; + console.log("bomSelectRef.value",bomSelectRef.value.tableRef.store.states.currentRow.value); + let selectedRow = bomSelectRef.value.tableRef.store.states.currentRow.value; console.log(selectedRow,form.value); form.value.materialName = selectedRow.materialName + console.log(selectedRow,form.value); // this.$set(form, "materialId", selectedRow.materialId); // this.$set(form, "materialName", selectedRow.materialName); // this.$set(form, "erpMaterialId", selectedRow.erpId); - materialOpen.value = false; + // materialOpen.value = false; } onMounted(() => {