feat: 完成出港计重页面5.5寸手机端适配

- 待计重列表:三格统计、卡片单票提前运抵、筛选弹层(通道号/承运人/运单类型/代理人)
- 开始计重:预配统计卡 + PhoneFormRow 表单
- 计重记录:三格统计、筛选弹层(入库日期/代理人/特码/目的站/计重人)
- 计重明细:新增手机端全屏「修改记录」覆层,复用平板编辑链路
- 新增手机专属「运单详情」页
- 手机首页「国际」Tab 增加「出港计重」入口
- 登记后端接口缺口 7 项(#12~#18)至问题清单

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-29 20:09:55 +08:00
parent 5a019a55c4
commit 1eb288a703
43 changed files with 4380 additions and 1941 deletions

View File

@@ -70,6 +70,14 @@ curl -s -X POST "$URL" -H "$AUTH" -H "Content-Type: application/json" \
0 正常/1 故障(三态需求=缺口 #7);无「来源」字段(#8)、无 `checkInDate`/`ifNo` 筛选入参(#9)、
无批量删除(#10`deleteUld``@Query` 单条);出参 `ifNo`/`efNo`/`checkInDate`/`checkOutDate`
文档无描述,按命名推断进/出港航班号与出入库时间(#11 待确认)
- `IntExpCheckIn`出港计重2026-07-29 内网实测):`likeNo` **并非任意模糊**——按 8 位 `no`
匹配11 位 wbNo 或部分号均 0 条11 位全号必须走 `wbNo``checkIn`/`checkInList`
文档有定义但 `pageQuery`/`pageQueryTotal` **均静默忽略**(缺口 #12,待计重/计重中计数依赖);
查询入参无通道号/承运人/运单类型(#13)、`checked/*` 无收运时间范围(#14`checked/pageQuery`
出参无通道号(#15)但有 `userName`(计重人中文名);`listRecordByWh` 出参计重人仅 `opId`#16
`preArrive` 成功后 `pageQuery``arriveFlag` 不回填(#17`splitCheckIn`/`completeCheckIn`
`palletNumber`/`carWeight` 入参(#18,手机版托盘数量/自重按设计稿传预留参数);
运单类型字典:`DictUtils.getWaybillTypeList2(ieFlag="E", type="IO")`
## 内网直调验证技巧(比驱动 UI 快得多)

View File

@@ -122,11 +122,13 @@ android.util.Log.d("DBG", "value '$field' -> '$v'", Throwable("trace"))
`phone_divider` `phone_badge_bg` `phone_green` `phone_check_border` `phone_tag_gray_*` `phone_tag_green_*`
`phone_tag_red_*` `phone_orange_bg/text`
- 背景:`bg_phone_card` `bg_phone_search` `bg_phone_input` `bg_phone_stat_box` `bg_phone_panel_top`
`bg_phone_icon_round` `bg_phone_btn_primary` `bg_phone_btn_outline` `bg_phone_badge`
`bg_phone_tag_green/gray/red/orange` `bg_phone_card_header_blue/green`
`bg_phone_icon_round` `bg_phone_btn_primary` `bg_phone_btn_outline` `bg_phone_btn_weak`(浅蓝弱按钮)
`bg_phone_badge` `bg_phone_tag_green/gray/red/orange` `bg_phone_card_header_blue/green`
`bg_phone_card_top_accent`(卡片顶部主色描边条,出港计重头部卡片)
- 图标:`ic_phone_airplane` `ic_phone_location` `ic_phone_person` `ic_phone_check_circle`
`ic_phone_chevron_right/down` `ic_phone_calendar` `ic_phone_close`
`ic_phone_check_round_checked/unchecked`(圆形复选框)
`ic_phone_clipboard`(剪贴板,白色 FAB 用)`ic_phone_weight`(砝码,可 tint
- 复用 Pad 的矢量图:`img_search` `img_scan` `img_filter`(可 `app:tint` 染色)
设计稿里的 MDI 图标若缺失,直接写 24×24 的 vector用 MDI 官方 path比找位图靠谱且能染色。

View File

@@ -8,6 +8,28 @@
## [Unreleased]
### 新增 (Added)
- 「出港计重」5.5 寸手机端适配(首个全链路 4+1 页模块,设计稿 03_出港计重
待计重列表(三格统计 总票数/待计重/计重中 + 卡片状态标签 未计重/计重中 + 卡片内单票「提前运抵」+
FAB 进计重记录 + 筛选弹层 通道号/承运人/运单类型/代理人)、开始计重(头部预配统计卡 + PhoneFormRow 表单,
托盘数量/托盘自重按设计稿手输)、计重记录(三格统计 + 卡片地磅图标进明细/「查看详情」进运单详情 +
筛选弹层 入库日期起止/代理人/特码/目的站/计重人)、计重明细(汇总卡含托盘总重 + 记录卡「修改」→
全屏「修改记录」覆层,复用平板 isEditMode 编辑链路,保存后留在本页)、手机专属新页「运单详情」
`GjcWeighingWbDetailActivity`12 字段只读网格手机首页「国际」Tab 增「出港计重」入口
- 新增手机版公共资源:`bg_phone_btn_weak`(浅蓝弱按钮)、`bg_phone_card_top_accent`(卡片顶部主色描边条)、
`ic_phone_clipboard``ic_phone_weight`
- `GjcMaWb` 预留 `palletNumber`/`carWeight` 字段、`GjcCheckInRecord``carWeightStr` 双向绑定属性
(均为手机版专属,平板请求体零变化);后端缺口 7 项登记问题清单 #12~#18
checkIn 过滤不生效、主列表筛选三入参、入库日期范围、通道号出参、计重人姓名、arriveFlag 不回填、
托盘数量/自重入参)
### 修复 (Fixed)
- 出港计重手机版搜索分流按实测修正:`likeNo` 并非任意模糊(按 8 位 no 匹配),
11 位全号改走 `wbNo` 精确查询,含字母走 `fno`
### 验证 (Verified)
- 出港计重双端实机验证通过:手机端 待计重列表/筛选/开始计重(必填校验)/计重记录/记录筛选/运单详情/
计重明细/修改覆层保存/单票提前运抵 全链路 crash=0、方向无闪屏、请求体新参数全部正确携带
平板端 待计重/计重记录/开始计重 三页回归无变化横屏、5 搜索条、日期默认今天、地磅区/托盘车号/浮动按钮组均在)
- 「ULD管理」5.5 寸手机端适配app 模块首个适配页):列表卡片(三色状态标签)+ 筛选弹层(入库时间/进港航班号/所属航司/来源)+
右下角浮动新增 + 底部全选/批量删除(循环调用单条删除接口)+ 一套 `activity_uld_edit` 手机布局覆盖 新增/修改/详情 三态
(详情态右上铅笔进入修改、状态底部选择面板、所在港默认 HFE、必填校验仅手机生效

View File

@@ -1054,6 +1054,8 @@ DataBinding 适配器统一放在 `PhoneWidgetKtx.kt`(同名属性按控件类
`PhoneBottomBar` 追加 `actionDanger` 属性true 时主按钮转浅红底红字 + 垃圾桶图标ULD 管理批量删除)。
新增资源:`bg_phone_btn_danger``bg_phone_fab`(圆形浮动 + 按钮)、`bg_phone_tag_red_light`(浅红标签)、
`ic_phone_trash``ic_phone_edit`、色值 `phone_danger_bg/text`
出港计重追加:`bg_phone_btn_weak`(浅蓝弱按钮,卡片内提前运抵)、`bg_phone_card_top_accent`
(卡片顶部主色描边条)、`ic_phone_clipboard`FAB 剪贴板)、`ic_phone_weight`(砝码图标,可 tint
⚠️ **弹层与浮动按钮的层级**`PhoneFilterPanel` 默认无 elevation页面里有带 elevation 的浮动按钮FAB
会穿透到弹层之上——给弹层实例加 `android:elevation="8dp"`(大于 FAB 的 6dp
@@ -1102,6 +1104,12 @@ override fun dispatchRestoreInstanceState(container: SparseArray<Parcelable>) =
(公共组件首个完整落地页,双端实机验证通过)
- 「ULD管理」`UldListActivity` + `UldEditActivity`app 模块首个适配页;一套编辑布局覆盖
新增/修改/详情三态;批量删除为前端循环调用单条接口;状态三态/来源等 5 项后端缺口见问题清单 #7~#11
- 「出港计重」全链路 4+1 页:`GjcWeighingListActivity`(待计重列表,三格统计 + 卡片单票提前运抵 +
FAB 进记录)、`GjcWeighingStartActivity`(开始计重,托盘数量/自重按设计稿手输)、
`GjcWeighingRecordListActivity`(计重记录)、`GjcWeighingRecordDetailsActivity`(计重明细,
isEditMode 复用为手机全屏「修改记录」覆层)+ 手机专属新页 `GjcWeighingWbDetailActivity`(运单详情)。
搜索分流规则实测含字母→fno、11 位数字→wbNo、其余→likeNolikeNo 按 8 位 no 匹配并非模糊);
checkIn 过滤等 7 项后端缺口见问题清单 #12~#18
-**待办**
- `PhoneSearchBar` 接入 AutoQuery 联想(`AutoQueryManager` 目前只对接了 Pad 系组件)
- 出库交接 Tab 角标恒 0`IntExpOutHandover/pageQueryTotal` 出参恒 0后端缺陷问题清单 #6

View File

@@ -50,5 +50,35 @@
android:exported="true"
tools:replace="android:exported" />
<!-- 出港待计重(手机版适配验证页) -->
<activity
android:name="com.lukouguoji.gjc.activity.GjcWeighingListActivity"
android:exported="true"
tools:replace="android:exported" />
<!-- 出港计重-开始计重(手机版适配验证页) -->
<activity
android:name="com.lukouguoji.gjc.activity.GjcWeighingStartActivity"
android:exported="true"
tools:replace="android:exported" />
<!-- 出港计重-计重记录(手机版适配验证页) -->
<activity
android:name="com.lukouguoji.gjc.activity.GjcWeighingRecordListActivity"
android:exported="true"
tools:replace="android:exported" />
<!-- 出港计重-计重明细(手机版适配验证页) -->
<activity
android:name="com.lukouguoji.gjc.activity.GjcWeighingRecordDetailsActivity"
android:exported="true"
tools:replace="android:exported" />
<!-- 出港计重-运单详情(手机版适配验证页) -->
<activity
android:name="com.lukouguoji.gjc.activity.GjcWeighingWbDetailActivity"
android:exported="true"
tools:replace="android:exported" />
</application>
</manifest>

View File

@@ -205,6 +205,12 @@
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<!-- 出港计重-运单详情5.5寸手机版专属页面) -->
<activity
android:name="com.lukouguoji.gjc.activity.GjcWeighingWbDetailActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name="com.lukouguoji.gjc.activity.GjcHandoverActivity"
android:configChanges="orientation|keyboardHidden"

View File

@@ -53,4 +53,16 @@ data class GjcCheckInRecord(
onDataChanged?.invoke()
}
}
// 托盘自重的字符串表示用于双向绑定5.5寸手机版「修改记录」覆层)
@get:Bindable
var carWeightStr: String
get() = carWeight
set(value) {
if (carWeight != value) {
carWeight = value
notifyPropertyChanged(BR.carWeightStr)
onDataChanged?.invoke()
}
}
}

View File

@@ -75,6 +75,8 @@ data class GjcMaWb(
var carNumber: String? = null, // 车牌号
var passageWay: String? = null, // 通道号
var passageWayId: String? = null,
var palletNumber: String? = null, // 托盘数量5.5寸手机版开始计重页,后端暂无该入参,见接口问题清单)
var carWeight: String? = null, // 托盘自重5.5寸手机版手输,后端暂无该入参,见接口问题清单)
// ==================== 状态信息 ====================
var checkIn: String? = null, // 收运状态。0待收运1已收运2收运中

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 手机版弱化操作按钮:浅蓝底 + 10dp 圆角(出港计重卡片内「提前运抵」) -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/phone_primary_light" />
<corners android:radius="10dp" />
</shape>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 手机版卡片顶部主色描边条(配合 bg_phone_card 使用,出港计重头部卡片) -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/phone_primary" />
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
</shape>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 剪贴板图标MDI clipboard-text出港待计重页 FAB → 计重记录) -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFF"
android:pathData="M17,9H7V7H17M17,13H7V11H17M14,17H7V15H14M12,3A1,1 0 0,1 13,4A1,1 0 0,1 12,5A1,1 0 0,1 11,4A1,1 0 0,1 12,3M19,3H14.82C14.4,1.84 13.3,1 12,1C10.7,1 9.6,1.84 9.18,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3Z" />
</vector>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 砝码/称重图标MDI weight计重记录卡片右上角 → 计重明细),可 tint 染色 -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#374151"
android:pathData="M12,3A4,4 0 0,1 16,7C16,7.73 15.81,8.41 15.46,9H18.5C19.15,9 19.71,9.44 19.87,10.07L21.95,18.36C22.07,18.86 21.96,19.38 21.65,19.79C21.34,20.19 20.86,20.43 20.35,20.43H3.65C3.14,20.43 2.66,20.19 2.35,19.79C2.04,19.38 1.93,18.86 2.05,18.36L4.13,10.07C4.29,9.44 4.85,9 5.5,9H8.54C8.19,8.41 8,7.73 8,7A4,4 0 0,1 12,3M12,5A2,2 0 0,0 10,7A2,2 0 0,0 12,9A2,2 0 0,0 14,7A2,2 0 0,0 12,5Z" />
</vector>

View File

@@ -3,19 +3,26 @@ package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingListBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcWeighingBean
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
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港计重列表页
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_gjc_weighing_list.xml平板
* layout/activity_gjc_weighing_list.xml手机
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST)
class GjcWeighingListActivity :
@@ -25,10 +32,20 @@ class GjcWeighingListActivity :
override fun viewModelClass() = GjcWeighingViewModel::class.java
/** 手机版筛选弹层显隐(仅 UI 状态,不涉及业务逻辑) */
val filterPanelVisible = ObservableBoolean(false)
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港待计重")
binding.viewModel = viewModel
binding.activity = this
// 手机版专属数据:放开默认日期、加载筛选弹层字典、启用三格统计
// 平板端不调用,查询链路与请求次数与改造前完全一致
if (DeviceUtil.isPhone()) {
viewModel.initPhoneExtras()
}
// 初始化代理人列表从API获取
viewModel.initAgentList()
@@ -52,6 +69,32 @@ class GjcWeighingListActivity :
viewModel.refresh()
}
// ==================== 手机版专用交互(纯 UI复用既有 ViewModel 字段) ====================
/** 手机版筛选弹层显隐切换 */
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
fun resetFilter() {
viewModel.channelFilter.value = ""
viewModel.carrierFilter.value = ""
viewModel.awbTypeFilter.value = ""
viewModel.agentCode.value = ""
}
/** 手机版筛选:确认 */
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
/** 手机版卡片内「提前运抵」(单票,由 ViewHolder 调用) */
fun preArriveClick(bean: GjcWeighingBean) {
viewModel.arrivedAheadSingle(bean)
}
companion object {
@JvmStatic
fun start(context: Context) {

View File

@@ -12,12 +12,17 @@ import com.lukouguoji.gjc.holder.GjcCheckInRecordViewHolder
import com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.bean.GjcCheckInRecord
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港计重明细页
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_gjc_weighing_record_details.xml平板列表内联编辑
* layout/activity_gjc_weighing_record_details.xml手机单条记录经全屏「修改记录」覆层编辑
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_DETAILS)
class GjcWeighingRecordDetailsActivity :
@@ -70,6 +75,23 @@ class GjcWeighingRecordDetailsActivity :
viewModel.initOnCreated(intent)
}
// ==================== 手机版专用交互(纯 UI复用既有 ViewModel 编辑链路) ====================
/**
* 手机版:打开「修改记录」覆层编辑指定记录。
* 复用 [GjcWeighingRecordDetailsViewModel.onModifyClick] 的备份/编辑态逻辑,
* 覆层显隐由 isEditMode 驱动(平板端该状态驱动列表内联编辑,互不影响)。
*/
fun openPhoneEdit(record: GjcCheckInRecord) {
viewModel.onModifyClick()
binding.editRecord = record
}
/** 手机版:取消编辑(恢复备份并收起覆层) */
fun closePhoneEdit() {
viewModel.onCancelClick()
}
companion object {
@JvmStatic
fun start(context: Context, bean: GjcWeighingRecordBean) {

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingRecordListBinding
@@ -13,9 +14,14 @@ 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
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港计重记录列表页
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_gjc_weighing_record_list.xml平板
* layout/activity_gjc_weighing_record_list.xml手机
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST)
class GjcWeighingRecordListActivity :
@@ -25,10 +31,20 @@ class GjcWeighingRecordListActivity :
override fun viewModelClass() = GjcWeighingRecordViewModel::class.java
/** 手机版筛选弹层显隐(仅 UI 状态,不涉及业务逻辑) */
val filterPanelVisible = ObservableBoolean(false)
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港计重记录")
binding.viewModel = viewModel
binding.activity = this
// 手机版专属数据:放开默认日期、加载计重人下拉
// 平板端不调用,查询链路与请求次数与改造前完全一致
if (DeviceUtil.isPhone()) {
viewModel.initPhoneExtras()
}
// 初始化代理人列表
viewModel.initAgentList()
@@ -50,6 +66,29 @@ class GjcWeighingRecordListActivity :
viewModel.refresh()
}
// ==================== 手机版专用交互(纯 UI复用既有 ViewModel 字段) ====================
/** 手机版筛选弹层显隐切换 */
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
fun resetFilter() {
viewModel.checkInDateStart.value = ""
viewModel.checkInDateEnd.value = ""
viewModel.agentCode.value = ""
viewModel.spCode.value = ""
viewModel.destFilter.value = ""
viewModel.opUserFilter.value = ""
}
/** 手机版筛选:确认 */
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
companion object {
@JvmStatic
fun start(context: Context) {

View File

@@ -15,6 +15,7 @@ import com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港计重-开始计重页面
@@ -32,26 +33,38 @@ class GjcWeighingStartActivity :
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港开始计重")
binding.viewModel = viewModel
// 手机版专属:提交体携带托盘数量/托盘自重(平板不调用,请求体与改造前完全一致)
if (DeviceUtil.isPhone()) {
viewModel.initPhoneExtras()
}
viewModel.initOnCreated(this, intent)
setupFloatButtons()
}
private fun setupFloatButtons() {
// 浮动按钮组仅平板布局存在layout-sw600dp手机布局无这些 id直接跳过
val mainFloatButton = binding.mainFloatButton ?: return
val maskView = binding.maskView ?: return
val subButton1 = binding.subButton1 ?: return
val subButton2 = binding.subButton2 ?: return
// 主按钮点击事件
binding.mainFloatButton.setOnClickListener {
mainFloatButton.setOnClickListener {
if (!isExpanded) {
expandButtons()
}
}
// 遮罩层点击事件
binding.maskView.setOnClickListener {
maskView.setOnClickListener {
collapseButtons()
}
// 子按钮1点击事件 - 跳转到出港运抵页面
binding.subButton1.setOnClickListener {
subButton1.setOnClickListener {
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
.navigation()
@@ -59,7 +72,7 @@ class GjcWeighingStartActivity :
}
// 子按钮2点击事件 - 跳转到计重记录
binding.subButton2.setOnClickListener {
subButton2.setOnClickListener {
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST)
.navigation()
@@ -68,37 +81,42 @@ class GjcWeighingStartActivity :
}
/**
* 展开子按钮
* 展开子按钮(仅平板,手机布局无浮动按钮组)
*/
private fun expandButtons() {
val mainFloatButton = binding.mainFloatButton ?: return
val maskView = binding.maskView ?: return
val subButton1 = binding.subButton1 ?: return
val subButton2 = binding.subButton2 ?: return
isExpanded = true
// 显示遮罩层
binding.maskView.visibility = View.VISIBLE
binding.maskView.alpha = 0f
binding.maskView.animate().alpha(0.3f).setDuration(200).start()
maskView.visibility = View.VISIBLE
maskView.alpha = 0f
maskView.animate().alpha(0.3f).setDuration(200).start()
// 显示子按钮
binding.subButton1.visibility = View.VISIBLE
binding.subButton2.visibility = View.VISIBLE
subButton1.visibility = View.VISIBLE
subButton2.visibility = View.VISIBLE
// 子按钮1动画向左上方移动: 左移15dp, 上移55dp
val sub1TransX = ObjectAnimator.ofFloat(binding.subButton1, "translationX", 0f, -5f)
val sub1TransY = ObjectAnimator.ofFloat(binding.subButton1, "translationY", 0f, -25f)
val sub1Alpha = ObjectAnimator.ofFloat(binding.subButton1, "alpha", 0f, 1f)
val sub1Scale = ObjectAnimator.ofFloat(binding.subButton1, "scaleX", 0f, 1f)
val sub1ScaleY = ObjectAnimator.ofFloat(binding.subButton1, "scaleY", 0f, 1f)
val sub1TransX = ObjectAnimator.ofFloat(subButton1, "translationX", 0f, -5f)
val sub1TransY = ObjectAnimator.ofFloat(subButton1, "translationY", 0f, -25f)
val sub1Alpha = ObjectAnimator.ofFloat(subButton1, "alpha", 0f, 1f)
val sub1Scale = ObjectAnimator.ofFloat(subButton1, "scaleX", 0f, 1f)
val sub1ScaleY = ObjectAnimator.ofFloat(subButton1, "scaleY", 0f, 1f)
val animSet1 = AnimatorSet()
animSet1.playTogether(sub1TransX, sub1TransY, sub1Alpha, sub1Scale, sub1ScaleY)
animSet1.duration = 200
// 子按钮2动画向左下方移动: 左移55dp, 下移15dp
val sub2TransX = ObjectAnimator.ofFloat(binding.subButton2, "translationX", 0f, -25f)
val sub2TransY = ObjectAnimator.ofFloat(binding.subButton2, "translationY", 0f, -5f)
val sub2Alpha = ObjectAnimator.ofFloat(binding.subButton2, "alpha", 0f, 1f)
val sub2Scale = ObjectAnimator.ofFloat(binding.subButton2, "scaleX", 0f, 1f)
val sub2ScaleY = ObjectAnimator.ofFloat(binding.subButton2, "scaleY", 0f, 1f)
val sub2TransX = ObjectAnimator.ofFloat(subButton2, "translationX", 0f, -25f)
val sub2TransY = ObjectAnimator.ofFloat(subButton2, "translationY", 0f, -5f)
val sub2Alpha = ObjectAnimator.ofFloat(subButton2, "alpha", 0f, 1f)
val sub2Scale = ObjectAnimator.ofFloat(subButton2, "scaleX", 0f, 1f)
val sub2ScaleY = ObjectAnimator.ofFloat(subButton2, "scaleY", 0f, 1f)
val animSet2 = AnimatorSet()
animSet2.playTogether(sub2TransX, sub2TransY, sub2Alpha, sub2Scale, sub2ScaleY)
@@ -106,14 +124,14 @@ class GjcWeighingStartActivity :
animSet2.startDelay = 50
// 主按钮隐藏动画
binding.mainFloatButton.animate()
mainFloatButton.animate()
.scaleX(0f)
.scaleY(0f)
.alpha(0f)
.setDuration(150)
.setListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
binding.mainFloatButton.visibility = View.GONE
mainFloatButton.visibility = View.GONE
}
})
.start()
@@ -123,33 +141,38 @@ class GjcWeighingStartActivity :
}
/**
* 收起子按钮
* 收起子按钮(仅平板,手机布局无浮动按钮组)
*/
private fun collapseButtons() {
val mainFloatButton = binding.mainFloatButton ?: return
val maskView = binding.maskView ?: return
val subButton1 = binding.subButton1 ?: return
val subButton2 = binding.subButton2 ?: return
isExpanded = false
// 隐藏遮罩层
binding.maskView.animate().alpha(0f).setDuration(200).withEndAction {
binding.maskView.visibility = View.GONE
maskView.animate().alpha(0f).setDuration(200).withEndAction {
maskView.visibility = View.GONE
}.start()
// 子按钮1动画回到原位
val sub1TransX = ObjectAnimator.ofFloat(binding.subButton1, "translationX", binding.subButton1.translationX, 0f)
val sub1TransY = ObjectAnimator.ofFloat(binding.subButton1, "translationY", binding.subButton1.translationY, 0f)
val sub1Alpha = ObjectAnimator.ofFloat(binding.subButton1, "alpha", 1f, 0f)
val sub1Scale = ObjectAnimator.ofFloat(binding.subButton1, "scaleX", 1f, 0f)
val sub1ScaleY = ObjectAnimator.ofFloat(binding.subButton1, "scaleY", 1f, 0f)
val sub1TransX = ObjectAnimator.ofFloat(subButton1, "translationX", subButton1.translationX, 0f)
val sub1TransY = ObjectAnimator.ofFloat(subButton1, "translationY", subButton1.translationY, 0f)
val sub1Alpha = ObjectAnimator.ofFloat(subButton1, "alpha", 1f, 0f)
val sub1Scale = ObjectAnimator.ofFloat(subButton1, "scaleX", 1f, 0f)
val sub1ScaleY = ObjectAnimator.ofFloat(subButton1, "scaleY", 1f, 0f)
val animSet1 = AnimatorSet()
animSet1.playTogether(sub1TransX, sub1TransY, sub1Alpha, sub1Scale, sub1ScaleY)
animSet1.duration = 200
// 子按钮2动画回到原位
val sub2TransX = ObjectAnimator.ofFloat(binding.subButton2, "translationX", binding.subButton2.translationX, 0f)
val sub2TransY = ObjectAnimator.ofFloat(binding.subButton2, "translationY", binding.subButton2.translationY, 0f)
val sub2Alpha = ObjectAnimator.ofFloat(binding.subButton2, "alpha", 1f, 0f)
val sub2Scale = ObjectAnimator.ofFloat(binding.subButton2, "scaleX", 1f, 0f)
val sub2ScaleY = ObjectAnimator.ofFloat(binding.subButton2, "scaleY", 1f, 0f)
val sub2TransX = ObjectAnimator.ofFloat(subButton2, "translationX", subButton2.translationX, 0f)
val sub2TransY = ObjectAnimator.ofFloat(subButton2, "translationY", subButton2.translationY, 0f)
val sub2Alpha = ObjectAnimator.ofFloat(subButton2, "alpha", 1f, 0f)
val sub2Scale = ObjectAnimator.ofFloat(subButton2, "scaleX", 1f, 0f)
val sub2ScaleY = ObjectAnimator.ofFloat(subButton2, "scaleY", 1f, 0f)
val animSet2 = AnimatorSet()
animSet2.playTogether(sub2TransX, sub2TransY, sub2Alpha, sub2Scale, sub2ScaleY)
@@ -157,19 +180,19 @@ class GjcWeighingStartActivity :
animSet1.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
binding.subButton1.visibility = View.GONE
subButton1.visibility = View.GONE
}
})
animSet2.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
binding.subButton2.visibility = View.GONE
subButton2.visibility = View.GONE
}
})
// 主按钮显示动画
binding.mainFloatButton.visibility = View.VISIBLE
binding.mainFloatButton.animate()
mainFloatButton.visibility = View.VISIBLE
mainFloatButton.animate()
.scaleX(1f)
.scaleY(1f)
.alpha(1f)

