feat: fix 国际出港
This commit is contained in:
@@ -10,7 +10,6 @@ import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.http.net.DiBangWeightModel
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
@@ -24,7 +23,6 @@ import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||
import com.lukouguoji.module_base.model.BluetoothDialogModel
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import com.lukouguoji.module_base.util.PrinterUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -62,7 +60,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
|
||||
// 下拉选择数据源
|
||||
val passagewayList = MutableLiveData<List<KeyValue>>() // 通道号列表
|
||||
val piCloseList = MutableLiveData<List<KeyValue>>() // 探板收口列表
|
||||
val plCloseList = MutableLiveData<List<KeyValue>>() // 探板收口列表
|
||||
|
||||
// 打印挂签
|
||||
val printTag = MutableLiveData(false)
|
||||
@@ -108,7 +106,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
|
||||
// 加载下拉列表数据
|
||||
loadPassagewayList()
|
||||
loadPiCloseList()
|
||||
loadPlCloseList()
|
||||
|
||||
// 初始化航班日期为今天
|
||||
val today = Date().formatDate()
|
||||
@@ -207,14 +205,14 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
/**
|
||||
* 加载探板收口列表
|
||||
*/
|
||||
private fun loadPiCloseList() {
|
||||
private fun loadPlCloseList() {
|
||||
launchCollect({
|
||||
NetApply.api.getDictList("PICLOSE")
|
||||
}) {
|
||||
onSuccess = {
|
||||
// 将 DictIdValueBean 转换为 KeyValue
|
||||
// 显示和提交都使用 value 字段
|
||||
piCloseList.value = (it.data ?: emptyList()).map { b ->
|
||||
plCloseList.value = (it.data ?: emptyList()).map { b ->
|
||||
KeyValue(b.value, b.value)
|
||||
}
|
||||
}
|
||||
@@ -335,8 +333,8 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
"dgrCode" to bean.dgrCode,
|
||||
"boardType" to bean.boardType,
|
||||
"height" to bean.height,
|
||||
"piClose" to bean.piClose,
|
||||
"piCloseSize" to bean.piCloseSize,
|
||||
"plClose" to bean.plClose,
|
||||
"plCloseSize" to bean.plCloseSize,
|
||||
"carWeight" to bean.carWeight,
|
||||
"uldWeight" to bean.uldWeight,
|
||||
"fdate" to bean.fdate,
|
||||
|
||||
Reference in New Issue
Block a user