Compare commits

...

4 Commits

Author SHA1 Message Date
d31a408ddc feat: dev 2026-03-09 19:40:55 +08:00
ce080f04a7 feat: 国际进港舱单货物发放、装机单查询参数对齐及运单号自动查询
- 实现货物发放功能,对接 /IntImpManifest/putUpCargo 接口
- 装机单列表查询参数改为与父页面一致(fid + fdep)
- 修复装机单列表接口返回类型(PageInfo 无需 BaseResultBean 包装)
- 舱单和装机单页面运单号输入框支持4位以上自动查询

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:38:01 +08:00
5a9dd6f97a refactor: 国际进港舱单列表项布局优化及分单按需加载
- 主列表项从4行改为2行5列标准KV布局
- 展开按钮移入白色卡片内,始终显示
- 分单数据改为点击展开时按需加载
- 子列表列宽调整,品名支持goodsCn优先显示
- 子列表所有列加单行省略号

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:47:43 +08:00
8c774ef3a3 refactor: 国际进港舱单列表改为通过FID查询
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 11:48:57 +08:00
13 changed files with 403 additions and 207 deletions

View File

@@ -72,7 +72,9 @@
"mcp__apifox__refresh_project_oas_ukz3j4",
"mcp__playwright__browser_click",
"mcp__playwright__browser_take_screenshot",
"mcp__playwright__browser_snapshot"
"mcp__playwright__browser_snapshot",
"Bash(/tmp/communicate_type_findings.md:*)",
"Read(//tmp/**)"
],
"deny": [],
"ask": []

View File

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

View File