View File

@@ -0,0 +1,40 @@
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingWbDetailBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingWbDetailViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant
/**
* 国际出港计重-运单详情页5.5寸手机版专属页面,平板端无对应页面)
*
* 由计重记录列表卡片的「查看详情」进入,只读展示运单基本信息,
* 对应设计稿 documents/5.5寸手持端设计文件/03_出港计重/detail.html。
*/
class GjcWeighingWbDetailActivity :
BaseBindingActivity<ActivityGjcWeighingWbDetailBinding, GjcWeighingWbDetailViewModel>() {
override fun layoutId() = R.layout.activity_gjc_weighing_wb_detail
override fun viewModelClass() = GjcWeighingWbDetailViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("运单详情")
binding.viewModel = viewModel
viewModel.initOnCreated(intent)
}
companion object {
@JvmStatic
fun start(context: Context, bean: GjcWeighingRecordBean) {
val starter = Intent(context, GjcWeighingWbDetailActivity::class.java)
.putExtra(Constant.Key.BEAN, bean)
context.startActivity(starter)
}
}
}

View File

@@ -23,5 +23,10 @@ class GjcCheckInRecordViewHolder(view: View) :
binding.isEditMode = isEditMode
binding.position = position // 传入位置用于显示序号
binding.executePendingBindings()
// 「修改」按钮(手机独有):打开全屏修改覆层编辑本条记录
binding.btnEdit?.setOnClickListener {
activity?.openPhoneEdit(record)
}
}
}

