联合支付余量计量模式订单显示当前取餐信息
This commit is contained in:
@@ -17,7 +17,7 @@ import com.sw.dualscreen.ext.gone
|
||||
import com.sw.dualscreen.ext.visible
|
||||
import com.sw.dualscreen.model.response.FoodItem
|
||||
|
||||
class FoodOrderAdapter(var list: MutableList<FoodItem>) :
|
||||
class FoodOrderAdapter(list: MutableList<FoodItem>) :
|
||||
BaseQuickAdapter<FoodItem, FoodOrderAdapter.VH>(list) {
|
||||
|
||||
inner class VH(var binding: ListItemFoodOrderBinding) : QuickViewHolder(binding.root)
|
||||
@@ -33,10 +33,10 @@ class FoodOrderAdapter(var list: MutableList<FoodItem>) :
|
||||
val binding = holder.binding
|
||||
item?.let {
|
||||
binding.tvFoodName.text = it.foodName
|
||||
val foodPrice = it.foodPrice.format2String(2)
|
||||
if (it.orderFrom == 2) {
|
||||
binding.tvPriceNorm.text = "${it.specName}/${it.specWeight}克"
|
||||
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}/${it.num}克"
|
||||
}
|
||||
//if (it.specName.isNullOrBlank().not()) {
|
||||
|
||||
Reference in New Issue
Block a user