feat: 进港舱单新增总重量字段并修正过磅记录代理显示
- 进港舱单 Bean 增加 totalWeight 字段 - 新增/详情页表单加入"总重量"项并重排布局,备注移至 UN 编号同行 - 出港过磅记录列表代理列由 agentCode 改为 agentName 显示 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,8 @@ data class GjjImportManifest(
|
||||
var splitFlag: String = "",
|
||||
// 总件数
|
||||
var totalPc: Long = 0,
|
||||
// 总重量
|
||||
var totalWeight: Double = 0.0,
|
||||
// 危险品编号
|
||||
var unNumber: String = "",
|
||||
// 体积
|
||||
|
||||
@@ -19,6 +19,7 @@ data class GjjManifest(
|
||||
var fid: Long = 0, // FID
|
||||
var pc: Long = 0, // 件数
|
||||
var totalPc: Long = 0, // 总件数
|
||||
var totalWeight: Double = 0.0, // 总重量
|
||||
var weight: Double = 0.0, // 重量
|
||||
var volume: Double = 0.0, // 体积
|
||||
var goods: String = "", // 品名(英)
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.agentCode}'
|
||||
android:text='@{bean.agentName}'
|
||||
android:textSize="15sp"
|
||||
tools:text="顺丰" />
|
||||
|
||||
|
||||
@@ -105,6 +105,9 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
// 运单件数
|
||||
val waybillNum = MutableLiveData("")
|
||||
|
||||
// 运单重量
|
||||
val waybillWeight = MutableLiveData("")
|
||||
|
||||
// 实到数量
|
||||
val actualNum = MutableLiveData("")
|
||||
|
||||
@@ -281,6 +284,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
// 填充表单字段
|
||||
waybillNo.value = manifest.getWaybillNo()
|
||||
waybillNum.value = manifest.totalPc.toString()
|
||||
waybillWeight.value = manifest.totalWeight.toString()
|
||||
actualNum.value = manifest.pc.toString()
|
||||
actualWeight.value = manifest.weight.toString()
|
||||
billingWeight.value = manifest.cashWeight.toString()
|
||||
@@ -311,6 +315,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
// 填充表单字段
|
||||
waybillNo.value = "${manifest.prefix}${manifest.no}"
|
||||
waybillNum.value = manifest.totalPc.toString()
|
||||
waybillWeight.value = manifest.totalWeight.toString()
|
||||
actualNum.value = manifest.pc.toString()
|
||||
actualWeight.value = manifest.weight.toString()
|
||||
departure.value = manifest.origin
|
||||
@@ -359,6 +364,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
|| verifyWaybillNo(waybillNo.value)
|
||||
|| agent.value.verifyNullOrEmpty("请选择代理")
|
||||
|| waybillNum.value.verifyNullOrEmpty("请输入运单件数")
|
||||
|| waybillWeight.value.verifyNullOrEmpty("请输入运单重量")
|
||||
|| actualNum.value.verifyNullOrEmpty("请输入实到件数")
|
||||
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|
||||
|| billingWeight.value.verifyNullOrEmpty("请输入计费重量")
|
||||
@@ -382,6 +388,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
"spCode" to specialCode.value.let { if (it.isNullOrEmpty()) "NOR" else it },
|
||||
"businessType" to businessType.value,
|
||||
"totalPc" to waybillNum.value,
|
||||
"totalWeight" to waybillWeight.value,
|
||||
"pc" to actualNum.value,
|
||||
"weight" to actualWeight.value,
|
||||
"cashWeight" to billingWeight.value,
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:总件数、实到件数、实到重量 -->
|
||||
<!-- 第4行:总件数、实到件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -204,6 +204,19 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/waybillWeightInput"
|
||||
hint='@{"请输入总重量"}'
|
||||
required="@{true}"
|
||||
title='@{"总 重 量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.waybillWeight}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/actualNumInput"
|
||||
hint='@{"请输入实到件数"}'
|
||||
@@ -216,6 +229,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:实到重量、计费重量、品名(中) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/actualWeightInput"
|
||||
@@ -227,18 +249,8 @@
|
||||
value='@={viewModel.actualWeight}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:计费重量、品名(中)、品名(英) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/billingWeightInput"
|
||||
hint='@{"请输入计费重量"}'
|
||||
@@ -248,6 +260,7 @@
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.billingWeight}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
@@ -263,6 +276,16 @@
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:品名(英)、包装类型、业务类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入品名(英)"}'
|
||||
required="@{true}"
|
||||
@@ -272,18 +295,8 @@
|
||||
value='@={viewModel.goodsNameEn}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:包装类型、业务类型、UN编号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请选择包装类型"}'
|
||||
list="@{viewModel.packageTypeList}"
|
||||
@@ -293,6 +306,7 @@
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.packageType}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
@@ -309,6 +323,15 @@
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第7行:UN编号、备注 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入UN编号"}'
|
||||
required="@{false}"
|
||||
@@ -318,23 +341,22 @@
|
||||
value='@={viewModel.unNumber}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="0.295" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第7行:备注(占满整行) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入备注"}'
|
||||
inputHeight="@{80}"
|
||||
required="@{false}"
|
||||
title='@{"备 注"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.remark}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp" />
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="0.605" />
|
||||
|
||||
</LinearLayout>
|
||||
<!-- -->
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行:总件数、实到件数、实到重量 -->
|
||||
<!-- 第3行:总件数、实到件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -128,6 +128,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"总重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.dataBean.totalWeight)}'
|
||||
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='@{"实到件数"}'
|
||||
@@ -138,6 +148,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:实到重量、计费重量、品名(中) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"实到重量"}'
|
||||
@@ -148,15 +167,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:计费重量、品名(中)、品名(英) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"计费重量"}'
|
||||
@@ -177,6 +187,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:品名(英)、包装类型、业务类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"品名(英)"}'
|
||||
@@ -187,15 +206,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:包装类型、业务类型、UN编号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"包装类型"}'
|
||||
@@ -216,33 +226,34 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"UN编号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.unNumber}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:备注(全宽) -->
|
||||
<!-- 第6行:UN编号、备注 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"UN编号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.unNumber}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.295" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
enable="@{false}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.remark}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.605" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user