From 0aa74790d62096d312c3fa6a044bcc33882b0286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 14 Jan 2025 09:24:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/materialBom/addBom.vue | 3 +++ src/views/mes/planInfo/index.vue | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) 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(() => {