feat: 国际出港 出港仓库 清仓

This commit is contained in:
2026-01-15 17:23:48 +08:00
parent 0a506617c7
commit a8d125ef9d
6 changed files with 38 additions and 17 deletions

View File

@@ -71,14 +71,23 @@ class IntExpTallyViewModel : BasePageViewModel() {
}
/**
* 全选按钮点击 (切换全选状态)
* 全选按钮点击 (切换全选状态,单向同步到子列表)
*/
fun checkAllClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
// 切换全选状态
val shouldCheckAll = !isAllChecked.value!!
list.forEach { it.checked.set(shouldCheckAll) }
// 单向同步:主列表和子列表都设置为相同的选择状态
list.forEach { maWb ->
maWb.checked.set(shouldCheckAll)
// 同步到所有子列表项
maWb.haWbList?.forEach { haWb ->
haWb.checked.set(shouldCheckAll)
}
}
isAllChecked.value = shouldCheckAll
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()