refactor: 国际进港舱单列表项布局优化及分单按需加载

- 主列表项从4行改为2行5列标准KV布局
- 展开按钮移入白色卡片内,始终显示
- 分单数据改为点击展开时按需加载
- 子列表列宽调整,品名支持goodsCn优先显示
- 子列表所有列加单行省略号

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 17:47:43 +08:00
parent 8c774ef3a3
commit 5a9dd6f97a
8 changed files with 207 additions and 178 deletions

View File

@@ -16,6 +16,7 @@ data class GjjHaWb(
var volume: Double = 0.0, var volume: Double = 0.0,
var cashWeight: Double = 0.0, var cashWeight: Double = 0.0,
var goods: String = "", var goods: String = "",
var goodsCn: String = "",
var spCode: String = "", var spCode: String = "",
var mftStatus: String = "", var mftStatus: String = "",
var lastMftStatus: String = "", var lastMftStatus: String = "",

View File

@@ -301,6 +301,12 @@ interface Api {
@POST("typeCode/countryType") @POST("typeCode/countryType")
suspend fun getAreaTypeList(): DictListBean suspend fun getAreaTypeList(): DictListBean
/**
* 获取通讯方式类型
*/
@POST("typeCode/communicateType")
suspend fun getCommunicateTypeList(): DictListBean
/** /**
* 查询平板车信息 * 查询平板车信息
*/ */
@@ -1814,7 +1820,7 @@ interface Api {
* 国际进港舱单-分页查询 * 国际进港舱单-分页查询
*/ */
@POST("IntImpManifest/pageQuery") @POST("IntImpManifest/pageQuery")
suspend fun getIntImpManifestList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjManifest>> suspend fun getIntImpManifestList(@Body data: RequestBody): PageInfo<GjjManifest>
/** /**
* 国际进港舱单-分页合计 * 国际进港舱单-分页合计

View File

@@ -40,10 +40,15 @@ class IntImpManifestViewHolder(view: View) :
clickListener?.onItemClick(position, 102) // 102=删除 clickListener?.onItemClick(position, 102) // 102=删除
} }
// 展开按钮点击事件 // 展开按钮点击事件 - 先加载分单数据,再切换展开状态
binding.ivShow.setOnClickListener { binding.ivShow.setOnClickListener {
if (!bean.showMore.get() && bean.haWbList.isNullOrEmpty()) {
// 首次展开且无数据,通知 ViewModel 加载分单
clickListener?.onItemClick(position, 103) // 103=加载分单
} else {
bean.showMore.set(!bean.showMore.get()) bean.showMore.set(!bean.showMore.get())
} }
}
// 初始化分单子列表 RecyclerView // 初始化分单子列表 RecyclerView
setCommonAdapter( setCommonAdapter(

View File

@@ -69,13 +69,18 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
} }
/** /**
* 加载通讯方式下拉列表(本地固定值) * 加载通讯方式下拉列表
*/ */
private fun loadComTypeList() { private fun loadComTypeList() {
comTypeList.value = listOf( launchCollect({ NetApply.api.getCommunicateTypeList() }) {
KeyValue("电话TE", "TE"), onSuccess = { result ->
KeyValue("传真FX", "FX") comTypeList.value = result.data?.mapNotNull { bean ->
) if (bean.code != null && bean.name != null) {
KeyValue(bean.name, bean.code)
} else null
} ?: emptyList()
}
}
} }
/** /**

View File

@@ -34,12 +34,13 @@ class IntImpManifestViewModel : BasePageViewModel() {
val flightNo = MutableLiveData("") // 航班号 val flightNo = MutableLiveData("") // 航班号
val sendAddress = MutableLiveData("") // 始发站 val sendAddress = MutableLiveData("") // 始发站
val sendAddressList = MutableLiveData<List<KeyValue>>(emptyList()) val sendAddressList = MutableLiveData<List<KeyValue>>(emptyList())
val fdep = MutableLiveData("") // 目的站 val fdest = MutableLiveData("") // 目的站
val waybillNo = MutableLiveData("") // 运单号 val waybillNo = MutableLiveData("") // 运单号
// ========== 航班级联查询 ========== // ========== 航班级联查询 ==========
private var lastQueriedFlight = "" private var lastQueriedFlight = ""
private var fid = "" private var fid = ""
private var fdep = "" // 航班始发港(用于列表查询参数)
fun onFlightDateInputComplete() { fun onFlightDateInputComplete() {
lastQueriedFlight = "" lastQueriedFlight = ""
@@ -72,7 +73,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
if (it.verifySuccess() && it.data != null) { if (it.verifySuccess() && it.data != null) {
val flight = it.data!! val flight = it.data!!
fid = flight.fid.noNull() fid = flight.fid.noNull()
fdep.value = flight.fdest.noNull() fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
// 构建始发站下拉列表fdep + jtz经停港 // 构建始发站下拉列表fdep + jtz经停港
val list = mutableListOf( val list = mutableListOf(
@@ -85,7 +87,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
sendAddress.value = flight.fdep.noNull() sendAddress.value = flight.fdep.noNull()
} else { } else {
fid = "" fid = ""
fdep.value = "" fdep = ""
fdest.value = ""
sendAddressList.value = emptyList() sendAddressList.value = emptyList()
sendAddress.value = "" sendAddress.value = ""
showToast(it.msg.noNull("获取航班信息失败")) showToast(it.msg.noNull("获取航班信息失败"))
@@ -94,7 +97,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
onFailed = { _, _ -> onFailed = { _, _ ->
fid = "" fid = ""
fdep.value = "" fdep = ""
fdest.value = ""
sendAddressList.value = emptyList() sendAddressList.value = emptyList()
sendAddress.value = "" sendAddress.value = ""
} }
@@ -153,7 +157,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
if (it.verifySuccess() && it.data != null) { if (it.verifySuccess() && it.data != null) {
val flight = it.data!! val flight = it.data!!
fid = flight.fid.noNull() fid = flight.fid.noNull()
fdep.value = flight.fdest.noNull() fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
val list = mutableListOf( val list = mutableListOf(
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()), KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
) )
@@ -164,7 +169,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
sendAddress.value = flight.fdep.noNull() sendAddress.value = flight.fdep.noNull()
} else { } else {
fid = "" fid = ""
fdep.value = "" fdep = ""
fdest.value = ""
sendAddressList.value = emptyList() sendAddressList.value = emptyList()
sendAddress.value = "" sendAddress.value = ""
showToast(it.msg.noNull("获取航班信息失败")) showToast(it.msg.noNull("获取航班信息失败"))
@@ -173,7 +179,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
} }
onFailed = { _, _ -> onFailed = { _, _ ->
fid = "" fid = ""
fdep.value = "" fdep = ""
fdest.value = ""
sendAddressList.value = emptyList() sendAddressList.value = emptyList()
sendAddress.value = "" sendAddress.value = ""
refresh() refresh()
@@ -184,6 +191,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
} }
} else { } else {
fid = "" fid = ""
fdep = ""
refresh() refresh()
} }
} }
@@ -212,11 +220,20 @@ class IntImpManifestViewModel : BasePageViewModel() {
val shouldExpand = !isAllExpanded.value!! val shouldExpand = !isAllExpanded.value!!
isAllExpanded.value = shouldExpand isAllExpanded.value = shouldExpand
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
list.forEach {
if (!it.haWbList.isNullOrEmpty()) { if (shouldExpand) {
it.showMore.set(shouldExpand) // 展开:对没有分单数据的项按需加载
list.forEach { bean ->
if (bean.haWbList.isNullOrEmpty()) {
loadHaWbList(bean)
} else {
bean.showMore.set(true)
} }
} }
} else {
// 收起
list.forEach { it.showMore.set(false) }
}
pageModel.rv?.commonAdapter()?.notifyDataSetChanged() pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
} }
@@ -235,7 +252,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
context = getTopActivity(), context = getTopActivity(),
fid = fid, fid = fid,
dep = sendAddress.value ?: "", dep = sendAddress.value ?: "",
dest = fdep.value ?: "" dest = fdest.value ?: ""
) )
} }
@@ -254,6 +271,10 @@ class IntImpManifestViewModel : BasePageViewModel() {
// 删除 // 删除
deleteManifest(bean) deleteManifest(bean)
} }
103 -> {
// 展开 - 加载分单数据
loadHaWbList(bean)
}
} }
} }
@@ -314,7 +335,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
.withString("fdate", flightDate.value ?: "") .withString("fdate", flightDate.value ?: "")
.withString("fno", flightNo.value ?: "") .withString("fno", flightNo.value ?: "")
.withString("sendAddress", sendAddress.value ?: "") .withString("sendAddress", sendAddress.value ?: "")
.withString("fdest", fdep.value ?: "") .withString("fdest", fdest.value ?: "")
.navigation() .navigation()
} }
@@ -333,8 +354,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
// 构建搜索条件使用FID代替fdate/fno // 构建搜索条件使用FID代替fdate/fno
val filterParams = mapOf( val filterParams = mapOf(
"fid" to fid.ifEmpty { null }, "fid" to fid.ifEmpty { null },
"sendAddress" to sendAddress.value?.ifEmpty { null }, "fdep" to fdep.ifEmpty { null },
"fdep" to fdep.value?.ifEmpty { null },
"wbNo" to waybillNo.value?.ifEmpty { null } "wbNo" to waybillNo.value?.ifEmpty { null }
) )
@@ -350,15 +370,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
// 获取列表带Loading // 获取列表带Loading
launchLoadingCollect({ NetApply.api.getIntImpManifestList(listParams) }) { launchLoadingCollect({ NetApply.api.getIntImpManifestList(listParams) }) {
onSuccess = { result -> onSuccess = { result ->
pageModel.handleListBean(result.data?.toBaseListBean()) pageModel.handleListBean(result.toBaseListBean())
// 列表加载完成后,加载分单数据
val items = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest>
items?.forEach { bean ->
if (bean.haWbNum > 0) {
loadHaWbList(bean)
}
}
} }
} }
@@ -374,18 +386,21 @@ class IntImpManifestViewModel : BasePageViewModel() {
} }
/** /**
* 加载主单下的分单列表 * 加载主单下的分单列表(按需加载,加载完成后自动展开)
*/ */
private fun loadHaWbList(bean: GjjManifest) { private fun loadHaWbList(bean: GjjManifest) {
val params = mapOf( val params = mapOf(
"mfId" to bean.mfId "mfId" to bean.mfId
).toRequestBody() ).toRequestBody()
launchCollect({ NetApply.api.getIntImpManifestHaWbList(params) }) { launchLoadingCollect({ NetApply.api.getIntImpManifestHaWbList(params) }) {
onSuccess = { result -> onSuccess = { result ->
if (result.verifySuccess() && !result.data.isNullOrEmpty()) { if (result.verifySuccess() && !result.data.isNullOrEmpty()) {
bean.haWbList = result.data bean.haWbList = result.data
bean.showMore.set(true)
pageModel.rv?.commonAdapter()?.notifyDataSetChanged() pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
} else {
showToast("暂无分单数据")
} }
} }
} }

View File

@@ -66,7 +66,7 @@
hint='@{"目的站"}' hint='@{"目的站"}'
enable="@{false}" enable="@{false}"
type="@{SearchLayoutType.INPUT}" type="@{SearchLayoutType.INPUT}"
value="@={viewModel.fdep}" value="@={viewModel.fdest}"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />

View File

@@ -22,6 +22,13 @@
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- 白色卡片区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<com.mcxtzhang.swipemenulib.SwipeMenuLayout <com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@@ -30,12 +37,11 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp"> android:padding="15dp">
<!-- 选中图标(飞机图标,根据选择状态切换图片) --> <!-- 选中图标 -->
<ImageView <ImageView
android:id="@+id/iv_icon" android:id="@+id/iv_icon"
android:layout_width="40dp" android:layout_width="40dp"
@@ -48,21 +54,26 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dp" android:layout_marginLeft="10dp"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<!-- 第一行:运单号 --> <!-- 第一行:运单号、始发站、目的站、总件数、实到件数 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" 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_height="wrap_content"
android:gravity="center_vertical" android:layout_weight="1.0"
android:orientation="horizontal"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="运单号:" android:text="运单号:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -72,31 +83,22 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.getWaybillNo()}" android:text="@{bean.getWaybillNo()}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="18sp" android:textSize="16sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行:始发站、目的站、总件数、实到件数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 始发站 --> <!-- 始发站 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="始发站:" android:text="始发站:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -108,20 +110,19 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 目的站 --> <!-- 目的站 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="目的站:" android:text="目的站:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -133,20 +134,19 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 总件数 --> <!-- 总件数 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="总件数:" android:text="总件数:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -158,20 +158,19 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 实到件数 --> <!-- 实到件数 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="实到件数:" android:text="实到件数:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -183,30 +182,27 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!--行:实到重量、计费重量、代理、特码 --> <!--行:实到重量、计费重量、代理、特码、分单数 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginTop="10dp">
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 实到重量 --> <!-- 实到重量 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1.0"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="实到重量:" android:text="实到重量:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -218,20 +214,19 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 计费重量 --> <!-- 计费重量 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="计费重量:" android:text="计费重量:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -243,20 +238,19 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 代理 --> <!-- 代理 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{3}"
android:text="代理:" android:text="代理:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -268,20 +262,19 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 特码 --> <!-- 特码 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{3}"
android:text="特码:" android:text="特码:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -293,30 +286,19 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 第四行:分单数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 分单数 --> <!-- 分单数 -->
<LinearLayout <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical">
android:orientation="horizontal">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="分单数:" android:text="分单数:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
@@ -328,11 +310,9 @@
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout> </androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
</LinearLayout> </LinearLayout>
@@ -344,6 +324,8 @@
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" /> android:src="@drawable/img_pda_right" />
</LinearLayout>
<!-- 侧滑菜单区 --> <!-- 侧滑菜单区 -->
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -368,7 +350,7 @@
</com.mcxtzhang.swipemenulib.SwipeMenuLayout> </com.mcxtzhang.swipemenulib.SwipeMenuLayout>
<!-- 展开/折叠按钮(仅当有分单时显示 --> <!-- 展开/折叠按钮(始终显示,点击加载分单 -->
<ImageView <ImageView
android:id="@+id/iv_show" android:id="@+id/iv_show"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -376,8 +358,9 @@
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:padding="5dp" android:padding="5dp"
android:src="@mipmap/img_down" android:src="@mipmap/img_down" />
visible="@{bean.haWbList != null &amp;&amp; !bean.haWbList.empty}" />
</LinearLayout>
<!-- 分单子列表容器(淡绿色背景) --> <!-- 分单子列表容器(淡绿色背景) -->
<LinearLayout <LinearLayout
@@ -430,7 +413,7 @@
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:text="件数" android:text="件数"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
@@ -440,7 +423,7 @@
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:text="重量" android:text="重量"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
@@ -450,7 +433,7 @@
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:text="原始舱单" android:text="原始舱单"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
@@ -460,7 +443,7 @@
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:text="理货报告" android:text="理货报告"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
@@ -470,7 +453,7 @@
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.0" android:layout_weight="1.8"
android:gravity="center" android:gravity="center"
android:text="品名(中)" android:text="品名(中)"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"

View File

@@ -37,6 +37,8 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1.0" android:layout_weight="1.0"
android:gravity="center" android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:text='@{bean.prefix + bean.no}' android:text='@{bean.prefix + bean.no}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -48,6 +50,8 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1.0" android:layout_weight="1.0"
android:gravity="center" android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:text="@{bean.hno ?? ``}" android:text="@{bean.hno ?? ``}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -57,8 +61,10 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:text="@{String.valueOf((int)bean.pc)}" android:text="@{String.valueOf((int)bean.pc)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -68,8 +74,10 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:text="@{String.valueOf((int)bean.weight)}" android:text="@{String.valueOf((int)bean.weight)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -79,8 +87,10 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:text="@{bean.mftStatus ?? ``}" android:text="@{bean.mftStatus ?? ``}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -90,8 +100,10 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="0.8" android:layout_weight="0.6"
android:gravity="center" android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:text="@{bean.lastMftStatus ?? ``}" android:text="@{bean.lastMftStatus ?? ``}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -101,9 +113,11 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1.0" android:layout_weight="1.8"
android:gravity="center" android:gravity="center"
android:text="@{bean.goods ?? ``}" android:maxLines="1"
android:ellipsize="end"
android:text='@{bean.goodsCn != null &amp;&amp; !bean.goodsCn.isEmpty() ? bean.goodsCn : (bean.goods ?? ``)}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />