feat: fix 国际出港

This commit is contained in:
2026-01-24 17:07:35 +08:00
parent 6b655348e1
commit ff2649e063
7 changed files with 15 additions and 28 deletions

View File

@@ -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,

View File

@@ -226,11 +226,11 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择探板收口"}'
list="@{viewModel.piCloseList}"
list="@{viewModel.plCloseList}"
title='@{"探板收口"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.piClose}'
value='@={viewModel.dataBean.plClose}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
@@ -240,7 +240,7 @@
title='@{"探板尺寸"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.piCloseSize}'
value='@={viewModel.dataBean.plCloseSize}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"

View File

@@ -163,7 +163,7 @@
title='@{"探板收口"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.piClose}'
value='@{viewModel.dataBean.plClose}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
@@ -173,7 +173,7 @@
title='@{"探板尺寸"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.piCloseSize}'
value='@{viewModel.dataBean.plCloseSize}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
@@ -236,16 +236,6 @@
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.remark}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"备注"}'

View File

@@ -176,7 +176,7 @@
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.waitingTransClick()}"
android:text="配运" />
android:text="配运" />
<!-- 交接完成按钮 -->
<TextView

View File

@@ -38,7 +38,7 @@
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="center"
android:text="@{bean.no ?? `--`}"
android:text="@{bean.location ?? `--`}"
android:textColor="@android:color/black"
android:textSize="14sp" />