fix: 多个国际进出港页面必填项与筛选逻辑调整
- 进港舱单新增/编辑:品名(中)改为非必填 - 国际出港开始计重:运抵件数/重量改为必填,新增运抵重量超预配3%校验 - 国际出港板箱过磅:架子车号改为非必填 - 国际进港出库列表:新增特码栏、删除提货单号、提取时间改办理时间、查询条件改特码 - 进港/出港仓库列表:清仓结果筛选传参修复并反转值(正常=1/异常=0) - 组装ULD未维护提示文言优化,版本号升至1.8.8 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -366,8 +366,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
bean.passageway = passagewayList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
|
||||
bean.passagewayId = channel.value ?: ""
|
||||
|
||||
// 验证必填字段
|
||||
if (bean.carId.verifyNullOrEmpty("请输入架子车号")) return
|
||||
// 验证必填字段(架子车号改为非必填)
|
||||
if (bean.uld.verifyNullOrEmpty("请输入ULD编号")) return
|
||||
if (bean.passageway.verifyNullOrEmpty("请选择通道号")) return
|
||||
|
||||
|
||||
@@ -355,7 +355,11 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
if (bean.fno.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 arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
||||
val preallocatedPc = bean.pc ?: 0L
|
||||
@@ -365,7 +369,17 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
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 {
|
||||
// 更新运抵数据(如果用户已编辑)
|
||||
arrivePc = this@GjcWeighingStartViewModel.arrivePc.value?.toLongOrNull() ?: arrivePc
|
||||
@@ -429,6 +443,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
||||
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
||||
|
||||
// 校验运抵件数、运抵重量必填
|
||||
if (arrivePc.value.verifyNullOrEmpty("请输入运抵件数")) return
|
||||
if (arriveWeight.value.verifyNullOrEmpty("请输入运抵重量")) return
|
||||
|
||||
// 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
||||
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
|
||||
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
||||
@@ -439,6 +457,16 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
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 arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume
|
||||
|
||||
@@ -449,7 +449,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
assembleInfoList.value = mutableListOf()
|
||||
}
|
||||
} else {
|
||||
showToast("未查询到该ULD信息")
|
||||
showToast("ULD 编号未维护,请先进行维护!")
|
||||
}
|
||||
}
|
||||
onFailed = { code, message ->
|
||||
|
||||
@@ -62,8 +62,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
// 初始化清仓综合结果列表(根据实际需求配置)
|
||||
clearResultList.value = listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("正常", "0"),
|
||||
KeyValue("异常", "1")
|
||||
KeyValue("正常", "1"),
|
||||
KeyValue("异常", "0")
|
||||
)
|
||||
|
||||
}
|
||||
@@ -306,7 +306,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
"fdate" to flightDate.value?.ifEmpty { null },
|
||||
"fno" to flightNo.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 }
|
||||
)
|
||||
|
||||
// 列表参数 (含分页)
|
||||
|
||||
@@ -322,6 +322,7 @@
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入运抵件数"}'
|
||||
required="@{true}"
|
||||
title='@{"运抵件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
@@ -332,6 +333,7 @@
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入运抵重量"}'
|
||||
required="@{true}"
|
||||
title='@{"运抵重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
|
||||
Reference in New Issue
Block a user