diff --git a/src/views/mes/bom/components/BomDetailForm.vue b/src/views/mes/bom/components/BomDetailForm.vue index 66de58bf..012910db 100644 --- a/src/views/mes/bom/components/BomDetailForm.vue +++ b/src/views/mes/bom/components/BomDetailForm.vue @@ -17,6 +17,7 @@ clearable filterable :placeholder="t('FactoryModeling.ProductBOM.detailMaterialPlaceholder')" + @change="(val) => handleProductChange(val, row)" > { + if (productId) { + const product = productList.value.find((item) => item.id === productId) + row.unitId = product?.unitId ?? undefined + } else { + row.unitId = undefined + } +} + /** 新增按钮操作 */ const handleAdd = () => { const row = {