feat: 国际进港装机单列表改为 ULD 主单与运单子单结构

适配装机单查询接口按 ULD 分组的新返回结构,主单展示 ULD 编号、
总件数、总重量、航班信息,展开后显示关联运单的运单号、件数、重量、品名,
样式与展开交互与其他主子单列表一致;点击子单行进入装机单编辑。
右下角“修改库位”“入库”按钮暂时隐藏。同步修正进港舱单页修改库位时
从新分组结构中取运单记录。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 19:43:26 +08:00
parent 51c5ac6e96
commit 5edb1bea06
10 changed files with 374 additions and 247 deletions

View File

@@ -10,13 +10,11 @@ import com.lukouguoji.gjj.dialog.IntImpInStorageDialogModel
import com.lukouguoji.gjj.dialog.IntImpModifyStorageDialogModel
import com.lukouguoji.gjj.viewModel.IntImpLoadingListViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.common.Constant
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.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.router.ARouterConstants
@@ -43,7 +41,7 @@ class IntImpLoadingListActivity :
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
@@ -78,8 +76,7 @@ class IntImpLoadingListActivity :
* 显示入库操作对话框
*/
fun showInStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
val selectedItems = viewModel.getSelectedManifests()
if (selectedItems.isEmpty()) {
showToast("请选择要入库的记录")
@@ -97,8 +94,7 @@ class IntImpLoadingListActivity :
* 显示修改库位对话框
*/
fun showModifyStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
val selectedItems = viewModel.getSelectedManifests()
if (selectedItems.isEmpty()) {
showToast("请选择要修改库位的记录")

View File

@@ -0,0 +1,26 @@
package com.lukouguoji.gjj.holder
import android.view.View
import com.lukouguoji.gjj.activity.IntImpLoadingListEditActivity
import com.lukouguoji.gjj.databinding.ItemIntImpLoadingListSubBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjjManifest
/**
* 国际进港装机单 关联运单(子单) ViewHolder
*/
class IntImpLoadingListSubViewHolder(view: View) :
BaseViewHolder<GjjManifest, ItemIntImpLoadingListSubBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
binding.bean = bean
binding.position = position + 1
binding.executePendingBindings()
// 点击运单行进入装机单编辑
binding.llRow.setOnClickListener {
IntImpLoadingListEditActivity.start(itemView.context, bean)
}
}
}

View File

@@ -1,17 +1,20 @@
package com.lukouguoji.gjj.holder
import android.view.View
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ItemIntImpLoadingListBinding
import com.lukouguoji.module_base.adapter.setCommonAdapter
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.bean.GjjLoadingUld
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.refresh
/**
* 国际进港装机单 ViewHolder
* 国际进港装机单 ULD 主单 ViewHolder
*/
class IntImpLoadingListViewHolder(view: View) :
BaseViewHolder<GjjManifest, ItemIntImpLoadingListBinding>(view) {
BaseViewHolder<GjjLoadingUld, ItemIntImpLoadingListBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
@@ -26,10 +29,35 @@ class IntImpLoadingListViewHolder(view: View) :
binding.executePendingBindings()
}
// 侧滑菜单 - 编辑按钮
binding.btnEdit.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, 2000)
// 展开/收起关联运单
binding.ivShow.setOnClickListener {
bean.showMore.set(!bean.showMore.get())
}
// 初始化子列表 RecyclerView
setCommonAdapter(
binding.rvSub,
IntImpLoadingListSubViewHolder::class.java,
R.layout.item_int_imp_loading_list_sub
)
// 刷新子列表数据
val subList = bean.manifestList ?: emptyList()
binding.rvSub.refresh(subList)
updateSubListVisibility(subList.isNotEmpty())
}
private fun updateSubListVisibility(hasData: Boolean) {
if (hasData) {
binding.llHeader.visibility = View.VISIBLE
binding.dividerHeader.visibility = View.VISIBLE
binding.rvSub.visibility = View.VISIBLE
binding.tvEmpty.visibility = View.GONE
} else {
binding.llHeader.visibility = View.GONE
binding.dividerHeader.visibility = View.GONE
binding.rvSub.visibility = View.GONE
binding.tvEmpty.visibility = View.VISIBLE
}
}
}

