fix: 多个国际进出港页面必填项与筛选逻辑调整

- 进港舱单新增/编辑:品名(中)改为非必填
- 国际出港开始计重:运抵件数/重量改为必填,新增运抵重量超预配3%校验
- 国际出港板箱过磅:架子车号改为非必填
- 国际进港出库列表:新增特码栏、删除提货单号、提取时间改办理时间、查询条件改特码
- 进港/出港仓库列表:清仓结果筛选传参修复并反转值(正常=1/异常=0)
- 组装ULD未维护提示文言优化,版本号升至1.8.8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 11:58:14 +08:00
parent 89989ef00a
commit 084832e4e9
12 changed files with 58 additions and 29 deletions

View File

@@ -26,8 +26,8 @@ android {
applicationId "com.lukouguoji.aerologic" applicationId "com.lukouguoji.aerologic"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 30
versionCode 87 versionCode 88
versionName "1.8.7" versionName "1.8.8"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -366,8 +366,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
bean.passageway = passagewayList.value?.firstOrNull{ it.value == channel.value }?.key ?: "" bean.passageway = passagewayList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
bean.passagewayId = channel.value ?: "" bean.passagewayId = channel.value ?: ""
// 验证必填字段 // 验证必填字段(架子车号改为非必填)
if (bean.carId.verifyNullOrEmpty("请输入架子车号")) return
if (bean.uld.verifyNullOrEmpty("请输入ULD编号")) return if (bean.uld.verifyNullOrEmpty("请输入ULD编号")) return
if (bean.passageway.verifyNullOrEmpty("请选择通道号")) return if (bean.passageway.verifyNullOrEmpty("请选择通道号")) return

View File

@@ -355,7 +355,11 @@ class GjcWeighingStartViewModel : BaseViewModel() {
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
if (channel.value.verifyNullOrEmpty("请选择通道号")) return if (channel.value.verifyNullOrEmpty("请选择通道号")) return
// 2. 校验件数: 运抵件数 + 实时件数 不能大于 预配件数 // 2. 校验运抵件数、运抵重量必填
if (arrivePc.value.verifyNullOrEmpty("请输入运抵件数")) return
if (arriveWeight.value.verifyNullOrEmpty("请输入运抵重量")) return
// 3. 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
val preallocatedPc = bean.pc ?: 0L val preallocatedPc = bean.pc ?: 0L
@@ -365,7 +369,17 @@ class GjcWeighingStartViewModel : BaseViewModel() {
return return
} }
// 3. 收集当前表单数据,更新到 bean // 4. 校验重量: 运抵重量 + 实时重量 不能超过预配重量的3%
val realTimeWeightVal = realTimeWeight.value?.toDoubleOrNull() ?: 0.0
val arriveWeightCheckVal = arriveWeight.value?.toDoubleOrNull() ?: 0.0
val preallocatedWeight = bean.weight ?: 0.0
if (arriveWeightCheckVal + realTimeWeightVal > preallocatedWeight * 1.03) {
showToast("运抵重量 + 实时重量不能超过预配重量的3%")
return
}
// 5. 收集当前表单数据,更新到 bean
bean.apply { bean.apply {
// 更新运抵数据(如果用户已编辑) // 更新运抵数据(如果用户已编辑)
arrivePc = this@GjcWeighingStartViewModel.arrivePc.value?.toLongOrNull() ?: arrivePc arrivePc = this@GjcWeighingStartViewModel.arrivePc.value?.toLongOrNull() ?: arrivePc
@@ -429,6 +443,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
if (channel.value.verifyNullOrEmpty("请选择通道号")) return if (channel.value.verifyNullOrEmpty("请选择通道号")) return
// 校验运抵件数、运抵重量必填
if (arrivePc.value.verifyNullOrEmpty("请输入运抵件数")) return
if (arriveWeight.value.verifyNullOrEmpty("请输入运抵重量")) return
// 校验件数: 运抵件数 + 实时件数 不能大于 预配件数 // 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
@@ -439,6 +457,16 @@ class GjcWeighingStartViewModel : BaseViewModel() {
return return
} }
// 校验重量: 运抵重量 + 实时重量 不能超过预配重量的3%
val realTimeWeightVal = realTimeWeight.value?.toDoubleOrNull() ?: 0.0
val arriveWeightCheckVal = arriveWeight.value?.toDoubleOrNull() ?: 0.0
val preallocatedWeight = bean.weight ?: 0.0
if (arriveWeightCheckVal + realTimeWeightVal > preallocatedWeight * 1.03) {
showToast("运抵重量 + 实时重量不能超过预配重量的3%")
return
}
// 从编辑字段获取数值 // 从编辑字段获取数值
val arriveWeightVal = arriveWeight.value?.toDoubleOrNull() ?: bean.arriveWeight val arriveWeightVal = arriveWeight.value?.toDoubleOrNull() ?: bean.arriveWeight
val arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume val arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume

View File

@@ -449,7 +449,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
assembleInfoList.value = mutableListOf() assembleInfoList.value = mutableListOf()
} }
} else { } else {
showToast("未查询到该ULD信息") showToast("ULD 编号未维护,请先进行维护!")
} }
} }
onFailed = { code, message -> onFailed = { code, message ->

View File

@@ -62,8 +62,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
// 初始化清仓综合结果列表(根据实际需求配置) // 初始化清仓综合结果列表(根据实际需求配置)
clearResultList.value = listOf( clearResultList.value = listOf(
KeyValue("全部", ""), KeyValue("全部", ""),
KeyValue("正常", "0"), KeyValue("正常", "1"),
KeyValue("异常", "1") KeyValue("异常", "0")
) )
} }
@@ -306,7 +306,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
"fdate" to flightDate.value?.ifEmpty { null }, "fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null }, "fno" to flightNo.value?.ifEmpty { null },
"wbNo" to wbNo.value?.ifEmpty { null }, "wbNo" to wbNo.value?.ifEmpty { null },
"location" to location.value?.ifEmpty { null } "location" to location.value?.ifEmpty { null },
"clearNormal" to clearResult.value?.ifEmpty { null }
) )
// 列表参数 (含分页) // 列表参数 (含分页)

