派车弹窗

This commit is contained in:
lijia 2024-10-24 10:14:27 +08:00
parent 1dae6c840f
commit 8f1c7b93ce
18 changed files with 633 additions and 225 deletions

View File

@ -4,8 +4,10 @@ import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.dahe.glex.bean.OrderBean
import com.dahe.glex.bean.WayBillBean
import com.dhsd.glowner.R
import com.dhsd.glowner.utils.OrderUtils
/**
* @ClassName WaybillAdapter
@ -14,9 +16,33 @@ import com.dhsd.glowner.R
* @Description TODO
*/
class WaybillAdapter :
BaseQuickAdapter<WayBillBean, QuickViewHolder>() {
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: WayBillBean?) {
BaseQuickAdapter<OrderBean, QuickViewHolder>() {
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: OrderBean?) {
item?.run {
holder.run {
setText(
R.id.tvStart,
"""${
if (loadingCity.length > 1) loadingCity.substring(0, 2) else loadingCity
} ${if (loadingArea.length > 1) loadingArea.substring(0, 2) else loadingArea}"""
)
setText(
R.id.tvEnd, """${
if (receiverCity.length > 1) receiverCity.substring(0, 2) else receiverCity
} ${
if (receiverArea.length > 1) receiverArea.substring(0, 2) else receiverArea
}"""
)
setText(R.id.tvModel, """${if (item.orderType == "0") "一装一卸" else "一装多卸"}""")
setText(R.id.tvMoney, driverFreight)
setText(R.id.tvDate, loadingDeadline)
setText(R.id.tvStatus, OrderUtils.getInstance().getOrderStatu(orderStatus))
setGone(R.id.btnCancel, true)
setGone(R.id.btnOk, !("102020" == orderStatus || "102030" == orderStatus))
}
}
}
override fun onCreateViewHolder(

View File

@ -0,0 +1,40 @@
package com.dhsd.glowner.adapter.popadapter
import android.content.Context
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.dhsd.glowner.R
import com.dhsd.glowner.bean.PopBean
/**
* @ClassName WaybillAdapter
* @Author 用户
* @Date 2024/1/23 16:27
* @Description TODO
*/
class SelectDisTypeAdapter() :
BaseQuickAdapter<PopBean, QuickViewHolder>() {
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: PopBean?) {
holder.run {
setText(R.id.tvTitle, item?.title)
setText(R.id.tvSub, item?.sub)
item?.isSelect?.let {
setSelected(R.id.llContent,it)
setTextColorRes(R.id.tvTitle, if (it) R.color.main_red else R.color.black)
setTextColorRes(R.id.tvSub, if (it) R.color.main_red else com.dahe.mylibrary.R.color.color_9 )
}
}
}
override fun onCreateViewHolder(
context: Context,
parent: ViewGroup,
viewType: Int
): QuickViewHolder {
// 返回一个 ViewHolder
return QuickViewHolder(R.layout.item_dis_type, parent)
}
}

View File

@ -10,21 +10,103 @@ package com.dahe.glex.bean
data class OrderListBean(
var rows: List<OrderBean>
)
data class TextOrder(val orderId: String)
data class OrderBean(
var orderId: String,
var waybillId: String,
var orderNum: String,
var waybillNum: String,
var orderTime: String,
var totalFreight: String,
var dispatchType : Int,
var effectiveTime: String,
var sendPut: String,
var distance: String,
var loadingAddress: String,
var receiverAddress: String,
var waybillStatus: Int,
var evaluation: Int,
var complaint: Int,
var multipleScore: String,
val acceptTime: String,
val alctGoodsType: String,
val auditStatus: String,
val auditTime: String,
val auditUser: String,
val automaticAudit: String,
val bankCardNo: String,
val bankName: String,
val bankOpenBank: String,
val bankSequenceCode: String,
val bankUserName: String,
val businessType: String,
val capitalStatus: String,
val createBy: String,
val createDate: String,
val createTime: String,
val deptAncestors: String,
val deptId: String,
val direction: String,
val dispatchStatus: String,
val dispatchType: String,
val distance: Double,
val driverFreight: String,
val driverTax: String,
val driverTaxFreight: String,
val effectiveTimeEnd: String,
val effectiveTimeStart: String,
val estimatedProfit: Double,
val etcCost: String,
val failedReason: String,
val finishTime: String,
val goodsBigCate: String,
val goodsValue: String,
val inputFreight: String,
val insuranceCosts: String,
val insurancePremiumRate: String,
val insureAmount: String,
val isDeleted: String,
val isInsure: String,
val loadingAddress: String,
val loadingArea: String,
val loadingAreaCode: String,
val loadingBusinessCode: String,
val loadingBusinessName: String,
val loadingCity: String,
val loadingCityCode: String,
val loadingDeadline: String,
val loadingName: String,
val loadingPhone: String,
val loadingProvince: String,
val loadingProvinceCityArea: String,
val loadingProvinceCode: String,
val motorcadeRatio: String,
val motorcadeTotalFreight: String,
val namedDrivers: String,
val noShipperCar: String,
val oliCost: String,
val orderId: String,
val orderNum: String,
val orderStatus: String,
val orderType: String,
val otherCost: String,
val passingPoStringsNum: String,
val platformRatio: String,
val platformTotalFreight: String,
val receiverAddress: String,
val receiverArea: String,
val receiverAreaCode: String,
val receiverBusinessCode: String,
val receiverBusinessName: String,
val receiverCity: String,
val receiverCityCode: String,
val receiverDeadline: String,
val receiverIdcard: String,
val receiverName: String,
val receiverPhone: String,
val receiverProvince: String,
val receiverProvinceCityArea: String,
val receiverProvinceCode: String,
val remark: String,
val report: String,
val reportAlct: String,
val reportStatus: String,
val requirement: String,
val settleStatus: String,
val settleTime: String,
val shipperCaptainId: String,
val shipperCarId: String,
val shipperDriverId: String,
val shipperId: String,
val submitTime: String,
val totalFreight: String,
val updateBy: String,
val updateTime: String,
val vehicleLength: String,
val vehicleType: String
)

View File

@ -0,0 +1,9 @@
package com.dhsd.glowner.bean
/**
* @ClassName PopBean
* @Author john
* @Date 2024/10/24 09:32
* @Description TODO
*/
data class PopBean(val title:String, val sub:String, var isSelect:Boolean = false)

View File

@ -0,0 +1,95 @@
package com.dhsd.glowner.cuspop
import android.content.Context
import android.graphics.Color
import android.widget.Button
import android.widget.LinearLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.dahe.mylibrary.recycleviewswipe.RecycleViewDivider
import com.dahe.mylibrary.utils.ConvertUtils
import com.dhsd.glowner.R
import com.dhsd.glowner.adapter.popadapter.SelectDisTypeAdapter
import com.dhsd.glowner.bean.PopBean
import com.lxj.xpopup.core.BottomPopupView
/**
* @ClassName PopBottomPic
* @Author john
* @Date 2024/1/31 11:11
* @Description TODO
*/
class PopBottomCar(
context: Context,
cars: MutableList<PopBean>,
onCarSelectListener: OnCarSelectListener
) : BottomPopupView(context) {
private var cars: MutableList<PopBean>
private var listener: OnCarSelectListener
private var currCar: PopBean? = null
init {
this.listener = onCarSelectListener
this.cars = cars
}
override fun getImplLayoutId() = R.layout.choice_car
override fun onCreate() {
super.onCreate()
var recycler = findViewById<RecyclerView>(R.id.recycler)
var btnOk = findViewById<Button>(R.id.btnOk)
// cars.find { if (isCap) (it.carId == selCarId && it.driverId == selDriverId) else it.carId == selCarId }
// ?.run {
// isSelect = true
// currCar = this
// }
initRecycle(recycler)
btnOk.setOnClickListener {
if (currCar == null) {
dismiss()
return@setOnClickListener
}
if (listener != null) {
listener.onResult(currCar!!, cars.indexOf(currCar!!))
dismiss()
}
}
}
private fun initRecycle(recycler: RecyclerView) {
recycler.run {
layoutManager = LinearLayoutManager(context, RecyclerView.VERTICAL, false)
setHasFixedSize(true)
addItemDecoration(
RecycleViewDivider(
LinearLayout.VERTICAL,
ConvertUtils.dp2px(10.0f),
Color.TRANSPARENT
)
)
adapter = SelectDisTypeAdapter()
(adapter as SelectDisTypeAdapter).submitList(cars)
(adapter as SelectDisTypeAdapter)
}.run {
setOnItemClickListener() { adapter, view, position ->
currCar = items[position]
items.find { it.isSelect }?.isSelect = false
items[position].isSelect = true
notifyDataSetChanged()
}
}
}
}
fun interface OnCarSelectListener {
fun onResult(result: PopBean, position: Int)
}

View File

@ -7,6 +7,7 @@ import io.reactivex.rxjava3.core.Observable
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
/**
@ -47,10 +48,10 @@ interface Api {
fun login(@Body bean: LoginBean): Observable<CommonResponseBean<UserBean>>
@GET(BASE_URL+"devApi/business/shipper/order/list")
fun getOrderList(): Observable<CommonResponseBean<MutableList<OrderBean>>>
fun getOrderList(): Observable<CommonResponseBean<OrderListBean>>
@GET(BASE_URL+"devApi/business/shipper/order/list")
fun getOrderList2(): Observable<CommonResponseBean<OrderListBean>>
@PUT(BASE_URL+"devApi/business/shipper/order/cancelSourceOfOrder")
fun cancelSourceOfOrder(@Body bean: TextOrder): Observable<CommonResponseBean<Any>>
}

View File

@ -1,5 +1,3 @@
import android.accounts.NetworkErrorException
import android.app.Activity
import android.app.ProgressDialog
@ -10,6 +8,7 @@ import android.view.Window
import com.dahe.mylibrary.net.CommonResponseBean
import com.dahe.mylibrary.net.ResultException
import com.dahe.mylibrary.utils.ToastUtils
import com.scwang.smart.refresh.layout.SmartRefreshLayout
import java.net.ConnectException
import java.net.SocketTimeoutException
import java.net.UnknownHostException
@ -21,6 +20,7 @@ import javax.net.ssl.SSLException
*/
abstract class RxHttpCallBack<T> {
private var dialog: ProgressDialog? = null
private var refresh: SmartRefreshLayout? = null
private fun initDialog(activity: Activity, dialogMessage: String) {
dialog = ProgressDialog(activity)
dialog!!.requestWindowFeature(Window.FEATURE_NO_TITLE)
@ -30,14 +30,20 @@ abstract class RxHttpCallBack<T> {
}
constructor(activity: Activity, dialogMessage: String?) {
initDialog(activity,
(if (TextUtils.isEmpty(dialogMessage)) "网络请求中......" else dialogMessage)!!)
initDialog(
activity,
(if (TextUtils.isEmpty(dialogMessage)) "网络请求中......" else dialogMessage)!!
)
}
constructor(activity: Activity) {
initDialog(activity, "网络请求中......")
}
constructor(refresh: SmartRefreshLayout) {
this.refresh = refresh
}
constructor() {}
/**
@ -65,6 +71,8 @@ abstract class RxHttpCallBack<T> {
if (dialog != null && dialog!!.isShowing) {
dialog!!.dismiss()
}
refresh?.finishRefresh()
refresh?.finishLoadMore()
}
/**
@ -77,6 +85,8 @@ abstract class RxHttpCallBack<T> {
if (dialog != null && dialog!!.isShowing) {
dialog!!.dismiss()
}
refresh?.finishRefresh()
refresh?.finishLoadMore()
if (t.code == 401) {
instance.loginOut(mContext!!)
// Intent intent = new Intent(mContext, LoginActivity.class);
@ -104,6 +114,8 @@ abstract class RxHttpCallBack<T> {
if (dialog != null && dialog!!.isShowing) {
dialog!!.dismiss()
}
refresh?.finishRefresh()
refresh?.finishLoadMore()
if (e is ConnectException
|| e is TimeoutException
|| e is SocketTimeoutException

View File

@ -3,14 +3,14 @@ package com.dhsd.glowner.ui.home
import BaseObserver
import DataManager
import RxHttpCallBack
import android.content.Context
import android.graphics.Color
import android.widget.LinearLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.dahe.gldriver.bean.GridBean
import com.chad.library.adapter4.BaseQuickAdapter
import com.dahe.glex.bean.OrderBean
import com.dahe.glex.bean.OrderListBean
import com.dahe.glex.bean.TextOrder
import com.dahe.glex.bean.WayBillBean
import com.dahe.mylibrary.base.BaseFragment
import com.dahe.mylibrary.callback.RefreshCallBack
@ -20,10 +20,12 @@ import com.dahe.mylibrary.utils.ActivityUtils
import com.dahe.mylibrary.utils.ConvertUtils
import com.dahe.mylibrary.utils.ToastUtils
import com.dhsd.glowner.R
import com.dhsd.glowner.adapter.GridItemAdapter
import com.dhsd.glowner.adapter.WaybillAdapter
import com.dhsd.glowner.bean.PopBean
import com.dhsd.glowner.cuspop.OnCarSelectListener
import com.dhsd.glowner.databinding.FragmentHomeBinding
import com.dhsd.glowner.ui.home.activtiy.SendGoodsActivity
import com.dhsd.glowner.utils.CommonPopUtils
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.schedulers.Schedulers
@ -34,7 +36,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers
* @Description TODO
*/
class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
lateinit var adapter: WaybillAdapter
override fun onFragmentVisibleChange(isVisible: Boolean) {
if (isVisible) {
}
@ -74,7 +76,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
WayBillBean(),
WayBillBean()
)
var adapter = binding.recyclerView.run {
adapter = binding.recyclerView.run {
layoutManager = LinearLayoutManager(mContext, RecyclerView.VERTICAL, false)
setHasFixedSize(true)
addItemDecoration(
@ -92,52 +94,53 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>(), RefreshCallBack {
}
addOnItemChildClickListener(R.id.btnOk) { adapter, view, position ->
// ActivityUtils.startActivity(mContext, WaybillDetailActivity::class.java)
CommonPopUtils.getInstance().showCarList(mContext
) { _, position ->
showToast(position.toString())
}
}
addOnItemChildClickListener(R.id.btnCancel) { adapter, view, position ->
val item = adapter.getItem(position) as OrderBean
DataManager.getInstance().cancelSourceOfOrder(TextOrder(item.orderId)).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext,object : RxHttpCallBack<Any>(){
override fun onSuccess(t: CommonResponseBean<Any>) {
super.onSuccess(t)
showToast(t.msg)
}
}))
}
}
adapter.submitList(datas)
// adapter.submitList(datas)
}
private fun initData() {
// DataManager.getInstance().getOrderList()
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(BaseObserver(mContext,object :RxHttpCallBack<MutableList<OrderBean>>(){
// override fun onSuccess(t: CommonResponseBean<MutableList<OrderBean>>) {
// super.onSuccess(t)
// showToast(t.rows.size.toString())
// }
//
// override fun onCodeError(
// mContext: Context?,
// t: CommonResponseBean<MutableList<OrderBean>>
// ) {
// super.onCodeError(mContext, t)
// binding.refresh.finishRefresh()
// binding.refresh.finishLoadMore()
// }
// }))
DataManager.getInstance().getOrderList2()
DataManager.getInstance().getOrderList()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(BaseObserver(mContext,object :RxHttpCallBack<OrderListBean>(){
.subscribe(BaseObserver(mContext,object :RxHttpCallBack<OrderListBean>(binding.refresh){
override fun onSuccess(t: CommonResponseBean<OrderListBean>) {
super.onSuccess(t)
showToast(t.data.rows.size.toString())
binding.refresh.finishRefresh()
binding.refresh.finishLoadMore()
initList(t.data.rows)
}
override fun onCodeError(
mContext: Context?,
t: CommonResponseBean<OrderListBean>
) {
super.onCodeError(mContext, t)
binding.refresh.finishRefresh()
binding.refresh.finishLoadMore()
}
}))
}
private fun initList(rows: List<OrderBean>) {
if (rows.isEmpty()){
adapter.setStateViewLayout(mContext, R.layout.empty_view)
}else{
if (mRefreshPage===1){
adapter?.submitList(rows)
}else{
adapter?.addAll(rows)
}
}
}
}

View File

@ -0,0 +1,51 @@
package com.dhsd.glowner.utils
import android.content.Context
import android.graphics.Color
import android.widget.ImageView
import androidx.recyclerview.widget.RecyclerView
import com.dahe.mylibrary.base.SingletonNoPHolder
import com.dhsd.glowner.bean.PopBean
import com.dhsd.glowner.cuspop.OnCarSelectListener
import com.dhsd.glowner.cuspop.PopBottomCar
import com.lxj.xpopup.XPopup
import com.lxj.xpopup.interfaces.OnConfirmListener
import com.lxj.xpopup.interfaces.OnInputConfirmListener
import com.lxj.xpopup.util.SmartGlideImageLoader
/**
* @ClassName CommonPopUtils
* @Author john
* @Date 2024/3/5 15:48
* @Description TODO
*/
class CommonPopUtils private constructor() {
companion object : SingletonNoPHolder<CommonPopUtils>(::CommonPopUtils)
/**
* 选择车辆
* */
fun showCarList(
context: Context,
listener: OnCarSelectListener
) {
val mutableListOf = mutableListOf<PopBean>()
mutableListOf.add(PopBean("直接指派", "直接指派司机和车辆,运费结算给司机", true))
mutableListOf.add(PopBean("车队指派", "车队进行指派或者直接指派车队的车辆,运费结算给车队长", false))
mutableListOf.add(PopBean("抢单模式", "由平台的司机和车队长自行抢单", false))
XPopup.Builder(context)
.isViewMode(true)
// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
.asCustom(PopBottomCar(context, mutableListOf, listener))
.show()
}
}

View File

@ -0,0 +1,74 @@
package com.dhsd.glowner.utils
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
import com.dahe.mylibrary.base.SingletonNoPHolder
import com.google.gson.Gson
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.schedulers.Schedulers
/**
* @ClassName OrderUtils
* @Author john
* @Date 2024/3/4 14:48
* @Description 订单状态转换
*/
class OrderUtils private constructor() {
companion object : SingletonNoPHolder<OrderUtils>(::OrderUtils)
fun getOrderStatu(statu: String): String {
return when (statu) {
"102010" -> "草稿箱"
"102020" -> "待调度"
"102030" -> "待接单"
"102040" -> "待装货"
"102050" -> "待卸货"
"102060" -> "待签收"
"102070" -> "待结算"
"102090" -> "已完成"
"103000" -> "已取消"
else -> {
""
}
}
}
fun getNextByStatu(statu: String): String {
return when (statu) {
"102010" -> "草稿箱"
"102020" -> "待调度"
"102030" -> "去接单"
"102040" -> "去装货"
"102050" -> "去卸货"
"102060" -> "去评价"
"102070" -> "去评价"
"102090" -> "去评价"
"103000" -> "已取消"
else -> {
""
}
}
}
fun getStatuByString(statu: String): String {
return when (statu) {
"草稿箱" -> "102010"
"待调度" -> "102020"
"待接单" -> "102030"
"待装货" -> "102040"
"待卸货" -> "102050"
"待签收" -> "102060"
"待结算" -> "102070"
"待评价" -> "102080"
"已取消" -> "103000"
else -> {
""
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_gray_5" android:state_selected="false"></item>
<item android:drawable="@drawable/shape_select_5" android:state_selected="true"></item>
<item android:drawable="@drawable/shape_gray_5"></item>
</selector>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="#FAAE90"
android:startColor="#FFE1D5"
android:type="linear"
android:useLevel="true" />
<corners
android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp" />
</shape>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_bai"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_20"
android:text="选择车辆"
android:textColor="@color/black"
android:textSize="@dimen/sp_18" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12" />
<Button
android:id="@+id/btnOk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_20"
android:background="@drawable/shape_ok_bg"
android:text="立即发货"
android:textColor="@color/white"
android:textSize="@dimen/sp_17" />
</LinearLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_210"
android:layout_height="@dimen/dp_210"
android:background="@drawable/empty_content" />
</LinearLayout>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/llContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/select_car_bg"
android:orientation="vertical"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_10"
android:paddingRight="@dimen/dp_15"
android:paddingBottom="@dimen/dp_10">
<TextView
android:id="@+id/tvTitle"
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/tvSub"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="直接指派司机和车辆,运费结算给司机"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_12" />
</LinearLayout>

View File

@ -3,8 +3,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_waybill_item_bg"
android:padding="@dimen/dp_16"
android:orientation="vertical">
android:orientation="vertical"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:paddingTop="@dimen/dp_16"
>
<RelativeLayout
@ -19,7 +22,7 @@
android:text="郑州 高新"
android:textColor="@color/black"
android:textSize="@dimen/sp_20"
android:textStyle="bold"/>
android:textStyle="bold" />
<ImageView
android:id="@+id/imageGo"
@ -29,7 +32,7 @@
android:layout_marginTop="@dimen/sp_10"
android:layout_marginRight="@dimen/dp_8"
android:layout_toRightOf="@+id/tvStart"
android:background="@drawable/go_right"/>
android:background="@drawable/go_right" />
<TextView
android:id="@+id/tvEnd"
@ -39,18 +42,39 @@
android:text="郑州 高新"
android:textColor="@color/black"
android:textSize="@dimen/sp_20"
android:textStyle="bold"/>
android:textStyle="bold" />
<TextView
android:id="@+id/tvStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tvEnd"
android:layout_marginBottom="@dimen/dp_2"
android:layout_alignParentRight="true"
android:text="待派车"
android:textColor="@color/main_red"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />
<TextView
android:id="@+id/tvDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tvProduct"
android:layout_alignParentRight="true"
android:text="2024-06-06" />
<TextView
android:layout_marginTop="@dimen/dp_4"
android:id="@+id/tvProduct"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvStart"
android:layout_marginTop="@dimen/dp_4"
android:text="6米/厢式/20吨/螺纹钢"
android:textColor="@color/color_6"
android:textSize="@dimen/sp_14"/>
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/tvModel"
@ -58,15 +82,17 @@
android:layout_height="wrap_content"
android:layout_below="@+id/tvProduct"
android:layout_marginTop="@dimen/dp_6"
android:text="一装一卸 今天装货"
android:text="一装一卸"
android:textColor="@color/color_6"
android:textSize="@dimen/sp_14"/>
android:textSize="@dimen/sp_14" />
<LinearLayout
android:id="@+id/llMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/tvModel"
android:layout_marginTop="@dimen/dp_10"
android:orientation="horizontal">
<TextView
@ -77,7 +103,7 @@
android:text="2000"
android:textColor="@color/money_color"
android:textSize="@dimen/sp_22"
android:textStyle="bold"/>
android:textStyle="bold" />
<TextView
android:id="@+id/tvMUnit"
@ -87,64 +113,42 @@
android:layout_marginLeft="@dimen/dp_2"
android:layout_toRightOf="@+id/tvMoney"
android:text="元/趟"
android:textColor="@color/money_color"/>
android:textColor="@color/money_color" />
</LinearLayout>
<TextView
android:id="@+id/tvDis"
android:layout_marginTop="@dimen/dp_6"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_46"
android:layout_alignTop="@+id/llMoney"
android:layout_alignParentRight="true"
android:layout_below="@+id/llMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="大约50km"
android:textColor="@color/color_9"
android:textSize="@dimen/sp_13"/>
android:orientation="horizontal">
<ImageView
android:id="@+id/imgHead"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:layout_below="@+id/tvModel"
android:layout_marginTop="@dimen/dp_10"
android:background="@color/color_9"/>
<Button
android:id="@+id/btnCancel"
android:layout_width="@dimen/dp_74"
android:layout_height="@dimen/dp_30"
android:layout_alignTop="@+id/imgHead"
android:layout_alignParentRight="true"
android:background="@drawable/shape_orange_5"
android:text="取消货源"
android:textColor="#ffff4a02"
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tvCom"
android:layout_toRightOf="@+id/imgHead"
android:layout_alignTop="@+id/imgHead"
android:layout_marginLeft="@dimen/dp_8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_14"
android:textColor="@color/black"
android:text="双汇食品有限公司"
/>
<Button
android:id="@+id/btnOk"
android:layout_width="@dimen/dp_74"
android:layout_height="@dimen/dp_30"
android:layout_alignTop="@+id/imgHead"
android:layout_alignParentRight="true"
android:layout_marginLeft="@dimen/dp_6"
android:background="@drawable/shape_ok_bg"
android:text="立即派车"
android:textColor="@color/white"
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tvRate"
android:layout_toRightOf="@+id/imgHead"
android:layout_alignBottom="@+id/imgHead"
android:layout_marginLeft="@dimen/dp_8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_12"
android:textColor="@color/color_9"
android:text="交易 200 好评率80%"
/>
</LinearLayout>
<Button
android:id="@+id/btnOk"
android:layout_width="@dimen/dp_74"
android:layout_height="@dimen/dp_30"
android:layout_alignTop="@+id/imgHead"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_4"
android:background="@drawable/shape_ok_bg"
android:text="立即派车"
android:textColor="@color/white"
android:textSize="@dimen/sp_15"
android:textStyle="bold"/>
</RelativeLayout>
</LinearLayout>

View File

@ -1,100 +0,0 @@
package com.dahe.mylibrary.bean;
import java.io.Serializable;
public class CarBean implements Serializable {
// private String approved_load;
// private String driver_name;
// private String current_load;
// private String car_number;
// private String outline_wide;
// private String outline_long;
// private String driver_phone;
// private Integer car_id;
// private String outline_high;
private boolean isSelect;
private String vehicle;
private String carId;
private String outlineWide;
private String outlineHigh;
private String outlineLong;
private String approvedLoad;
private String driverName;
private String driverPhone;
public String getVehicle() {
return vehicle;
}
public void setVehicle(String vehicle) {
this.vehicle = vehicle;
}
public String getCarId() {
return carId;
}
public void setCarId(String carId) {
this.carId = carId;
}
public String getOutlineWide() {
return outlineWide;
}
public void setOutlineWide(String outlineWide) {
this.outlineWide = outlineWide;
}
public String getOutlineHigh() {
return outlineHigh;
}
public void setOutlineHigh(String outlineHigh) {
this.outlineHigh = outlineHigh;
}
public String getOutlineLong() {
return outlineLong;
}
public void setOutlineLong(String outlineLong) {
this.outlineLong = outlineLong;
}
public String getApprovedLoad() {
return approvedLoad;
}
public void setApprovedLoad(String approvedLoad) {
this.approvedLoad = approvedLoad;
}
public String getDriverName() {
return driverName;
}
public void setDriverName(String driverName) {
this.driverName = driverName;
}
public String getDriverPhone() {
return driverPhone;
}
public void setDriverPhone(String driverPhone) {
this.driverPhone = driverPhone;
}
public boolean isSelect() {
return isSelect;
}
public void setSelect(boolean select) {
isSelect = select;
}
}