| | |
| | | Handler(Looper.getMainLooper()).post { |
| | | toast("用户已取消订单") |
| | | MyApplication.getTTsManager().setVideoText("用户已取消订单") |
| | | MyApplication.currentOrderType = "" |
| | | MyApplication.currentOrderId = "" |
| | | finish() |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | private fun callOrder() { |
| | | MyApplication.currentOrderId = orderId |
| | | MyApplication.currentOrderType = orderType |
| | | var map = getMapByAny() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | |
| | | private fun showUi(orderBean: OrderBean?) { |
| | | orderBean?.let { |
| | | tv_name.text = orderBean.data.nickName |
| | | tv_car_num.text = it.data.historyNum.toString() + "次乘车" |
| | | tv_car_num.text = it.data.historyNum.toString() + "次寄物" |
| | | tv_time.text = it.data.travelTime |
| | | tv_start_address.text = it.data.startAddress |
| | | tv_end_address.text = it.data.endAddress |
| | | tv_name_phone.text = orderBean.data.nickName + "-" + orderBean.data.phone |
| | | tv_type_cargo.text = "普通小件X" + orderBean.data.peopleNumber |
| | | tv_red_money.text = doubleTwo(orderBean.data.tipMoney) + "元加急费" |
| | | if (orderBean.data.tipMoney == null || orderBean.data.tipMoney <= 0.0){ |
| | | tv_red_money.gone() |
| | | } |
| | | tv_phone.text = orderBean.data.phone |
| | | showStatueMapUI(it) |
| | | } |
| | |
| | | // 流程操作状态(3=开始出发预约点,4=到达预约点,5=开始服务,6=服务结束) |
| | | private fun showStatueMapUI(it: OrderBean) { |
| | | getAllMark(it) |
| | | tv_gap_money.gone() |
| | | if (it.data.orderState == 4 || it.data.orderState == 8 || it.data.orderState == 12){ |
| | | tv_gap_money.visible() |
| | | } |
| | | when (it.data.orderState) { |
| | | 2, 3 -> { |
| | | clickBroad() |
| | |
| | | setTitleText("去取货物") |
| | | } |
| | | } |
| | | 4,8-> { |
| | | 4,8,12-> { |
| | | clickBroad() |
| | | iv_to_gd.gone() |
| | | closeLine() |
| | |
| | | |
| | | fun callStartOrder(contexts: Context, i: Int,func:() -> Unit) { |
| | | var map = getMapByAny() |
| | | map["orderId"] = MyApplication.currentOrderId |
| | | map["orderType"] = MyApplication.currentOrderType |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["state"] = i |
| | | map["lat"] = MyApplication.getLocation().latitude |
| | | map["lon"] = MyApplication.getLocation().longitude |