View File

@@ -322,6 +322,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵件数"}' hint='@{"请输入运抵件数"}'
required="@{true}"
title='@{"运抵件数"}' title='@{"运抵件数"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
@@ -332,6 +333,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵重量"}' hint='@{"请输入运抵重量"}'
required="@{true}"
title='@{"运抵重量"}' title='@{"运抵重量"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"

View File

@@ -368,7 +368,6 @@ class GjjManifestAddViewModel : BaseViewModel() {
|| actualNum.value.verifyNullOrEmpty("请输入实到件数") || actualNum.value.verifyNullOrEmpty("请输入实到件数")
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量") || actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|| billingWeight.value.verifyNullOrEmpty("请输入计费重量") || billingWeight.value.verifyNullOrEmpty("请输入计费重量")
|| goodsNameCn.value.verifyNullOrEmpty("请输入品名(中)")
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)") || goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|| waybillType.value.verifyNullOrEmpty("请选择运单类型") || waybillType.value.verifyNullOrEmpty("请选择运单类型")
|| businessType.value.verifyNullOrEmpty("请选择业务类型") || businessType.value.verifyNullOrEmpty("请选择业务类型")

View File

@@ -34,7 +34,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
val paymentDateEnd = MutableLiveData("") // 缴费日期止 val paymentDateEnd = MutableLiveData("") // 缴费日期止
val agentCode = MutableLiveData("") // 代理人 val agentCode = MutableLiveData("") // 代理人
val wbNo = MutableLiveData("") // 运单号 val wbNo = MutableLiveData("") // 运单号
val pickUpNo = MutableLiveData("") // 提货单号 val spCode = MutableLiveData("") // 特码
// ========== 下拉列表数据源 ========== // ========== 下拉列表数据源 ==========
val agentList = MutableLiveData(listOf(KeyValue("全部", ""))) val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
@@ -90,9 +90,9 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
} }
/** /**
* 扫码提货单号 * 扫码特码
*/ */
fun scanPickUpNo() { fun scanSpCode() {
ScanModel.startScan(getTopActivity(), Constant.RequestCode.gnj_chu_ku_list) ScanModel.startScan(getTopActivity(), Constant.RequestCode.gnj_chu_ku_list)
} }
@@ -144,7 +144,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
"endDate" to paymentDateEnd.value?.ifEmpty { null }, "endDate" to paymentDateEnd.value?.ifEmpty { null },
"agentCode" to agentCode.value?.ifEmpty { null }, "agentCode" to agentCode.value?.ifEmpty { null },
"no" to wbNo.value?.ifEmpty { null }, "no" to wbNo.value?.ifEmpty { null },
"pkId" to pickUpNo.value?.ifEmpty { null } "spCode" to spCode.value?.ifEmpty { null }
) )
val listParams = (filterParams + mapOf( val listParams = (filterParams + mapOf(
@@ -182,7 +182,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
refresh() refresh()
} }
Constant.RequestCode.gnj_chu_ku_list -> { Constant.RequestCode.gnj_chu_ku_list -> {
pickUpNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT) spCode.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
refresh() refresh()
} }
} }

View File

@@ -57,8 +57,8 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
init { init {
clearResultList.value = listOf( clearResultList.value = listOf(
KeyValue("全部", ""), KeyValue("全部", ""),
KeyValue("正常", "0"), KeyValue("正常", "1"),
KeyValue("异常", "1") KeyValue("异常", "0")
) )
} }

View File

@@ -266,7 +266,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入品名(中)"}' hint='@{"请输入品名(中)"}'
required="@{true}" required="@{false}"
title='@{"品名(中)"}' title='@{"品名(中)"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"

View File

@@ -76,13 +76,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
<!-- 提货单号 --> <!-- 特码 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入提货单号"}' hint='@{"请输入特码"}'
icon="@{@drawable/img_scan}" icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanPickUpNo()}" setOnIconClickListener="@{(v)-> viewModel.scanSpCode()}"
type="@{SearchLayoutType.INPUT}" type="@{SearchLayoutType.INPUT}"
value="@={viewModel.pickUpNo}" value="@={viewModel.spCode}"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />

View File

@@ -160,13 +160,13 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行:提货单号、库位、提取时间、品名(中) --> <!-- 第二行:特码、库位、办理时间、品名(中) -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp"> android:layout_marginTop="10dp">
<!-- 提货单号 --> <!-- 特码 -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -177,13 +177,13 @@
completeSpace="@{5}" completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="提货单号" android:text="特码"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.pkId}" android:text="@{bean.spCode}"
android:textSize="15sp" /> android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -210,7 +210,7 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 提取时间 --> <!-- 办理时间 -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -221,7 +221,7 @@
completeSpace="@{5}" completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="提取时间:" android:text="办理时间:"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView