diff --git a/klp-ui/src/components/KLPService/MaterialSelect/index.vue b/klp-ui/src/components/KLPService/MaterialSelect/index.vue
index 00cd49bd..888c06d6 100644
--- a/klp-ui/src/components/KLPService/MaterialSelect/index.vue
+++ b/klp-ui/src/components/KLPService/MaterialSelect/index.vue
@@ -48,7 +48,7 @@
},
_itemId: {
get() {
- return this.itemId;
+ return this.itemId.toString();
},
set(val) {
this.$emit('update:itemId', val);
diff --git a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue
index 3387f47d..51765133 100644
--- a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue
+++ b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue
@@ -63,9 +63,9 @@ export default {
let bomId = this.bomId;
if (!bomId) {
if (this.itemType === 'product') {
- bomId = this.productMap[this.itemId].bomId;
+ bomId = this.productMap[this.itemId]?.bomId;
} else if (this.itemType === 'raw_material') {
- bomId = this.rawMaterialMap[this.itemId].bomId;
+ bomId = this.rawMaterialMap[this.itemId]?.bomId;
}
}
if (!bomId) {
diff --git a/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue b/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue
index e08552e1..52c24df0 100644
--- a/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue
+++ b/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue
@@ -63,12 +63,13 @@ export default {
let bomId = this.bomId;
if (!bomId) {
if (this.itemType === 'product') {
- bomId = this.productMap[this.itemId].bomId;
+ bomId = this.productMap[this.itemId]?.bomId;
} else if (this.itemType === 'raw_material') {
- bomId = this.rawMaterialMap[this.itemId].bomId;
+ bomId = this.rawMaterialMap[this.itemId]?.bomId;
}
}
if (!bomId) {
+ this.bomInfo = [];
return;
}
if (bomMap[bomId]) {
diff --git a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue
index 0830efb1..6e5580cb 100644
--- a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue
+++ b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue
@@ -62,9 +62,9 @@ export default {
watch: {
productId: {
handler(newVal) {
- this.product = this.productMap && this.productMap[this.productId]
- ? { ...this.productMap[this.productId] }
- : {};
+ const res = this.productMap[this.productId] ? this.productMap[this.productId] : {};
+ console.log(res)
+ this.product = res;
},
immediate: true
}
diff --git a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue
index 79975da6..00f76682 100644
--- a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue
+++ b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue
@@ -3,7 +3,7 @@
- {{ material.rawMaterialName ? material.rawMaterialName : '--' }}
+ {{ material.rawMaterialName ? material.rawMaterialName : '-' }}
+
-
+
@@ -80,19 +81,20 @@
-
+
-
-
+
+
+
-
+
-
+
-
+