钱包提现功能调试

This commit is contained in:
lijia 2024-04-29 16:35:58 +08:00
parent 98bb7113af
commit 683d8eb283
22 changed files with 643 additions and 203 deletions

View File

@ -26,7 +26,7 @@ class RateAdapter(var isInvite: Boolean = false) :
setText(R.id.tvComName, item.realCompanyName)
setText(
R.id.tvRate,
"""交易${item.shipperPositiveReviewRate} 好评率${item.shipperTransactionVolume.toInt() * 100}%"""
"""交易${item.shipperTransactionVolume} 好评率${item.shipperPositiveReviewRate.toInt() * 100}%"""
)
val rating = getView<MaterialRatingBar>(R.id.rating)

View File

@ -8,6 +8,7 @@ import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.arpa.hndahesudintocctmsdriver.R
import com.arpa.hndahesudintocctmsdriver.utils.OrderUtils
import com.arpa.glex.bean.OrderBean
import com.arpa.hndahesudintocctmsdriver.utils.SPUtils
import com.arpa.mylibrary.utils.ImageLoader
/**
@ -40,13 +41,26 @@ class WaybillAdapter :
setText(R.id.tvCredit, """信用 ${shipperCreditRating}""")
setText(
R.id.tvRate,
"""交易 ${shipperTransactionVolume} 好评率 ${shipperPositiveReviewRate}"""
"""交易 ${item.shipperTransactionVolume} 好评率${
item.shipperPositiveReviewRate.toDoubleOrNull()
?.times(100)
}%"""
)
// setText(R.id.tvProduct, """${vehicleLength}/${vehicleType}/""")
setText(R.id.tvProduct, """${item.goodsList[0].goodItemGrossWeight}/${item.goodsList[0].goodName}""")
setText(R.id.tvProduct, """${if (item.goodsList.isNotEmpty()) item.goodsList[0].goodItemGrossWeight+"/"+ item.goodsList[0].goodName else ""}""")
setText(
R.id.tvProduct,
"""${item.goodsList[0].goodItemGrossWeight}/${item.goodsList[0].goodName}"""
)
setText(
R.id.tvProduct,
"""${if (item.goodsList.isNotEmpty()) item.goodsList[0].goodItemGrossWeight + "/" + item.goodsList[0].goodName else ""}"""
)
setText(R.id.tvModel, """${if (orderType == "0") "一装一卸" else "一装多卸"}""")
setText(R.id.btnOk, OrderUtils.getInstance().getOrderStatu(orderStatus))
setText(
R.id.btnOk,
if (SPUtils.instance.getUserInfo(context)?.isCarCaptain == "1") "去指派" else OrderUtils.getInstance()
.getOrderStatu(orderStatus)
)
ImageLoader.getInstance()
.loadRoundImage(context, avatar, 6, getView<ImageView>(R.id.imgHead))

View File

@ -30,6 +30,8 @@ class WaybillListAdapter(var isCap: Boolean) :
setText(R.id.tvGood, """${it.goodItemGrossWeight}吨/${it.goodName}""")
setText(R.id.tvMoney, it.driverFreight)
setText(R.id.tvComName, it.realCompanyName)
setText(R.id.tvRate, """交易${item.shipperTransactionVolume} 好评率${item.shipperPositiveReviewRate.toIntOrNull()
?.times(100)}%""")
setText(R.id.btnOk, OrderUtils.getInstance().getNextByStatu(it.orderStatus))
if (isCap) {

View File

@ -260,6 +260,37 @@ data class UpPersonHead(
)
/**
* 提现
* @property tradeMoney String
* @property tradeTitle String
* @constructor
*/
data class UpCashBean(
val tradeMoney: String,
val tradeTitle: String
)
data class MyLocation(
val latitude: String,
val longitude: String
)
/**
* 获取手续费配置
* @constructor
*/
data class CashConfig(
val driverBankcardNumber: String,
val driverBankcardName: String,
val driverBankcardAddress: String,
val chargeRate: String,
val minCharge: String
)