View File

@@ -5,6 +5,7 @@ import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.holder.IntImpLoadingListViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.GjjLoadingUld
import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
@@ -109,15 +110,23 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
// ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false)
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjLoadingUld> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
/**
* 获取选中 ULD 下的全部运单(供修改库位/入库使用)
*/
fun getSelectedManifests(): List<GjjManifest> {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjLoadingUld> ?: return emptyList()
return list.filter { it.checked.get() }.flatMap { it.manifestList ?: emptyList() }
}
// ========== 适配器配置 ==========
val itemViewHolder = IntImpLoadingListViewHolder::class.java
@@ -191,7 +200,7 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
* 全选按钮点击(切换全选状态)
*/
fun checkAllClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjLoadingUld> ?: return
// 切换全选状态
val shouldCheckAll = !isAllChecked.value!!
@@ -280,17 +289,9 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
}
/**
* 列表项点击回调(侧滑菜单
* 列表项点击回调(运单编辑已改为在子列表 ViewHolder 中直接跳转
*/
override fun onItemClick(position: Int, type: Int) {
when (type) {
2000 -> {
// 编辑操作
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
val bean = list.getOrNull(position) ?: return
com.lukouguoji.gjj.activity.IntImpLoadingListEditActivity.start(getTopActivity(), bean)
}
}
}
/**

View File

@@ -509,7 +509,10 @@ class IntImpManifestViewModel : BasePageViewModel() {
launchLoadingCollect({ NetApply.api.getIntImpLoadingList(queryParams) }) {
onSuccess = { result ->
val tallyRecord = result.list?.firstOrNull()
// 装机单接口已按 ULD 分组,运单记录在 manifestList 中
val tallyRecord = result.list
?.flatMap { it.manifestList ?: emptyList() }
?.let { list -> list.firstOrNull { it.wbNo == selectedItem.wbNo || it.getWaybillNo() == selectedItem.wbNo } ?: list.firstOrNull() }
showModifyStorageDialog(
selectedItems = selectedItems,
currentLocationId = tallyRecord?.locationTallyId?.takeIf { it > 0 }?.toString() ?: "",

View File

@@ -155,7 +155,7 @@
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
@@ -207,7 +207,7 @@
</LinearLayout>
<!-- 修改库位按钮 (蓝色) -->
<!-- 修改库位按钮 (蓝色):暂时隐藏 -->
<TextView
android:layout_width="100dp"
android:layout_height="40dp"
@@ -218,9 +218,10 @@
android:onClick="@{()-> activity.showModifyStorageDialog()}"
android:text="修改库位"
android:textColor="@color/white"
android:textSize="18sp" />
android:textSize="18sp"
android:visibility="gone" />
<!-- 入库按钮 (蓝色) -->
<!-- 入库按钮 (蓝色):暂时隐藏 -->
<TextView
android:layout_width="100dp"
android:layout_height="40dp"
@@ -230,7 +231,8 @@
android:onClick="@{()-> activity.showInStorageDialog()}"
android:text="入库"
android:textColor="@color/white"
android:textSize="18sp" />
android:textSize="18sp"
android:visibility="gone" />
</LinearLayout>

View File

@@ -8,55 +8,56 @@
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjjManifest" />
type="com.lukouguoji.module_base.bean.GjjLoadingUld" />
<variable
name="position"
type="Integer" />
</data>
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:id="@+id/swipe_menu"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp">
android:layout_marginTop="10dp"
android:orientation="vertical">
<!-- 主内容区域 -->
<!-- 白色卡片ULD 主单 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp"
android:gravity="center_vertical">
android:orientation="vertical">
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
<ImageView
android:id="@+id/iv_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" />
<!-- 舱单信息区域 -->
<!-- 主要内容区域 -->
<LinearLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:orientation="vertical">
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="10dp"
android:paddingVertical="20dp">
<!-- 第一行运单号、始发站、ULD编号、总件数、件数 -->
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
<ImageView
android:id="@+id/iv_icon"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginTop="0.5px"
android:src="@drawable/img_plane" />
<!-- ULD 信息区域ULD编号、总件数、总重量、航班信息 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 运单号 (weight=1.0) -->
<!-- ULD编号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -65,235 +66,97 @@
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="运单号:"
android:text="ULD编号"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.getWaybillNo()}"
android:text="@{bean.uld}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 始发站 (weight=1) -->
<!-- 总件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="始发站:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.origin}"
android:textSize="15sp" />
</LinearLayout>
<!-- ULD编号 (weight=1.0) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="ULD编号"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.locationMft}"
android:textSize="15sp" />
</LinearLayout>
<!-- 总件数 (weight=1) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="总件数:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.totalPc)}"
android:text="@{bean.totalPc == null ? `0` : String.valueOf(bean.totalPc)}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
<!-- 件数 (weight=1) -->
<!-- 总重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.pc)}"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
<!-- 第二行:品名、代理、库位号、重量、计费重量 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 品名 (weight=1.0) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="品名(中)"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.goodsCn}"
android:textSize="15sp" />
</LinearLayout>
<!-- 代理 (weight=1) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="代理:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总重量:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.agentCode}"
android:text="@{bean.totalWeightText}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
<!-- 库位号 (weight=1.0) -->
<!-- 航班信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:layout_weight="1.2"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="库位号:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="航班信息:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.locationTally}"
android:textSize="15sp" />
</LinearLayout>
<!-- 重量 (weight=1) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.weight)}"
android:textSize="15sp" />
</LinearLayout>
<!-- 计费重量 (weight=1) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="计费重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.cashWeight)}"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:text="@{bean.flight}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
@@ -302,23 +165,108 @@
</LinearLayout>
<!-- 展开按钮 -->
<ImageView
android:id="@+id/iv_show"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_marginTop="-20dp"
android:paddingVertical="2.5dp"
android:rotation="@{bean.showMore.get() ? 180f : 0f}"
android:scaleType="center"
android:src="@mipmap/img_down" />
</LinearLayout>
<!-- 侧滑菜单区域 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- 子单列表容器(关联运单,白色圆角卡片) -->
<LinearLayout
visible="@{bean.showMore}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:visibility="gone">
<!-- 编辑按钮 -->
<!-- 暂无数据提示 -->
<TextView
android:id="@+id/btn_edit"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="编辑" />
android:id="@+id/tv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingVertical="15dp"
android:text="暂无运单数据"
android:textColor="@color/text_gray"
android:textSize="14sp"
android:visibility="gone" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 表头 -->
<LinearLayout
android:id="@+id/ll_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_arrive_sub_header"
android:orientation="horizontal"
android:paddingHorizontal="10dp"
android:paddingVertical="10dp">
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center"
android:text="运单号"
android:textColor="@color/text_normal"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center"
android:text="件数"
android:textColor="@color/text_normal"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center"
android:text="重量"
android:textColor="@color/text_normal"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center"
android:text="品名"
android:textColor="@color/text_normal"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<com.google.android.material.divider.MaterialDivider
android:id="@+id/divider_header"
android:layout_width="match_parent"
android:layout_height="1px"
app:dividerColor="@color/sub_list_divider" />
<!-- 子列表 RecyclerView -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,86 @@
<?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">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjjManifest" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:id="@+id/ll_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="8dp"
android:orientation="horizontal"
android:paddingHorizontal="10dp">
<!-- 运单号 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1.2"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="@{bean.getWaybillNo()}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 件数 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="0.8"
android:gravity="center"
android:text="@{String.valueOf(bean.pc)}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 重量 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="0.8"
android:gravity="center"
android:text="@{String.valueOf((int)bean.weight)}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 品名 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="2"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="@{bean.goodsCn.isEmpty() ? bean.goods : bean.goodsCn}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
</LinearLayout>
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1px"
app:dividerColor="@color/sub_list_divider" />
</LinearLayout>
</layout>