View File

@@ -2,12 +2,17 @@ package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.activity.GjcWeighingRecordDetailsActivity
import com.lukouguoji.gjc.activity.GjcWeighingWbDetailActivity
import com.lukouguoji.gjc.databinding.ItemGjcWeighingRecordBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
/**
* 国际出港计重记录列表 ViewHolder
*
* item 布局分平板layout-sw600dp/item_gjc_weighing_record.xml含选择图标 iv_icon
* 与手机layout/item_gjc_weighing_record.xml卡片式地磅图标 iv_scale 进计重明细、
* 「查看详情」tv_detail 进运单详情)两个变体,单侧独有的 id 需判空调用。
*/
class GjcWeighingRecordViewHolder(view: View) :
BaseViewHolder<GjcWeighingRecordBean, ItemGjcWeighingRecordBinding>(view) {
@@ -17,8 +22,8 @@ class GjcWeighingRecordViewHolder(view: View) :
binding.bean = bean
binding.executePendingBindings()
// 图标点击 - 切换选择状态
binding.ivIcon.setOnClickListener {
// 图标点击 - 切换选择状态(平板独有)
binding.ivIcon?.setOnClickListener {
// 反转checked状态
bean.checked.set(!bean.checked.get())
@@ -26,6 +31,16 @@ class GjcWeighingRecordViewHolder(view: View) :
binding.executePendingBindings()
}
// 地磅图标点击进计重明细(手机独有)
binding.ivScale?.setOnClickListener {
GjcWeighingRecordDetailsActivity.start(it.context, bean)
}
// 「查看详情」进运单详情(手机独有页面)
binding.tvDetail?.setOnClickListener {
GjcWeighingWbDetailActivity.start(it.context, bean)
}
// 整行点击跳转到计重明细页
binding.ll.setOnClickListener {
GjcWeighingRecordDetailsActivity.start(it.context, bean)

View File

@@ -1,15 +1,20 @@
package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.activity.GjcWeighingListActivity
import com.lukouguoji.gjc.activity.GjcWeighingStartActivity
import com.lukouguoji.gjc.databinding.ItemGjcWeighingBinding
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.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjcWeighingBean
/**
* 国际出港计重列表 ViewHolder
*
* item 布局分平板layout-sw600dp/item_gjc_weighing.xml含选择图标 iv_icon
* 与手机layout/item_gjc_weighing.xml卡片式含单票提前运抵按钮 btn_pre_arrive两个变体
* 单侧独有的 id 在 Binding 基类中为可空字段,需判空调用。
*/
class GjcWeighingViewHolder(view: View) :
BaseViewHolder<GjcWeighingBean, ItemGjcWeighingBinding>(view) {
@@ -20,8 +25,8 @@ class GjcWeighingViewHolder(view: View) :
binding.position = position
binding.executePendingBindings()
// 选择图标点击事件 - 切换选择状态
binding.ivIcon.setOnClickListener {
// 选择图标点击事件 - 切换选择状态(平板独有)
binding.ivIcon?.setOnClickListener {
// 反转checked状态
bean.checked.set(!bean.checked.get())
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
@@ -30,6 +35,11 @@ class GjcWeighingViewHolder(view: View) :
binding.executePendingBindings()
}
// 卡片内「提前运抵」按钮(手机独有,单票操作)
binding.btnPreArrive?.setOnClickListener {
(it.context as? GjcWeighingListActivity)?.preArriveClick(bean)
}
// 整行点击跳转到开始计重页面
binding.ll.setOnClickListener {
GjcWeighingStartActivity.startForAdd(it.context, bean.maWbId)

View File

@@ -53,6 +53,7 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0.0") // 总重量
val weightError = MutableLiveData("0.0%") // 重量误差百分比
val totalCarWeight = MutableLiveData("0") // 托盘总重5.5寸手机版顶部卡片,平板布局不引用)
// 传递参数用于API调用
private var prefix = ""
@@ -143,6 +144,10 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
val sumWeight = records.sumOf { it.weight }
totalWeight.value = String.format("%.2f", sumWeight)
// 计算托盘总重(手机版顶部卡片)
val sumCarWeight = records.sumOf { it.carWeight.toDoubleOrNull() ?: 0.0 }
totalCarWeight.value = String.format("%.2f", sumCarWeight)
// 计算重量误差百分比
val preWeightValue = preWeight.value?.toDoubleOrNull() ?: 0.0
val error = if (sumWeight > 0 && preWeightValue > 0) {
@@ -191,6 +196,39 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
saveRecords(records)
}
/**
* 5.5寸手机版「修改记录」覆层保存:与 [onSaveClick] 相同的批量更新接口,
* 但保存成功后留在本页(收起覆层 + 重新加载),不关闭页面。仅手机布局调用。
*/
fun onPhoneSaveClick() {
val records = recordList.value ?: return
if (!validateRecords(records)) return
launchLoadingCollect({
NetApply.api.updateGjcCheckInRecordList(records)
}) {
onSuccess = { result ->
if (result.data == true) {
showToast("保存成功")
// 收起编辑覆层
isEditMode.value = false
// 通知列表页刷新
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
// 重新加载本页数据
loadData()
} else {
showToast("保存失败")
}
}
onFailed = { code, msg ->
showToast("保存失败:$msg")
}
}
}
///////////////////////////////////////////////////////////////////////////
// 业务逻辑
///////////////////////////////////////////////////////////////////////////

View File

@@ -46,6 +46,32 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
val totalWeight = MutableLiveData("0") // 总重量
val cargoWeight = MutableLiveData("0") // 总货重
// ========== 5.5寸手机版专属字段(平板不调用 initPhoneExtras行为零变化 ==========
/** 目的站(后端支持入参 dest */
val destFilter = MutableLiveData("")
/** 计重人(后端支持入参 opId下拉复用仓库用户列表 */
val opUserFilter = MutableLiveData("")
val whsUserList = MutableLiveData<List<KeyValue>>(emptyList())
/** 入库日期起/止(后端暂无对应入参,传 opDateStart/opDateEnd 预留参数,见接口问题清单) */
val checkInDateStart = MutableLiveData("")
val checkInDateEnd = MutableLiveData("")
/** 由手机形态的 Activity 置 true平板保持 false不产生任何额外请求与参数 */
private var phoneExtrasEnabled = false
/**
* 开启手机版专属数据:放开「今天」默认日期(设计稿筛选无航班日期)、加载计重人下拉。
* 仅由手机形态的 Activity 调用。
*/
fun initPhoneExtras() {
phoneExtrasEnabled = true
flightDate.value = ""
DictUtils.getWHSUserList { whsUserList.postValue(it) }
}
///////////////////////////////////////////////////////////////////////////
// 方法区
///////////////////////////////////////////////////////////////////////////
@@ -130,25 +156,38 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
* 获取列表数据
*/
override fun getData() {
// 公共查询条件(列表与统计共用)
val baseParams = mutableMapOf<String, Any?>(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
)
// 手机版专属条件(平板 phoneExtrasEnabled 恒为 false请求体与改造前完全一致
if (phoneExtrasEnabled) {
// 搜索分流实测11 位数字走 wbNo 精确;其余走 likeNo后端按 8 位 no 匹配)
val key = waybillNo.value?.trim() ?: ""
if (key.isNotEmpty() && key.length != 11) {
baseParams["wbNo"] = null
baseParams["likeNo"] = key
}
baseParams["dest"] = destFilter.value?.ifEmpty { null }
baseParams["opId"] = opUserFilter.value?.ifEmpty { null }
// 入库日期起/止为后端预留参数(暂无对应入参,静默忽略,见接口问题清单)
baseParams["opDateStart"] = checkInDateStart.value?.ifEmpty { null }
baseParams["opDateEnd"] = checkInDateEnd.value?.ifEmpty { null }
}
// 构建查询参数(列表接口)
val listParams = mapOf(
val listParams = (baseParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit,
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
)).toRequestBody()
// 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
val totalParams = baseParams.toRequestBody()
// 获取列表数据显示loading
launchLoadingCollect({

View File

@@ -72,9 +72,22 @@ class GjcWeighingStartViewModel : BaseViewModel() {
val spCodeList = MutableLiveData<List<KeyValue>>() // 特码列表
val businessTypeList = MutableLiveData<List<KeyValue>>() // 业务类型列表
// 托盘车自重(查询获取
// 托盘车自重(平板:托盘车号查询回填只读;手机:手输,见下方 initPhoneExtras
val carWeight = MutableLiveData("0")
// ========== 5.5寸手机版专属(平板不调用 initPhoneExtras行为零变化 ==========
/** 托盘数量(设计稿字段,后端暂无对应入参,提交时传 palletNumber 预留参数,见接口问题清单) */
val palletNumber = MutableLiveData("")
/** 手机形态标记:为 true 时提交体额外携带 palletNumber / carWeight后端静默忽略 */
private var phoneMode = false
/** 仅由手机形态的 Activity 调用 */
fun initPhoneExtras() {
phoneMode = true
}
/**
* 初始化
*/
@@ -392,6 +405,12 @@ class GjcWeighingStartViewModel : BaseViewModel() {
passageWayId = this@GjcWeighingStartViewModel.channel.value
remark = pageRemark.value
// 手机版专属:托盘数量/托盘自重(后端暂无对应入参,静默忽略;平板 phoneMode 恒 false字段为 null 不进请求体)
if (this@GjcWeighingStartViewModel.phoneMode) {
palletNumber = this@GjcWeighingStartViewModel.palletNumber.value?.ifEmpty { null }
carWeight = this@GjcWeighingStartViewModel.carWeight.value?.ifEmpty { null }
}
}
// 3. 构建请求数据GjcMaWb转RequestBody包含通道号
@@ -423,8 +442,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
maWbBean.value = maWbBean.value?.apply {
carId = null
remark = null
palletNumber = null
}
carWeight.value = "0"
this@GjcWeighingStartViewModel.palletNumber.value = ""
} else {
showToast(result.msg.noNull("分托计重失败"))
}
@@ -502,7 +523,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
"remark" to pageRemark.value,
"checkIn" to "1", // 收运状态设置为已收运
"passageWayId" to channel.value, // 通道号参数
"passageWay" to (channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: "")
"passageWay" to (channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""),
// 手机版专属预留参数(平板 phoneMode 恒 false → null → removeEmptyOrNull 移除,请求体不变)
"palletNumber" to (if (phoneMode) palletNumber.value?.ifEmpty { null } else null),
"carWeight" to (if (phoneMode) carWeight.value?.ifEmpty { null } else null)
).toRequestBody(removeEmptyOrNull = true)
launchLoadingCollect({

View File

@@ -55,15 +55,80 @@ class GjcWeighingViewModel : BasePageViewModel() {
// 全选状态
val isAllChecked = MutableLiveData(false)
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcWeighingBean> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
// ========== 5.5寸手机版专属字段(平板不调用 initPhoneExtras行为零变化 ==========
/** 手机版顶部搜索关键字(运单号/航班号混输getData 内分流含字母→fno纯数字→likeNo 模糊) */
val searchKey = MutableLiveData("")
/** 主页三格统计待计重checkIn=0/ 计重中checkIn=2数量 */
val pendingCount = MutableLiveData("0")
val weighingCount = MutableLiveData("0")
/** 手机版筛选弹层字段。通道号/承运人/运单类型后端暂无查询入参(见接口问题清单),传预留参数名 */
val channelFilter = MutableLiveData("") // 通道号 → passageWayId
val carrierFilter = MutableLiveData("") // 承运人 → by0
val awbTypeFilter = MutableLiveData("") // 运单类型 → awbType
val channelList = MutableLiveData<List<KeyValue>>(emptyList())
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
/** 由手机形态的 Activity 置 true平板保持 false不产生任何额外请求与参数 */
private var phoneExtrasEnabled = false
/**
* 开启手机版专属数据:放开「今天」默认日期(设计稿主页无日期筛选)、加载筛选弹层字典。
* 仅由手机形态的 Activity 调用。
*/
fun initPhoneExtras() {
phoneExtrasEnabled = true
flightDate.value = ""
DictUtils.getGjcChannelList { list ->
channelList.postValue(listOf(KeyValue("全部", "")) + list)
}
DictUtils.getWaybillTypeList2(ieFlag = "E", type = "IO") {
awbTypeList.postValue(it)
}
}
/**
* 单票提前运抵(手机版卡片内按钮;平板走底部批量 [arrivedAhead]
*/
fun arrivedAheadSingle(bean: GjcWeighingBean) {
if (bean.arriveFlag == "1") {
showToast("该运单已提前运抵")
return
}
val maWbList = listOf(
GjcMaWb(
maWbId = bean.maWbId,
no = bean.no,
prefix = bean.prefix,
wbNo = bean.wbNo,
arriveFlag = "1"
)
)
launchLoadingCollect({ NetApply.api.preArrive(maWbList) }) {
onSuccess = {
showToast("提前运抵成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
onFailed = { code, msg ->
showToast(msg.noNull("提前运抵失败"))
}
}
}
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcWeighingBean> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
///////////////////////////////////////////////////////////////////////////
// 方法区
@@ -185,25 +250,41 @@ class GjcWeighingViewModel : BasePageViewModel() {
* 获取列表数据
*/
override fun getData() {
// 公共查询条件(列表与统计共用)
val baseParams = mutableMapOf<String, Any?>(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
)
// 手机版专属条件(平板 phoneExtrasEnabled 恒为 false请求体与改造前完全一致
if (phoneExtrasEnabled) {
val key = searchKey.value?.trim() ?: ""
if (key.isNotEmpty()) {
// 分流规则(实测):含字母 → 航班号11 位数字 → wbNo 精确;
// 其余数字 → likeNo后端按 8 位 no 匹配,并非任意模糊)
when {
key.any { it.isLetter() } -> baseParams["fno"] = key
key.length == 11 -> baseParams["wbNo"] = key
else -> baseParams["likeNo"] = key
}
}
// 以下三个为后端预留参数(暂无对应入参,后端静默忽略,见接口问题清单)
baseParams["passageWayId"] = channelFilter.value?.ifEmpty { null }
baseParams["by0"] = carrierFilter.value?.ifEmpty { null }
baseParams["awbType"] = awbTypeFilter.value?.ifEmpty { null }
}
// 构建查询参数(列表接口)
val listParams = mapOf(
val listParams = (baseParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit,
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
)).toRequestBody()
// 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
val totalParams = baseParams.toRequestBody()
// 获取列表数据显示loading
launchLoadingCollect({
@@ -225,6 +306,21 @@ class GjcWeighingViewModel : BasePageViewModel() {
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
}
}
// 手机版三格统计:待计重 / 计重中(各带一次 checkIn 条件的统计请求,仅手机调用)
if (phoneExtrasEnabled) {
listOf("0" to pendingCount, "2" to weighingCount).forEach { (state, liveData) ->
launchCollect({
NetApply.api.getGjcWeighingStatistics(
(baseParams + mapOf("checkIn" to state)).toRequestBody()
)
}) {
onSuccess = { result ->
liveData.value = (result.data?.wbNumber ?: 0).toString()
}
}
}
}
}
/**
@@ -234,7 +330,10 @@ class GjcWeighingViewModel : BasePageViewModel() {
if (resultCode == Activity.RESULT_OK && data != null) {
when (requestCode) {
Constant.RequestCode.WAYBILL -> {
waybillNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
val content = data.getStringExtra(Constant.Result.CODED_CONTENT)
// 手机版扫码写入顶部搜索框,平板写入原运单号搜索条
if (phoneExtrasEnabled) searchKey.value = content
else waybillNo.value = content
refresh()
}
}

View File

@@ -0,0 +1,30 @@
package com.lukouguoji.gjc.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.ktx.showToast
/**
* 国际出港计重-运单详情 ViewModel5.5寸手机版专属页面)
*
* 只读展示计重记录列表传入的运单信息,无接口请求。
* 注:设计稿中的「通道号」字段在 /IntExpCheckIn/checked/pageQuery 出参中不存在(后端缺口,
* 见接口问题清单),布局侧空值兜底显示 "-"。
*/
class GjcWeighingWbDetailViewModel : BaseViewModel() {
// 运单信息(从计重记录列表页传入)
val bean = MutableLiveData(GjcWeighingRecordBean())
fun initOnCreated(intent: Intent) {
val data = intent.getSerializableExtra(Constant.Key.BEAN) as? GjcWeighingRecordBean
if (data != null) {
bean.value = data
} else {
showToast("参数错误")
}
}
}

View File

@@ -0,0 +1,227 @@
<?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.gjc.viewModel.GjcWeighingViewModel" />
<!-- 平板端不使用仅为与手机变体layout/activity_gjc_weighing_list.xml保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingListActivity" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择代理 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择代理"}'
list="@{viewModel.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择特码 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索和添加按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 添加按钮 -->
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}"
android:src="@drawable/img_add" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<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"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_weighing" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 全选按钮 (图标+文字) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.checkAllClick()}">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp" />
</LinearLayout>
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量100" />
</LinearLayout>
<!-- 提前运抵按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.arrivedAhead()}"
android:text="提前运抵" />
<!-- 计重记录按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.recordClick()}"
android:text="计重记录" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,279 @@
<?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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel" />
<!-- 以下两个变量平板端不使用仅为与手机变体layout/activity_gjc_weighing_record_details.xml保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordDetailsActivity" />
<variable
name="editRecord"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
</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_margin="15dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="运单信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1dp" />
<!-- 第一部分:运单信息区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="15dp">
<!-- 运单号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.waybillNo}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配件数:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.prePc}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配重量:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.preWeight}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 品名(中) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="品名(中)"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.goodsName}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:layout_weight="1"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="称重信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:background="#e7e7e7"
android:layout_height="1px" />
<!-- 第二部分:计重记录列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/item_gjc_check_in_record" />
</LinearLayout>
<!-- 取消+保存按钮组(编辑模式,居中) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:orientation="horizontal"
android:visibility="@{viewModel.isEditMode ? View.VISIBLE : View.GONE}">
<!-- 取消按钮 -->
<TextView
android:id="@+id/btnCancel"
style="@style/tv_bottom_btn"
android:layout_marginEnd="10dp"
android:onClick="@{() -> viewModel.onCancelClick()}"
android:text="取消" />
<!-- 保存按钮 -->
<TextView
android:id="@+id/btnSave"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onSaveClick()}"
android:text="保存" />
</LinearLayout>
<!-- 第三部分:底部统计与按钮区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="15dp">
<!-- 统计信息(左侧) -->
<LinearLayout
android:id="@+id/statsLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 总件数 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{`总件数:` + viewModel.totalPc}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 总重量 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`总重量:` + viewModel.totalWeight}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 重量误差(红色) -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`重量误差:` + viewModel.weightError}"
android:textColor="@color/text_red"
android:textSize="16sp" />
</LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 修改按钮(只读模式,右侧) -->
<TextView
android:id="@+id/btnModify"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onModifyClick()}"
android:text="修改"
android:visibility="@{viewModel.isEditMode ? View.GONE : View.VISIBLE}" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,188 @@
<?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.gjc.viewModel.GjcWeighingRecordViewModel" />
<!-- 平板端不使用仅为与手机变体layout/activity_gjc_weighing_record_list.xml保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordListActivity" />
</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}"
setUpperCaseAlphanumeric="@{true}" />
<!-- 择代理 -->
<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.agentCode}" />
<!-- 择特码 -->
<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.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
<!-- 运单号 -->
<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.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/checked/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<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_gjc_weighing_record" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 统计信息 -->
<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"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量100" />
</LinearLayout>
<!-- 运抵申报按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.declareClick()}"
android:text="运抵申报" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,496 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- 主内容区域 -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="8dp">
<!-- 第一部分前2行表单左侧2列+ 地磅称重(右侧) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 左侧前2行表单2列 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:orientation="vertical">
<!-- 第1行运单号、通道号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运单号"}'
required="@{true}"
setRefreshCallBack="@{viewModel::onWaybillNoInputComplete}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.wbNo}'
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择通道号"}'
list="@{viewModel.channelList}"
required="@{true}"
title='@{"通 道 号"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第2行代理人、特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代 理 人"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.agentCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特 码"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.spCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<!-- 右侧:地磅称重区域 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 黄色标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="@drawable/bg_shouyun_dbcz"
android:gravity="center"
android:text="地磅称重"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 青色重量显示区域 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_shouyun_dbzl"
android:minHeight="60dp">
<EditText
android:id="@+id/etWeight"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@null"
android:gravity="center"
android:hint="0"
android:inputType="numberDecimal"
android:text="@={viewModel.diBangWeight}"
android:textColor="@color/text_red"
android:textColorHint="@color/text_red"
android:textSize="45sp"
android:textStyle="bold"
tools:text="1655" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/etWeight"
android:layout_marginStart="8dp"
android:layout_toEndOf="@id/etWeight"
android:text="kg"
android:textColor="@color/text_red"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<!-- 第3行航班日期、航班号、航程 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
titleLength="@{5}"
type="@{DataLayoutType.DATE}"
value='@={viewModel.flightDate}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航班号"}'
title='@{"航 班 号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.fno}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航程"}'
title='@{"航 程"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.range}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第4行预配件数、预配重量、预配体积只读 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.pc)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.weight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.volume)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第5行实时件数、实时重量、实时体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时件数"}'
title='@{"实时件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时重量"}'
title='@{"实时重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时体积"}'
title='@{"实时体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第6行运抵件数、运抵重量、运抵体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵件数"}'
required="@{true}"
title='@{"运抵件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arrivePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵重量"}'
required="@{true}"
title='@{"运抵重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵体积"}'
title='@{"运抵体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第7行托盘车号、托盘车自重、业务类型 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘车号"}'
setRefreshCallBack="@{viewModel::onCarIdInputComplete}"
title='@{"托盘车号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.carId}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"托盘车自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.carWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}"
title='@{"业务类型"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.businessType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第8行备注 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入备注"}'
inputHeight="@{80}"
title='@{"备 注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.pageRemark}'
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp" />
</LinearLayout>
<!-- 底部操作栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="15dp"
android:paddingTop="15dp">
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_marginEnd="30dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.sortingWeighingClick()}"
android:text="分托计重"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.completeCheckInClick()}"
android:text="完成计重"
android:textColor="@color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<!-- 浮动按钮组 -->
<!-- 遮罩层(点击收起) -->
<View
android:id="@+id/maskView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<!-- 子按钮1 -->
<View
android:id="@+id/subButton1"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="25dp"
android:layout_marginBottom="70dp"
android:background="@drawable/ic_btn_customs"
android:visibility="gone" />
<!-- 子按钮2 -->
<View
android:id="@+id/subButton2"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="70dp"
android:layout_marginBottom="25dp"
android:background="@drawable/ic_btn_record"
android:visibility="gone" />
<!-- 主浮动按钮 -->
<ImageView
android:id="@+id/mainFloatButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/ic_float_button_weighing_start" />
</FrameLayout>
</layout>

