|
|
@@ -49,7 +49,7 @@ class AddCardDialog(
|
|
|
})
|
|
|
// 用户单选
|
|
|
binding.usernameTv.setDebouncedClickListener {
|
|
|
- TextDropDownDialog.showSingle(userData,binding.usernameTv) { item ->
|
|
|
+ TextDropDownDialog.showSingle(userData, binding.usernameTv) { item ->
|
|
|
selectedUser = item
|
|
|
binding.usernameTv.text = item.getShowText()
|
|
|
}
|
|
|
@@ -67,19 +67,15 @@ class AddCardDialog(
|
|
|
PopTip.build().tip(R.string.please_input_card_nfc)
|
|
|
return@setDebouncedClickListener
|
|
|
}
|
|
|
- if (selectedUser == null) {
|
|
|
- PopTip.build().tip(R.string.please_select_card_username)
|
|
|
- return@setDebouncedClickListener
|
|
|
- }
|
|
|
// 构造并回调
|
|
|
val vo = AddCardDataVo(
|
|
|
cardNfc = nfc,
|
|
|
- userId = selectedUser!!.getId(),
|
|
|
- userName = selectedUser!!.getShowText(),
|
|
|
+ userId = selectedUser?.getId(),
|
|
|
+ userName = selectedUser?.getShowText(),
|
|
|
exStatus = statusChecked,
|
|
|
exRemark = binding.remarkEt.text.toString().takeIf { it.isNotBlank() }
|
|
|
)
|
|
|
- onConfirm(vo,dialog)
|
|
|
+ onConfirm(vo, dialog)
|
|
|
}
|
|
|
}
|
|
|
|