feat(weightBilling): 优化按重量计费逻辑并完善界面展示
- 规格栏显示改为直接展示规格重量,去除单价/100克显示 - 新增最小计费重量常量 MIN_BILLABLE_WEIGHT,净重不足时阻止下单 - 下单时检测净重,低于最小计费重量时弹出提示并拦截 - 计算价格时按净重计算,单价基于规格价与规格重量的比值 - 本地明细中 eatNum 仅用于展示份数,不参与金额计算 - SettlementOrder 用实际食用重量 eatWeight 赋值 num 字段,配合重量栏显示逻辑调整
This commit is contained in:
@@ -39,8 +39,8 @@ class FoodOrderAdapter(list: MutableList<FoodItem>) :
|
||||
if (it.orderFrom == 2) {
|
||||
binding.tvPriceNorm.text = if (it.specName.isNullOrBlank()) "${it.specWeight}克" else "${it.specName}/${it.specWeight}克"
|
||||
} else {
|
||||
val foodPrice = it.foodPrice.format2String(2)
|
||||
binding.tvPriceNorm.text = "${foodPrice}/100克"
|
||||
// 营养秤结算:规格栏显示规格重量 specWeight
|
||||
binding.tvPriceNorm.text = "${it.specWeight}克"
|
||||
}
|
||||
//if (it.specName.isNullOrBlank().not()) {
|
||||
// binding.tvPriceFlag.text = "[${it.specName}]"
|
||||
|
||||
Reference in New Issue
Block a user