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