feat: opt GjcQueryActivity list

This commit is contained in:
2025-12-03 19:56:31 +08:00
parent be0541f522
commit f1abc3ddfc
6 changed files with 163 additions and 139 deletions

View File

@@ -52,6 +52,7 @@ class GjcQueryViewModel : BasePageViewModel() {
// ==================== 筛选条件(预留)====================
val spCode = MutableLiveData("") // 特码
val flightNo = MutableLiveData("") // 航班号
val dest = MutableLiveData("") // 目的港
val awbType = MutableLiveData("") // 运单类型
val businessType = MutableLiveData("") // 业务类型
@@ -81,6 +82,7 @@ class GjcQueryViewModel : BasePageViewModel() {
fun filterClick() {
val filterDialog = GjcQueryFilterDialogModel(
spCode = spCode,
flightNo = flightNo,
dest = dest,
awbType = awbType,
businessType = businessType,
@@ -106,6 +108,7 @@ class GjcQueryViewModel : BasePageViewModel() {
"wbNo" to waybillNo.value!!.ifEmpty { null },
// 筛选条件(暂未使用)
"spCode" to spCode.value!!.ifEmpty { null },
"flightNo" to flightNo.value!!.ifEmpty { null },
"dest" to dest.value!!.ifEmpty { null },
"awbType" to awbType.value!!.ifEmpty { null },
"businessType" to businessType.value!!.ifEmpty { null },
@@ -121,6 +124,7 @@ class GjcQueryViewModel : BasePageViewModel() {
"wbNo" to waybillNo.value!!.ifEmpty { null },
// 筛选条件
"spCode" to spCode.value!!.ifEmpty { null },
"flightNo" to flightNo.value!!.ifEmpty { null },
"dest" to dest.value!!.ifEmpty { null },
"awbType" to awbType.value!!.ifEmpty { null },
"businessType" to businessType.value!!.ifEmpty { null },
@@ -131,12 +135,9 @@ class GjcQueryViewModel : BasePageViewModel() {
launchLoadingCollect({
NetApply.api.getGjcQueryList(listParams)
}) {
onSuccess = { result ->
val pageInfo = result.data
if (pageInfo != null) {
// ⚠️ 核心使用toBaseListBean()转换PageInfo为BaseListBean
pageModel.handleListBean(pageInfo.toBaseListBean())
}
onSuccess = { pageInfo ->
// ⚠️ 核心使用toBaseListBean()转换PageInfo为BaseListBean
pageModel.handleListBean(pageInfo.toBaseListBean())
}
}