|
|
@@ -227,17 +227,27 @@ class StepFragment(val goBack: () -> Unit, val changePage: (PageChangeBO) -> Uni
|
|
|
}
|
|
|
|
|
|
private fun handleStep(step: Int) {
|
|
|
+ if (mStep == 0) return
|
|
|
when (step) {
|
|
|
3 -> {
|
|
|
- if (mStep == 0 || mStep > 5) return
|
|
|
+ if (mStep > 5 || mStep != 2) {
|
|
|
+ ToastUtils.tip(R.string.current_step_can_not_be_process)
|
|
|
+ return
|
|
|
+ }
|
|
|
changePage(PageChangeBO(1, mChangePage?.workstationId, mChangePage?.ticketId, mChangePage?.machineryId, mChangePage?.machineryName))
|
|
|
}
|
|
|
4 -> {
|
|
|
- if (mStep == 0 || mStep >= 4) return
|
|
|
+ if (mStep != 3) {
|
|
|
+ ToastUtils.tip(R.string.current_step_can_not_be_process)
|
|
|
+ return
|
|
|
+ }
|
|
|
updateStep(4)
|
|
|
}
|
|
|
5, 6, 7, 8 -> {
|
|
|
- if (mStep == 0 || mStep != step - 1) return
|
|
|
+ if (mStep != step - 1) {
|
|
|
+ ToastUtils.tip(R.string.current_step_can_not_be_process)
|
|
|
+ return
|
|
|
+ }
|
|
|
updateStep(step)
|
|
|
}
|
|
|
}
|