| | |
| | | } |
| | | |
| | | private fun addSockectCancel() { |
| | | MyApplication.addOrderView(object : MyApplication.OrderStatueView { |
| | | override fun orderInfo(data: OrderSimpleData?) { |
| | | data?.let { |
| | | if (it.status == 10 || it.status == 11) { |
| | | Handler(Looper.getMainLooper()).post { |
| | | if (it.status == 10){ |
| | | toast("用户已取消订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已取消订单") |
| | | }else{ |
| | | toast("用户已改派订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已改派订单") |
| | | } |
| | | finish() |
| | | MyApplication.addOrderView(orderView) |
| | | } |
| | | |
| | | var orderView = object : MyApplication.OrderStatueView { |
| | | override fun orderInfo(data: OrderSimpleData?) { |
| | | data?.let { |
| | | if (it.status == 10 || it.status == 11) { |
| | | Handler(Looper.getMainLooper()).post { |
| | | if (it.status == 10){ |
| | | toast("用户已取消订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已取消订单") |
| | | }else{ |
| | | toast("用户已改派订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已改派订单") |
| | | } |
| | | finish() |
| | | } |
| | | if (it.orderType == 4 || it.orderType == 5 && it.orderId.toString() == orderId) { |
| | | Handler(Looper.getMainLooper()).post { |
| | | initView() |
| | | } |
| | | } |
| | | if (it.orderType == 4 || it.orderType == 5 && it.orderId.toString() == orderId) { |
| | | Handler(Looper.getMainLooper()).post { |
| | | initView() |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | override fun finish() { |
| | | MyApplication.removeOrderView(orderView) |
| | | super.finish() |
| | | } |
| | | |
| | | override fun onBackPressed() { |
| | |
| | | showStatueMapUI(it) |
| | | } |
| | | 5, 6 -> { |
| | | it.data.orderState = 6 |
| | | showChangeCargoDialog() |
| | | sendCode { |
| | | it.data.orderState = 6 |
| | | showChangeCargoDialog() |
| | | } |
| | | |
| | | } |
| | | 12 -> { |
| | | it.data.orderState = 5 |
| | |
| | | } |
| | | } |
| | | |
| | | private fun sendCode(function: () -> Unit) { |
| | | var map = getMapByAny() |
| | | map["orderId"] = orderId |
| | | callNet(true,Api.sendVerificationCode, map) { |
| | | function() |
| | | } |
| | | } |
| | | |
| | | |
| | | private fun callNumberCargo(num: String, click: () -> Unit) { |