feat: fix int exp arrive sub list
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemIntExpArriveSubBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjcHaWb
|
||||
|
||||
/**
|
||||
* 国际出港-出港理货 子订单(分单) ViewHolder
|
||||
*/
|
||||
class IntExpArriveSubViewHolder(view: View) :
|
||||
BaseViewHolder<GjcHaWb, ItemIntExpArriveSubBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position + 1 // 序号从 1 开始
|
||||
binding.executePendingBindings()
|
||||
|
||||
// checkbox点击切换选择状态
|
||||
binding.ivCheckbox.setOnClickListener {
|
||||
bean.checked.set(!bean.checked.get())
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,8 +37,8 @@ class IntExpArriveViewHolder(view: View) :
|
||||
// ========== 初始化子列表 RecyclerView ==========
|
||||
setCommonAdapter(
|
||||
binding.rvSub,
|
||||
IntExpTallySubViewHolder::class.java,
|
||||
R.layout.item_int_exp_tally_sub
|
||||
IntExpArriveSubViewHolder::class.java,
|
||||
R.layout.item_int_exp_arrive_sub
|
||||
)
|
||||
|
||||
// 刷新子列表数据
|
||||
|
||||
Reference in New Issue
Block a user