Files
klp-oa/klp-ui/src/components/KLPService/Renderer/BomInfo.vue

41 lines
795 B
Vue
Raw Normal View History

2025-07-29 15:16:51 +08:00
<template>
<div>
<el-descriptions :column="1" border v-if="bomInfo.length > 0">
<el-descriptions-item v-for="item in bomInfo" :key="item.attrKey" :label="item.attrKey">
{{ item.attrValue }}
</el-descriptions-item>
</el-descriptions>
<div v-else>
<el-empty description="暂无BOM信息" />
</div>
</div>
</template>
<script>
import { listBomItem } from '../../../api/wms/bomItem';
export default {
name: 'BomInfo',
props: {
bomId: {
type: [String, Number],
required: true
}
},
data() {
return {
bomInfo: []
}
},
created() {
this.getBomInfo();
},
methods: {
getBomInfo() {
listBomItem({ bomId: this.bomId }).then(res => {
this.bomInfo = res.rows;
})
}
}
}
</script>