diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8448698..3dad8e3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -460,6 +460,12 @@ android:exported="false" android:screenOrientation="userLandscape" /> + + () { + + override fun layoutId() = R.layout.activity_int_imp_tally_details + override fun viewModelClass() = IntImpTallyDetailsViewModel::class.java + + override fun initOnCreate(savedInstanceState: Bundle?) { + setBackArrow("理货报告详情") + binding.viewModel = viewModel + viewModel.initOnCreated(intent) + } + + companion object { + @JvmStatic + fun start(context: Context, tally: GjjImportTally) { + val starter = Intent(context, IntImpTallyDetailsActivity::class.java) + .putExtra(Constant.Key.DATA, tally) + context.startActivity(starter) + } + } +} diff --git a/module_gjj/src/main/java/com/lukouguoji/gjj/holder/IntImpTallyViewHolder.kt b/module_gjj/src/main/java/com/lukouguoji/gjj/holder/IntImpTallyViewHolder.kt index 9190cab..513b09d 100644 --- a/module_gjj/src/main/java/com/lukouguoji/gjj/holder/IntImpTallyViewHolder.kt +++ b/module_gjj/src/main/java/com/lukouguoji/gjj/holder/IntImpTallyViewHolder.kt @@ -3,6 +3,7 @@ package com.lukouguoji.gjj.holder import android.view.View import com.lukouguoji.gjj.R import com.lukouguoji.gjj.databinding.ItemIntImpTallyBinding +import com.lukouguoji.gjj.activity.IntImpTallyDetailsActivity import com.lukouguoji.module_base.adapter.setCommonAdapter import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.bean.GjjImportTally @@ -38,6 +39,11 @@ class IntImpTallyViewHolder(view: View) : binding.rvSub.adapter?.notifyDataSetChanged() } + // 整个内容区域点击 - 跳转到详情页 + binding.llContent.setOnClickListener { + IntImpTallyDetailsActivity.start(it.context, bean) + } + // 展开按钮点击事件 binding.ivShow.setOnClickListener { if (bean.haWbList != null) { diff --git a/module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpTallyDetailsViewModel.kt b/module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpTallyDetailsViewModel.kt new file mode 100644 index 0000000..7a4dd63 --- /dev/null +++ b/module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpTallyDetailsViewModel.kt @@ -0,0 +1,26 @@ +package com.lukouguoji.gjj.viewModel + +import android.content.Intent +import androidx.lifecycle.MutableLiveData +import com.lukouguoji.module_base.base.BaseViewModel +import com.lukouguoji.module_base.bean.GjjImportTally +import com.lukouguoji.module_base.common.Constant + +/** + * 国际进港理货报告详情 ViewModel + */ +class IntImpTallyDetailsViewModel : BaseViewModel() { + + // 理货数据 + val dataBean = MutableLiveData(GjjImportTally()) + + /** + * 初始化数据(从列表项携带的数据) + */ + fun initOnCreated(intent: Intent) { + val tally = intent.getSerializableExtra(Constant.Key.DATA) as? GjjImportTally + if (tally != null) { + dataBean.value = tally + } + } +} diff --git a/module_gjj/src/main/res/layout/activity_int_imp_tally_details.xml b/module_gjj/src/main/res/layout/activity_int_imp_tally_details.xml new file mode 100644 index 0000000..efb2f5d --- /dev/null +++ b/module_gjj/src/main/res/layout/activity_int_imp_tally_details.xml @@ -0,0 +1,359 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/module_gjj/src/main/res/layout/item_int_imp_tally.xml b/module_gjj/src/main/res/layout/item_int_imp_tally.xml index 826fde3..f40b573 100644 --- a/module_gjj/src/main/res/layout/item_int_imp_tally.xml +++ b/module_gjj/src/main/res/layout/item_int_imp_tally.xml @@ -33,6 +33,7 @@ @@ -288,6 +290,14 @@ + + +