|
|
@@ -4,6 +4,7 @@ import com.grkj.iscs.BusinessManager
|
|
|
import com.grkj.iscs.R
|
|
|
import com.grkj.iscs.activity.TicketDetailActivity
|
|
|
import com.grkj.iscs.base.BasePresenter
|
|
|
+import com.grkj.iscs.dialog.TipDialog
|
|
|
import com.grkj.iscs.extentions.serialNo
|
|
|
import com.grkj.iscs.iview.ITicketDetailView
|
|
|
import com.grkj.iscs.modbus.ModBusController
|
|
|
@@ -160,14 +161,35 @@ class TicketDetailPresenter : BasePresenter<ITicketDetailView>() {
|
|
|
}
|
|
|
when(role.jobStatus) {
|
|
|
JOB_STATUS_NOT_STARTED -> {
|
|
|
- // TODO 调用更新接口
|
|
|
+ showTipDlg(mContext!!.getString(R.string.make_sure_to_colock)) {
|
|
|
+ SPUtils.getLoginUser(mContext!!)?.userId?.let {
|
|
|
+ NetApi.updateTicketProgress(ticketDetail.ticketId!!, it) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
JOB_STATUS_READY_TO_UNLOCK -> {
|
|
|
- // TODO 调用更新接口
|
|
|
+ showTipDlg(mContext!!.getString(R.string.make_sure_to_unlock)) {
|
|
|
+ SPUtils.getLoginUser(mContext!!)?.userId?.let {
|
|
|
+ NetApi.updateTicketProgress(ticketDetail.ticketId!!, it) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
JOB_STATUS_UNLOCKED -> {
|
|
|
ToastUtils.tip(R.string.ticket_is_colocker_part_finished)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private fun showTipDlg(tip: String, callback: () -> Unit) {
|
|
|
+ val dlg = TipDialog(mContext!!)
|
|
|
+ dlg.setTip(tip)
|
|
|
+ dlg.setConfirmListener {
|
|
|
+ callback.invoke()
|
|
|
+ }
|
|
|
+ dlg.showDialog()
|
|
|
+ }
|
|
|
}
|