refactor: 国际出港查询筛选面板去掉出库状态筛选项

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-11 14:29:32 +08:00
parent de64c8ddb6
commit 85fd66b005
2 changed files with 1 additions and 26 deletions

View File

@@ -44,15 +44,6 @@ class GjcQueryViewModel : BasePageViewModel() {
// 代理下拉列表从API获取
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
// 出库状态下拉列表
val outStatusList = MutableLiveData(
listOf(
KeyValue("全部", ""),
KeyValue("未出库", "0"),
KeyValue("已出库", "1")
)
)
// ==================== 适配器配置 ====================
val itemViewHolder = GjcQueryViewHolder::class.java
val itemLayoutId = R.layout.item_gjc_query
@@ -80,7 +71,6 @@ class GjcQueryViewModel : BasePageViewModel() {
// ==================== 筛选条件 ====================
val spCode = MutableLiveData("") // 特码
val outStatus = MutableLiveData("") // 出库状态
val dest = MutableLiveData("") // 目的港
val awbType = MutableLiveData("") // 运单类型
val businessType = MutableLiveData("") // 业务类型
@@ -89,11 +79,10 @@ class GjcQueryViewModel : BasePageViewModel() {
// 是否有筛选条件(任意一个非空则为 true用于筛选按钮红点
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
val update = { _: Any? ->
value = listOf(spCode, outStatus, dest, awbType, businessType, goodsCn)
value = listOf(spCode, dest, awbType, businessType, goodsCn)
.any { !it.value.isNullOrEmpty() }
}
addSource(spCode, update)
addSource(outStatus, update)
addSource(dest, update)
addSource(awbType, update)
addSource(businessType, update)
@@ -137,7 +126,6 @@ class GjcQueryViewModel : BasePageViewModel() {
*/
fun resetFilter() {
spCode.value = ""
outStatus.value = ""
dest.value = ""
awbType.value = ""
businessType.value = ""
@@ -181,7 +169,6 @@ class GjcQueryViewModel : BasePageViewModel() {
"wbNo" to waybillNo.value?.ifEmpty { null },
// 筛选面板条件
"spCode" to spCode.value?.ifEmpty { null },
"outState" to outStatus.value?.ifEmpty { null }?.toIntOrNull(),
"dest" to dest.value?.ifEmpty { null },
"awbType" to awbType.value?.ifEmpty { null },
"businessType" to businessType.value?.ifEmpty { null },

View File

@@ -67,18 +67,6 @@
type="@{DataLayoutType.INPUT}"
value='@={viewModel.spCode}' />
<!-- 出库状态 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
hint='@{"请选择出库状态"}'
list="@{viewModel.outStatusList}"
title='@{"出库状态"}'
titleLength="@{4}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.outStatus}' />
<!-- 目的港 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/filter_dest"