From b7c9e3b08f6cd3d7370c26fc3c4b0be3f623f4be Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 4 Jun 2021 17:11:32 +0000 Subject: [PATCH] --- .../src/components/work-order-item-parts.vue | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/ayanova/src/components/work-order-item-parts.vue b/ayanova/src/components/work-order-item-parts.vue index be9ba116..1a63449b 100644 --- a/ayanova/src/components/work-order-item-parts.vue +++ b/ayanova/src/components/work-order-item-parts.vue @@ -385,6 +385,23 @@ export default { this.activeItemIndex ].requestAmountViz; if (requestQuantity != null && requestQuantity > 0) { + let selectedPartWarehouse = this.$refs[ + `Items[${this.activeWoItemIndex}].parts[${this.activeItemIndex}].partWarehouseId` + ].getFullSelectionValue(); + if ( + selectedPartWarehouse != null && + selectedPartWarehouse.name != null + ) { + selectedPartWarehouse = selectedPartWarehouse.name; + } + + let selectedPart = this.$refs[ + `Items[${this.activeWoItemIndex}].parts[${this.activeItemIndex}].partId` + ].getFullSelectionValue(); + if (selectedPart != null && selectedPart.name != null) { + selectedPart = selectedPart.name; + } + //change the partquantity this.value.items[this.activeWoItemIndex].parts[ this.activeItemIndex @@ -399,15 +416,11 @@ export default { partId: this.value.items[this.activeWoItemIndex].parts[ this.activeItemIndex ].partId, - partViz: this.value.items[this.activeWoItemIndex].parts[ - this.activeItemIndex - ].partViz, + partViz: selectedPart, partWarehouseId: this.value.items[this.activeWoItemIndex].parts[ this.activeItemIndex ].partWarehouseId, - partWarehouseViz: this.value.items[this.activeWoItemIndex].parts[ - this.activeItemIndex - ].partWarehouseViz, + partWarehouseViz: selectedPartWarehouse, quantity: requestQuantity, isDirty: true, workOrderItemId: this.value.items[this.activeWoItemIndex].id, @@ -415,7 +428,7 @@ export default { }); this.$emit("change"); - //clear the error but leave dirty + //clear the error but leave dirty and let user save it this.value.items[this.activeWoItemIndex].parts[ this.activeItemIndex ].requestAmountViz = null; @@ -423,7 +436,6 @@ export default { this.fieldValueChanged(`Items[${this.activeWoItemIndex}].parts[ ${this.activeItemIndex} ].quantity`); - //let user save it } },