修复了消耗值为空字符串时重量不显示的问题
修复了相机未初始化或已关闭时调用拍照报错问题 调整了未确认列表允许收货 调整了重量大于1kg时显示kg
This commit is contained in:
@@ -3,6 +3,7 @@ package com.sw.inbound.viewmodel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.sw.inbound.ext.toFormattedString
|
||||
import com.sw.inbound.ext.toSafeBigDecimal
|
||||
import com.sw.inbound.ext.toSafeDouble
|
||||
import com.sw.inbound.ext.toSafeFloat
|
||||
import com.sw.inbound.model.request.UploadInfo
|
||||
import com.sw.inbound.model.response.DictType
|
||||
@@ -91,10 +92,10 @@ class ReceiptViewModel @Inject constructor(
|
||||
ToastUtils.showToast("订单为空或包含异常数据")
|
||||
return
|
||||
}
|
||||
if (!unadjustedOrders.value.isEmpty()) {
|
||||
ToastUtils.showToast("请先确认物品信息")
|
||||
return
|
||||
}
|
||||
// if (!unadjustedOrders.value.isEmpty()) {
|
||||
// ToastUtils.showToast("请先确认物品信息")
|
||||
// return
|
||||
// }
|
||||
_showReceiptDialog.value = showDialog
|
||||
}
|
||||
|
||||
@@ -253,7 +254,7 @@ class ReceiptViewModel @Inject constructor(
|
||||
)
|
||||
return
|
||||
}
|
||||
var consumeValue = currentItem.consumeValue?.toDouble() ?: 1.0
|
||||
var consumeValue = currentItem.consumeValue?.toSafeDouble() ?: 1.0
|
||||
var purchaseValue = currentItem.purchaseValue?.toDouble() ?: 1.0
|
||||
if (consumeValue == 0.0) {
|
||||
consumeValue = 1.0
|
||||
|
||||
Reference in New Issue
Block a user