diff --git a/src/views/CountDetail.vue b/src/views/CountDetail.vue index 74b1146f..b36933c6 100644 --- a/src/views/CountDetail.vue +++ b/src/views/CountDetail.vue @@ -62,12 +62,12 @@
-
+
-
+

{{ getProductIdentificationValue(productStoreSettings["productIdentificationPref"].primaryId, getProduct(product.productId)) }}

@@ -345,10 +345,11 @@ function updateFilteredItems() { }); } if (filteredItems.value.length > 0) { - store.dispatch("product/currentProduct", product.value); + const item = filteredItems.value.find((item) => item.importItemSeqId === product.value.importItemSeqId) + store.dispatch("product/currentProduct", item ? product.value : filteredItems.value[0]); updateNavigationState(filteredItems.value.indexOf(product.value)); } else { - store.dispatch("product/currentProduct", null); + store.dispatch("product/currentProduct", {}); isFirstItem.value = true isLastItem.value = false } @@ -445,9 +446,9 @@ async function saveCount() { product.value.quantity = inputCount.value product.value.countedByGroupName = userProfile.value.userFullName product.value.countedByUserLoginId = userProfile.value.username - await store.dispatch('product/currentProduct', product.value); inputCount.value = ''; product.value.isRecounting = false; + await store.dispatch('product/currentProduct', product.value); } else { throw resp.data; }