refactor: 国际进港舱单列表项布局优化及分单按需加载
- 主列表项从4行改为2行5列标准KV布局 - 展开按钮移入白色卡片内,始终显示 - 分单数据改为点击展开时按需加载 - 子列表列宽调整,品名支持goodsCn优先显示 - 子列表所有列加单行省略号 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,9 +40,14 @@ class IntImpManifestViewHolder(view: View) :
|
||||
clickListener?.onItemClick(position, 102) // 102=删除
|
||||
}
|
||||
|
||||
// 展开按钮点击事件
|
||||
// 展开按钮点击事件 - 先加载分单数据,再切换展开状态
|
||||
binding.ivShow.setOnClickListener {
|
||||
bean.showMore.set(!bean.showMore.get())
|
||||
if (!bean.showMore.get() && bean.haWbList.isNullOrEmpty()) {
|
||||
// 首次展开且无数据,通知 ViewModel 加载分单
|
||||
clickListener?.onItemClick(position, 103) // 103=加载分单
|
||||
} else {
|
||||
bean.showMore.set(!bean.showMore.get())
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化分单子列表 RecyclerView
|
||||
|
||||
Reference in New Issue
Block a user