fix: 国际进港装机单编辑页库位号取 locationTally,查询详情运单信息取 awbPc/awbWeight

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-15 13:42:03 +08:00
parent 1fa0f6dde4
commit 4451b790de
2 changed files with 3 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ class IntImpLoadingListEditViewModel : BaseViewModel() {
val bean = Gson().fromJson(jsonData, GjjManifest::class.java)
dataBean.value = bean
// 初始化可编辑字段
location.value = bean.location
location.value = bean.locationTally
totalPcStr.value = bean.totalPc.toString()
pcStr.value = bean.pc.toString()
weightStr.value = bean.weight.toString()
@@ -58,7 +58,6 @@ class IntImpLoadingListEditViewModel : BaseViewModel() {
val bean = dataBean.value ?: return
// 同步可编辑字段回 bean
bean.location = location.value ?: ""
bean.totalPc = totalPcStr.value?.toLongOrNull() ?: 0
bean.pc = pcStr.value?.toLongOrNull() ?: 0
bean.weight = weightStr.value?.toDoubleOrNull() ?: 0.0

View File

@@ -83,7 +83,7 @@
title='@{"运单件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.maWbData.get("pc") != null ? String.valueOf((int)Math.round(((Double)viewModel.maWbData.get("pc")))) : ``}' />
value='@{viewModel.maWbData.get("awbPc") != null ? String.valueOf((int)Math.round(((Double)viewModel.maWbData.get("awbPc")))) : ``}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
@@ -93,7 +93,7 @@
title='@{"运单重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.maWbData.get("weight") != null ? String.valueOf(viewModel.maWbData.get("weight")) : ``}' />
value='@{viewModel.maWbData.get("awbWeight") != null ? String.valueOf(viewModel.maWbData.get("awbWeight")) : ``}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"