|
@@ -265,9 +265,9 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
return@observe
|
|
return@observe
|
|
|
}
|
|
}
|
|
|
if (item.stepId != viewModel.currentStepData?.stepId && !workflowStep.enableSetLocker && !workflowStep.enableSetColocker) {
|
|
if (item.stepId != viewModel.currentStepData?.stepId && !workflowStep.enableSetLocker && !workflowStep.enableSetColocker) {
|
|
|
- PopTip(
|
|
|
|
|
- getString(
|
|
|
|
|
- R.string.please_done_operation,
|
|
|
|
|
|
|
+ showToast(
|
|
|
|
|
+ CommonUtils.getStr(
|
|
|
|
|
+ "please_done_operation",
|
|
|
viewModel.currentStepData?.androidStepContent
|
|
viewModel.currentStepData?.androidStepContent
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
@@ -443,7 +443,7 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
|
|
|
|
|
"2" -> {
|
|
"2" -> {
|
|
|
itemBinding.lockStatusTv.setTextColor(
|
|
itemBinding.lockStatusTv.setTextColor(
|
|
|
- CommonUtils.getColor( com.grkj.ui_base.R.attr.colorWhite)
|
|
|
|
|
|
|
+ CommonUtils.getColor(com.grkj.ui_base.R.attr.colorWhite)
|
|
|
)
|
|
)
|
|
|
itemBinding.lockStatusLayout.setBackgroundResource(R.drawable.bg_btn_job_execute_go_unlocking)
|
|
itemBinding.lockStatusLayout.setBackgroundResource(R.drawable.bg_btn_job_execute_go_unlocking)
|
|
|
itemBinding.lockStatusIv.setImageResource(R.drawable.icon_ticket_unlock)
|
|
itemBinding.lockStatusIv.setImageResource(R.drawable.icon_ticket_unlock)
|
|
@@ -495,12 +495,10 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
viewModel.colockerStatusChange(colocker)
|
|
viewModel.colockerStatusChange(colocker)
|
|
|
.observe(this) {
|
|
.observe(this) {
|
|
|
if (it) {
|
|
if (it) {
|
|
|
- PopTip.build()
|
|
|
|
|
- .tip(R.string.colock_complete)
|
|
|
|
|
|
|
+ showToast(CommonUtils.getStr("colock_complete"))
|
|
|
checkStepComplete()
|
|
checkStepComplete()
|
|
|
} else {
|
|
} else {
|
|
|
- PopTip.build()
|
|
|
|
|
- .tip(R.string.colock_failed)
|
|
|
|
|
|
|
+ showToast(CommonUtils.getStr("colock_failed"))
|
|
|
}
|
|
}
|
|
|
refreshTicketUser()
|
|
refreshTicketUser()
|
|
|
}
|
|
}
|
|
@@ -516,19 +514,16 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
viewModel.colockerStatusChange(colocker)
|
|
viewModel.colockerStatusChange(colocker)
|
|
|
.observe(this) {
|
|
.observe(this) {
|
|
|
if (it) {
|
|
if (it) {
|
|
|
- PopTip.build()
|
|
|
|
|
- .tip(R.string.uncolock_complete)
|
|
|
|
|
|
|
+ showToast(CommonUtils.getStr("uncolock_complete"))
|
|
|
checkStepComplete()
|
|
checkStepComplete()
|
|
|
} else {
|
|
} else {
|
|
|
- PopTip.build()
|
|
|
|
|
- .tip(R.string.uncolock_failed)
|
|
|
|
|
|
|
+ showToast(CommonUtils.getStr("uncolock_failed"))
|
|
|
}
|
|
}
|
|
|
refreshTicketUser()
|
|
refreshTicketUser()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- PopTip.build()
|
|
|
|
|
- .tip(R.string.currently_unable_to_lock_together)
|
|
|
|
|
|
|
+ showToast(CommonUtils.getStr("currently_unable_to_lock_together"))
|
|
|
}
|
|
}
|
|
|
} ?: showToast(CommonUtils.getStr("invalid_user"))
|
|
} ?: showToast(CommonUtils.getStr("invalid_user"))
|
|
|
} ?: showToast(CommonUtils.getStr("invalid_card"))
|
|
} ?: showToast(CommonUtils.getStr("invalid_card"))
|
|
@@ -546,8 +541,8 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
|
|
|
|
|
EventConstants.EVENT_TICKET_FINISHED -> {
|
|
EventConstants.EVENT_TICKET_FINISHED -> {
|
|
|
TipDialog.show(
|
|
TipDialog.show(
|
|
|
- title = getString(com.grkj.ui_base.R.string.action_hint),
|
|
|
|
|
- msg = getString(com.grkj.ui_base.R.string.job_already_finished),
|
|
|
|
|
|
|
+ title = CommonUtils.getStr("action_hint"),
|
|
|
|
|
+ msg = CommonUtils.getStr("job_already_finished"),
|
|
|
dialogType = TipDialog.DialogType.ERROR,
|
|
dialogType = TipDialog.DialogType.ERROR,
|
|
|
showCancel = false,
|
|
showCancel = false,
|
|
|
onConfirmClick = {
|
|
onConfirmClick = {
|
|
@@ -597,7 +592,7 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
binding.cancelJob.isVisible = false
|
|
binding.cancelJob.isVisible = false
|
|
|
binding.finishJob.isVisible = false
|
|
binding.finishJob.isVisible = false
|
|
|
FlashTipEvent.sendFlashTipEvent(viewModel.getCurrentStepTip())
|
|
FlashTipEvent.sendFlashTipEvent(viewModel.getCurrentStepTip())
|
|
|
- viewModel.checkMyTodoForHandleKey().observe(this){}
|
|
|
|
|
|
|
+ viewModel.checkMyTodoForHandleKey().observe(this) {}
|
|
|
binding.lockInfo.text =
|
|
binding.lockInfo.text =
|
|
|
"${viewModel.ticketPoints.size}/${viewModel.ticketPoints.count { it.pointStatus?.toInt() ?: 0 >= 1 }}/${viewModel.ticketPoints.count { it.pointStatus == "2" }}"
|
|
"${viewModel.ticketPoints.size}/${viewModel.ticketPoints.count { it.pointStatus?.toInt() ?: 0 >= 1 }}/${viewModel.ticketPoints.count { it.pointStatus == "2" }}"
|
|
|
binding.colockInfo.text =
|
|
binding.colockInfo.text =
|
|
@@ -681,18 +676,18 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
viewModel.ticketUser.let {
|
|
viewModel.ticketUser.let {
|
|
|
binding.waitToColockRv.models =
|
|
binding.waitToColockRv.models =
|
|
|
it.filter { it.jobStatus == "0" && it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
it.filter { it.jobStatus == "0" && it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
|
- binding.waitToColock.text = getString(
|
|
|
|
|
- R.string.wait_to_colock,
|
|
|
|
|
|
|
+ binding.waitToColock.text = CommonUtils.getStr(
|
|
|
|
|
+ "wait_to_colock",
|
|
|
it.count { it.jobStatus == "0" && it.userRole == RoleEnum.JTCOLOCKER.roleKey })
|
|
it.count { it.jobStatus == "0" && it.userRole == RoleEnum.JTCOLOCKER.roleKey })
|
|
|
binding.alreadyColockRv.models =
|
|
binding.alreadyColockRv.models =
|
|
|
it.filter { it.jobStatus == "1" && it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
it.filter { it.jobStatus == "1" && it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
|
- binding.alreadyColock.text = getString(
|
|
|
|
|
- R.string.already_colock,
|
|
|
|
|
|
|
+ binding.alreadyColock.text = CommonUtils.getStr(
|
|
|
|
|
+ "already_colock",
|
|
|
it.count { it.jobStatus == "1" && it.userRole == RoleEnum.JTCOLOCKER.roleKey })
|
|
it.count { it.jobStatus == "1" && it.userRole == RoleEnum.JTCOLOCKER.roleKey })
|
|
|
binding.alreadyUncolockRv.models =
|
|
binding.alreadyUncolockRv.models =
|
|
|
it.filter { it.jobStatus == "2" && it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
it.filter { it.jobStatus == "2" && it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
|
- binding.alreadyUncolock.text = getString(
|
|
|
|
|
- R.string.already_uncolock,
|
|
|
|
|
|
|
+ binding.alreadyUncolock.text = CommonUtils.getStr(
|
|
|
|
|
+ "already_uncolock",
|
|
|
it.count { it.jobStatus == "2" && it.userRole == RoleEnum.JTCOLOCKER.roleKey })
|
|
it.count { it.jobStatus == "2" && it.userRole == RoleEnum.JTCOLOCKER.roleKey })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|