feat: dev
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package com.lukouguoji.gnc.page.inspection
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gnc.R
|
||||
import com.lukouguoji.gnc.databinding.ActivityGncInspectionBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国内出港收运检查列表页
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GNC_INSPECTION)
|
||||
class GncInspectionActivity :
|
||||
BaseBindingActivity<ActivityGncInspectionBinding, GncInspectionViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gnc_inspection
|
||||
|
||||
override fun viewModelClass() = GncInspectionViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港收运审核")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 绑定分页逻辑
|
||||
viewModel.pageModel
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH)
|
||||
.observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始化代理列表
|
||||
viewModel.initAgentList()
|
||||
|
||||
// 初始加载
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, GncInspectionActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.lukouguoji.gnc.page.inspection
|
||||
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import com.lukouguoji.gnc.databinding.ItemGncInspectionBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GncInspectionBean
|
||||
|
||||
/**
|
||||
* 国内出港收运检查列表 ViewHolder
|
||||
*/
|
||||
class GncInspectionViewHolder(view: View) :
|
||||
BaseViewHolder<GncInspectionBean, ItemGncInspectionBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item)!!
|
||||
binding.bean = bean
|
||||
|
||||
// 点击checkbox切换选中状态
|
||||
binding.ivIcon.setOnClickListener {
|
||||
bean.checked.set(!bean.checked.get())
|
||||
}
|
||||
|
||||
// 根据审核状态设置颜色
|
||||
when (bean.auditStatusName) {
|
||||
"已通过" -> binding.tvStatus.setTextColor(Color.parseColor("#4CAF50")) // 绿色
|
||||
"退回" -> binding.tvStatus.setTextColor(Color.parseColor("#F44336")) // 红色
|
||||
else -> binding.tvStatus.setTextColor(Color.parseColor("#9E9E9E")) // 灰色
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.lukouguoji.gnc.page.inspection
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.gnc.R
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.GncInspectionBean
|
||||
import com.lukouguoji.module_base.bean.StatisticsBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showConfirmDialog
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.CheckUtil
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* 国内出港收运检查 ViewModel
|
||||
*/
|
||||
class GncInspectionViewModel : BasePageViewModel() {
|
||||
|
||||
// 搜索条件
|
||||
val flightDate = MutableLiveData("") // 航班日期
|
||||
val flightNo = MutableLiveData("") // 航班号
|
||||
val agentId = MutableLiveData("") // 代理ID
|
||||
val auditStatus = MutableLiveData("") // 审核状态
|
||||
val waybillNo = MutableLiveData("") // 运单号
|
||||
|
||||
// 代理下拉列表(需要从API获取,暂时用空列表)
|
||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||
|
||||
// 审核状态下拉列表
|
||||
val auditStatusList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("已通过", "1"),
|
||||
KeyValue("退回", "2"),
|
||||
KeyValue("未审核", "0"),
|
||||
)
|
||||
)
|
||||
|
||||
// 适配器配置
|
||||
val itemViewHolder = GncInspectionViewHolder::class.java
|
||||
val itemLayoutId = R.layout.item_gnc_inspection
|
||||
|
||||
// 统计数据
|
||||
val totalCount = MutableLiveData("0") // 合计票数
|
||||
val totalPc = MutableLiveData("0") // 总件数
|
||||
val totalWeight = MutableLiveData("0") // 总重量
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 方法区
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 扫码输入运单号
|
||||
*/
|
||||
fun waybillScanClick() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索按钮点击
|
||||
*/
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
override fun getData() {
|
||||
val body = mapOf(
|
||||
"page" to pageModel.page,
|
||||
"limit" to pageModel.limit,
|
||||
"flightDate" to flightDate.value!!.ifEmpty { null },
|
||||
"flightNo" to flightNo.value!!.ifEmpty { null },
|
||||
"agentId" to agentId.value!!.ifEmpty { null },
|
||||
"auditStatus" to auditStatus.value!!.ifEmpty { null },
|
||||
"waybillNo" to waybillNo.value!!.ifEmpty { null },
|
||||
).toRequestBody()
|
||||
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getGncInspectionList(body)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
}
|
||||
}
|
||||
getStatistics(body)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取统计数据
|
||||
*/
|
||||
private fun getStatistics(body: okhttp3.RequestBody) {
|
||||
launchCollect({
|
||||
NetApply.api.getGncInspectionStatistics(body)
|
||||
}) {
|
||||
onSuccess = {
|
||||
val stats = it.data ?: StatisticsBean()
|
||||
totalCount.value = stats.totalCount.noNull("0")
|
||||
totalPc.value = stats.totalPc.noNull("0")
|
||||
totalWeight.value = stats.totalWeight.noNull("0")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理扫码结果
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.WAYBILL -> {
|
||||
waybillNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量审核 - 通过
|
||||
*/
|
||||
fun auditPassClick() {
|
||||
val list = pageModel.rv!!.commonAdapter()!!.items as List<GncInspectionBean>
|
||||
val filter = list.filter { it.checked.get() }
|
||||
if (filter.isEmpty()) {
|
||||
showToast("请选择数据")
|
||||
return
|
||||
}
|
||||
getTopActivity().showConfirmDialog("确定要通过选中的 ${filter.size} 条数据吗?") {
|
||||
performAudit(filter, "1", "通过")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量审核 - 退回
|
||||
*/
|
||||
fun auditRejectClick() {
|
||||
val list = pageModel.rv!!.commonAdapter()!!.items as List<GncInspectionBean>
|
||||
val filter = list.filter { it.checked.get() }
|
||||
if (filter.isEmpty()) {
|
||||
showToast("请选择数据")
|
||||
return
|
||||
}
|
||||
getTopActivity().showConfirmDialog("确定要退回选中的 ${filter.size} 条数据吗?") {
|
||||
performAudit(filter, "2", "退回")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行审核操作
|
||||
*/
|
||||
private fun performAudit(items: List<GncInspectionBean>, status: String, action: String) {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.auditGncInspection(
|
||||
mapOf(
|
||||
"ids" to items.map { it.id },
|
||||
"auditStatus" to status,
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
showToast(it.msg.noNull("${action}成功"))
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全选/全不选
|
||||
*/
|
||||
fun checkAllClick() {
|
||||
val list = pageModel.rv!!.commonAdapter()!!.items as List<GncInspectionBean>
|
||||
CheckUtil.handleAllCheck(list)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化代理下拉列表(从API获取)
|
||||
*/
|
||||
fun initAgentList() {
|
||||
// TODO: 调用API获取代理列表
|
||||
// 暂时使用模拟数据
|
||||
agentList.value = listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("SF", "SF"),
|
||||
KeyValue("YTO", "YTO"),
|
||||
KeyValue("ZTO", "ZTO"),
|
||||
)
|
||||
}
|
||||
}
|
||||
171
module_gnc/src/main/res/layout/activity_gnc_inspection.xml
Normal file
171
module_gnc/src/main/res/layout/activity_gnc_inspection.xml
Normal file
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gnc.page.inspection.GncInspectionViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航班日期 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择航班日期"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.flightDate}" />
|
||||
|
||||
<!-- 航班号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入航班号"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<!-- 代理 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择代理"}'
|
||||
list="@{viewModel.agentList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.agentId}" />
|
||||
|
||||
<!-- 审核状态 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择审核状态"}'
|
||||
list="@{viewModel.auditStatusList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.auditStatus}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运单号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillNo}" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 全选按钮 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:onClick="@{()->viewModel.checkAllClick()}"
|
||||
android:text="全选" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:onClick="@{()->viewModel.checkAllClick()}"
|
||||
android:src="@drawable/img_check_all" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 列表 -->
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_gnc_inspection" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 底部统计和操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_bottom_layout"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text='@{"合计:"+viewModel.totalCount+"票,总件数:"+viewModel.totalPc+",总重量:"+viewModel.totalWeight}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:1票,总件数:100,总重量:100" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()-> viewModel.auditRejectClick()}"
|
||||
android:text="退回"
|
||||
android:layout_marginRight="10dp" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()-> viewModel.auditPassClick()}"
|
||||
android:text="通过" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
278
module_gnc/src/main/res/layout/item_gnc_inspection.xml
Normal file
278
module_gnc/src/main/res/layout/item_gnc_inspection.xml
Normal file
@@ -0,0 +1,278 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.GncInspectionBean" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行数据 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- 运单号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="运单号:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.wbNo}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
tools:text="78109081212" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 代理人 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="代理人:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.agentCode}'
|
||||
tools:text="SF" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 特码 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="特码:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.spCode}"
|
||||
tools:text="NOR" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 预配件数 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="预配件数:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.apc}'
|
||||
tools:text="11" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 预配重量 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="预配重量:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.weight}'
|
||||
tools:text="12" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 第二行数据 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<!-- 计划航班 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="计划航班:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.flight}"
|
||||
tools:text="20240216/MU2026" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 航程 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="航程:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.route}'
|
||||
tools:text="HFE - PEK" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 预计起飞 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="预计起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.scheduledTackOff}"
|
||||
tools:text="09:12" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 业务类型 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="业务类型:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.businessType}'
|
||||
tools:text="普通货物运输" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 审核状态 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="审核状态:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.auditStatusName}'
|
||||
android:textStyle="bold"
|
||||
tools:text="已通过" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧箭头 -->
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/right_icon"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user