[6.0.0] 取消订单
This commit is contained in:
@@ -44,7 +44,6 @@ import com.mogo.och.taxi.constant.TaxiUnmannedConst.Companion.TAXI_START_MAP_MAK
|
||||
import com.mogo.och.taxi.constant.TaxiUnmannedConst.Companion.TYPE_MARKER_TAXI_ORDER
|
||||
import com.mogo.och.taxi.model.TaxiModel
|
||||
import com.mogo.och.taxi.model.TaxiUnmannedViewModel
|
||||
import com.mogo.och.taxi.ui.TaxiOrderCancelDialog.CommitReasonListener
|
||||
import com.mogo.och.taxi.ui.unmanned.TaskAndOrderUiState
|
||||
import com.mogo.och.taxi.ui.unmanned.UnmannedIntent
|
||||
import kotlinx.android.synthetic.main.taxi_no_data_common_view.noOrderDataTv
|
||||
@@ -135,6 +134,7 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
|
||||
is TaskAndOrderUiState.ORDERCANCEL -> {
|
||||
updateOrderCancelUi(state.isCancel)
|
||||
onCurrentOrderCancelDone()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,7 +234,7 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
when(order.orderStatus){
|
||||
|
||||
TaxiOrderStatusEnum.None.code -> { //无
|
||||
// TODO("显示无订单页面")
|
||||
isHaveBeingOrder(false)
|
||||
}
|
||||
|
||||
TaxiOrderStatusEnum.Cancel.code -> { //取消
|
||||
@@ -265,8 +265,6 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
R.raw.end_marker
|
||||
)
|
||||
}
|
||||
|
||||
clearSmallMapRouteLine()
|
||||
}
|
||||
TaxiOrderStatusEnum.JourneyCompleted.code -> { //服务完成
|
||||
taskStatus.text = resources.getString(R.string.task_start_end_site)
|
||||
@@ -304,7 +302,6 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
R.raw.end_marker
|
||||
)
|
||||
}
|
||||
clearSmallMapRouteLine()
|
||||
}
|
||||
TaxiOrderStatusEnum.OnTheWayToEnd.code -> { //送驾中
|
||||
taskStatus.text = resources.getString(R.string.task_start_end_site)
|
||||
@@ -596,13 +593,10 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
if (being) {
|
||||
noTaskData.visibility = View.GONE
|
||||
mBeingOrderLayout.visibility = View.VISIBLE
|
||||
// mTaxiFragment!!.changeOperationViewVisible(View.GONE)
|
||||
clearSmallMapRouteLine()
|
||||
} else {
|
||||
noTaskData.visibility = View.VISIBLE
|
||||
noOrderDataTv.text = "暂无进行中订单"
|
||||
mBeingOrderLayout.visibility = View.GONE
|
||||
// mTaxiFragment!!.changeOperationViewVisible(View.VISIBLE)
|
||||
}
|
||||
} catch (e: NullPointerException) { //可能会出现订单信息已经轮询回来,但进行中页面控件还未初始化完成的情况
|
||||
TaxiModel.clearCurrentOCHOrder()
|
||||
@@ -655,23 +649,25 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
mTaxiFragment!!.startNaviToEndStation(isShow)
|
||||
}
|
||||
|
||||
fun onCurrentOrderCancelDone() {
|
||||
private fun onCurrentOrderCancelDone() {
|
||||
//去除起终点
|
||||
if (mCurrentTaskAndOrder != null) {
|
||||
// setOrRemoveMapMaker(
|
||||
// false,
|
||||
// TaxiUnmannedConst.TAXI_START_MAP_MAKER,
|
||||
// mCurrentOrder!!.startSitePoint,
|
||||
// R.raw.star_marker
|
||||
// )
|
||||
// setOrRemoveMapMaker(
|
||||
// false,
|
||||
// TaxiUnmannedConst.TAXI_END_MAP_MAKER,
|
||||
// mCurrentOrder!!.endSitePoint,
|
||||
// R.raw.end_marker
|
||||
// )
|
||||
if (mCurrentTaskAndOrder != null && mCurrentTaskAndOrder!!.startSite != null
|
||||
&& mCurrentTaskAndOrder!!.endSite != null) {
|
||||
setOrRemoveMapMaker(
|
||||
false,
|
||||
TAXI_START_MAP_MAKER,
|
||||
mCurrentTaskAndOrder!!.startSite!!.gcjLat,
|
||||
mCurrentTaskAndOrder!!.startSite!!.gcjLon,
|
||||
R.raw.star_marker
|
||||
)
|
||||
setOrRemoveMapMaker(
|
||||
false,
|
||||
TAXI_END_MAP_MAKER,
|
||||
mCurrentTaskAndOrder!!.endSite!!.gcjLat,
|
||||
mCurrentTaskAndOrder!!.endSite!!.gcjLon,
|
||||
R.raw.end_marker
|
||||
)
|
||||
}
|
||||
clearSmallMapRouteLine()
|
||||
//提交取消订单后的回调
|
||||
ToastUtils.showShort("订单取消成功")
|
||||
//更新界面
|
||||
@@ -680,10 +676,6 @@ class TaxiBeingTaskFragment : BaseFragment(),
|
||||
clearOrderTag()
|
||||
}
|
||||
|
||||
private fun clearSmallMapRouteLine() {
|
||||
// CallerSmpManager.clearPolyline();
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单流转debug START
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user