添加车队长成功页面
This commit is contained in:
parent
0bcf04f33b
commit
34bff03c52
@ -151,6 +151,10 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ui.account.AuthSuccActivity"
|
android:name=".ui.account.AuthSuccActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|locale"
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden" /><activity
|
||||||
|
android:name=".ui.account.AuthTeamSuccActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ class AuthSuccActivity : BaseActivity<ActivityAuthSuccBinding>() {
|
|||||||
ActivityUtils.startActivity(mContext, HomeActivity::class.java)
|
ActivityUtils.startActivity(mContext, HomeActivity::class.java)
|
||||||
} else {
|
} else {
|
||||||
ActivityUtils.startActivity(mContext, AuthDrivingActivity::class.java)
|
ActivityUtils.startActivity(mContext, AuthDrivingActivity::class.java)
|
||||||
|
finish()
|
||||||
// ActivityUtils.finishToActivityAndGoNew(mContext,CarsManActivity::class.java,AuthDrivingActivity::class.java,false)
|
// ActivityUtils.finishToActivityAndGoNew(mContext,CarsManActivity::class.java,AuthDrivingActivity::class.java,false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.dahe.gldriver.ui.account
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.os.CountDownTimer
|
||||||
|
import android.view.View
|
||||||
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.base.AppConfig
|
||||||
|
import com.dahe.gldriver.databinding.ActivityAuthSuccBinding
|
||||||
|
import com.dahe.gldriver.ui.HomeActivity
|
||||||
|
import com.dahe.gldriver.ui.account.authperson.AuthDrivingActivity
|
||||||
|
import com.dahe.gldriver.ui.mine.activity.CarsManActivity
|
||||||
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
|
import com.dahe.mylibrary.utils.ActivityUtils
|
||||||
|
import com.dahe.mylibrary.utils.BaseSPUtils
|
||||||
|
import com.dahe.mylibrary.utils.BaseUtils
|
||||||
|
import com.dahe.mylibrary.utils.TimeUtil
|
||||||
|
import io.reactivex.rxjava3.core.Observable
|
||||||
|
import java.util.Timer
|
||||||
|
import java.util.TimerTask
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName AuthSuccActivity
|
||||||
|
* @Author john
|
||||||
|
* @Date 2024/3/8 15:13
|
||||||
|
* @Description 车队长认证成功页面
|
||||||
|
*/
|
||||||
|
class AuthTeamSuccActivity : BaseActivity<ActivityAuthSuccBinding>() {
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
setStatusBarColor(R.color.white)
|
||||||
|
setTitleBar("提交成功", true)
|
||||||
|
|
||||||
|
binding.run {
|
||||||
|
btnRight.visibility = View.GONE
|
||||||
|
btnLeft.setOnClickListener {
|
||||||
|
ActivityUtils.startActivity(mContext, HomeActivity::class.java)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initDate() {
|
||||||
|
val timer = Timer()
|
||||||
|
var timeTask = object : TimerTask() {
|
||||||
|
override fun run() {
|
||||||
|
runOnUiThread {
|
||||||
|
ActivityUtils.startActivity(mContext, HomeActivity::class.java)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
timer.schedule(timeTask, 3000)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -154,6 +154,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>(), View.OnClickListener
|
|||||||
if (!binding.cb.isChecked) {
|
if (!binding.cb.isChecked) {
|
||||||
CommonPopUtils.getInstance()
|
CommonPopUtils.getInstance()
|
||||||
.showCommCenterPop(mContext, content = "是否同意隐私协议?") {
|
.showCommCenterPop(mContext, content = "是否同意隐私协议?") {
|
||||||
|
binding.cb.isChecked = true
|
||||||
if ("获取验证码" == binding.ok.text) {
|
if ("获取验证码" == binding.ok.text) {
|
||||||
var phone = binding.etPhone.text.toString().trim()
|
var phone = binding.etPhone.text.toString().trim()
|
||||||
if (phone.length == 11) {
|
if (phone.length == 11) {
|
||||||
@ -179,6 +180,29 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>(), View.OnClickListener
|
|||||||
}
|
}
|
||||||
// ToastUtils.showToast(mContext, "请勾选用户隐私协议")
|
// ToastUtils.showToast(mContext, "请勾选用户隐私协议")
|
||||||
// return
|
// return
|
||||||
|
}else{
|
||||||
|
if ("获取验证码" == binding.ok.text) {
|
||||||
|
var phone = binding.etPhone.text.toString().trim()
|
||||||
|
if (phone.length == 11) {
|
||||||
|
ActivityUtils.startActivityForResult(
|
||||||
|
LoginActivity@ this,
|
||||||
|
CodeLoginActivity::class.java,
|
||||||
|
Bundle().apply {
|
||||||
|
putString(
|
||||||
|
AppConfig.PHONE,
|
||||||
|
binding.etPhone.text.toString()
|
||||||
|
)
|
||||||
|
},
|
||||||
|
1
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
ToastUtils.showToast(mContext, "请输入正确手机号")
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
OneKeyLoginUtils.getInstance().oneLogin(mContext, this)
|
||||||
|
// ActivityUtils.startActivity(mContext, SelectRoleActivity::class.java)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import com.dahe.gldriver.net.DataManager
|
|||||||
import com.dahe.gldriver.net.RxHttpCallBack
|
import com.dahe.gldriver.net.RxHttpCallBack
|
||||||
import com.dahe.gldriver.oss.OssServiceUtil
|
import com.dahe.gldriver.oss.OssServiceUtil
|
||||||
import com.dahe.gldriver.ui.HomeActivity
|
import com.dahe.gldriver.ui.HomeActivity
|
||||||
|
import com.dahe.gldriver.ui.account.AuthTeamSuccActivity
|
||||||
import com.dahe.gldriver.utils.OcrUtils
|
import com.dahe.gldriver.utils.OcrUtils
|
||||||
import com.dahe.mylibrary.base.BaseActivity
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
import com.dahe.mylibrary.net.CommonResponseBean
|
import com.dahe.mylibrary.net.CommonResponseBean
|
||||||
@ -375,7 +376,7 @@ class AuthTeamActivity : BaseActivity<ActivityAuthTeamBinding>(), View.OnClickLi
|
|||||||
object : RxHttpCallBack<Any>(this@AuthTeamActivity) {
|
object : RxHttpCallBack<Any>(this@AuthTeamActivity) {
|
||||||
override fun onSuccess(t: CommonResponseBean<Any>) {
|
override fun onSuccess(t: CommonResponseBean<Any>) {
|
||||||
super.onSuccess(t)
|
super.onSuccess(t)
|
||||||
ActivityUtils.startActivity(mContext, HomeActivity::class.java)
|
ActivityUtils.startActivity(mContext, AuthTeamSuccActivity::class.java)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -192,69 +192,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
//执行中运单轨迹上传
|
|
||||||
OrderUtils.getInstance().upLocation(mContext)
|
|
||||||
|
|
||||||
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
|
||||||
if (userInfo?.isCarCaptain == "1") {//是否是车队长(0=否,1=是,9=未选择)
|
|
||||||
binding.llNotic.visibility = View.GONE
|
|
||||||
} else {
|
|
||||||
DataManager.getInstance().getDriverDocIntegrity()
|
|
||||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
|
||||||
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
|
||||||
super.onSuccess(t)
|
|
||||||
if (t == null || t.data == null)
|
|
||||||
return
|
|
||||||
if (t.data.idcardNo.isNullOrEmpty() || t.data.licenseNo.isNullOrEmpty() ||
|
|
||||||
(if (t.data.licenseType.contains("C")) false else t.data.qualificationCertificateEffectiveEnd.isNullOrEmpty()) || t.data.driverBankcardNumber.isNullOrEmpty() ||
|
|
||||||
t.data.isRealName == "0"
|
|
||||||
) {
|
|
||||||
binding.llNotic.visibility = View.VISIBLE
|
|
||||||
binding.run {
|
|
||||||
llNotic.setOnClickListener {
|
|
||||||
ActivityUtils.startActivity(
|
|
||||||
mContext,
|
|
||||||
PersonInfoActivity::class.java
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
DataManager.getInstance().getDriverExpiredDocuments()
|
|
||||||
.subscribeOn(Schedulers.io())
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.subscribe(
|
|
||||||
BaseObserver(mContext,
|
|
||||||
object : RxHttpCallBack<CardInfo>() {
|
|
||||||
override fun onSuccess(t: CommonResponseBean<CardInfo>) {
|
|
||||||
super.onSuccess(t)
|
|
||||||
if (t.data.licenseEffectiveOverdue == "1" || t.data.qualificationCertificateEffectiveOverdue == "1" || t.data.idcardEffectiveOverdue == "1") {
|
|
||||||
binding.llNotic.visibility = View.VISIBLE
|
|
||||||
binding.run {
|
|
||||||
llNotic.visibility = View.VISIBLE
|
|
||||||
btnNotic.text = "去更换"
|
|
||||||
tvNotic.text = "司机证件即将过期,请及时更换"
|
|
||||||
llNotic.setOnClickListener {
|
|
||||||
ActivityUtils.startActivity(
|
|
||||||
mContext,
|
|
||||||
PersonInfoActivity::class.java
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
binding.llNotic.visibility = View.GONE
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DataManager.getInstance().getUserInfo()
|
DataManager.getInstance().getUserInfo()
|
||||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserBean>() {
|
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserBean>() {
|
||||||
@ -265,11 +202,75 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
|
|||||||
UserUtils.instance.updateUser(mContext, t.data)
|
UserUtils.instance.updateUser(mContext, t.data)
|
||||||
|
|
||||||
//初始化安联
|
//初始化安联
|
||||||
if (t.data.auditStatus == "100003")
|
if (t.data.auditStatus == "100003") {
|
||||||
ALProcess.verification(mContext)
|
ALProcess.verification(mContext)
|
||||||
|
}
|
||||||
|
|
||||||
|
//执行中运单轨迹上传
|
||||||
|
OrderUtils.getInstance().upLocation(mContext)
|
||||||
|
|
||||||
|
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
||||||
|
if (userInfo?.isCarCaptain == "1") {//是否是车队长(0=否,1=是,9=未选择)
|
||||||
|
binding.llNotic.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
DataManager.getInstance().getDriverDocIntegrity()
|
||||||
|
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
||||||
|
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
||||||
|
super.onSuccess(t)
|
||||||
|
if (t == null || t.data == null)
|
||||||
|
return
|
||||||
|
if (t.data.idcardNo.isNullOrEmpty() || t.data.licenseNo.isNullOrEmpty() ||
|
||||||
|
(if (t.data.licenseType.contains("C")) false else t.data.qualificationCertificateEffectiveEnd.isNullOrEmpty()) || t.data.driverBankcardNumber.isNullOrEmpty() ||
|
||||||
|
t.data.isRealName == "0"
|
||||||
|
) {
|
||||||
|
binding.llNotic.visibility = View.VISIBLE
|
||||||
|
binding.run {
|
||||||
|
llNotic.setOnClickListener {
|
||||||
|
ActivityUtils.startActivity(
|
||||||
|
mContext,
|
||||||
|
PersonInfoActivity::class.java
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DataManager.getInstance().getDriverExpiredDocuments()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(
|
||||||
|
BaseObserver(mContext,
|
||||||
|
object : RxHttpCallBack<CardInfo>() {
|
||||||
|
override fun onSuccess(t: CommonResponseBean<CardInfo>) {
|
||||||
|
super.onSuccess(t)
|
||||||
|
if (t.data.licenseEffectiveOverdue == "1" || t.data.qualificationCertificateEffectiveOverdue == "1" || t.data.idcardEffectiveOverdue == "1") {
|
||||||
|
binding.llNotic.visibility = View.VISIBLE
|
||||||
|
binding.run {
|
||||||
|
llNotic.visibility = View.VISIBLE
|
||||||
|
btnNotic.text = "去更换"
|
||||||
|
tvNotic.text = "司机证件即将过期,请及时更换"
|
||||||
|
llNotic.setOnClickListener {
|
||||||
|
ActivityUtils.startActivity(
|
||||||
|
mContext,
|
||||||
|
PersonInfoActivity::class.java
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
binding.llNotic.visibility = View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initRecy() {
|
private fun initRecy() {
|
||||||
|
@ -88,6 +88,8 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
|||||||
object : RxHttpCallBack<CardInfo>() {
|
object : RxHttpCallBack<CardInfo>() {
|
||||||
override fun onSuccess(t: CommonResponseBean<CardInfo>) {
|
override fun onSuccess(t: CommonResponseBean<CardInfo>) {
|
||||||
super.onSuccess(t)
|
super.onSuccess(t)
|
||||||
|
if (t == null || t.data == null)
|
||||||
|
return
|
||||||
binding.run {
|
binding.run {
|
||||||
tvNotic1.visibility =
|
tvNotic1.visibility =
|
||||||
if (t.data.idcardEffectiveOverdue == "1") View.VISIBLE else View.GONE//身份证是否过期
|
if (t.data.idcardEffectiveOverdue == "1") View.VISIBLE else View.GONE//身份证是否过期
|
||||||
|
Loading…
Reference in New Issue
Block a user