View File

@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="record"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
<variable
name="isEditMode"
type="Boolean" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
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:paddingVertical="8dp"
android:paddingHorizontal="15dp">
<!-- 绿色圆圈序号 -->
<TextView
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/bg_circle_green"
android:gravity="center"
android:text="@{String.valueOf(position + 1)}"
android:textColor="@color/c666666"
android:textSize="16sp" />
<!-- 件数字段 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{isEditMode}"
hint="@{`件数`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER}"
title="@{`件数`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@={record.pcStr}" />
<!-- 重量字段 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{isEditMode}"
hint="@{`重量`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title="@{`重量`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@={record.weightStr}" />
<!-- 托盘自重字段(只读) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{false}"
title="@{`托盘自重`}"
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value="@{record.carWeight}" />
<!-- 计重时间字段(只读) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1.5"
enable="@{false}"
title="@{`计重时间`}"
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value="@{record.opDate}" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,316 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View" />
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcWeighingBean" />
<variable
name="position"
type="int" />
</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="@{bean.checkIn.equals(`2`) ? @drawable/bg_item_green : @drawable/bg_item}"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 飞机图标 (根据checked状态切换图片) -->
<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:src="@drawable/img_plane" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="运单号:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
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
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="代理人:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:maxLines="1"
android:lines="1"
android:ellipsize="end"
android:text='@{bean.agentName}'
tools:text="SF" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="特码:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预配件数:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(bean.pc)}'
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预配重量:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="计划航班:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
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
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="航程:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.range}'
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预计起飞:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.scheduledTackOffHM}"
tools:text="09:12" />
<TextView
android:id="@+id/tvDayPlus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="+1"
android:textColor="@color/text_red"
android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="业务类型:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.businessName}'
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="品名(中)" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:text='@{bean.goodsCn}'
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:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -0,0 +1,272 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcWeighingRecordBean" />
</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:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 飞机图标 -->
<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_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
tools:text="10" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
tools:text="100" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInPc)}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInWeight)}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="代理人:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.agentName}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="特码:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.spCode}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收运人:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.userName}'
android:textSize="15sp"
tools:text="张三" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库时间:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.opDate}'
android:textSize="15sp"
tools:text="2024-02-16 09:12" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -1,222 +1,301 @@
<?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.gjc.viewModel.GjcWeighingViewModel" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择代理 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择代理"}'
list="@{viewModel.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择特码 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索和添加按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 添加按钮 -->
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}"
android:src="@drawable/img_add" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<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"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_weighing" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 全选按钮 (图标+文字) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.checkAllClick()}">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp" />
</LinearLayout>
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量100" />
</LinearLayout>
<!-- 提前运抵按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.arrivedAhead()}"
android:text="提前运抵" />
<!-- 计重记录按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.recordClick()}"
android:text="计重记录" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港待计重 —— 手机版布局5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_list.xml两者是同一布局的资源变体
DataBinding 因此生成同一个 ActivityGjcWeighingListBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致viewModel / activity
· 保留 Activity 中引用的控件 idsrl / rv
→ GjcWeighingViewModel 的业务逻辑与接口调用全部复用,平板端行为不受影响
交互差异(均复用既有 ViewModel 字段与接口):
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号/航班号混输)+ 底部筛选弹层
· 三格统计(总票数/待计重/计重中后两格为手机专属统计请求initPhoneExtras 开启)
· 平板底部全选 + 批量提前运抵 → 手机卡片内单票「提前运抵」按钮
· 右下 FAB 进入计重记录(平板为搜索区图标按钮)
-->
<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.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingListActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索运单号/航班号..."}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setOnScanClickListener="@{(v)-> viewModel.waybillNoScanClick()}"
setRefreshCallBack="@{viewModel::searchClick}"
upperCase="@{true}"
value="@={viewModel.searchKey}" />
</LinearLayout>
<!-- ==================== 三格统计:总票数 / 待计重 / 计重中 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<!-- 总票数(蓝) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_primary" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总票数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalCount}"
android:textColor="@color/phone_primary"
android:textSize="20sp"
android:textStyle="bold"
tools:text="4" />
</LinearLayout>
</LinearLayout>
<!-- 待计重(橙) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_orange_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="待计重"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.pendingCount}"
android:textColor="@color/phone_tag_orange_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="2" />
</LinearLayout>
</LinearLayout>
<!-- 计重中(绿) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_green_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="计重中"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.weighingCount}"
android:textColor="@color/phone_tag_green_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="2" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- ==================== 列表 ==================== -->
<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"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="80dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_gjc_weighing" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
<!-- ==================== 右下 FAB计重记录 ==================== -->
<ImageView
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:background="@drawable/bg_phone_fab"
android:contentDescription="计重记录"
android:elevation="6dp"
android:onClick="@{()-> viewModel.recordClick()}"
android:padding="14dp"
android:src="@drawable/ic_phone_clipboard" />
<!-- ==================== 筛选弹层elevation 需大于 FAB 的 6dp ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 通道号(后端暂无查询入参,预留,见接口问题清单) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择通道号"}'
list="@{viewModel.channelList}"
title='@{"通道号"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.channelFilter}" />
<!-- 承运人(后端暂无查询入参,预留,见接口问题清单) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入承运人"}'
title='@{"承运人"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.carrierFilter}" />
<!-- 运单类型(后端暂无查询入参,预留,见接口问题清单) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择运单类型"}'
list="@{viewModel.awbTypeList}"
title='@{"运单类型"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.awbTypeFilter}" />
<!-- 代理人(复用既有 agentCode 查询字段) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代理人"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.agentCode}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -1,270 +1,257 @@
<?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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel" />
</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_margin="15dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="运单信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1dp" />
<!-- 第一部分:运单信息区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="15dp">
<!-- 运单号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.waybillNo}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配件数:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.prePc}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配重量:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.preWeight}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 品名(中) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="品名(中)"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.goodsName}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:layout_weight="1"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="称重信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:background="#e7e7e7"
android:layout_height="1px" />
<!-- 第二部分:计重记录列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/item_gjc_check_in_record" />
</LinearLayout>
<!-- 取消+保存按钮组(编辑模式,居中) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:orientation="horizontal"
android:visibility="@{viewModel.isEditMode ? View.VISIBLE : View.GONE}">
<!-- 取消按钮 -->
<TextView
android:id="@+id/btnCancel"
style="@style/tv_bottom_btn"
android:layout_marginEnd="10dp"
android:onClick="@{() -> viewModel.onCancelClick()}"
android:text="取消" />
<!-- 保存按钮 -->
<TextView
android:id="@+id/btnSave"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onSaveClick()}"
android:text="保存" />
</LinearLayout>
<!-- 第三部分:底部统计与按钮区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="15dp">
<!-- 统计信息(左侧) -->
<LinearLayout
android:id="@+id/statsLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 总件数 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{`总件数:` + viewModel.totalPc}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 总重量 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`总重量:` + viewModel.totalWeight}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 重量误差(红色) -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`重量误差:` + viewModel.weightError}"
android:textColor="@color/text_red"
android:textSize="16sp" />
</LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 修改按钮(只读模式,右侧) -->
<TextView
android:id="@+id/btnModify"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onModifyClick()}"
android:text="修改"
android:visibility="@{viewModel.isEditMode ? View.GONE : View.VISIBLE}" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重明细 —— 手机版布局5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_record_details.xml列表内联编辑
变量 viewModel / activity / editRecord 与平板一致;保留 Activity 中引用的控件 idrecyclerView。
交互差异(业务逻辑全部复用 GjcWeighingRecordDetailsViewModel
· 顶部卡片:运单号 + 总件数/总重量/托盘总重totalCarWeight 为手机专属统计字段)
· 每条记录卡片带「修改」→ 全屏「修改记录」覆层isEditMode 驱动显隐,
平板端该状态驱动列表内联编辑,互不影响);保存走 onPhoneSaveClick成功后留在本页
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneFormRowType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordDetailsActivity" />
<variable
name="editRecord"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ============ 头部卡片:运单号 + 汇总统计 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical">
<!-- 顶部主色描边条 -->
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/bg_phone_card_top_accent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="14dp">
<!-- 运单号行 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/bg_phone_fab" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="@{viewModel.waybillNo}"
android:textColor="@color/phone_text_strong"
android:textSize="20sp"
android:textStyle="bold"
tools:text="78133363396" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_btn_weak"
android:paddingHorizontal="10dp"
android:paddingVertical="4dp"
android:text="国际出港"
android:textColor="@color/phone_primary"
android:textSize="12sp" />
</LinearLayout>
<!-- 汇总统计 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
label1='@{"总件数"}'
label2='@{"总重量(kg)"}'
label3='@{"托盘总重(kg)"}'
value1="@{viewModel.totalPc}"
value2="@{viewModel.totalWeight}"
value3="@{viewModel.totalCarWeight}" />
</LinearLayout>
</LinearLayout>
<!-- ============ 计重记录列表 ============ -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="2dp"
android:paddingBottom="16dp"
tools:itemCount="3"
tools:listitem="@layout/item_gjc_check_in_record" />
</LinearLayout>
<!-- ============ 全屏「修改记录」覆层isEditMode 驱动) ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:clickable="true"
android:elevation="10dp"
android:focusable="true"
android:orientation="vertical"
android:visibility="@{viewModel.isEditMode ? View.VISIBLE : View.GONE}"
tools:visibility="gone">
<!-- 覆层顶栏(与公共标题栏同规格) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/phone_primary"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()-> activity.closePhoneEdit()}"
android:paddingHorizontal="16dp"
android:text=" 返回"
android:textColor="@color/white"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="修改记录"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 右侧占位,保证标题居中 -->
<View
android:layout_width="62dp"
android:layout_height="match_parent" />
</LinearLayout>
<!-- 编辑表单卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:paddingHorizontal="14dp"
android:paddingVertical="4dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵件数"}'
numeric="@{true}"
required="@{true}"
title='@{"运抵件数"}'
type="@{PhoneFormRowType.INPUT}"
value="@={editRecord.pcStr}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵重量"}'
numeric="@{true}"
required="@{true}"
title='@{"运抵重量(kg)"}'
type="@{PhoneFormRowType.INPUT}"
value="@={editRecord.weightStr}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入托盘自重"}'
numeric="@{true}"
required="@{true}"
title='@{"托盘自重(kg)"}'
type="@{PhoneFormRowType.INPUT}"
value="@={editRecord.carWeightStr}" />
<!-- 计重人:接口出参仅有操作员编码(无姓名,后端缺口见接口问题清单) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"计重人"}'
type="@{PhoneFormRowType.TEXT}"
value="@{editRecord.opId}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"计重时间"}'
type="@{PhoneFormRowType.TEXT}"
value="@{editRecord.opDate}" />
</LinearLayout>
<!-- 保存 -->
<TextView
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="24dp"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> viewModel.onPhoneSaveClick()}"
android:text="保存"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</FrameLayout>
</layout>

