修复了用户输入状态未重置问题

This commit is contained in:
zxj
2025-07-09 16:18:44 +08:00
parent 6cf7b4fb9b
commit 6cd5069aac
5 changed files with 11 additions and 5 deletions
@@ -89,6 +89,9 @@ class SelfProcurementViewModel @Inject constructor(
weight * 1000 / consumeValue / purchaseValue
val finalCount = count.toSafeDouble(currentItem.unitName)
Timber.d("startSensorScale weight = $weight, count = $count, finalCount = $finalCount, consumeValue = $consumeValue, purchaseValue = $purchaseValue")
if (info.goodsCountTemp.isEmpty()) {
_countUserInput.value = false
}
_selectedItem.value = info.copy(
goodsWeight = weight.toSafeBigDecimal(),
goodsCountTemp = if (_countUserInput.value) info.goodsCountTemp else count.toSafeString(