| | |
| | | package com.future.driver.ui.main.add_order |
| | | |
| | | import android.content.Intent |
| | | import androidx.recyclerview.widget.GridLayoutManager |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import cn.sinata.xldutils.utils.clickDelay |
| | |
| | | import kotlinx.android.synthetic.main.pop_select_type_to.view.* |
| | | import org.jetbrains.anko.toast |
| | | import org.jetbrains.anko.startActivity |
| | | import org.jetbrains.anko.startActivityForResult |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | ll_select_car_line.clickDelay { |
| | | if (startCityId.isEmpty() || endCityId.isEmpty()) { |
| | | toast("请先选择起点和终点") |
| | | return@clickDelay |
| | | } |
| | | startActivity<SelectLineActivity>("endId" to endCityId, "startId" to startCityId) |
| | | // if (startCityId.isEmpty() || endCityId.isEmpty()) { |
| | | // toast("请先选择起点和终点") |
| | | // return@clickDelay |
| | | // } |
| | | startActivityForResult<SelectLineActivity>(1,"endId" to endCityId, "startId" to startCityId) |
| | | } |
| | | |
| | | ll_start_point.clickDelay { |
| | |
| | | classStartTime = data.startTime |
| | | carId = data.carId.toString() |
| | | driverId = data.driverId.toString() |
| | | tv_select_class.text = data.allTime |
| | | laveSeatNumber = data.laveSeatNumber |
| | | totalSeat = data.totalSeat |
| | | hasPeopleNum = data.laveSeat |
| | |
| | | tv_driver.text = data.name |
| | | tv_car_num.text = data.carLicensePlate |
| | | clearByType(4) |
| | | tv_select_class.text = data.allTime |
| | | tv_line.text = lineName |
| | | } |
| | | |
| | | BaseEvent.SELECT_POINT_SITE_DETAIL -> { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
| | | super.onActivityResult(requestCode, resultCode, data) |
| | | if (data != null){ |
| | | startCityId = data.getStringExtra("startCityId")?:"" |
| | | startCityName = data.getStringExtra("startCity")?:"" |
| | | startSiteName = data.getStringExtra("startSite")?:"" |
| | | endCityId = data.getStringExtra("endCityId")?:"" |
| | | endCityName = data.getStringExtra("endCity")?:"" |
| | | endSiteName = data.getStringExtra("endSite")?:"" |
| | | lineId = data.getStringExtra("id")?:"" |
| | | lineName = data.getStringExtra("name")?:"" |
| | | startActivity<SelectClassActivity>("lineId" to lineId, "startCityName" to startSiteName, "endCityName" to endSiteName) |
| | | } |
| | | } |
| | | } |