优化
This commit is contained in:
@@ -272,7 +272,10 @@ class DishSamplingActivity : BaseActivity() {
|
||||
toast("不允许重复添加同一食材")
|
||||
return@show
|
||||
}
|
||||
binding.etInputDishType.setText(item.goodsName)
|
||||
binding.etInputDishType.run {
|
||||
setText(item.goodsName)
|
||||
setSelection(length())
|
||||
}
|
||||
tempDishEntity = CookFoodGoodsEntity().apply {
|
||||
goodsId = item.goodsId
|
||||
goodsName = item.goodsName
|
||||
|
||||
@@ -182,6 +182,10 @@ class SubmitFoodActivity : BaseActivity() {
|
||||
val firstWeight = firstGoodsArray.get(address, null)
|
||||
if (firstWeight == null) {
|
||||
//未设置数据
|
||||
if (state != WeightUtil.STATE_STABLE) {
|
||||
//首次记录数据需要稳定数据
|
||||
return@addWeightListener
|
||||
}
|
||||
firstGoodsArray.put(address, weight)
|
||||
return@addWeightListener
|
||||
}
|
||||
@@ -420,7 +424,11 @@ class SubmitFoodActivity : BaseActivity() {
|
||||
initConfigData()
|
||||
// setGridData(list)
|
||||
list.forEach { entity ->
|
||||
updateGridData(entity.also { it.useWeight = 0.0 })
|
||||
//烹饪中重量数据从本地获取,否则显示0
|
||||
if (isCooking.not()) {
|
||||
entity.useWeight = 0.0
|
||||
}
|
||||
updateGridData(entity)
|
||||
}
|
||||
seasoningCookingItems = seasoningItems.map { it.copy() }.toList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user