View File

@ -33,7 +33,10 @@ import com.arpa.hndahesudintocctmsdriver.bean.UpQualiInfoBean
import com.arpa.hndahesudintocctmsdriver.bean.UpRate
import com.arpa.hndahesudintocctmsdriver.bean.UpRoadInfoBean
import com.arpa.glex.bean.*
import com.arpa.hndahesudintocctmsdriver.bean.CashConfig
import com.arpa.hndahesudintocctmsdriver.bean.MyJtt
import com.arpa.hndahesudintocctmsdriver.bean.MyLocation
import com.arpa.hndahesudintocctmsdriver.bean.UpCashBean
import com.arpa.mylibrary.net.CommonResponseBean
import io.reactivex.rxjava3.core.Observable
import okhttp3.MultipartBody
@ -290,8 +293,8 @@ interface Api {
* @param orderId String
* @return Observable<CommonResponseBean<Jtt>>
*/
@GET(BASE_URL+"driver/driverWaybill/getTrafficConfigByWaybillId")
fun getTrafficConfigByWaybillId(@Query("orderId") orderId: String): Observable<CommonResponseBean<MyJtt>>
@GET(BASE_URL + "driver/driverWaybill/getTrafficConfigByWaybillId")
fun getTrafficConfigByWaybillId(@Query("orderId") orderId: String): Observable<CommonResponseBean<MyJtt>>
/**
@ -443,6 +446,19 @@ interface Api {
fun getUserDetail(): Observable<CommonResponseBean<UserDetail>>
/**
* 获取车辆轨迹
* @param orderId String
* @param carId String
* @return Observable<CommonResponseBean<MutableList<DriverBean>>>
*/
@GET(BASE_URL + "driver/order/getOrderCarLocus")
fun getOrderCarLocus(
@Query("orderId") orderId: String,
@Query("carId") carId: String
): Observable<CommonResponseBean<MutableList<MyLocation>>>
/**
*
*查询司机所在车队信息
@ -546,6 +562,22 @@ interface Api {
fun getDriverBalance(): Observable<CommonResponseBean<WalletInfo>>
/**
* 提现
* @param upCashBean UpCashBean
* @return Observable<CommonResponseBean<Any>>
*/
@POST(BASE_URL + "driver/driver/withdrawal")
fun withdrawal(@Body upCashBean: UpCashBean): Observable<CommonResponseBean<Any>>
/**
* 获取手续费配置
* @return Observable<CommonResponseBean<Any>>
*/
@GET(BASE_URL+"driver/driver/getWithdrawalsConfig")
fun getWithdrawalsConfig():Observable<CommonResponseBean<CashConfig>>
/**
* 查询司机资金流水
* @return Observable<CommonResponseBean<RateBean>>

View File

@ -131,7 +131,7 @@ class EditBankCardActivity : BaseActivity<ActivityAuthBankcardBinding>() {
DataManager.getInstance().reUpDriverBankCard(this)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>(this@EditBankCardActivity) {
override fun onSuccess(t: CommonResponseBean<Any>) {
super.onSuccess(t)
val isBack = intent.extras?.getBoolean(AppConfig.IS_BACK, false)

View File

@ -349,7 +349,7 @@ class AuthTeamActivity : BaseActivity<ActivityAuthTeamBinding>(), View.OnClickLi
if ("长期" == tvPerEnd.text.toString().trim()) {
upPerInfoBean.idcardIsEndless = "1"
} else {
upPerInfoBean.idcardEffectiveEnd = tvEnd.text.toString().trim()
upPerInfoBean.idcardEffectiveEnd = tvPerEnd.text.toString().trim()
}
//银行卡相关信息
upPerInfoBean.captainBankcardNumber = etPerBankId.text.toString().trim()

View File

@ -196,6 +196,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
//获取当前位置
getLocation()
//证件过期判断+轨迹上传判断
DataManager.getInstance().getUserInfo()
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserBean>() {

View File

@ -39,6 +39,7 @@ import com.arpa.mylibrary.net.CommonResponseBean
import com.arpa.mylibrary.utils.ActivityUtils
import com.arpa.mylibrary.utils.BaseUtils
import com.arpa.mylibrary.utils.ImageLoader
import com.arpa.mylibrary.utils.MobileInfoUtils
import com.arpa.mylibrary.utils.PhoneFormatCheckUtils
import com.arpa.mylibrary.utils.ToastUtils
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers

View File

@ -17,6 +17,8 @@ import com.arpa.glex.bean.UserDetail
import com.arpa.glex.bean.WalletInfo
import com.arpa.glex.bean.WaterInfo
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
import com.arpa.hndahesudintocctmsdriver.bean.CashConfig
import com.arpa.hndahesudintocctmsdriver.bean.UpCashBean
import com.arpa.mylibrary.base.BaseActivity
import com.arpa.mylibrary.callback.RefreshCallBack
import com.arpa.mylibrary.net.CommonResponseBean
@ -36,6 +38,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers
class WalletActivity : BaseActivity<ActivityWalletBinding>(), RefreshCallBack {
lateinit var adapter: WalletAdapter
lateinit var walletInfo: WalletInfo
override fun initView(savedInstanceState: Bundle?) {
setStatusHeightParams(binding.rlTop)
setTitleBar("钱包", true, true)
@ -43,7 +46,10 @@ class WalletActivity : BaseActivity<ActivityWalletBinding>(), RefreshCallBack {
binding.run {
setRefresh(refresh, this@WalletActivity)
tvLeft.setOnClickListener {
ActivityUtils.startActivity(mContext, EditBankCardActivity::class.java,Bundle().apply { putBoolean(AppConfig.IS_BACK,true) })
ActivityUtils.startActivity(
mContext,
EditBankCardActivity::class.java,
Bundle().apply { putBoolean(AppConfig.IS_BACK, true) })
}
tvRight.setOnClickListener {
getCurrBank()
@ -82,6 +88,7 @@ class WalletActivity : BaseActivity<ActivityWalletBinding>(), RefreshCallBack {
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<WalletInfo>() {
override fun onSuccess(t: CommonResponseBean<WalletInfo>) {
super.onSuccess(t)
walletInfo = t.data
binding.run {
tvCanCash.text = t.data.actualBal
tvAllCash.text = t.data.acctBal
@ -92,7 +99,7 @@ class WalletActivity : BaseActivity<ActivityWalletBinding>(), RefreshCallBack {
}
private fun getWaterList() {
DataManager.getInstance().selectDriverCapitalFlows(mRefreshPage,mRefreshCount)
DataManager.getInstance().selectDriverCapitalFlows(mRefreshPage, mRefreshCount)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<MutableList<WaterInfo>>() {
@ -117,19 +124,32 @@ class WalletActivity : BaseActivity<ActivityWalletBinding>(), RefreshCallBack {
* 获取当前银行卡
*/
private fun getCurrBank() {
DataManager.getInstance().getUserDetail()
if (!::walletInfo.isInitialized) {
showToast("未获取到余额信息")
return
}
// DataManager.getInstance().getUserDetail()
DataManager.getInstance().getWithdrawalsConfig()
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<CashConfig>() {
override fun onSuccess(t: CommonResponseBean<CashConfig>) {
super.onSuccess(t)
if (t.data != null && t.data.driverBankcardNumber.isNullOrEmpty()) {
ToastUtils.showToast(mContext, "请先绑定银行卡")
return
}
CommonPopUtils.getInstance().showPickMoney(mContext, t.data) {
val toDouble = it.toDouble()
ToastUtils.showToast(mContext, "值是::::$toDouble")
CommonPopUtils.getInstance().showPickMoney(mContext,walletInfo, t.data) {
DataManager.getInstance().withdrawal(UpCashBean(it, ""))
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
override fun onSuccess(t: CommonResponseBean<Any>) {
super.onSuccess(t)
mRefreshPage = 1
binding.refresh.autoRefresh()
ToastUtils.showToast(mContext, "提现成功")
}
}))
}
}
}))

