|
|
@@ -62,7 +62,7 @@ class ExceptionReportFragment :
|
|
|
presenter?.getKeyPage {
|
|
|
mKeyList.clear()
|
|
|
mKeyList.addAll(it?.records ?: mutableListOf())
|
|
|
- if (mKeyList.isEmpty()){
|
|
|
+ if (mKeyList.isEmpty()) {
|
|
|
mBinding?.siDevice?.setOptionList(mutableListOf())
|
|
|
}
|
|
|
mBinding?.siDevice?.setOptionList(mKeyList.map { "${it.keyName}(${it.keyNfc})" }
|
|
|
@@ -84,7 +84,7 @@ class ExceptionReportFragment :
|
|
|
presenter?.getLockPage {
|
|
|
mLockList.clear()
|
|
|
mLockList.addAll(it?.records ?: mutableListOf())
|
|
|
- if (mLockList.isEmpty()){
|
|
|
+ if (mLockList.isEmpty()) {
|
|
|
mBinding?.siDevice?.setOptionList(mutableListOf())
|
|
|
}
|
|
|
mBinding?.siDevice?.setOptionList(mLockList.map { "${it.lockName}(${it.lockNfc})" }
|
|
|
@@ -107,10 +107,11 @@ class ExceptionReportFragment :
|
|
|
mJobCardList.clear()
|
|
|
mJobCardList.addAll(it?.records?.filter { it.nickName != null }
|
|
|
?.toMutableList() ?: mutableListOf())
|
|
|
- if (mJobCardList.isEmpty()){
|
|
|
+ if (mJobCardList.isEmpty()) {
|
|
|
mBinding?.siDevice?.setOptionList(mutableListOf())
|
|
|
}
|
|
|
- mBinding?.siDevice?.setOptionList(mJobCardList.map { "${it.cardCode}(${it.cardNfc})" }.toMutableList() ?: mutableListOf())
|
|
|
+ mBinding?.siDevice?.setOptionList(mJobCardList.map { "${it.cardCode}(${it.cardNfc})" }
|
|
|
+ .toMutableList() ?: mutableListOf())
|
|
|
}
|
|
|
mBinding?.siDevice?.setOnSpinnerSelectListener(object :
|
|
|
SelectableInput.OnSpinnerSelectListener {
|
|
|
@@ -128,7 +129,7 @@ class ExceptionReportFragment :
|
|
|
presenter?.getRfidTokenPage {
|
|
|
mRfidList.clear()
|
|
|
mRfidList.addAll(it?.records ?: mutableListOf())
|
|
|
- if (mRfidList.isEmpty()){
|
|
|
+ if (mRfidList.isEmpty()) {
|
|
|
mBinding?.siDevice?.setOptionList(mutableListOf())
|
|
|
}
|
|
|
mBinding?.siDevice?.setOptionList(mRfidList.map { "${it.rfidCode}(${it.rfid})" }
|
|
|
@@ -177,6 +178,13 @@ class ExceptionReportFragment :
|
|
|
mExceptionList[mTypeIdx].dictValue!!,
|
|
|
mSelectDeviceId
|
|
|
) {
|
|
|
+ mBinding?.siDescription?.setText("")
|
|
|
+ mBinding?.siDevice?.setOptionList(mutableListOf())
|
|
|
+ mBinding?.siLevel?.setText("")
|
|
|
+ mBinding?.siType?.setText("")
|
|
|
+ mTypeIdx = -1
|
|
|
+ mLevelIdx = -1
|
|
|
+ mSelectDeviceId = ""
|
|
|
ToastUtils.tip(R.string.exception_submit_success_tip)
|
|
|
}
|
|
|
}
|