| | |
| | | style="width: 100%"> |
| | | <el-table-column prop="productName" |
| | | label="产品" /> |
| | | <el-table-column prop="drawingNumber" |
| | | label="产品图纸编号" /> |
| | | <el-table-column prop="model" |
| | | label="规格"> |
| | | <template #default="{ row, $index }"> |
| | |
| | | prop="bomNo" /> |
| | | <el-table-column label="产品名称" |
| | | prop="productName" /> |
| | | <el-table-column label="产品图纸编号" |
| | | prop="drawingNumber" /> |
| | | <el-table-column label="规格型号" |
| | | prop="model" /> |
| | | </el-table> |
| | |
| | | // 从路由参数获取产品信息 |
| | | const routeBomNo = computed(() => route.query.bomNo || ""); |
| | | const routeProductName = computed(() => route.query.productName || ""); |
| | | const routeDrawingNumber = computed(() => route.query.drawingNumber || ""); |
| | | const routeProductModelName = computed( |
| | | () => route.query.productModelName || "" |
| | | ); |
| | |
| | | const tableData = reactive([ |
| | | { |
| | | productName: "", |
| | | drawingNumber: "", |
| | | model: "", |
| | | bomNo: "", |
| | | }, |
| | |
| | | dataValue.dataList.map(item => { |
| | | if (item.tempId === dataValue.currentRowName) { |
| | | item.productName = productData.productName; |
| | | item.drawingNumber = productData.drawingNumber || ""; |
| | | item.model = productData.model; |
| | | item.productModelId = productData.id; |
| | | item.unit = productData.unit || ""; |
| | |
| | | const childItem = (item: any, tempId: any, productData: any) => { |
| | | if (item.tempId === tempId) { |
| | | item.productName = productData.productName; |
| | | item.drawingNumber = productData.drawingNumber || ""; |
| | | item.model = productData.model; |
| | | item.productModelId = productData.id; |
| | | item.unit = productData.unit || ""; |
| | |
| | | onMounted(async () => { |
| | | // 从路由参数回显数据 |
| | | tableData[0].productName = routeProductName.value as string; |
| | | tableData[0].drawingNumber = routeDrawingNumber.value as string; |
| | | tableData[0].model = routeProductModelName.value as string; |
| | | tableData[0].bomNo = routeBomNo.value as string; |
| | | |