View File

@ -12,6 +12,7 @@ import com.amap.api.maps.model.LatLng
import com.arpa.hndahesudintocctmsdriver.R
import com.arpa.hndahesudintocctmsdriver.adapter.WaybillNodeAdapter
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
import com.arpa.hndahesudintocctmsdriver.bean.CaptainBean
import com.arpa.hndahesudintocctmsdriver.bean.OrderDetailBean
import com.arpa.hndahesudintocctmsdriver.databinding.ActivityWaybillDetailBinding
import com.arpa.hndahesudintocctmsdriver.net.BaseObserver
@ -27,6 +28,7 @@ import com.arpa.mylibrary.recycleviewswipe.RecycleViewDivider
import com.arpa.mylibrary.utils.ActivityUtils
import com.arpa.mylibrary.utils.BaseUtils
import com.arpa.mylibrary.utils.ConvertUtils
import com.arpa.mylibrary.utils.ImageLoader
import com.arpa.mylibrary.utils.LoadingUtils
import com.arpa.mylibrary.utils.TimeUtil
import com.arpa.mylibrary.utils.ToastUtils
@ -54,10 +56,12 @@ class WaybillDetailActivity : BaseActivity<ActivityWaybillDetailBinding>() {
initRecy()
getLocation()
binding.btnReceiving.visibility = if (isCap) View.GONE else View.VISIBLE
// binding.btnReceiving.visibility = if (isCap) View.GONE else View.VISIBLE
binding.btnReceiving.text = if (isCap) "去指派" else "立即接单"
binding.btnCall.setOnClickListener {
BaseUtils.callPhone(this@WaybillDetailActivity, "15838201105")
}
binding.cvCap.visibility = if (isCap) View.VISIBLE else View.GONE
binding.btnReceiving.setOnClickListener {
if (!::orderDetailInfo.isInitialized){
ToastUtils.showToast(mContext,"请稍等,暂未获取订单信息")

View File

@ -9,9 +9,14 @@ import android.widget.Toast
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.amap.api.maps.AMap
import com.amap.api.maps.model.BitmapDescriptor
import com.amap.api.maps.model.BitmapDescriptorFactory
import com.amap.api.maps.model.LatLng
import com.amap.api.maps.model.PolylineOptions
import com.arpa.hndahesudintocctmsdriver.R
import com.arpa.hndahesudintocctmsdriver.adapter.WaybillNodeAdapter
import com.arpa.hndahesudintocctmsdriver.base.AppConfig
import com.arpa.hndahesudintocctmsdriver.bean.MyLocation
import com.arpa.hndahesudintocctmsdriver.bean.OrderDetailBean
import com.arpa.hndahesudintocctmsdriver.databinding.ActivityWaybillUnloadBinding
import com.arpa.hndahesudintocctmsdriver.net.BaseObserver
@ -292,4 +297,31 @@ class WaybillUnlLoadActivity : BaseActivity<ActivityWaybillUnloadBinding>() {
}
}
fun getCarLocation(carId:String){
DataManager.getInstance().getOrderCarLocus(orderId,carId)
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext,object : RxHttpCallBack<MutableList<MyLocation>>(){
override fun onSuccess(t: CommonResponseBean<MutableList<MyLocation>>) {
super.onSuccess(t)
//用一个数组来存放纹理
val texTuresList: MutableList<BitmapDescriptor> = mutableListOf()
texTuresList.add(BitmapDescriptorFactory.fromResource(R.drawable.icon_roud_type))
val options = PolylineOptions()
options.width(20f) //设置宽度
t.data.forEach {
options.add(LatLng(it.latitude.toDouble(),it.longitude.toDouble()))
}
//加入对应的颜色,使用setCustomTextureList 即表示使用多纹理;
//加入对应的颜色,使用setCustomTextureList 即表示使用多纹理;
options.setCustomTextureList(texTuresList)
aMap.addPolyline(options)
}
}))
}
}

