车队优化
This commit is contained in:
parent
8e29418137
commit
afcd241bbf
@ -2,13 +2,11 @@ package com.dahe.gldriver.adapter
|
||||
|
||||
import android.content.Context
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter4.BaseQuickAdapter
|
||||
import com.chad.library.adapter4.viewholder.QuickViewHolder
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.bean.CarBean
|
||||
import com.dahe.glex.bean.WayBillBean
|
||||
import com.dahe.mylibrary.utils.ImageLoader
|
||||
|
||||
/**
|
||||
@ -17,7 +15,7 @@ import com.dahe.mylibrary.utils.ImageLoader
|
||||
* @Date 2024/1/23 16:27
|
||||
* @Description TODO
|
||||
*/
|
||||
class CarsAdapter :
|
||||
class CarsAdapter(private var isCanUnbind: Boolean) :
|
||||
BaseQuickAdapter<CarBean, QuickViewHolder>() {
|
||||
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: CarBean?) {
|
||||
holder.run {
|
||||
@ -33,6 +31,8 @@ class CarsAdapter :
|
||||
}吨"""
|
||||
)
|
||||
|
||||
setGone(R.id.tvUnbind,!isCanUnbind)
|
||||
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(context, item?.carUrl, 6, getView<ImageView>(R.id.ivHead))
|
||||
}
|
||||
|
@ -57,4 +57,14 @@ data class CarDetail(
|
||||
val vehicleNum: String,
|
||||
val vehicleType: String,
|
||||
val vehicleTypeCode: String
|
||||
)
|
||||
)
|
||||
data class CapCarListBean(
|
||||
val avatar: String,
|
||||
val carList: List<CarBean>,
|
||||
val contactName: String,
|
||||
val contactPhone: String,
|
||||
val driverId: Int,
|
||||
val idcardName: String,
|
||||
val idcardSex: String
|
||||
)
|
||||
|
||||
|
@ -131,6 +131,7 @@ data class AuthTeamBean(
|
||||
var captainBankcardAddress: String="",
|
||||
var captainBankcardNumber: String="",
|
||||
var captainBankcardName: String="",
|
||||
var captainName: String="",
|
||||
var captainBankcardPhotoUrl: String="",
|
||||
var captainType: String="",//类型(0=个人,1=企业)
|
||||
var idcardAddress: String="",
|
||||
|
@ -438,8 +438,8 @@ interface Api {
|
||||
* 根据ID查询车队车辆列表-根据司机分页
|
||||
* @return Observable<CommonResponseBean<MutableList<DriverBean>>>
|
||||
*/
|
||||
@GET(BASE_URL + "driver/captain/selectDriverIdsForCarPage")
|
||||
fun selectDriverIdsForCarPage(@Query("captainId") captainId: String): Observable<CommonResponseBean<MutableList<CarBean>>>
|
||||
@GET(BASE_URL + "driver/captain/selectCarsList")
|
||||
fun selectCarsList(@Query("captainId") captainId: String): Observable<CommonResponseBean<MutableList<CarBean>>>
|
||||
|
||||
/**
|
||||
* 根据ID查询车队信息
|
||||
@ -449,6 +449,15 @@ interface Api {
|
||||
@GET(BASE_URL + "driver/captain/getCaptainById")
|
||||
fun getCaptainById(@Query("captainId") captainId: String): Observable<CommonResponseBean<CaptainBean>>
|
||||
|
||||
|
||||
/**
|
||||
* 查询车队详情(证件)
|
||||
* @param captainId String
|
||||
* @return Observable<CommonResponseBean<CaptainBean>>
|
||||
*/
|
||||
@GET(BASE_URL+"driver/captain/getCaptainDetail")
|
||||
fun getCaptainDetail(@Query("captainId") captainId: String): Observable<CommonResponseBean<AuthTeamBean>>
|
||||
|
||||
/**
|
||||
* 查询车辆证件完整度
|
||||
* @param captainId String
|
||||
|
@ -3,9 +3,9 @@ package com.dahe.gldriver.ui.account.authteam
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.AuthTeamBean
|
||||
import com.dahe.gldriver.bean.OcrPersonBean
|
||||
import com.dahe.gldriver.databinding.ActivityAuthTeamBinding
|
||||
import com.dahe.gldriver.databinding.ActivityAuthTeamEditBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
@ -17,7 +17,6 @@ import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.ImageLoader
|
||||
import com.dahe.mylibrary.utils.PickerUtils
|
||||
import com.dahe.mylibrary.utils.PopsUtils
|
||||
import com.dahe.mylibrary.utils.TimeUtil
|
||||
import com.dahe.mylibrary.utils.ToastUtils
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
@ -29,7 +28,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
* @Date 2024/1/25 16:44
|
||||
* @Description 个人车队-编辑
|
||||
*/
|
||||
class EditCaTeamActivity : BaseActivity<ActivityAuthTeamBinding>(), View.OnClickListener {
|
||||
class EditCaTeamActivity : BaseActivity<ActivityAuthTeamEditBinding>(), View.OnClickListener {
|
||||
private var checkTeamType = 1 //1代表运输公司,0代表个人车队
|
||||
|
||||
var ossServiceUtil: OssServiceUtil = OssServiceUtil.getInstance()
|
||||
@ -41,9 +40,6 @@ class EditCaTeamActivity : BaseActivity<ActivityAuthTeamBinding>(), View.OnClick
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("身份认证", true)
|
||||
binding.run {
|
||||
rgTeam.setOnCheckedChangeListener { _, i ->
|
||||
changeTeamType(if (i == binding.rbCom.id) 1 else 0)
|
||||
}
|
||||
//营业执照选择。ocr识别
|
||||
ivBusiness.setOnClickListener {
|
||||
OcrUtils.getInstance()
|
||||
@ -274,14 +270,76 @@ class EditCaTeamActivity : BaseActivity<ActivityAuthTeamBinding>(), View.OnClick
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
val capId = intent.extras!!.getString(AppConfig.ID, "")
|
||||
DataManager.getInstance().getCaptainDetail(capId)
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<AuthTeamBean>() {
|
||||
override fun onSuccess(t: CommonResponseBean<AuthTeamBean>) {
|
||||
super.onSuccess(t)
|
||||
if (t.data == null) {
|
||||
return
|
||||
}
|
||||
initViewByData(t.data)
|
||||
}
|
||||
}))
|
||||
|
||||
}
|
||||
|
||||
private fun changeTeamType(type: Int) {
|
||||
private fun initViewByData(data: AuthTeamBean) {
|
||||
changeTeamType(data.captainType.toInt(),data)
|
||||
binding.run {
|
||||
if (data.captainType == "1") {//1企业车队
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.businessLicensePhoneUrl, 12, ivBusiness)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.roadLicensePhotoUrl, 12, ivRoad)
|
||||
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.captainBankcardPhotoUrl, 12, binding.ivComBank)
|
||||
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardFrontUrl, 12, binding.ivComFront)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardBackUrl, 12, binding.ivComBack)
|
||||
|
||||
etRootId.setText(data.roadLicense)
|
||||
tvComDate.text = data.roadLicenseValidity
|
||||
|
||||
etComBankId.setText(data.captainBankcardNumber)
|
||||
etComBankName.setText(data.captainBankcardName)
|
||||
|
||||
etName.setText(data.idcardName)
|
||||
etId.setText(data.idcardNo)
|
||||
tvStart.text = data.idcardEffectiveStart
|
||||
tvEnd.text = if (data.idcardIsEndless == "1") "长期" else data.idcardEffectiveEnd
|
||||
|
||||
} else {
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardFrontUrl, 12, binding.ivFront)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardBackUrl, 12, binding.ivBack)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.captainBankcardPhotoUrl, 12, binding.ivBank)
|
||||
|
||||
etPerName.setText(data.idcardName)
|
||||
etPerId.setText(data.idcardNo)
|
||||
tvPerStart.text = data.idcardEffectiveStart
|
||||
tvPerEnd.text = if (data.idcardIsEndless == "1") "长期" else data.idcardEffectiveEnd
|
||||
|
||||
etPerBankId.setText(data.captainBankcardNumber)
|
||||
tvPerBankName.setText(data.captainBankcardName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun changeTeamType(type: Int, data: AuthTeamBean) {
|
||||
checkTeamType = type
|
||||
if (1 == checkTeamType) {
|
||||
upComInfoBean = data
|
||||
binding.llCom.visibility = View.VISIBLE
|
||||
binding.llPerson.visibility = View.GONE
|
||||
} else {
|
||||
upPerInfoBean = data
|
||||
binding.llCom.visibility = View.GONE
|
||||
binding.llPerson.visibility = View.VISIBLE
|
||||
}
|
||||
@ -381,76 +439,5 @@ class EditCaTeamActivity : BaseActivity<ActivityAuthTeamBinding>(), View.OnClick
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun selBankPic(picType: Int = 0) {
|
||||
PopsUtils.getInstance().showSimSelPic(mContext) { it ->
|
||||
ossServiceUtil.run {
|
||||
asyncPutImage(it[0].realPath, this@EditCaTeamActivity)
|
||||
setResultCallBack { data, oldPath ->
|
||||
DataManager.getInstance().recognizeBankCard(oldPath)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
BaseObserver(mContext,
|
||||
object : RxHttpCallBack<OcrPersonBean>(this@EditCaTeamActivity) {
|
||||
override fun onSuccess(t: CommonResponseBean<OcrPersonBean>) {
|
||||
super.onSuccess(t)
|
||||
t.data.data?.run {
|
||||
// bankInfo.driverBankcardPhotoUrl = oldPath
|
||||
|
||||
binding.let {
|
||||
it.etComBankId.setText(cardNumber)
|
||||
it.etComBankName.setText(bankName)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, it[0].realPath, 12, binding.ivComBank)
|
||||
}
|
||||
}
|
||||
|
||||
private fun selPerPic() {
|
||||
PopsUtils.getInstance().showSimSelPic(mContext) {
|
||||
|
||||
ImageLoader.getInstance().loadRoundImage(mContext, it[0].realPath, 12, binding.ivFront)
|
||||
|
||||
ossServiceUtil.run {
|
||||
asyncPutImage(it[0].realPath, this@EditCaTeamActivity)
|
||||
setResultCallBack { data, oldPath ->
|
||||
DataManager.getInstance().recognizeIdcard(oldPath)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
BaseObserver(mContext,
|
||||
object : RxHttpCallBack<OcrPersonBean>(this@EditCaTeamActivity) {
|
||||
override fun onSuccess(t: CommonResponseBean<OcrPersonBean>) {
|
||||
super.onSuccess(t)
|
||||
t.data.data.face?.data.let {
|
||||
it?.run {
|
||||
// perInfoBean.run {
|
||||
// idcardNo = idNumber
|
||||
// idcardName = name
|
||||
// idcardSex = if (sex == "男") "1" else "2"
|
||||
// }
|
||||
}
|
||||
binding.run {
|
||||
etName.setText(it?.idNumber)
|
||||
etId.setText(it?.name)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,9 +6,7 @@ import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.CarsAdapter
|
||||
import com.dahe.gldriver.adapter.DriversAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.DriverBean
|
||||
import com.dahe.gldriver.databinding.ActivityInviteDriverBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
|
@ -6,13 +6,9 @@ import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.CarsAdapter
|
||||
import com.dahe.gldriver.adapter.DriversAdapter
|
||||
import com.dahe.gldriver.adapter.InviteRecordAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.DriverBean
|
||||
import com.dahe.gldriver.bean.InviteRecord
|
||||
import com.dahe.gldriver.databinding.ActivityInviteDriverBinding
|
||||
import com.dahe.gldriver.databinding.ActivityInviteRecordBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
|
@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.GridItemAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.base.WebActivity
|
||||
import com.dahe.gldriver.bean.GridBean
|
||||
import com.dahe.gldriver.bean.OcrPersonBean
|
||||
@ -13,6 +14,7 @@ import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.oss.OssServiceUtil
|
||||
import com.dahe.gldriver.ui.account.authperson.AuthPartyActivity
|
||||
import com.dahe.gldriver.ui.account.authteam.EditCaTeamActivity
|
||||
import com.dahe.gldriver.ui.mine.activity.CarTeamManActivity
|
||||
import com.dahe.gldriver.ui.mine.activity.CarsManActivity
|
||||
import com.dahe.gldriver.ui.mine.activity.ComProActivity
|
||||
@ -90,7 +92,19 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
||||
}
|
||||
|
||||
llPerson.setOnClickListener {
|
||||
ActivityUtils.startActivity(mContext, PersonInfoActivity::class.java)
|
||||
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
||||
|
||||
if (userInfo.isCarCaptain == "1") {//是否是车队长(0=否,1=是,9=未选择)
|
||||
ActivityUtils.startActivity(
|
||||
mContext,
|
||||
EditCaTeamActivity::class.java,
|
||||
Bundle().apply {
|
||||
putString(AppConfig.ID, userInfo.captainId)
|
||||
})
|
||||
} else {
|
||||
ActivityUtils.startActivity(mContext, PersonInfoActivity::class.java)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -176,7 +190,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
||||
}
|
||||
|
||||
7 -> {
|
||||
ActivityUtils.startActivity(mContext,SettingActivity::class.java)
|
||||
ActivityUtils.startActivity(mContext, SettingActivity::class.java)
|
||||
}
|
||||
|
||||
}
|
||||
@ -186,7 +200,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
||||
getUserData()
|
||||
}
|
||||
|
||||
private fun getUserData(){
|
||||
private fun getUserData() {
|
||||
DataManager.getInstance().getUserInfo()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -194,7 +208,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
||||
override fun onSuccess(t: CommonResponseBean<UserBean>) {
|
||||
super.onSuccess(t)
|
||||
binding.refresh.finishRefresh()
|
||||
if (t==null||t.data==null)
|
||||
if (t == null || t.data == null)
|
||||
return
|
||||
UserUtils.instance.updateUser(mContext, t.data)
|
||||
refreshView()
|
||||
|
@ -3,19 +3,16 @@ package com.dahe.gldriver.ui.mine.activity
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.PopupMenu
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.CarsAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.CarBean
|
||||
import com.dahe.gldriver.bean.OcrPersonBean
|
||||
import com.dahe.gldriver.databinding.ActivityCarsManBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.oss.OssServiceUtil
|
||||
import com.dahe.gldriver.ui.account.authperson.AuthDrivingActivity
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
@ -23,9 +20,6 @@ import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.recycleviewswipe.RecycleViewDivider
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.ConvertUtils
|
||||
import com.dahe.mylibrary.utils.ImageLoader
|
||||
import com.dahe.mylibrary.utils.PopsUtils
|
||||
import com.dahe.mylibrary.utils.ToastUtils
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
|
||||
@ -53,7 +47,7 @@ class CarsManActivity : BaseActivity<ActivityCarsManBinding>() {
|
||||
Color.TRANSPARENT
|
||||
)
|
||||
)
|
||||
adapter = CarsAdapter()
|
||||
adapter = CarsAdapter(true)
|
||||
adapter as CarsAdapter
|
||||
}.apply {
|
||||
isStateViewEnable = true
|
||||
@ -99,7 +93,7 @@ class CarsManActivity : BaseActivity<ActivityCarsManBinding>() {
|
||||
BaseObserver(mContext, object : RxHttpCallBack<MutableList<CarBean>>() {
|
||||
override fun onSuccess(t: CommonResponseBean<MutableList<CarBean>>) {
|
||||
super.onSuccess(t)
|
||||
if (t.data.size == 0) {
|
||||
if (t.data == null || t.data.size == 0) {
|
||||
adapter.submitList(null)
|
||||
adapter.setStateViewLayout(mContext, R.layout.empty_view)
|
||||
} else {
|
||||
|
@ -6,7 +6,6 @@ import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.CarsAdapter
|
||||
import com.dahe.gldriver.adapter.ComProAdatper
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.ProBean
|
||||
|
@ -7,10 +7,7 @@ import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.CarsAdapter
|
||||
import com.dahe.gldriver.adapter.RateAdapter
|
||||
import com.dahe.gldriver.adapter.WalletAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.databinding.ActivityWalletBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
|
@ -1,32 +1,22 @@
|
||||
package com.dahe.gldriver.ui.mine.fragment
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.LayoutManager
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.CarsAdapter
|
||||
import com.dahe.gldriver.adapter.DriversAdapter
|
||||
import com.dahe.gldriver.adapter.WaybillAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.CarBean
|
||||
import com.dahe.gldriver.databinding.ActivityCarsManBinding
|
||||
import com.dahe.gldriver.databinding.FragmentWaybillListBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.mine.InviteDriverActivity
|
||||
import com.dahe.gldriver.utils.SPUtils
|
||||
import com.dahe.glex.bean.WayBillBean
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.base.BaseFragment
|
||||
import com.dahe.mylibrary.callback.RefreshCallBack
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.recycleviewswipe.RecycleViewDivider
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.ConvertUtils
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
@ -58,7 +48,7 @@ class CarsManFragment : BaseFragment<FragmentWaybillListBinding>(), RefreshCallB
|
||||
Color.TRANSPARENT
|
||||
)
|
||||
)
|
||||
adapter = CarsAdapter()
|
||||
adapter = CarsAdapter(false)
|
||||
adapter as CarsAdapter
|
||||
}.apply {
|
||||
isStateViewEnable = true
|
||||
@ -77,7 +67,7 @@ class CarsManFragment : BaseFragment<FragmentWaybillListBinding>(), RefreshCallB
|
||||
|
||||
private fun initData() {
|
||||
DataManager.getInstance()
|
||||
.selectDriverIdsForCarPage(captainId)
|
||||
.selectCarsList(captainId)
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<MutableList<CarBean>>() {
|
||||
override fun onSuccess(t: CommonResponseBean<MutableList<CarBean>>) {
|
||||
|
@ -1,29 +1,19 @@
|
||||
package com.dahe.gldriver.ui.mine.fragment
|
||||
|
||||
import android.graphics.Color
|
||||
import android.opengl.Visibility
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.LayoutManager
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.CarsAdapter
|
||||
import com.dahe.gldriver.adapter.DriversAdapter
|
||||
import com.dahe.gldriver.adapter.WaybillAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.DriverBean
|
||||
import com.dahe.gldriver.databinding.ActivityCarsManBinding
|
||||
import com.dahe.gldriver.databinding.FragmentWaybillListBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.mine.InviteDriverActivity
|
||||
import com.dahe.gldriver.utils.SPUtils
|
||||
import com.dahe.glex.bean.UserDetail
|
||||
import com.dahe.glex.bean.WayBillBean
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.base.BaseFragment
|
||||
import com.dahe.mylibrary.callback.RefreshCallBack
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
|
@ -435,11 +435,12 @@
|
||||
</LinearLayout>
|
||||
<!-- 个人车队 -->
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/llPerson"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
@ -742,7 +743,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_btn"
|
||||
android:text="提交审核"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_17">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user