diff --git a/src/views/mes/productionReport/components/ProductInfoDialog.vue b/src/views/mes/productionReport/components/ProductInfoDialog.vue
index 5713912b..2826fd88 100644
--- a/src/views/mes/productionReport/components/ProductInfoDialog.vue
+++ b/src/views/mes/productionReport/components/ProductInfoDialog.vue
@@ -1,20 +1,17 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.isEnable ? '是' : '否' }}
-
-
-
+
+
+ {{ productInfo.barCode }}
+ {{ productInfo.productName }}
+ {{ productInfo.number }}
+ {{ productInfo.unitName }}
+ {{ productInfo.standard }}
+
+
+
+
+
+
@@ -26,29 +23,34 @@ defineOptions({ name: 'ProductInfoDialog' })
const dialogVisible = ref(false)
const loading = ref(false)
-const productList = ref([])
+const materialList = ref([])
+const productInfo = ref({})
-const open = async (productId: number) => {
+const open = async (row: any) => {
dialogVisible.value = true
+ productInfo.value = row || {}
loading.value = true
try {
- const data = await BomApi.getBomByProductId(productId)
- productList.value = data || []
+ const data = await BomApi.getBomByProductId(row.productId)
+ materialList.value = data || []
} catch (error) {
- console.error('Failed to fetch product info:', error)
- productList.value = []
+ console.error('Failed to fetch material list:', error)
+ materialList.value = []
} finally {
loading.value = false
}
}
const handleClose = () => {
- productList.value = []
+ materialList.value = []
+ productInfo.value = {}
}
-defineExpose({
- open
-})
+defineExpose({ open })
-
+
diff --git a/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue b/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue
index 0e937ce1..eb83aa11 100644
--- a/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue
+++ b/src/views/mes/productionReport/components/ProductionReportBasicInfo.vue
@@ -72,9 +72,7 @@ watch(
/** 打开产品信息对话框 */
const openProductInfo = (row: any) => {
- if (row?.productId) {
- productInfoDialogRef.value?.open(row.productId)
- }
+ productInfoDialogRef.value?.open(row)
}