View File

@ -11,9 +11,10 @@ import com.arpa.hndahesudintocctmsdriver.callback.OnResultListener
import com.arpa.hndahesudintocctmsdriver.mypop.AgreementAlert
import com.arpa.hndahesudintocctmsdriver.mypop.OnCarSelectListener
import com.arpa.hndahesudintocctmsdriver.mypop.PopBottomCar
import com.arpa.hndahesudintocctmsdriver.weight.pop.InputMoneyPop
import com.arpa.hndahesudintocctmsdriver.weight.pop.UpAppPop
import com.arpa.glex.bean.UserDetail
import com.arpa.glex.bean.WalletInfo
import com.arpa.hndahesudintocctmsdriver.bean.CashConfig
import com.arpa.hndahesudintocctmsdriver.weight.pop.InputMoneyPop2
import com.arpa.mylibrary.base.SingletonNoPHolder
import com.arpa.mylibrary.utils.ConvertUtils
import com.lxj.xpopup.XPopup
@ -178,13 +179,13 @@ class CommonPopUtils private constructor() {
* @param userInfo UserDetail
* @param listener OnInputConfirmListener
*/
fun showPickMoney(context: Context, userInfo: UserDetail, listener: OnInputConfirmListener) {
fun showPickMoney(context: Context, walletInfo:WalletInfo, cashConfig: CashConfig, listener: OnInputConfirmListener) {
XPopup.Builder(context)
.dismissOnBackPressed(true)
.dismissOnTouchOutside(true)
.asCustom(
InputMoneyPop(
context, userInfo, listener
InputMoneyPop2(
context,walletInfo, cashConfig, listener
)
)
.show()

View File

@ -1,64 +0,0 @@
package com.arpa.hndahesudintocctmsdriver.weight.pop
import android.content.Context
import android.widget.Button
import android.widget.EditText
import android.widget.TextView
import androidx.core.widget.addTextChangedListener
import com.arpa.hndahesudintocctmsdriver.R
import com.arpa.glex.bean.UserDetail
import com.lxj.xpopup.core.CenterPopupView
import com.lxj.xpopup.interfaces.OnInputConfirmListener
/**
* @ClassName InputMoneyPop
* @Author john
* @Date 2024/4/11 14:58
* @Description TODO
*/
class InputMoneyPop(
context: Context,
val userInfo: UserDetail,
val listener: OnInputConfirmListener
) :
CenterPopupView(context) {
override fun getImplLayoutId() = R.layout.pop_input_money
override fun onCreate() {
super.onCreate()
val tvName = findViewById<TextView>(R.id.tvName)
val etMoney = findViewById<EditText>(R.id.etMoney)
val btnOk = findViewById<Button>(R.id.btnOk)
tvName.text = """提现到
|${userInfo.driverBankcardAddress}${userInfo.driverBankcardNumber.substring(userInfo.driverBankcardNumber.length - 4)}
""".trimMargin()
etMoney.setSelection(etMoney.length())
etMoney.addTextChangedListener {
}
etMoney.addTextChangedListener {
if (it.toString().indexOf(".") == 0) {
etMoney.setText("0.")
etMoney.setSelection(etMoney.length())
return@addTextChangedListener
}
// if (it.toString().indexOf("0") == 0 ) {
// etMoney.setText(it.toString().substring(1))
// etMoney.setSelection(etMoney.length())
// }
// if (it.toString().isNullOrEmpty()){
// etMoney.setText("0")
// etMoney.setSelection(etMoney.length())
// }
}
btnOk.setOnClickListener {
listener.onConfirm(etMoney.text.toString().trim())
dismiss()
}
}
}

View File

@ -0,0 +1,110 @@
package com.arpa.hndahesudintocctmsdriver.weight.pop
import android.content.Context
import android.widget.Button
import android.widget.EditText
import android.widget.TextView
import androidx.core.widget.addTextChangedListener
import com.arpa.hndahesudintocctmsdriver.R
import com.arpa.glex.bean.UserDetail
import com.arpa.glex.bean.WalletInfo
import com.arpa.hndahesudintocctmsdriver.bean.CashConfig
import com.lxj.xpopup.core.BottomPopupView
import com.lxj.xpopup.core.CenterPopupView
import com.lxj.xpopup.interfaces.OnInputConfirmListener
/**
* @ClassName InputMoneyPop
* @Author john
* @Date 2024/4/11 14:58
* @Description TODO
*/
class InputMoneyPop2(
context: Context,
val walletInfo: WalletInfo,
private val cashConfig: CashConfig,
val listener: OnInputConfirmListener
) :
BottomPopupView(context) {
override fun getImplLayoutId() = R.layout.pop_input_money2
override fun onCreate() {
super.onCreate()
val tvName = findViewById<TextView>(R.id.tvName)
val tvAllCash = findViewById<TextView>(R.id.tvAllCash)
val tvRate = findViewById<TextView>(R.id.tvRate)
val tvCharge = findViewById<TextView>(R.id.tvCharge)
val tvTrueMoney = findViewById<TextView>(R.id.tvTrueMoney)
val tvBankInfo = findViewById<TextView>(R.id.tvBankInfo)
val etMoney = findViewById<EditText>(R.id.etMoney)
val btnOk = findViewById<Button>(R.id.btnOk)
// etMoney.sethintt
// tvName.text = """提现到
// |${cashConfig.driverBankcardAddress}${
// cashConfig.driverBankcardNumber.substring(
// cashConfig.driverBankcardNumber.length - 4
// )
// }
// """.trimMargin()
tvRate.text = """服务费${cashConfig.chargeRate}%"""
tvBankInfo.text = """${cashConfig.driverBankcardAddress} ${
cashConfig.driverBankcardNumber.substring(cashConfig.driverBankcardNumber.length - 4)
}"""
etMoney.setSelection(etMoney.length())
etMoney.addTextChangedListener {
}
etMoney.addTextChangedListener {
if (it.toString().indexOf(".") == 0) {
etMoney.setText("0.")
etMoney.setSelection(etMoney.length())
return@addTextChangedListener
}
val toDoubleOrNull = it.toString().toDoubleOrNull()
// val times = toDoubleOrNull?.times(cashConfig.chargeRate.toDouble())
// if (times?.minus(cashConfig.minCharge.toDouble())!! >=0){
// tvCharge.text = """${times}元"""
// }else{
// tvCharge.text = """${cashConfig.minCharge}元"""
// }
it.toString().toDoubleOrNull()?.run {
if (this==0.0){
tvCharge.text = ""
tvTrueMoney.text = ""
return@run
}
val times = times(cashConfig.chargeRate.toDouble().div(100))
var currChar: Double
if (times.minus(cashConfig.minCharge.toDouble().div(100)) >= 0) {
currChar = times
tvCharge.text = """${times}"""
} else {
currChar = cashConfig.minCharge.toDouble().div(100)
tvCharge.text = """${cashConfig.minCharge.toDouble().div(100)}"""
}
tvTrueMoney.text = minus(currChar).toString()
}
if (it.toString().toDoubleOrNull() == null) {
tvCharge.text = ""
tvTrueMoney.text = ""
}
}
btnOk.setOnClickListener {
listener.onConfirm(etMoney.text.toString().trim())
dismiss()
}
tvAllCash.setOnClickListener {
etMoney.setText(walletInfo.actualBal)
etMoney.setSelection(etMoney.text.length)
}
}
}

View File

@ -45,7 +45,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_32"
android:text="8556.52"
android:text="0"
android:textColor="@color/white"
android:textSize="@dimen/sp_24" />
@ -62,7 +62,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_114"
android:text="10556.52"
android:text="0"
android:textColor="@color/white"
android:textSize="@dimen/sp_24" />

View File

@ -492,6 +492,65 @@
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cvCap"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_15"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="@dimen/dp_8">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="@dimen/dp_16">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收款人/车队信息"
android:textColor="@color/black"
android:textSize="@dimen/sp_17"
android:textStyle="bold" />
<ImageView
android:id="@+id/ivCapHead"
android:layout_width="@dimen/dp_42"
android:layout_height="@dimen/dp_42"
android:layout_marginTop="@dimen/dp_40"
android:background="@drawable/head_defaut" />
<TextView
android:id="@+id/tvCapName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_40"
android:layout_toRightOf="@+id/ivCapHead"
android:text="李师傅的车队"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<TextView
android:id="@+id/tvCapPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/ivCapHead"
android:layout_marginLeft="@dimen/dp_10"
android:layout_toRightOf="@+id/ivCapHead"
android:text="155****5645"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="0dp"
android:layout_height="@dimen/dp_10"

View File

@ -552,7 +552,64 @@
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cvCap"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_15"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="@dimen/dp_8">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="@dimen/dp_16">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收款人/车队信息"
android:textColor="@color/black"
android:textSize="@dimen/sp_17"
android:textStyle="bold" />
<ImageView
android:id="@+id/ivCapHead"
android:layout_width="@dimen/dp_42"
android:layout_height="@dimen/dp_42"
android:layout_marginTop="@dimen/dp_40"
android:background="@drawable/head_defaut" />
<TextView
android:id="@+id/tvCapName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_40"
android:layout_toRightOf="@+id/ivCapHead"
android:text="李师傅的车队"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<TextView
android:id="@+id/tvCapPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/ivCapHead"
android:layout_marginLeft="@dimen/dp_10"
android:layout_toRightOf="@+id/ivCapHead"
android:text="155****5645"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="0dp"

View File

@ -587,6 +587,65 @@
</RelativeLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cvCap"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_15"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="@dimen/dp_8">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:padding="@dimen/dp_16">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收款人/车队信息"
android:textColor="@color/black"
android:textSize="@dimen/sp_17"
android:textStyle="bold" />
<ImageView
android:id="@+id/ivCapHead"
android:layout_width="@dimen/dp_42"
android:layout_height="@dimen/dp_42"
android:layout_marginTop="@dimen/dp_40"
android:background="@drawable/head_defaut" />
<TextView
android:id="@+id/tvCapName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_40"
android:layout_toRightOf="@+id/ivCapHead"
android:text="李师傅的车队"
android:textColor="@color/black"
android:textSize="@dimen/sp_15" />
<TextView
android:id="@+id/tvCapPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/ivCapHead"
android:layout_marginLeft="@dimen/dp_10"
android:layout_toRightOf="@+id/ivCapHead"
android:text="155****5645"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<View
android:layout_width="0dp"
android:layout_height="@dimen/dp_10"

View File

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_blue_12"
android:orientation="vertical"
android:paddingTop="@dimen/dp_20"
android:paddingBottom="@dimen/dp_20">
<TextView
android:id="@+id/tvName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_28"
android:layout_marginTop="@dimen/dp_11"
android:text="提现到\n招商银行3002"
android:textColor="#ffffffff"
android:textSize="@dimen/sp_18" />
<EditText
android:id="@+id/etMoney"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_28"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginRight="@dimen/dp_28"
android:background="@null"
android:digits="0123456789."
android:gravity="center"
android:paddingTop="@dimen/dp_10"
android:paddingBottom="@dimen/dp_10"
android:inputType="numberDecimal"
android:maxLength="6"
android:maxLines="1"
android:singleLine="true"
android:text="0"
android:textColor="#ffffffff"
android:textSize="@dimen/dp_26" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_28"
android:layout_marginRight="@dimen/dp_30"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="费率"
android:textColor="#ffffffff"
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tvFl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textColor="#ffffffff"
android:textSize="@dimen/sp_12"
tools:text="0.10% (最低¥0.10)" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginRight="@dimen/dp_30"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:text="提示:"
android:textColor="#ffffffff"
android:textSize="@dimen/sp_12" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="服务费为银行收取,实际到账金额=提现金额-服务费"
android:textColor="#ffffffff"
android:textSize="@dimen/sp_12" />
</LinearLayout>
<Button
android:id="@+id/btnOk"
android:layout_width="@dimen/dp_230"
android:layout_height="@dimen/dp_44"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_34"
android:background="@drawable/shape_white_8"
android:text="确认提现"
android:textColor="@color/black"
android:textSize="@dimen/sp_18" />
</LinearLayout>

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_white_12"
android:orientation="vertical"
android:paddingLeft="@dimen/dp_20"
android:paddingTop="@dimen/dp_30"
android:paddingRight="@dimen/dp_20"
android:paddingBottom="@dimen/dp_30">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请输入提现金额"
android:textColor="@color/black"
android:textSize="@dimen/sp_18" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="@dimen/dp_20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="¥"
android:textSize="@dimen/sp_25"
android:textColor="@color/black"
/>
<EditText
android:id="@+id/etMoney"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:background="@null"
android:digits="0123456789."
android:inputType="numberDecimal"
android:maxLength="6"
android:maxLines="1"
android:paddingTop="@dimen/dp_10"
android:paddingBottom="@dimen/dp_10"
android:singleLine="true"
tools:text="123123"
android:hint="请输入提现金额"
android:textColor="@color/black"
android:textSize="@dimen/dp_30" />
<TextView
android:id="@+id/tvAllCash"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="全部提现"
android:textColor="@color/main_red"
android:textSize="@dimen/sp_14"
/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="@dimen/dp_15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/tvRate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="服务费 0.1%"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tvCharge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="1.0元"
android:textColor="@color/black"
android:textSize="@dimen/sp_14" />
</LinearLayout>
<LinearLayout
android:layout_marginTop="@dimen/dp_15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="342dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="实际到账"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tvTrueMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="999.0元"
android:textColor="@color/black"
android:textSize="@dimen/sp_14" />
</LinearLayout>
<TextView
android:layout_marginTop="@dimen/dp_22"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="提示:服务费为银行收取,实际到账金额=提现金额-服务费"
android:textSize="@dimen/sp_12"
android:textColor="@color/main_red"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_52"
android:orientation="horizontal"
android:background="@drawable/shape_gray_5"
android:layout_marginTop="@dimen/dp_15"
android:gravity="center_vertical"
android:paddingLeft="@dimen/dp_14"
android:paddingRight="@dimen/dp_14"
>
<TextView
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="到账银行卡"
android:textColor="@color/black"
android:textSize="@dimen/sp_18"
/>
<TextView
android:id="@+id/tvBankInfo"
android:maxLines="1"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="农业银行 5630"
android:textColor="@color/black"
android:textSize="@dimen/sp_18"
/>
</LinearLayout>
<Button
android:layout_marginTop="@dimen/dp_38"
android:id="@+id/btnOk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_btn"
android:text="立即提现"
android:textColor="@color/white"
android:textSize="@dimen/sp_17"/>
</LinearLayout>
</LinearLayout>

View File

@ -20,12 +20,31 @@ public class MobileInfoUtils {
//获取手机类型
private static String getMobileType() {
public static String getMobileType() {
return Build.MANUFACTURER;
}
/**
* 获取手机厂商
*
* @return 手机厂商
*/
public static String getDeviceBrand() {
return android.os.Build.BRAND;
}
/**
* 获取当前手机系统版本号
*
* @return 系统版本号
*/
public static String getSystemVersion() {
return android.os.Build.VERSION.RELEASE;
}
//跳转至授权页面
public void jumpStartInterface(Context context) {