@@ -301,6 +301,12 @@ interface Api {
@POST("typeCode/countryType")
suspend fun getAreaTypeList(): DictListBean
/**
* 获取通讯方式类型
*/
@POST("typeCode/communicateType")
suspend fun getCommunicateTypeList(): DictListBean
/**
* 查询平板车信息
*/
@@ -1814,7 +1820,7 @@ interface Api {
* 国际进港舱单-分页查询
*/
@POST("IntImpManifest/pageQuery")
suspend fun getIntImpManifestList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjManifest>>
suspend fun getIntImpManifestList(@Body data: RequestBody): PageInfo<GjjManifest>
/**
* 国际进港舱单-分页合计
@@ -1832,7 +1838,7 @@ interface Api {
* 国际进港舱单-分拣理货(装机单)-分页查询
*/
@POST("IntImpManifest/pageQueryAir")
suspend fun getIntImpLoadingList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjManifest>>
suspend fun getIntImpLoadingList(@Body data: RequestBody): PageInfo<GjjManifest>
/**
* 国际进港舱单-分拣理货(装机单)-分页合计
@@ -1852,6 +1858,12 @@ interface Api {
@POST("IntImpTally/pageQueryTotal")
suspend fun getIntImpTallyTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港舱单-货物发放
*/
@POST("IntImpManifest/putUpCargo")
suspend fun intImpManifestPutUpCargo(@Body data: RequestBody): BaseResultBean<String>
///////////////////////////////////////////////////////////////////////////
// 国际进港-事故签证
///////////////////////////////////////////////////////////////////////////

View File

@@ -51,10 +51,19 @@ class IntImpLoadingListActivity :
viewModel.refresh()
}
// 接收从进港舱单传递的参数
// 设置运单号自动查询的额外参数FID、FDGP
binding.pslWaybillNo.autoQueryConfig.extraParamsProvider = {
mapOf(
"fid" to viewModel.fid,
"fdep" to viewModel.fdep
)
}
// 接收从进港舱单传递的参数FID和FDGP用于查询fdate/fno/fdest用于界面显示
intent.getStringExtra("fid")?.let { if (it.isNotEmpty()) viewModel.fid = it }
intent.getStringExtra("fdep")?.let { if (it.isNotEmpty()) viewModel.fdep = it }
intent.getStringExtra("fdate")?.let { if (it.isNotEmpty()) viewModel.flightDate.value = it }
intent.getStringExtra("fno")?.let { if (it.isNotEmpty()) viewModel.flightNo.value = it }
intent.getStringExtra("sendAddress")?.let { if (it.isNotEmpty()) viewModel.sendAddress.value = it }
intent.getStringExtra("fdest")?.let { if (it.isNotEmpty()) viewModel.fdest.value = it }
// 如果收到了航班号和日期参数,触发航班查询来构建始发站下拉列表

View File

@@ -44,6 +44,14 @@ class IntImpManifestActivity :
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 设置运单号自动查询的额外参数FID、FDGP
binding.pslWaybillNo.autoQueryConfig.extraParamsProvider = {
mapOf(
"fid" to viewModel.fid,
"fdep" to viewModel.fdep
)
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

View File

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

View File

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

View File

@@ -35,7 +35,8 @@ class IntImpLoadingListViewModel : BasePageViewModel() {
// ========== 航班级联查询 ==========
private var lastQueriedFlight = ""
private var fid = ""
var fid = ""
var fdep = ""
fun onFlightDateInputComplete() {
lastQueriedFlight = ""
@@ -68,6 +69,7 @@ class IntImpLoadingListViewModel : BasePageViewModel() {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
fid = flight.fid.noNull()
fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
// 构建始发站下拉列表fdep + jtz经停港
@@ -81,6 +83,7 @@ class IntImpLoadingListViewModel : BasePageViewModel() {
sendAddress.value = flight.fdep.noNull()
} else {
fid = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
@@ -90,6 +93,7 @@ class IntImpLoadingListViewModel : BasePageViewModel() {
onFailed = { _, _ ->
fid = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
@@ -120,9 +124,66 @@ class IntImpLoadingListViewModel : BasePageViewModel() {
/**
* 搜索按钮点击
* 先查询航班信息获取FID再刷新列表与父页面逻辑保持一致
*/
fun searchClick() {
refresh()
val fdate = flightDate.value
val fno = flightNo.value
if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) {
val key = "$fdate-$fno"
if (key != lastQueriedFlight || fid.isEmpty()) {
// 先查询航班信息获取FID
lastQueriedFlight = key
launchLoadingCollect({
NetApply.api.getGjFlightBean(
mapOf(
"fdate" to fdate,
"fno" to fno,
"ieFlag" to "I",
).toRequestBody()
)
}) {
onSuccess = {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
fid = flight.fid.noNull()
fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
val list = mutableListOf(
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
)
if (!flight.jtz.isNullOrEmpty()) {
list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull()))
}
sendAddressList.value = list
sendAddress.value = flight.fdep.noNull()
} else {
fid = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
showToast(it.msg.noNull("获取航班信息失败"))
}
refresh()
}
onFailed = { _, _ ->
fid = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
refresh()
}
}
} else {
refresh()
}
} else {
fid = ""
fdep = ""
refresh()
}
}
/**
@@ -219,14 +280,13 @@ class IntImpLoadingListViewModel : BasePageViewModel() {
/**
* 获取数据重写BasePageViewModel
* 查询参数与父页面国际进港舱单保持一致使用FID和FDGP
*/
override fun getData() {
// 构建搜索条件
// 构建搜索条件与父页面一致fid + fdep + wbNo
val filterParams = mapOf(
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"sendAddress" to sendAddress.value?.ifEmpty { null },
"fdest" to fdest.value?.ifEmpty { null },
"fid" to fid.ifEmpty { null },
"fdep" to fdep.ifEmpty { null },
"wbNo" to waybillNo.value?.ifEmpty { null }
)
@@ -242,19 +302,7 @@ class IntImpLoadingListViewModel : BasePageViewModel() {
// 获取列表带Loading
launchLoadingCollect({ NetApply.api.getIntImpLoadingList(listParams) }) {
onSuccess = { result ->
// 处理PageInfo结构
val pageInfo = result.data
if (pageInfo != null) {
val list = pageInfo.list ?: emptyList()
val pages = pageInfo.pages ?: 1
// 处理分页数据
pageModel.handleDataList(list)
pageModel.haveMore.postValue(pages > pageModel.page)
} else {
pageModel.handleDataList(emptyList())
pageModel.haveMore.postValue(false)
}
pageModel.handleListBean(result.toBaseListBean())
}
}

View File

@@ -34,12 +34,13 @@ class IntImpManifestViewModel : BasePageViewModel() {
val flightNo = MutableLiveData("") // 航班号
val sendAddress = MutableLiveData("") // 始发站
val sendAddressList = MutableLiveData<List<KeyValue>>(emptyList())
val fdep = MutableLiveData("") // 目的站
val fdest = MutableLiveData("") // 目的站
val waybillNo = MutableLiveData("") // 运单号
// ========== 航班级联查询 ==========
private var lastQueriedFlight = ""
private var fid = ""
var fid = ""
var fdep = "" // 航班始发港(用于列表查询参数)
fun onFlightDateInputComplete() {
lastQueriedFlight = ""
@@ -72,7 +73,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
fid = flight.fid.noNull()
fdep.value = flight.fdest.noNull()
fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
// 构建始发站下拉列表fdep + jtz经停港
val list = mutableListOf(
@@ -85,7 +87,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
sendAddress.value = flight.fdep.noNull()
} else {
fid = ""
fdep.value = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
showToast(it.msg.noNull("获取航班信息失败"))
@@ -94,7 +97,8 @@ class IntImpManifestViewModel : BasePageViewModel() {
onFailed = { _, _ ->
fid = ""
fdep.value = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
}
@@ -130,9 +134,66 @@ class IntImpManifestViewModel : BasePageViewModel() {
/**
* 搜索按钮点击
* 先查询航班信息获取FID再刷新列表
*/
fun searchClick() {
refresh()
val fdate = flightDate.value
val fno = flightNo.value
if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) {
val key = "$fdate-$fno"
if (key != lastQueriedFlight || fid.isEmpty()) {
// 先查询航班信息获取FID
lastQueriedFlight = key
launchLoadingCollect({
NetApply.api.getGjFlightBean(
mapOf(
"fdate" to fdate,
"fno" to fno,
"ieFlag" to "I",
).toRequestBody()
)
}) {
onSuccess = {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
fid = flight.fid.noNull()
fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
val list = mutableListOf(
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
)
if (!flight.jtz.isNullOrEmpty()) {
list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull()))
}
sendAddressList.value = list
sendAddress.value = flight.fdep.noNull()
} else {
fid = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
showToast(it.msg.noNull("获取航班信息失败"))
}
refresh()
}
onFailed = { _, _ ->
fid = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
refresh()
}
}
} else {
refresh()
}
} else {
fid = ""
fdep = ""
refresh()
}
}
/**
@@ -159,10 +220,19 @@ class IntImpManifestViewModel : BasePageViewModel() {
val shouldExpand = !isAllExpanded.value!!
isAllExpanded.value = shouldExpand
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
list.forEach {
if (!it.haWbList.isNullOrEmpty()) {
it.showMore.set(shouldExpand)
if (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()
}
@@ -182,7 +252,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
context = getTopActivity(),
fid = fid,
dep = sendAddress.value ?: "",
dest = fdep.value ?: ""
dest = fdest.value ?: ""
)
}
@@ -201,6 +271,10 @@ class IntImpManifestViewModel : BasePageViewModel() {
// 删除
deleteManifest(bean)
}
103 -> {
// 展开 - 加载分单数据
loadHaWbList(bean)
}
}
}
@@ -258,30 +332,56 @@ class IntImpManifestViewModel : BasePageViewModel() {
fun sortingTallyClick() {
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(com.lukouguoji.module_base.router.ARouterConstants.ACTIVITY_URL_INT_IMP_LOADING_LIST)
.withString("fid", fid)
.withString("fdep", fdep)
.withString("fdate", flightDate.value ?: "")
.withString("fno", flightNo.value ?: "")
.withString("sendAddress", sendAddress.value ?: "")
.withString("fdest", fdep.value ?: "")
.withString("fdest", fdest.value ?: "")
.navigation()
}
/**
* 货物发放(暂不实现)
* 货物发放
*/
fun cargoReleaseClick() {
showToast("货物发放功能开发中")
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
val selectedItems = list.filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要发放的运单")
return
}
ConfirmDialogModel(
message = "确定要发放选中的 ${selectedItems.size} 票运单吗?",
title = "货物发放确认"
) {
val params = mapOf(
"manifestList" to selectedItems
).toRequestBody()
launchLoadingCollect({ NetApply.api.intImpManifestPutUpCargo(params) }) {
onSuccess = {
if (it.verifySuccess()) {
showToast(it.msg.noNull("货物发放成功"))
refresh()
} else {
showToast(it.msg.noNull("货物发放失败"))
}
}
}
}.show()
}
/**
* 获取数据重写BasePageViewModel
* 通过FID查询列表而不是直接通过航班号和航班日期
*/
override fun getData() {
// 构建搜索条件
// 构建搜索条件使用FID代替fdate/fno
val filterParams = mapOf(
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"sendAddress" to sendAddress.value?.ifEmpty { null },
"fdep" to fdep.value?.ifEmpty { null },
"fid" to fid.ifEmpty { null },
"fdep" to fdep.ifEmpty { null },
"wbNo" to waybillNo.value?.ifEmpty { null }
)
@@ -297,15 +397,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
// 获取列表带Loading
launchLoadingCollect({ NetApply.api.getIntImpManifestList(listParams) }) {
onSuccess = { result ->
pageModel.handleListBean(result.data?.toBaseListBean())
// 列表加载完成后,加载分单数据
val items = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest>
items?.forEach { bean ->
if (bean.haWbNum > 0) {
loadHaWbList(bean)
}
}
pageModel.handleListBean(result.toBaseListBean())
}
}
@@ -321,18 +413,21 @@ class IntImpManifestViewModel : BasePageViewModel() {
}
/**
* 加载主单下的分单列表
* 加载主单下的分单列表(按需加载,加载完成后自动展开)
*/
private fun loadHaWbList(bean: GjjManifest) {
val params = mapOf(
"mfId" to bean.mfId
).toRequestBody()
launchCollect({ NetApply.api.getIntImpManifestHaWbList(params) }) {
launchLoadingCollect({ NetApply.api.getIntImpManifestHaWbList(params) }) {
onSuccess = { result ->
if (result.verifySuccess() && !result.data.isNullOrEmpty()) {
bean.haWbList = result.data
bean.showMore.set(true)
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
} else {
showToast("暂无分单数据")
}
}
}

View File

@@ -77,11 +77,18 @@
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/psl_waybill_no"
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanWaybill()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntImpManifest/pageQueryAirWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />

View File

@@ -66,18 +66,25 @@
hint='@{"目的站"}'
enable="@{false}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.fdep}"
value="@={viewModel.fdest}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/psl_waybill_no"
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanWaybill()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntImpManifest/pageQueryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />

View File

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

View File

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