feat: 国际出港查询筛选弹框特码改为下拉选择

特码由手动输入改为从特码字典接口获取的下拉列表,
接口参数与国际出港待记重页面一致(flag=1 国际、ieFlag 为空),
首项「全部」表示不过滤

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 12:45:04 +08:00
parent b14649b228
commit 50275457a4
2 changed files with 17 additions and 4 deletions

View File

@@ -60,6 +60,9 @@ class GjcQueryViewModel : BasePageViewModel() {
// 运单类型列表(字典接口 typeCode/awbtype=IO 国际出港) // 运单类型列表(字典接口 typeCode/awbtype=IO 国际出港)
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList()) val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
// 特码列表与国际出港待记重页面同源flag=1 国际ieFlag 为空)
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
// 业务类型列表 // 业务类型列表
val businessTypeList = MutableLiveData( val businessTypeList = MutableLiveData(
listOf( listOf(
@@ -141,7 +144,7 @@ class GjcQueryViewModel : BasePageViewModel() {
} }
/** /**
* 初始化筛选下拉列表(运单类型从字典接口获取type=IO 国际出港 * 初始化筛选下拉列表(运单类型、特码均从字典接口获取)
*/ */
fun initFilterLists() { fun initFilterLists() {
DictUtils.getWaybillTypeList( DictUtils.getWaybillTypeList(
@@ -151,6 +154,15 @@ class GjcQueryViewModel : BasePageViewModel() {
) { ) {
awbTypeList.postValue(it) awbTypeList.postValue(it)
} }
// 特码列表(参数与国际出港待记重页面一致)
DictUtils.getSpecialCodeList(
flag = 1, // 国际
ieFlag = "", // 空字符串
parentcode = "" // 无父级
) {
spCodeList.postValue(it)
}
} }
/** /**

View File

@@ -56,15 +56,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<!-- 特码 --> <!-- 特码(下拉选择,数据来源与国际出港待记重页面一致) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
hint='@{"请输入特码"}' hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}' title='@{"特码"}'
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.SPINNER}"
value='@={viewModel.spCode}' /> value='@={viewModel.spCode}' />
<!-- 目的港 --> <!-- 目的港 -->