View File

@@ -1,183 +1,301 @@
<?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.gjc.viewModel.GjcWeighingRecordViewModel" />
</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}"
setUpperCaseAlphanumeric="@{true}" />
<!-- 择代理 -->
<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.agentCode}" />
<!-- 择特码 -->
<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.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
<!-- 运单号 -->
<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.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/checked/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<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_gjc_weighing_record" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 统计信息 -->
<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"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量100" />
</LinearLayout>
<!-- 运抵申报按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.declareClick()}"
android:text="运抵申报" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重记录 —— 手机版布局5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_record_list.xml。
变量 viewModel / activity 与平板一致;保留 Activity 中引用的控件 idsrl / rv。
交互差异(业务逻辑全部复用 GjcWeighingRecordViewModel
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号模糊)+ 底部筛选弹层
· 筛选弹层:入库日期起/止(后端暂无入参,预留)、代理人、特码、目的站、计重人
· 三格统计复用既有统计接口出参(总票数/总件数/总重量)
-->
<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.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordListActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索运单号"}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setOnScanClickListener="@{(v)-> viewModel.waybillNoScanClick()}"
setRefreshCallBack="@{viewModel::searchClick}"
upperCase="@{true}"
value="@={viewModel.waybillNo}" />
</LinearLayout>
<!-- ==================== 三格统计:总票数 / 总件数 / 总重量 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<!-- 总票数(蓝) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_primary" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingHorizontal="8dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总票数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalCount}"
android:textColor="@color/phone_primary"
android:textSize="20sp"
android:textStyle="bold"
tools:text="3" />
</LinearLayout>
</LinearLayout>
<!-- 总件数(橙) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_orange_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingHorizontal="8dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总件数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalPc}"
android:textColor="@color/phone_tag_orange_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="145" />
</LinearLayout>
</LinearLayout>
<!-- 总重量(绿) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_green_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingHorizontal="8dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总重量"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalWeight}"
android:textColor="@color/phone_tag_green_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="2480" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- ==================== 列表 ==================== -->
<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"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="16dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/item_gjc_weighing_record" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
<!-- ==================== 筛选弹层 ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 入库日期起/止:后端暂无查询入参,预留(见接口问题清单) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择入库日期"}'
title='@{"入库日期起"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.checkInDateStart}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择入库日期"}'
title='@{"入库日期止"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.checkInDateEnd}" />
<!-- 代理人(复用既有 agentCode 查询字段) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"全部"}'
list="@{viewModel.agentList}"
title='@{"代理人"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.agentCode}" />
<!-- 特码(复用既有 spCode 查询字段) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"全部"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
<!-- 目的站(后端支持入参 dest -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入目的站"}'
title='@{"目的站"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.destFilter}" />
<!-- 计重人(后端支持入参 opId -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"全部"}'
list="@{viewModel.whsUserList}"
title='@{"计重人"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.opUserFilter}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -1,496 +1,286 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- 主内容区域 -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="8dp">
<!-- 第一部分前2行表单左侧2列+ 地磅称重(右侧) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 左侧前2行表单2列 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:orientation="vertical">
<!-- 第1行运单号、通道号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运单号"}'
required="@{true}"
setRefreshCallBack="@{viewModel::onWaybillNoInputComplete}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.wbNo}'
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择通道号"}'
list="@{viewModel.channelList}"
required="@{true}"
title='@{"通 道 号"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第2行代理人、特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代 理 人"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.agentCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特 码"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.spCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<!-- 右侧:地磅称重区域 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 黄色标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="@drawable/bg_shouyun_dbcz"
android:gravity="center"
android:text="地磅称重"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 青色重量显示区域 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_shouyun_dbzl"
android:minHeight="60dp">
<EditText
android:id="@+id/etWeight"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@null"
android:gravity="center"
android:hint="0"
android:inputType="numberDecimal"
android:text="@={viewModel.diBangWeight}"
android:textColor="@color/text_red"
android:textColorHint="@color/text_red"
android:textSize="45sp"
android:textStyle="bold"
tools:text="1655" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/etWeight"
android:layout_marginStart="8dp"
android:layout_toEndOf="@id/etWeight"
android:text="kg"
android:textColor="@color/text_red"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<!-- 第3行航班日期、航班号、航程 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
titleLength="@{5}"
type="@{DataLayoutType.DATE}"
value='@={viewModel.flightDate}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航班号"}'
title='@{"航 班 号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.fno}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航程"}'
title='@{"航 程"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.range}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第4行预配件数、预配重量、预配体积只读 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.pc)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.weight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.volume)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第5行实时件数、实时重量、实时体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时件数"}'
title='@{"实时件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时重量"}'
title='@{"实时重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时体积"}'
title='@{"实时体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第6行运抵件数、运抵重量、运抵体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵件数"}'
required="@{true}"
title='@{"运抵件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arrivePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵重量"}'
required="@{true}"
title='@{"运抵重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵体积"}'
title='@{"运抵体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第7行托盘车号、托盘车自重、业务类型 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘车号"}'
setRefreshCallBack="@{viewModel::onCarIdInputComplete}"
title='@{"托盘车号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.carId}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"托盘车自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.carWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}"
title='@{"业务类型"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.businessType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第8行备注 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入备注"}'
inputHeight="@{80}"
title='@{"备 注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.pageRemark}'
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp" />
</LinearLayout>
<!-- 底部操作栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="15dp"
android:paddingTop="15dp">
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_marginEnd="30dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.sortingWeighingClick()}"
android:text="分托计重"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.completeCheckInClick()}"
android:text="完成计重"
android:textColor="@color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<!-- 浮动按钮组 -->
<!-- 遮罩层(点击收起) -->
<View
android:id="@+id/maskView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<!-- 子按钮1 -->
<View
android:id="@+id/subButton1"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="25dp"
android:layout_marginBottom="70dp"
android:background="@drawable/ic_btn_customs"
android:visibility="gone" />
<!-- 子按钮2 -->
<View
android:id="@+id/subButton2"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="70dp"
android:layout_marginBottom="25dp"
android:background="@drawable/ic_btn_record"
android:visibility="gone" />
<!-- 主浮动按钮 -->
<ImageView
android:id="@+id/mainFloatButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/ic_float_button_weighing_start" />
</FrameLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港开始计重 —— 手机版布局5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_start.xml。
变量与平板一致(仅 viewModel平板独有 idetWeight / mainFloatButton / maskView /
subButton1 / subButton2手机变体不存在Activity 中已判空处理。
交互差异(业务逻辑全部复用 GjcWeighingStartViewModel
· 手机版从待计重卡片进入(必带 maWbId故不做运单号输入行
· 平板「地磅称重」输入 → 手机直接编辑「运抵重量」(同一 arriveWeight 字段)
· 平板「托盘车号」→ 手机按设计稿为「托盘数量」palletNumber 预留字段),
「托盘自重」相应改为手输carWeight两者后端暂无入参见接口问题清单
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneFormRowType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp">
<!-- ============ 头部卡片:运单号 + 预配统计 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical">
<!-- 顶部主色描边条 -->
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/bg_phone_card_top_accent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="14dp">
<!-- 运单号行 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/bg_phone_fab" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="@{viewModel.maWbBean.wbNo}"
android:textColor="@color/phone_text_strong"
android:textSize="20sp"
android:textStyle="bold"
tools:text="781333617" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_btn_weak"
android:paddingHorizontal="10dp"
android:paddingVertical="4dp"
android:text="国际出港"
android:textColor="@color/phone_primary"
android:textSize="12sp" />
</LinearLayout>
<!-- 预配统计 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
label1='@{"预配件数"}'
label2='@{"预配重量"}'
label3='@{"预配体积"}'
value1="@{String.valueOf(viewModel.maWbBean.pc)}"
value2='@{viewModel.maWbBean.weight + " kg"}'
value3='@{viewModel.maWbBean.volume + " m³"}' />
</LinearLayout>
</LinearLayout>
<!-- ============ 表单卡片 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:paddingHorizontal="14dp"
android:paddingVertical="4dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择通道号"}'
list="@{viewModel.channelList}"
required="@{true}"
title='@{"通道号"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.channel}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代理人"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.maWbBean.agentCode}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.maWbBean.spCode}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵件数"}'
numeric="@{true}"
title='@{"运抵件数"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.arrivePc}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵重量"}'
numeric="@{true}"
title='@{"运抵重量"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.arriveWeight}" />
<!-- 运抵体积 = 运抵重量 / 220 自动计算,只读 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"运抵体积"}'
type="@{PhoneFormRowType.TEXT}"
value="@{viewModel.arriveVolume}" />
<!-- 托盘数量:设计稿字段,后端暂无入参(预留 palletNumber见接口问题清单 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入托盘数量"}'
numeric="@{true}"
title='@{"托盘数量"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.palletNumber}" />
<!-- 托盘自重:手机版手输(平板为托盘车号查询回填) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入托盘自重"}'
numeric="@{true}"
title='@{"托盘自重"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.carWeight}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"航班日期"}'
type="@{PhoneFormRowType.TEXT}"
value="@{viewModel.flightDate}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"航班号"}'
type="@{PhoneFormRowType.TEXT}"
value="@{viewModel.maWbBean.fno}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"航程"}'
type="@{PhoneFormRowType.TEXT}"
value="@{viewModel.maWbBean.range}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}"
title='@{"业务类型"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.maWbBean.businessType}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入备注"}'
title='@{"备注"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.pageRemark}" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- ============ 底部按钮:分托计重 / 完成计重 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:elevation="8dp"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_btn_outline"
android:gravity="center"
android:onClick="@{()-> viewModel.sortingWeighingClick()}"
android:text="分托计重"
android:textColor="@color/phone_primary"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> viewModel.completeCheckInClick()}"
android:text="完成计重"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,254 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重 - 运单详情5.5 寸手机版专属页面,无平板变体)
设计稿documents/5.5寸手持端设计文件/03_出港计重/detail.html
结构:白色卡片「基本信息」 + 两列灰底字段网格PhoneKvItem 套 bg_phone_stat_box
注:「通道号」在 /IntExpCheckIn/checked/pageQuery 出参中不存在(后端缺口,见接口问题清单),
此处绑定空串由组件兜底显示 "-"。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingWbDetailViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- 基本信息卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:padding="16dp">
<!-- 卡片标题:蓝色竖条 + 基本信息 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="16dp"
android:background="@color/phone_primary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="基本信息"
android:textColor="@color/phone_text_strong"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 运单号 / 件数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"运单号"}'
value="@{viewModel.bean.wbNo}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"件数"}'
value="@{String.valueOf(viewModel.bean.pc)}" />
</LinearLayout>
<!-- 重量 / 特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"重量"}'
value='@{viewModel.bean.weight + " kg"}' />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"特码"}'
value="@{viewModel.bean.spCode}" />
</LinearLayout>
<!-- 代理 / 航班日期 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"代理"}'
value="@{viewModel.bean.agentName}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"航班日期"}'
value="@{viewModel.bean.fdate}" />
</LinearLayout>
<!-- 航班号 / 航程 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"航班号"}'
value="@{viewModel.bean.fno}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"航程"}'
value="@{viewModel.bean.range}" />
</LinearLayout>
<!-- 业务类型 / 通道号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"业务类型"}'
value="@{viewModel.bean.businessName.empty ? viewModel.bean.businessType : viewModel.bean.businessName}" />
<!-- 通道号:接口出参无该字段(后端缺口),空值兜底 "-" -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"通道号"}'
value='@{""}' />
</LinearLayout>
<!-- 品名(半宽,与设计稿一致) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"品名"}'
value="@{viewModel.bean.goodsCn.empty ? viewModel.bean.goods : viewModel.bean.goodsCn}" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginStart="12dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 备注(整行) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"备注"}'
value="@{viewModel.bean.remark}" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -1,95 +1,196 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="record"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
<variable
name="isEditMode"
type="Boolean" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
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:paddingVertical="8dp"
android:paddingHorizontal="15dp">
<!-- 绿色圆圈序号 -->
<TextView
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/bg_circle_green"
android:gravity="center"
android:text="@{String.valueOf(position + 1)}"
android:textColor="@color/c666666"
android:textSize="16sp" />
<!-- 件数字段 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{isEditMode}"
hint="@{`件数`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER}"
title="@{`件数`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@={record.pcStr}" />
<!-- 重量字段 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{isEditMode}"
hint="@{`重量`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title="@{`重量`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@={record.weightStr}" />
<!-- 托盘自重字段(只读) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{false}"
title="@{`托盘自重`}"
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value="@{record.carWeight}" />
<!-- 计重时间字段(只读) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1.5"
enable="@{false}"
title="@{`计重时间`}"
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value="@{record.opDate}" />
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重明细 - 记录卡片(手机版变体)
平板版为 layout-sw600dp/item_gjc_check_in_record.xml表格行 + 编辑态内联输入框)。
变量 record / isEditMode / position 与平板一致(手机卡片只读展示,不使用 isEditMode
手机独有 idbtn_edit→ 全屏「修改记录」覆层ViewHolder 判空绑定)。
-->
<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="record"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
<variable
name="isEditMode"
type="Boolean" />
<variable
name="position"
type="Integer" />
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:paddingHorizontal="14dp"
android:paddingVertical="6dp">
<!-- 运抵件数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="运抵件数"
android:textColor="@color/phone_text_label"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(record.pc)}"
android:textColor="@color/phone_text_strong"
android:textSize="14sp"
tools:text="20" />
</LinearLayout>
<!-- 运抵重量(kg) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="运抵重量(kg)"
android:textColor="@color/phone_text_label"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(record.weight)}"
android:textColor="@color/phone_text_strong"
android:textSize="14sp"
tools:text="320" />
</LinearLayout>
<!-- 托盘自重(kg) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="托盘自重(kg)"
android:textColor="@color/phone_text_label"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{record.carWeight}"
android:textColor="@color/phone_text_strong"
android:textSize="14sp"
tools:text="18" />
</LinearLayout>
<!-- 计重人(接口出参仅操作员编码,无姓名,见接口问题清单) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="计重人"
android:textColor="@color/phone_text_label"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{record.opId}"
android:textColor="@color/phone_text_strong"
android:textSize="14sp"
tools:text="张三" />
</LinearLayout>
<!-- 计重时间 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingVertical="8dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="计重时间"
android:textColor="@color/phone_text_label"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{record.opDate}"
android:textColor="@color/phone_text_strong"
android:textSize="14sp"
tools:text="2026-07-05 10:02:15" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="4dp"
android:background="@color/phone_divider" />
<!-- 修改 -->
<LinearLayout
android:id="@+id/btn_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|end"
android:orientation="horizontal"
android:paddingVertical="10dp">
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:src="@drawable/ic_phone_edit"
app:tint="@color/phone_primary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="修改"
android:textColor="@color/phone_primary"
android:textSize="14sp" />
</LinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -1,316 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View" />
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcWeighingBean" />
<variable
name="position"
type="int" />
</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="@{bean.checkIn.equals(`2`) ? @drawable/bg_item_green : @drawable/bg_item}"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 飞机图标 (根据checked状态切换图片) -->
<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:src="@drawable/img_plane" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="运单号:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
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
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="代理人:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:maxLines="1"
android:lines="1"
android:ellipsize="end"
android:text='@{bean.agentName}'
tools:text="SF" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="特码:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预配件数:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(bean.pc)}'
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预配重量:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="计划航班:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
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
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="航程:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.range}'
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预计起飞:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.scheduledTackOffHM}"
tools:text="09:12" />
<TextView
android:id="@+id/tvDayPlus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="+1"
android:textColor="@color/text_red"
android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="业务类型:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.businessName}'
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="品名(中)" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:text='@{bean.goodsCn}'
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:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港待计重 - 列表卡片(手机版变体)
平板版为 layout-sw600dp/item_gjc_weighing.xml横排 KV + 选择图标 iv_icon
变量 bean / position 与平板一致;根节点保留 id llViewHolder 整卡点击进开始计重)。
手机独有 idbtn_pre_arrive单票提前运抵ViewHolder 判空绑定)。
状态标签checkIn = 2 → 计重中绿其余0 待收运)→ 未计重(橙)
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcWeighingBean" />
<variable
name="position"
type="int" />
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:padding="14dp">
<!-- 头行:运单号 + 状态标签 + 箭头 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{bean.wbNo}"
android:textColor="@color/phone_text_strong"
android:textSize="16sp"
android:textStyle="bold"
tools:text="78133363398" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@{`2`.equals(bean.checkIn) ? @drawable/bg_phone_tag_green : @drawable/bg_phone_tag_orange}"
android:paddingHorizontal="8dp"
android:paddingVertical="3dp"
android:text="@{`2`.equals(bean.checkIn) ? `计重中` : `未计重`}"
android:textColor="@{`2`.equals(bean.checkIn) ? @color/phone_tag_green_text : @color/phone_tag_orange_text}"
android:textSize="11sp"
tools:text="未计重" />
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginStart="6dp"
android:src="@drawable/ic_phone_chevron_right" />
</LinearLayout>
<!-- 字段网格:日期 / 航程 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text='@{"日期: " + bean.fdate}'
android:textColor="@color/phone_text_body"
android:textSize="13sp"
tools:text="日期: 20260721" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text='@{"航程: " + bean.range}'
android:textColor="@color/phone_text_body"
android:textSize="13sp"
tools:text="航程: HFE-LAX" />
</LinearLayout>
<!-- 字段网格:代理 / 特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text='@{"代理: " + bean.agentName}'
android:textColor="@color/phone_text_body"
android:textSize="13sp"
tools:text="代理: 中外运" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text='@{"特码: " + bean.spCode}'
android:textColor="@color/phone_text_body"
android:textSize="13sp"
tools:text="特码: DGR" />
</LinearLayout>
<!-- 单票提前运抵已提前运抵置灰ViewHolder 判空绑定点击) -->
<TextView
android:id="@+id/btn_pre_arrive"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_marginTop="12dp"
android:alpha="@{`1`.equals(bean.arriveFlag) ? 0.45f : 1f}"
android:background="@drawable/bg_phone_btn_weak"
android:gravity="center"
android:text="@{`1`.equals(bean.arriveFlag) ? `已提前运抵` : `提前运抵`}"
android:textColor="@color/phone_primary"
android:textSize="14sp"
tools:text="提前运抵" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -1,272 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcWeighingRecordBean" />
</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:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 飞机图标 -->
<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_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
tools:text="10" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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"
tools:text="100" />
</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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInPc)}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInWeight)}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="代理人:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.agentName}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="特码:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.spCode}'
android:textSize="15sp"
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
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收运人:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.userName}'
android:textSize="15sp"
tools:text="张三" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库时间:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.opDate}'
android:textSize="15sp"
tools:text="2024-02-16 09:12" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重记录 - 列表卡片(手机版变体)
平板版为 layout-sw600dp/item_gjc_weighing_record.xml横排 KV + 选择图标 iv_icon
变量 bean 与平板一致;根节点保留 id llViewHolder 整卡点击进计重明细)。
手机独有 idiv_scale地磅图标 → 计重明细、tv_detail查看详情 → 运单详情),
均由 ViewHolder 判空绑定。
-->
<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.GjcWeighingRecordBean" />
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:padding="14dp">
<!-- 头行:运单号 + 地磅图标 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{bean.wbNo}"
android:textColor="@color/phone_text_strong"
android:textSize="16sp"
android:textStyle="bold"
tools:text="78133363396" />
<ImageView
android:id="@+id/iv_scale"
android:layout_width="32dp"
android:layout_height="32dp"
android:contentDescription="计重明细"
android:padding="5dp"
android:src="@drawable/ic_phone_weight" />
</LinearLayout>
<!-- 代理 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text='@{"代理: " + bean.agentName}'
android:textColor="@color/phone_text_body"
android:textSize="13sp"
tools:text="代理: 马道" />
<!-- 运抵统计框 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
label1='@{"运抵件数"}'
label2='@{"运抵重量"}'
label3='@{"运抵体积"}'
value1='@{bean.checkInPc + "件"}'
value2='@{bean.checkInWeight + "kg"}'
value3='@{bean.checkInVolume + "m³"}' />
<!-- 计重人 · 计重时间 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text='@{"计重人:" + bean.userName + " · 计重时间:" + bean.opDate}'
android:textColor="@color/phone_text_body"
android:textSize="12sp"
tools:text="计重人:张三 · 计重时间2026-07-05 11:45" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginTop="12dp"
android:background="@color/phone_divider" />
<!-- 查看详情(运单详情) -->
<LinearLayout
android:id="@+id/tv_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|end"
android:orientation="horizontal"
android:paddingTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="查看详情"
android:textColor="@color/phone_primary"
android:textSize="14sp" />
<ImageView
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_marginStart="2dp"
android:src="@drawable/ic_phone_chevron_right"
app:tint="@color/phone_primary" />
</LinearLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -48,6 +48,12 @@ class GjViewModel : BaseViewModel() {
Constant.AuthName.GjcIntExpOutHandover,
ARouterConstants.ACTIVITY_URL_INT_EXP_OUT_HANDOVER
),
ActionBean(
"出港计重",
R.drawable.img_gjc_chugangjizhong,
Constant.AuthName.GjcCheckWeighing,
ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST
),
// ULD管理属综合管理业务Pad 端在「综合管理」菜单组),手机端首页暂无综合 Tab挂在国际 Tab 下
ActionBean(
"ULD管理",

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB