|
@@ -37,7 +37,6 @@ import com.quansu.heifengwuliu.config.ConfigRx
|
|
|
import com.quansu.heifengwuliu.config.MIntentAction
|
|
|
import com.quansu.heifengwuliu.model.WaybillDetails
|
|
|
import com.quansu.heifengwuliu.utils.ChosePhotoUtils
|
|
|
-import com.quansu.heifengwuliu.utils.VerifyUtils
|
|
|
import com.quansu.heifengwuliu.utils.net.NetEngine
|
|
|
import com.quansu.heifengwuliu.view.PasswordView
|
|
|
import com.yanzhenjie.permission.Action
|
|
@@ -132,8 +131,8 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
20 -> tvTitle.value = "运输轨迹"
|
|
|
30 -> {
|
|
|
tvTitle.value = "去结算"
|
|
|
- number=info.value!!.order.t_nums
|
|
|
- modifyTime.value=info.value!!.order.sd_time
|
|
|
+ number = info.value!!.order.t_nums
|
|
|
+ modifyTime.value = info.value!!.order.sd_time
|
|
|
nopath.addAll(info.value!!.order.t_img)
|
|
|
|
|
|
isVoucherShow.value = true
|
|
@@ -148,30 +147,30 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
tvTitle.value = "待评价"
|
|
|
}
|
|
|
|
|
|
- number=info.value!!.order.t_nums
|
|
|
- modifyTime.value=info.value!!.order.sd_time
|
|
|
+ number = info.value!!.order.t_nums
|
|
|
+ modifyTime.value = info.value!!.order.sd_time
|
|
|
|
|
|
nopath.addAll(info.value!!.order.t_img)
|
|
|
isVoucherShow.value = true
|
|
|
isModify.value = false
|
|
|
|
|
|
//实际支付
|
|
|
- isPayShow.value=true
|
|
|
- payMoney.value=info.value!!.info.true_total
|
|
|
+ isPayShow.value = true
|
|
|
+ payMoney.value = info.value!!.info.true_total
|
|
|
|
|
|
|
|
|
}
|
|
|
50 -> {
|
|
|
tvTitle.value = "查看评价"
|
|
|
- number=info.value!!.order.t_nums
|
|
|
- modifyTime.value=info.value!!.order.sd_time
|
|
|
+ number = info.value!!.order.t_nums
|
|
|
+ modifyTime.value = info.value!!.order.sd_time
|
|
|
nopath.addAll(info.value!!.order.t_img)
|
|
|
isVoucherShow.value = true
|
|
|
isModify.value = false
|
|
|
|
|
|
//实际支付
|
|
|
- isPayShow.value=true
|
|
|
- payMoney.value=info.value!!.info.true_total
|
|
|
+ isPayShow.value = true
|
|
|
+ payMoney.value = info.value!!.info.true_total
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -194,8 +193,8 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
10 -> tvTitle.value = "开始送货"
|
|
|
20 -> tvTitle.value = "已送达"
|
|
|
30 -> {
|
|
|
- number=info.value!!.order.t_nums
|
|
|
- modifyTime.value=info.value!!.order.sd_time
|
|
|
+ number = info.value!!.order.t_nums
|
|
|
+ modifyTime.value = info.value!!.order.sd_time
|
|
|
nopath.addAll(info.value!!.order.t_img)
|
|
|
isVoucherShow.value = true
|
|
|
isModify.value = true
|
|
@@ -208,32 +207,30 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
tvTitle.value = "待评价"
|
|
|
}
|
|
|
//回单
|
|
|
- number=info.value!!.order.t_nums
|
|
|
- modifyTime.value=info.value!!.order.sd_time
|
|
|
+ number = info.value!!.order.t_nums
|
|
|
+ modifyTime.value = info.value!!.order.sd_time
|
|
|
nopath.addAll(info.value!!.order.t_img)
|
|
|
- isVoucherShow.value=true
|
|
|
- isModify.value=false
|
|
|
+ isVoucherShow.value = true
|
|
|
+ isModify.value = false
|
|
|
|
|
|
//实际支付
|
|
|
- isPayShow.value=true
|
|
|
- payMoney.value=info.value!!.info.true_total
|
|
|
-
|
|
|
-
|
|
|
+ isPayShow.value = true
|
|
|
+ payMoney.value = info.value!!.info.true_total
|
|
|
|
|
|
|
|
|
}
|
|
|
50 -> {
|
|
|
tvTitle.value = "查看评价"
|
|
|
//回单
|
|
|
- number=info.value!!.order.t_nums
|
|
|
- modifyTime.value=info.value!!.order.sd_time
|
|
|
+ number = info.value!!.order.t_nums
|
|
|
+ modifyTime.value = info.value!!.order.sd_time
|
|
|
nopath.addAll(info.value!!.order.t_img)
|
|
|
isVoucherShow.value = true
|
|
|
isModify.value = false
|
|
|
|
|
|
//实际支付
|
|
|
- isPayShow.value=true
|
|
|
- payMoney.value=info.value!!.info.true_total
|
|
|
+ isPayShow.value = true
|
|
|
+ payMoney.value = info.value!!.info.true_total
|
|
|
|
|
|
}
|
|
|
|
|
@@ -292,7 +289,7 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
if (order_state == 30) {
|
|
|
|
|
|
|
|
|
- showPayDialog(order_id,info.value!!.info.total)
|
|
|
+ showPayDialog(order_id, info.value!!.info.total)
|
|
|
|
|
|
|
|
|
|
|
@@ -388,6 +385,13 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
|
|
|
order_state = 20//变成运输中
|
|
|
tvTitle.value = "已送达"
|
|
|
+ //开启定位
|
|
|
+ CCRetrofit.instance()
|
|
|
+ .with(repository().context)
|
|
|
+ .create(IGaode::class.java)
|
|
|
+ .loacationStart(info.value!!.order.order_sn,info.value!!.info.send[0].city.code,info.value!!.info.receive[info.value!!.info.receive.size-1].city.code)
|
|
|
+ .subscribe()
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
.subscribe()
|
|
@@ -426,7 +430,7 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
|
|
|
}
|
|
|
|
|
|
- fun clearMoreImg(position:Int){
|
|
|
+ fun clearMoreImg(position: Int){
|
|
|
nopath!!.removeAt(position)
|
|
|
|
|
|
|
|
@@ -472,6 +476,14 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
isVoucherShow.value=true
|
|
|
isModify.value=true
|
|
|
|
|
|
+ //已送达 停止定位
|
|
|
+
|
|
|
+ CCRetrofit.instance()
|
|
|
+ .with(repository().context)
|
|
|
+ .create(IGaode::class.java)
|
|
|
+ .loacationStop(info.value!!.order.order_sn,info.value!!.info.send[0].city.code,info.value!!.info.receive[info.value!!.info.receive.size-1].city.code)
|
|
|
+ .subscribe()
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
.subscribe()
|
|
@@ -506,7 +518,7 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
}
|
|
|
|
|
|
|
|
|
- fun showPayDialog(order_id: String,total:String) {
|
|
|
+ fun showPayDialog(order_id: String, total: String) {
|
|
|
var mNormalPopup = QMUIPopups.fullScreenPopup(repository().context)
|
|
|
val builder: QMUISkinValueBuilder = QMUISkinValueBuilder.acquire()
|
|
|
val frameLayout = QMUIFrameLayout(repository().context)
|
|
@@ -691,7 +703,7 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
}
|
|
|
|
|
|
|
|
|
- fun reviseModel(order_id:String){
|
|
|
+ fun reviseModel(order_id: String){
|
|
|
//确定
|
|
|
if (TextUtils.isEmpty(number)) {
|
|
|
toast("输入运送数量")
|
|
@@ -721,11 +733,11 @@ open class WaybillDetailsVModel(application: Application) : BViewModel<BReposito
|
|
|
|
|
|
|
|
|
|
|
|
- fun toBuy(is_baoxian:Int){
|
|
|
+ fun toBuy(is_baoxian: Int){
|
|
|
UiSwitch.bundleRes(repository().context as Activity,
|
|
|
BuyInsureActivity::class.java,
|
|
|
B.with().putInt("type", is_baoxian)
|
|
|
- .putString("order_id",info.value!!.order.order_id)
|
|
|
+ .putString("order_id", info.value!!.order.order_id)
|
|
|
.ok(),
|
|
|
MIntentAction.REQUEST_CHOSE_INSURE)
|
|
|
}
|