fix: 国际进港出库特码筛选由输入框改为字典下拉选择
与国际进港查询筛选栏保持一致,加载国际特码字典供选择, 去掉原特码扫码入口。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -38,8 +38,9 @@ class IntImpPickUpDLVActivity :
|
|||||||
viewModel.refresh()
|
viewModel.refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化代理人列表
|
// 初始化代理人、特码下拉列表
|
||||||
viewModel.initAgentList()
|
viewModel.initAgentList()
|
||||||
|
viewModel.initSpecialCodeList()
|
||||||
|
|
||||||
// 初始加载数据
|
// 初始加载数据
|
||||||
viewModel.refresh()
|
viewModel.refresh()
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.lukouguoji.module_base.ktx.formatDate
|
|||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
import com.lukouguoji.module_base.model.ConfirmDialogModel
|
import com.lukouguoji.module_base.model.ConfirmDialogModel
|
||||||
import com.lukouguoji.module_base.model.ScanModel
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
|
import com.lukouguoji.module_base.util.DictUtils
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
import dev.utils.common.DateUtils
|
import dev.utils.common.DateUtils
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -38,6 +39,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
|
|
||||||
// ========== 下拉列表数据源 ==========
|
// ========== 下拉列表数据源 ==========
|
||||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||||
|
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
|
||||||
// ========== 统计信息 ==========
|
// ========== 统计信息 ==========
|
||||||
val totalCount = MutableLiveData("0") // 合计票数
|
val totalCount = MutableLiveData("0") // 合计票数
|
||||||
@@ -75,6 +77,19 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化特码列表(与国际进港查询筛选栏一致:国际、不区分进出港)
|
||||||
|
*/
|
||||||
|
fun initSpecialCodeList() {
|
||||||
|
DictUtils.getSpecialCodeList(
|
||||||
|
flag = 1,
|
||||||
|
ieFlag = "",
|
||||||
|
parentcode = ""
|
||||||
|
) {
|
||||||
|
spCodeList.value = it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索按钮点击
|
* 搜索按钮点击
|
||||||
*/
|
*/
|
||||||
@@ -89,13 +104,6 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 扫码特码
|
|
||||||
*/
|
|
||||||
fun scanSpCode() {
|
|
||||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.gnj_chu_ku_list)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全选按钮点击
|
* 全选按钮点击
|
||||||
*/
|
*/
|
||||||
@@ -181,10 +189,6 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
wbNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
wbNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
Constant.RequestCode.gnj_chu_ku_list -> {
|
|
||||||
spCode.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
|
||||||
refresh()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,10 +78,9 @@
|
|||||||
|
|
||||||
<!-- 特码 -->
|
<!-- 特码 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请输入特码"}'
|
hint='@{"请选择特码"}'
|
||||||
icon="@{@drawable/img_scan}"
|
list="@{viewModel.spCodeList}"
|
||||||
setOnIconClickListener="@{(v)-> viewModel.scanSpCode()}"
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
|
||||||
value="@={viewModel.spCode}"
|
value="@={viewModel.spCode}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user