fix: 国际进港装机单修改库位弹框仅单选时自动带出库位号
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -108,13 +108,11 @@ class IntImpLoadingListActivity :
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果所有选中项库位相同,则预选该库位
|
// 单选时自动带出该项的库位号,多选不带出
|
||||||
val commonLocation = selectedItems.map { it.locationTally }.distinct().let {
|
val presetLocation = if (selectedItems.size == 1) selectedItems.first().locationTally ?: "" else ""
|
||||||
if (it.size == 1) it.first() else ""
|
|
||||||
}
|
|
||||||
|
|
||||||
IntImpModifyStorageDialogModel(
|
IntImpModifyStorageDialogModel(
|
||||||
currentLocationName = commonLocation
|
currentLocationName = presetLocation
|
||||||
) { dialog ->
|
) { dialog ->
|
||||||
val locationName = dialog.locationName
|
val locationName = dialog.locationName
|
||||||
val locationId = dialog.locationId
|
val locationId = dialog.locationId
|
||||||
|
|||||||
Reference in New Issue
Block a user