| | |
| | | import com.future.driver.ui.DialogUtil |
| | | import com.future.driver.ui.adapter.CityOverMoneyAdapter |
| | | import com.future.driver.ui.adapter.TripItemAdapter |
| | | import com.future.driver.ui.main.FillOutActivity |
| | | import com.future.driver.ui.main.OrderOverActivity |
| | | import com.future.driver.utils.DateUtil |
| | | import com.future.driver.utils.MyUtils |
| | | import com.google.gson.Gson |
| | |
| | | * 全部完成 走流程 |
| | | */ |
| | | private fun allOver() { |
| | | MyApplication.currentOrderType = "" |
| | | MyApplication.currentOrderId = "" |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.FINISH_RECORD)) |
| | | if (tripItemAdapter.data.size == 0) { |
| | | toast("订单已取消") |
| | | onBackPressed() |
| | |
| | | iv_move.gone() |
| | | iv_to_gd.gone() |
| | | cl_over_view.visible() |
| | | EventBus.getDefault().post(BaseEvent(BaseEvent.FINISH_RECORD)) |
| | | recycler_view_money.layoutManager = LinearLayoutManager(this) |
| | | recycler_view_money.adapter = overAdapter |
| | | orderBean?.let { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | private fun showMoneyTypeDialog() { |
| | | var pop = DialogUtil.getPopupwindow(this, R.layout.dialog_select_pay_type) |
| | | var payType = 1 //支付方式(1=快运平台收款,2=其他方式收款) |
| | | pop.showDown(window.decorView) |
| | | pop.contentView.tv_cancel.setOnClickListener { |
| | | pop.dismiss() |
| | | } |
| | | pop.contentView.tv_ok.setOnClickListener { |
| | | pop.dismiss() |
| | | if (payType == 1) { |
| | | callStatue(6,{ |
| | | startActivity<FillOutActivity>("orderId" to orderId, "orderType" to orderType) |
| | | finish() |
| | | }) { |
| | | |
| | | } |
| | | } else { |
| | | DialogUtil.getDelAndSureDialog(this, "请确定是否收款?", {}, { |
| | | pop.dismiss() |
| | | val map = getMapByAny() |
| | | map["orderId"] = orderId |
| | | map["orderType"] = orderType |
| | | map["type"] = payType |
| | | callStatue(6,{ |
| | | callNet(Api.confirmFees, map) { |
| | | finish() |
| | | startActivity<OrderOverActivity>( |
| | | "orderId" to orderId, |
| | | "orderType" to orderType |
| | | ) |
| | | } |
| | | }) { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | pop.contentView.tv_select_ok.setOnClickListener { |
| | | pop.contentView.tv_select_ok.alpha = 1f |
| | | pop.contentView.tv_select_ok.textSize = 16f |
| | | pop.contentView.tv_select_or.alpha = 0.6f |
| | | pop.contentView.tv_select_or.textSize = 14f |
| | | payType = 1 |
| | | } |
| | | pop.contentView.tv_select_or.setOnClickListener { |
| | | pop.contentView.tv_select_ok.alpha = 0.6f |
| | | pop.contentView.tv_select_ok.textSize = 14f |
| | | pop.contentView.tv_select_or.alpha = 1f |
| | | pop.contentView.tv_select_or.textSize = 16f |
| | | payType = 2 |
| | | } |
| | | } |
| | | |
| | | |
| | | /*** |