Compare commits
14 Commits
0d9406af13
...
feature/ph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42647c2136 | ||
|
|
5e8fe7d69d | ||
|
|
6f813f9cff | ||
|
|
68e6c7c52b | ||
|
|
cca62aae29 | ||
|
|
1229ecc920 | ||
|
|
d2340d46fb | ||
|
|
a431c09bd0 | ||
|
|
b522efa6b9 | ||
|
|
40edbe7c67 | ||
|
|
415b685a85 | ||
|
|
b3b884504d | ||
|
|
f6b3842882 | ||
|
|
18e438550c |
@@ -158,3 +158,30 @@ curl -s -X POST "http://192.168.1.250:8093/IntExpOutHandover/pageQuery" \
|
||||
用它做「参数是否生效」的 A/B 对比(同条件只改一个参数看 total 变化),
|
||||
再回 App UI 走一遍确认端到端链路。UI 里的滚轮日期选择器可用
|
||||
`input swipe`(慢速 500ms、每次 3 格 ≈ 396px)驱动,滑完截图校准。
|
||||
|
||||
## 2026-10-09 后端反馈联调后的最新口径(与上文冲突时以本节为准)
|
||||
|
||||
后端在问题清单补「解决方案」后逐项内网实测的结论。**通用规则:后端对手机端新增筛选维度一律答复
|
||||
「与平板端查询参数保持一致」——手机筛选只放平板已用的入参;文档里定义了但平板没用的入参,
|
||||
多数实测也被忽略(agentCode/spCode/dest/opId 等),别再按文档加筛选。**
|
||||
|
||||
- **统一统计 DTO**:各 `*/pageQueryTotal` 出参现含 `uldNumber`/`storedNumber`/`departedNumber`/
|
||||
`notClearNumber`/`clearNumber`/`waitCheckInNumber`/`checkingNumber`/`flightNumber`(`ManifestTotalDto`
|
||||
已补齐)。分项统计一律取出参,**不要再按状态入参多调几次 total**
|
||||
- `IntExpOutHandover/pageQueryTotal` 已修复(与列表一致);Tab 角标取 `uldNumber`(板箱数);无交接人入参
|
||||
- `IntExpMove/pageQuery` 出参新增 `flight`("20260924/MU2222")/`businessName`/`opUserName`;已移库 `opId`/`opdate` 已回填
|
||||
- `eqm/uld`:状态维持两态;`source`(空运/陆运) 出参与保存入参支持、**查询入参不支持**;入库时间 = `inStoreTime`
|
||||
(date-time,**只传日期 400**)、所在港 = `nowPort`;批删 `deleteUldBatch`(Body 为字符串数组);
|
||||
⚠️ `pageQuery` 带 `uld` 即 500(#35);`saveUld` 缺 `maxVolume`/`maxWeight` 即 500(#36)
|
||||
- `IntExpCheckIn`:`listRecordByWh` 出参 `opUserName`/`trayNumber`/`trayTotalWeight`;
|
||||
`checked/pageQuery` 出参 `passageWay`;`splitCheckIn`/`completeCheckIn` 托盘入参 = `trayNumber` +
|
||||
`trayTotalWeight`(数量×自重);`arriveFlag` 已回填("0" 正常/"1" 提前运抵);
|
||||
⚠️ `pageQuery` 的 `checkIn` 过滤仍被忽略(#40,统计用分项出参);`checked/pageQuery` 的 `dest`/`opId` 被忽略
|
||||
- `IntExpArrive`:入参 `arrivalStatus`("0" 未运抵/"1" 已运抵)服务端过滤生效;`agentCode` 被忽略;补充信息页已删除
|
||||
- `IntExpSearch`:**`beginDate`/`endDate` 只有携带 `dateState`(0 入库/1 离港)才生效**;`outState` 生效
|
||||
- `IntExpStorageUse`:仅 `fdate`/`fno`/`wbNo`/`location`/`clearNormal` 有意义;⚠️ 列表 total 与统计 wbNumber 不一致(#38)
|
||||
- `IntImpStorage`:⚠️ `pageQuery` 当前**所有**过滤条件均失效(#37),`pageQueryTotal` 正常
|
||||
- `IntImpSearch/detail`:按平板展示 航程 `range`(无经停站)/`unNumber`/`lockState`/出库时间 `dlvTime`
|
||||
- `IntImpPickUpDlv`:运单号入参用 `wbNo`;出参新增 `refUserName`(出库人姓名,`dlvName` 是提货人);测试环境暂无数据
|
||||
- `DomImpMove`:`fdate`/`fno`/`spCode` 已生效;`searchMoved` 已回填 `opId`/`opDate`/`opUserName`;
|
||||
新增 `GET movedDetail?moveId=`(含 pic 三字段);⚠️ 已移库运单无 `mawbId`,`modify` 无法补传照片(#39)
|
||||
|
||||
19
CHANGELOG.md
19
CHANGELOG.md
@@ -8,6 +8,19 @@
|
||||
## [Unreleased]
|
||||
|
||||
### 变更 (Changed)
|
||||
- 【后端反馈联调 · 2026-10-09】后端在《问题清单》补「解决方案/备注」后,逐项(#1~#34)api-doc 核对 +
|
||||
内网直调 A/B + AeroLogic_Phone 模拟器端到端验证,并按后端意见调整前端:
|
||||
① 后端已补字段/接口 → 前端对接:出港移库 flight/businessName/opUserName;出库交接 uldNumber 角标;
|
||||
ULD source/inStoreTime/nowPort + `deleteUldBatch` 一次批删;出港计重 waitCheckInNumber/checkingNumber
|
||||
统计、passageWay、opUserName、trayNumber/trayTotalWeight;运抵 arrivalStatus 服务端 Tab;
|
||||
出港/进港查询 storedNumber/departedNumber;出港/进港仓库 notClearNumber/clearNumber(统计请求 3→1);
|
||||
提取出库 refUserName;国内进港移库 opUserName + `movedDetail` 照片回填。
|
||||
`ManifestTotalDto` 补齐后端统一统计 DTO 分项字段。
|
||||
② 后端「按平板端调整/设计如此」→ 前端对齐:出库交接/ULD/计重/记录/出港仓库/进港仓库/提取出库/运抵
|
||||
的手机筛选全部收敛为平板同款查询参数;ULD 状态回归两态;删除运抵「补充信息」页;出港详情移除
|
||||
锁定状态/计费重量;进港详情按平板改 航程/出库时间(无经停站);提取出库移除无出参占位。
|
||||
③ 联调新发现记入问题清单 #35~#41(ULD uld 搜索 500、saveUld 缺 maxVolume/maxWeight 500、
|
||||
IntImpStorage/pageQuery 过滤全失效、出港仓库列表与统计口径不一致、已移库无 mawbId 无法补传照片等)。
|
||||
- 【进港移库归属更正 · 2026-08-03】设计稿 11「进港移库」经确认归属**国内进港移库
|
||||
(DomImpMove,后端 8 接口齐全,Pad 首页「国内进港→进港移库」既有页面)**,此前误判为
|
||||
国际进港并按 IntExpMove 约定预接不存在的 IntImpMove 模块(原问题清单 #31 作废)。处置:
|
||||
@@ -29,6 +42,12 @@
|
||||
`fdate`/`fno`/`spCode` 被后端静默忽略(新缺口 #32)、`searchMoved`/`detail` 出参
|
||||
`opId`/`opDate` 恒 null 且无姓名字段(#33)、`searchMoved` 无 pic 三字段(#34,前端已规避)
|
||||
|
||||
### 修复 (Fixed)
|
||||
- 出港计重「修改记录」托盘自重输入框:Double 回写导致光标跳回开头(输入 18 存成 81),改为保留输入原文
|
||||
- ULD 新增:入库时间日期行仅产出 yyyy-MM-dd(后端 400)→ 保存时补 00:00:00;补充最大装载容积/最大载重
|
||||
可编辑必填(缺失时 saveUld 500)
|
||||
- 提取出库运单号入参 no → wbNo(与主干平板端修复一致)
|
||||
|
||||
### 新增 (Added)
|
||||
- 「进港查询」5.5 寸手机端适配(设计稿 10_进港查询,06 出港查询的进港镜像;详情页与运单追踪
|
||||
复用 08/06 已适配页零新增):列表 `IntImpQueryActivity`(module_gjj,首页菜单实际跳转页;
|
||||
|
||||
11
CLAUDE.md
11
CLAUDE.md
@@ -1192,10 +1192,12 @@ override fun dispatchRestoreInstanceState(container: SparseArray<Parcelable>) =
|
||||
- ✅ **设计稿 11 个入口(01~11)已于 2026-07-31 全部适配完成**
|
||||
- ⏳ **待办**:
|
||||
- `PhoneSearchBar` 接入 AutoQuery 联想(`AutoQueryManager` 目前只对接了 Pad 系组件)
|
||||
- 进港移库筛选三项(航班日期/航班号/特码)待后端实装 `fdate`/`fno`/`spCode` 入参(缺口 #32)、
|
||||
移库人/移库时间待后端回填 `opId`/`opDate` 并补姓名出参(缺口 #33)后自动生效
|
||||
- 出库交接 Tab 角标恒 0:`IntExpOutHandover/pageQueryTotal` 出参恒 0(后端缺陷,问题清单 #6),
|
||||
后端修复后角标自动恢复(`handoverState` 过滤本身已于 2026-07-29 实机验证通过)生效
|
||||
- 联调新发现的后端缺口 #35~#41(ULD uld 搜索 500、IntImpStorage 列表过滤全失效、已移库无 mawbId
|
||||
无法补传照片等)待后端处理,详见问题清单
|
||||
- ✅ **2026-10-09 后端反馈联调完成**:问题清单 #1~#34 逐项内网直调 + 模拟器端到端验证,结论写入清单 P 列。
|
||||
**后端口径:手机筛选一律与平板端查询参数保持一致**(不为手机新增入参);分项统计统一取
|
||||
`pageQueryTotal` 出参(`ManifestTotalDto` 已补齐分项字段),不要再按状态多调 total。
|
||||
最新字段语义见 `.claude/skills/phone-adapt/references/api-doc.md` 末节
|
||||
- 📋 **接口对接**:适配中发现的后端接口缺口统一记录在 `documents/后端接口对接问题清单.xlsx`
|
||||
(按模块/页面/接口定义/接口地址索引,与后端对接的正式文档,每页适配完必须维护);
|
||||
接口入参/出参一律以 api-doc MCP 为准核对,流程见
|
||||
@@ -1288,6 +1290,7 @@ adb shell am start -n com.lukouguoji.aerologic/com.lukouguoji.gjc.activity.IntEx
|
||||
| 通过 `Intent.putExtra(Serializable)` 传递的 Bean,切换其 `checked`/`showMore` 等状态时崩溃 `NullPointerException: ... on a null object reference` | 这些字段标了 `@Transient`(= JVM `transient`,本意是避免 Gson 网络请求序列化 `ObservableBoolean`),但 Java 对象序列化(Intent 传递走的机制)会跳过 `transient` 字段的恢复,反序列化后是 null | 接收方 `initOnCreated` 里对列表做 `.map { it.copy() }`——`.copy()` 会重新走一遍类体初始化逻辑,用全新 `ObservableBoolean(false)` 补上 |
|
||||
| 布局构建报 `Error: The string "--" is not permitted within comments` | XML 注释中出现连续双横线(如写"兜底 \"--\""),XML 规范禁止 | 注释里改用文字描述(如「兜底双横线」),代码绑定表达式中的 `"--"` 不受影响 |
|
||||
| 多选页手机版点「全选」后底部「已选 N 项」不更新(单卡勾选正常) | 批量勾选在 `checkAllClick` 里直接 set,不走 FlowBus 的单卡 EVENT_CHECK_CHANGED 事件,`selectedCountText` 只在事件回调里更新 | `checkAllClick` 末尾自行同步 `selectedCountText`(平板布局不绑定该字段,无影响) |
|
||||
| 手机版数字输入框(`PhoneFormRow` 双向绑 Double 的 `xxxStr`)输入 "18" 变成 "81" | getter 由 Double 反推字符串("1" → "1.0"),与输入框文本不等触发 `setText`,光标回到开头 | Bean 里保留输入原文(`@Transient` 私有 String),getter 优先返回原文(参考 `GjcCheckInRecord.trayTotalWeightStr`) |
|
||||
| XML 里 `bean.a ?? bean.b` 兜底不生效,字段明明有值却显示占位符 | 网络层转换器把 JSON null 归一成空串 `""`,DataBinding 的 `??` 只判 null 不判空串,永远取到左侧的空串 | 在 Bean 上加计算属性做 `isNullOrEmpty` 双兜底(如 `agentDisplay`),XML 绑计算属性(进港查询/出港查询代理人已踩过) |
|
||||
|
||||
---
|
||||
|
||||
@@ -26,8 +26,8 @@ android {
|
||||
applicationId "com.lukouguoji.aerologic"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 88
|
||||
versionName "1.8.8"
|
||||
versionCode 87
|
||||
versionName "1.8.7"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -98,12 +98,6 @@
|
||||
android:exported="true"
|
||||
tools:replace="android:exported" />
|
||||
|
||||
<!-- 出港运抵-补充信息(手机版适配验证页) -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.IntExpArriveSupplementActivity"
|
||||
android:exported="true"
|
||||
tools:replace="android:exported" />
|
||||
|
||||
<!-- 出港查询(手机版适配验证页) -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcQueryActivity"
|
||||
|
||||
@@ -157,12 +157,6 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="unspecified" />
|
||||
<!-- 国际出港运抵-补充信息(5.5寸手机版专属页面) -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.IntExpArriveSupplementActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="unspecified" />
|
||||
<!-- 国际出港仓库 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.IntExpStorageUseActivity"
|
||||
|
||||
@@ -33,7 +33,7 @@ class GnjMoveStashDetailActivity :
|
||||
/** 「异常照片」加号槽位 → 拍照上传页 */
|
||||
fun openPhoto() {
|
||||
viewModel.dataBean.value?.let {
|
||||
GnjMoveStashPhotoActivity.start(this, it.mawbId, it.wbNo)
|
||||
GnjMoveStashPhotoActivity.start(this, it.mawbId, it.wbNo, it.moveId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class GnjMoveStashListActivity :
|
||||
/** 浮层「拍照」→ 拍照上传页 */
|
||||
fun openPhoto(bean: MoveStashBean) {
|
||||
bean.actionMenuVisible.set(false)
|
||||
GnjMoveStashPhotoActivity.start(this, bean.mawbId, bean.wbNo)
|
||||
GnjMoveStashPhotoActivity.start(this, bean.mawbId, bean.wbNo, bean.moveId)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -33,12 +33,16 @@ class GnjMoveStashPhotoActivity :
|
||||
}
|
||||
|
||||
companion object {
|
||||
/** 已移库运单的 moveId(movedDetail 回填照片用) */
|
||||
const val EXTRA_MOVE_ID = "moveId"
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context, mawbId: String, wbNo: String) {
|
||||
fun start(context: Context, mawbId: String, wbNo: String, moveId: String = "") {
|
||||
context.startActivity(
|
||||
Intent(context, GnjMoveStashPhotoActivity::class.java)
|
||||
.putExtra(Constant.Key.ID, mawbId)
|
||||
.putExtra(Constant.Key.CODE, wbNo)
|
||||
.putExtra(EXTRA_MOVE_ID, moveId)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,13 +37,17 @@ import kotlinx.coroutines.launch
|
||||
* 国内进港移库「拍照上传」ViewModel(5.5 寸手持端专属页面)
|
||||
*
|
||||
* 图片选择/预览/删除复用 module_base 的 ImageSelectNewViewHolder(末位加号槽位)。
|
||||
* 已有照片经 DomImpMove/detail 回填;提交走 DomImpMove/modify 最小体
|
||||
* 已有照片回填:待移库经 DomImpMove/detail(mawbId),已移库经 DomImpMove/movedDetail(moveId,
|
||||
* searchMoved 出参不含 mawbId)。提交走 DomImpMove/modify 最小体
|
||||
* (mawbId/remark/picNumber/pic/originalPic),与平板移交编辑页同一链路。
|
||||
*/
|
||||
class GnjMoveStashPhotoViewModel : BaseViewModel(), IOnItemClickListener {
|
||||
|
||||
var mawbId = ""
|
||||
|
||||
/** 已移库运单的移库记录 ID(searchMoved 出参),用于 movedDetail 回填 */
|
||||
var moveId = ""
|
||||
|
||||
/** 运单号(副标题展示,由列表带入) */
|
||||
val wbNo = MutableLiveData("")
|
||||
|
||||
@@ -59,9 +63,14 @@ class GnjMoveStashPhotoViewModel : BaseViewModel(), IOnItemClickListener {
|
||||
fun initOnCreated(intent: Intent) {
|
||||
mawbId = intent.getStringExtra(Constant.Key.ID).orEmpty()
|
||||
wbNo.value = intent.getStringExtra(Constant.Key.CODE).orEmpty()
|
||||
moveId = intent.getStringExtra(GnjMoveStashPhotoActivity.EXTRA_MOVE_ID).orEmpty()
|
||||
|
||||
// 已有照片回填(pic 缩略图 + originalPic 原图),末位补加号槽位
|
||||
launchCollect({ NetApply.api.getGnjMoveStashDetail(mawbId) }) {
|
||||
// 已有照片回填(pic 缩略图 + originalPic 原图),末位补加号槽位;
|
||||
// 已移库运单无 mawbId,改按 moveId 走 movedDetail
|
||||
launchCollect({
|
||||
if (mawbId.isEmpty() && moveId.isNotEmpty()) NetApply.api.getGnjMoveStashMovedDetail(moveId)
|
||||
else NetApply.api.getGnjMoveStashDetail(mawbId)
|
||||
}) {
|
||||
onSuccess = {
|
||||
detailBean = it.data ?: GnjYiKuBean()
|
||||
val picList = detailBean.pic.split(",").filter { p -> p.isNotEmpty() }
|
||||
@@ -88,6 +97,11 @@ class GnjMoveStashPhotoViewModel : BaseViewModel(), IOnItemClickListener {
|
||||
* 确认提交:先补传未上传的本地图片,再按三字段规范提交 modify
|
||||
*/
|
||||
fun submitClick() {
|
||||
// modify 以 mawbId 定位运单;已移库运单 searchMoved/movedDetail 均不返回 mawbId(后端缺口),无法提交
|
||||
if (mawbId.isEmpty()) {
|
||||
showToast("已移库运单缺少运单ID,暂不支持提交照片")
|
||||
return
|
||||
}
|
||||
(rv?.commonAdapter()?.items ?: emptyList())
|
||||
.asFlow()
|
||||
.map { it as FileBean }
|
||||
|
||||
@@ -36,7 +36,7 @@ class UldEditViewModel : BaseViewModel() {
|
||||
|
||||
// ========== 手机版(5.5 寸手持端)专用 ==========
|
||||
|
||||
/** 来源选项(本地枚举;后端字段暂不支持,需求已登记 documents/后端接口对接问题清单.xlsx) */
|
||||
/** 来源选项(与平板端一致:空运 / 陆运) */
|
||||
val sourceEditList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("空运", "空运"),
|
||||
@@ -45,8 +45,8 @@ class UldEditViewModel : BaseViewModel() {
|
||||
)
|
||||
|
||||
/**
|
||||
* 手机版状态选项。设计稿为三态(可用/占用/维修),后端枚举当前仅 0/1,
|
||||
* 按语义映射 可用=0 / 维修=1;「占用」待后端扩展枚举后放开(需求已登记清单)。
|
||||
* 手机版状态选项。后端枚举维持两态(0 正常 / 1 故障,不新增「占用」),
|
||||
* 按设计稿文案映射 可用=0 / 维修=1。
|
||||
*/
|
||||
val statusPhoneList = listOf(
|
||||
KeyValue("可用", "0"),
|
||||
@@ -64,7 +64,7 @@ class UldEditViewModel : BaseViewModel() {
|
||||
loadCarrierList(null)
|
||||
// 手机版新增默认所在港 HFE(设计稿约定);平板无此预填,行为不变
|
||||
if (DeviceUtil.isPhone()) {
|
||||
uldBean.value = uldBean.value?.copy(airport = "HFE")
|
||||
uldBean.value = uldBean.value?.copy(nowPort = "HFE")
|
||||
}
|
||||
} else {
|
||||
getData()
|
||||
@@ -107,11 +107,24 @@ class UldEditViewModel : BaseViewModel() {
|
||||
showToast("自重不能为空")
|
||||
return
|
||||
}
|
||||
if (bean.checkInDate.isBlank()) {
|
||||
// saveUld 缺最大装载容积/最大载重时后端直接 500(内网实测),提前拦截
|
||||
if (bean.maxVolume.isBlank()) {
|
||||
showToast("最大装载容积不能为空")
|
||||
return
|
||||
}
|
||||
if (bean.maxWeight.isBlank()) {
|
||||
showToast("最大载重不能为空")
|
||||
return
|
||||
}
|
||||
if (bean.inStoreTime.isBlank()) {
|
||||
showToast("入库时间不能为空")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 手机版日期行只产出 yyyy-MM-dd,而 inStoreTime 为 date-time(仅日期后端返回 400),补齐时分秒
|
||||
if (DeviceUtil.isPhone() && bean.inStoreTime.length == 10) {
|
||||
bean.inStoreTime = "${bean.inStoreTime} 00:00:00"
|
||||
}
|
||||
val isAdd = pageType.value == DetailsPageType.Add
|
||||
launchLoadingCollect({
|
||||
if (isAdd) NetApply.api.saveUld(bean.toRequestBody())
|
||||
@@ -121,7 +134,7 @@ class UldEditViewModel : BaseViewModel() {
|
||||
showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功"))
|
||||
if (isAdd) {
|
||||
// 清空表单继续录入;手机版保持所在港默认 HFE(与进入页面时一致)
|
||||
uldBean.value = if (DeviceUtil.isPhone()) ULDBean(airport = "HFE") else ULDBean()
|
||||
uldBean.value = if (DeviceUtil.isPhone()) ULDBean(nowPort = "HFE") else ULDBean()
|
||||
} else {
|
||||
getData()
|
||||
}
|
||||
|
||||
@@ -70,13 +70,11 @@ class UldListActivity : BaseBindingActivity<ActivityUldListBinding, UldListViewM
|
||||
/**
|
||||
* 手机版筛选:重置
|
||||
*
|
||||
* 只清空弹层内的四个条件(入库时间 / 进港航班号 / 所属航司 / 来源),不影响顶部搜索框。
|
||||
* 只清空弹层内的两个条件(状态 / 所属航司),不影响顶部搜索框。
|
||||
*/
|
||||
fun resetFilter() {
|
||||
viewModel.checkInDateFilter.value = ""
|
||||
viewModel.ifNoFilter.value = ""
|
||||
viewModel.status.value = ""
|
||||
viewModel.uldSuffix.value = ""
|
||||
viewModel.sourceFilter.value = ""
|
||||
}
|
||||
|
||||
/** 手机版筛选:确认 */
|
||||
@@ -85,7 +83,7 @@ class UldListActivity : BaseBindingActivity<ActivityUldListBinding, UldListViewM
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
/** 手机版批量删除(二次确认后逐条调用单条删除接口) */
|
||||
/** 手机版批量删除(二次确认后调用批量删除接口) */
|
||||
fun showDeleteConfirmDialog() {
|
||||
val selected = viewModel.getSelectedItems()
|
||||
if (selected.isEmpty()) {
|
||||
|
||||
@@ -27,20 +27,15 @@ class UldListViewModel : BasePageViewModel() {
|
||||
val uldSuffix = MutableLiveData("")
|
||||
val uldNo = MutableLiveData("")
|
||||
|
||||
// ========== 手机版(5.5 寸手持端)专用筛选条件 ==========
|
||||
// 平板布局无对应控件,恒为空 → 不进请求参数,平板查询行为与改造前完全一致。
|
||||
// 三个入参后端暂不支持(api-doc 已核对),已登记 documents/后端接口对接问题清单.xlsx,
|
||||
// 按「以设计为准」的约定照传(后端静默忽略无副作用),后端支持后自动生效。
|
||||
val checkInDateFilter = MutableLiveData("") // 入库时间
|
||||
val ifNoFilter = MutableLiveData("") // 进港航班号
|
||||
val sourceFilter = MutableLiveData("") // 来源:空运 / 陆运
|
||||
// ========== 手机版(5.5 寸手持端)筛选 ==========
|
||||
// 后端确认查询入参与平板端保持一致(uld / status / uldSuffix),手机筛选弹层只放 状态 + 所属航司。
|
||||
|
||||
/** 来源下拉(本地枚举,后端字段需求已登记清单) */
|
||||
val sourceList = MutableLiveData<List<KeyValue>>(
|
||||
/** 手机版状态下拉:文案与卡片标签一致(可用=0 / 维修=1) */
|
||||
val statusPhoneFilterList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("空运", "空运"),
|
||||
KeyValue("陆运", "陆运"),
|
||||
KeyValue("可用", "0"),
|
||||
KeyValue("维修", "1"),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -82,10 +77,6 @@ class UldListViewModel : BasePageViewModel() {
|
||||
"status" to status.value?.ifEmpty { null },
|
||||
"uldSuffix" to uldSuffix.value?.ifEmpty { null },
|
||||
"uld" to uldNo.value?.ifEmpty { null },
|
||||
// 手机版筛选维度(平板恒空不参与);后端暂不支持这三个入参,已登记清单
|
||||
"checkInDate" to checkInDateFilter.value?.ifEmpty { null },
|
||||
"ifNo" to ifNoFilter.value?.ifEmpty { null },
|
||||
"source" to sourceFilter.value?.ifEmpty { null },
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
@@ -122,10 +113,7 @@ class UldListViewModel : BasePageViewModel() {
|
||||
?.filter { it.checked.get() } ?: emptyList()
|
||||
|
||||
/**
|
||||
* 批量删除选中的 ULD。
|
||||
*
|
||||
* 后端仅有单条删除接口(/eqm/uld/deleteUld,批量接口需求已登记清单),
|
||||
* 此处按队列逐条串行调用,全部完成后统一刷新;中途失败即停并提示。
|
||||
* 批量删除选中的 ULD(/eqm/uld/deleteUldBatch,请求体为 ULD 编号数组,一次调用)。
|
||||
*/
|
||||
fun deleteSelected() {
|
||||
val ulds = getSelectedItems().map { it.uld }
|
||||
@@ -133,19 +121,9 @@ class UldListViewModel : BasePageViewModel() {
|
||||
showToast("请选择要删除的ULD")
|
||||
return
|
||||
}
|
||||
deleteQueue(ulds, 0)
|
||||
}
|
||||
|
||||
private fun deleteQueue(ulds: List<String>, index: Int) {
|
||||
if (index >= ulds.size) {
|
||||
showToast("已删除 ${ulds.size} 条")
|
||||
refresh()
|
||||
return
|
||||
}
|
||||
launchLoadingCollect({ NetApply.api.deleteUld(ulds[index]) }) {
|
||||
onSuccess = { deleteQueue(ulds, index + 1) }
|
||||
onFailed = { _, msg ->
|
||||
showToast("删除 ${ulds[index]} 失败:${msg.noNull("未知错误")}")
|
||||
launchLoadingCollect({ NetApply.api.deleteUldBatch(ulds.toRequestBody()) }) {
|
||||
onSuccess = {
|
||||
showToast("已删除 ${ulds.size} 条")
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"移库人"}'
|
||||
value="@{viewModel.dataBean.opId}" />
|
||||
value="@{viewModel.dataBean.opUserDisplay}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
· ULD修改(Modify):编号只读,其余可编辑 + 底部保存
|
||||
· ULD详情(Details):全只读右对齐 + 顶栏右侧铅笔进入修改 + 额外展示最大装载容积/最大载重
|
||||
|
||||
「来源」「状态三态(占用)」为后端暂不支持的设计稿要求,
|
||||
已登记 documents/后端接口对接问题清单.xlsx,UI 先行、后端补齐后自动生效。
|
||||
字段与平板端一致:来源 source(空运/陆运)、入库时间 inStoreTime、所在港 nowPort;
|
||||
状态维持两态(0 可用 / 1 维修,后端不新增「占用」)。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
@@ -119,11 +119,11 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:background="@{viewModel.uldBean.status.empty ? null : (viewModel.uldBean.isStatusAvailable ? @drawable/bg_phone_tag_green : (viewModel.uldBean.isStatusOccupied ? @drawable/bg_phone_tag_orange : @drawable/bg_phone_tag_red_light))}"
|
||||
android:background="@{viewModel.uldBean.status.empty ? null : (viewModel.uldBean.isStatusAvailable ? @drawable/bg_phone_tag_green : @drawable/bg_phone_tag_red_light)}"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:text='@{viewModel.uldBean.status.empty ? "请选择状态" : viewModel.uldBean.statusPhoneName}'
|
||||
android:textColor="@{viewModel.uldBean.status.empty ? @color/phone_text_hint : (viewModel.uldBean.isStatusAvailable ? @color/phone_tag_green_text : (viewModel.uldBean.isStatusOccupied ? @color/phone_tag_orange_text : @color/phone_danger_text))}"
|
||||
android:textColor="@{viewModel.uldBean.status.empty ? @color/phone_text_hint : (viewModel.uldBean.isStatusAvailable ? @color/phone_tag_green_text : @color/phone_danger_text)}"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<!-- 编辑态右箭头 -->
|
||||
@@ -172,25 +172,31 @@
|
||||
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.uldBean.uldWeight}" />
|
||||
|
||||
<!-- 最大装载容积(仅详情展示,与设计稿一致) -->
|
||||
<!-- 最大装载容积:新增/修改可编辑(与平板一致;saveUld 缺该字段后端 500,内网实测) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请输入最大装载容积"}'
|
||||
numeric="@{true}"
|
||||
required="@{viewModel.pageType == DetailsPageType.Add}"
|
||||
title='@{"最大装载容积(m³)"}'
|
||||
type="@{PhoneFormRowType.TEXT}"
|
||||
value="@{viewModel.uldBean.maxVolume}"
|
||||
android:visibility="@{viewModel.pageType == DetailsPageType.Details ? View.VISIBLE : View.GONE}" />
|
||||
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.uldBean.maxVolume}" />
|
||||
|
||||
<!-- 最大载重(仅详情展示,与设计稿一致) -->
|
||||
<!-- 最大载重:新增/修改可编辑(与平板一致;saveUld 缺该字段后端 500,内网实测) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||
hint='@{"请输入最大载重"}'
|
||||
numeric="@{true}"
|
||||
required="@{viewModel.pageType == DetailsPageType.Add}"
|
||||
title='@{"最大载重(kg)"}'
|
||||
type="@{PhoneFormRowType.TEXT}"
|
||||
value="@{viewModel.uldBean.maxWeight}"
|
||||
android:visibility="@{viewModel.pageType == DetailsPageType.Details ? View.VISIBLE : View.GONE}" />
|
||||
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.uldBean.maxWeight}" />
|
||||
|
||||
<!-- 进港航班号(绑 ifNo,语义待后端确认,已登记清单) -->
|
||||
<!-- 进港航班号(ifNo) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -200,7 +206,7 @@
|
||||
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.uldBean.ifNo}" />
|
||||
|
||||
<!-- 所在港(新增默认 HFE,由 ViewModel 手机开关预填) -->
|
||||
<!-- 所在港(nowPort,与平板端一致;新增默认 HFE,由 ViewModel 手机开关预填) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -208,9 +214,9 @@
|
||||
hint='@{"请输入所在港"}'
|
||||
title='@{"所在港"}'
|
||||
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.uldBean.airport}" />
|
||||
value="@={viewModel.uldBean.nowPort}" />
|
||||
|
||||
<!-- 来源(设计稿顺序位于所在港之后;后端字段暂不支持,已登记清单,提交后端忽略) -->
|
||||
<!-- 来源(source:空运/陆运,设计稿顺序位于所在港之后) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -221,7 +227,7 @@
|
||||
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.SELECT}"
|
||||
value="@={viewModel.uldBean.source}" />
|
||||
|
||||
<!-- 入库时间(绑 checkInDate,筛选/格式语义待后端确认,已登记清单) -->
|
||||
<!-- 入库时间(inStoreTime,与平板端一致) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -230,7 +236,7 @@
|
||||
required="@{viewModel.pageType == DetailsPageType.Add}"
|
||||
title='@{"入库时间"}'
|
||||
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.DATE}"
|
||||
value="@={viewModel.uldBean.checkInDate}" />
|
||||
value="@={viewModel.uldBean.inStoreTime}" />
|
||||
|
||||
<!-- 备注 -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
|
||||
@@ -130,23 +130,15 @@
|
||||
setOnResetClick="@{(v)-> activity.resetFilter()}"
|
||||
title='@{"筛选条件"}'>
|
||||
|
||||
<!-- 入库时间(后端筛选入参暂不支持,已登记清单) -->
|
||||
<!-- 状态(后端入参 status,与平板端查询参数一致) -->
|
||||
<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.checkInDateFilter}" />
|
||||
|
||||
<!-- 进港航班号(后端筛选入参暂不支持,已登记清单) -->
|
||||
<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.ifNoFilter}" />
|
||||
hint='@{"请选择状态"}'
|
||||
list="@{viewModel.statusPhoneFilterList}"
|
||||
title='@{"状态"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.status}" />
|
||||
|
||||
<!-- 所属航司(后端入参 uldSuffix,真实生效) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
@@ -158,16 +150,6 @@
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.uldSuffix}" />
|
||||
|
||||
<!-- 来源(后端字段暂不支持,已登记清单) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择来源"}'
|
||||
list="@{viewModel.sourceList}"
|
||||
title='@{"来源"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.sourceFilter}" />
|
||||
|
||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
· 平板独有 id(tv_modify / tv_delete / iv_icon)与手机独有 id(iv_check)
|
||||
在 Binding 基类中自动为 @Nullable,ViewHolder 判空使用
|
||||
|
||||
状态标签三色(设计稿):可用=浅绿 / 占用=浅橙 / 维修=浅红。
|
||||
后端当前仅两态(0 可用 / 1 维修),「占用」为后端扩展枚举后的预留,见 ULDBean.statusPhoneName。
|
||||
状态标签:可用=浅绿 / 维修=浅红(后端枚举维持两态 0/1,不含「占用」),见 ULDBean.statusPhoneName。
|
||||
「来源」字段后端暂无(恒空显示 "-"),已登记 documents/后端接口对接问题清单.xlsx。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
@@ -61,16 +60,16 @@
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 状态标签:可用(绿) / 占用(橙) / 维修(红,浅红底红字) -->
|
||||
<!-- 状态标签:可用(绿) / 维修(红,浅红底红字) -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@{bean.isStatusAvailable ? @drawable/bg_phone_tag_green : (bean.isStatusOccupied ? @drawable/bg_phone_tag_orange : @drawable/bg_phone_tag_red_light)}"
|
||||
android:background="@{bean.isStatusAvailable ? @drawable/bg_phone_tag_green : @drawable/bg_phone_tag_red_light}"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:text="@{bean.statusPhoneName}"
|
||||
android:textColor="@{bean.isStatusAvailable ? @color/phone_tag_green_text : (bean.isStatusOccupied ? @color/phone_tag_orange_text : @color/phone_danger_text)}"
|
||||
android:textColor="@{bean.isStatusAvailable ? @color/phone_tag_green_text : @color/phone_danger_text}"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<ImageView
|
||||
@@ -137,7 +136,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_weight="1"
|
||||
android:text='@{"入库时间:" + (bean.checkInDate.empty ? "-" : bean.checkInDate)}'
|
||||
android:text='@{"入库时间:" + (bean.inStoreTime.empty ? "-" : bean.inStoreTime)}'
|
||||
android:textColor="@color/phone_text_body"
|
||||
android:textSize="13sp" />
|
||||
|
||||
|
||||
Binary file not shown.
@@ -22,9 +22,16 @@ data class GjcCheckInRecord(
|
||||
var weight: Double = 0.0, // 运抵重量
|
||||
var volume: Double = 0.0, // 运抵体积
|
||||
var whId: Long = 0, // GJC_WAREHOUSE.ID
|
||||
var carWeight: String = "" // 托盘自重
|
||||
var carWeight: String = "", // 托盘车重(平板托盘车号反查值)
|
||||
var trayNumber: Int = 0, // 托盘数量
|
||||
var trayTotalWeight: Double = 0.0, // 托盘重量(托盘数量 × 托盘自重,与平板端一致)
|
||||
var opUserName: String = "" // 计重人姓名(opId 关联查询)
|
||||
) : BaseObservable() {
|
||||
|
||||
/** 计重人:优先姓名,为空回退操作员编码 */
|
||||
val opUserDisplay: String
|
||||
get() = opUserName.ifEmpty { opId }
|
||||
|
||||
// 数据变化回调
|
||||
var onDataChanged: (() -> Unit)? = null
|
||||
|
||||
@@ -54,14 +61,23 @@ data class GjcCheckInRecord(
|
||||
}
|
||||
}
|
||||
|
||||
// 托盘自重的字符串表示(用于双向绑定,5.5寸手机版「修改记录」覆层)
|
||||
/**
|
||||
* 托盘重量输入原文(手机「修改记录」覆层)。保留原文而非由 Double 反推:
|
||||
* 输入 "1" 时若 getter 返回 "1.0",输入框会被重设、光标回到开头,再输 "8" 就成了 "81"(实机踩过)。
|
||||
* transient:不参与 Gson 提交序列化。
|
||||
*/
|
||||
@Transient
|
||||
private var trayTotalWeightInput: String? = null
|
||||
|
||||
// 托盘重量的字符串表示(用于双向绑定,5.5寸手机版「修改记录」覆层)
|
||||
@get:Bindable
|
||||
var carWeightStr: String
|
||||
get() = carWeight
|
||||
var trayTotalWeightStr: String
|
||||
get() = trayTotalWeightInput ?: if (trayTotalWeight == 0.0) "" else trayTotalWeight.toString()
|
||||
set(value) {
|
||||
if (carWeight != value) {
|
||||
carWeight = value
|
||||
notifyPropertyChanged(BR.carWeightStr)
|
||||
if (trayTotalWeightStr != value) {
|
||||
trayTotalWeightInput = value
|
||||
trayTotalWeight = value.toDoubleOrNull() ?: 0.0
|
||||
notifyPropertyChanged(BR.trayTotalWeightStr)
|
||||
onDataChanged?.invoke()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,8 +76,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 trayNumber: Int? = null, // 托盘数量(splitCheckIn / completeCheckIn 入参,与平板端一致)
|
||||
var trayTotalWeight: Double? = null, // 托盘重量 = 托盘数量 × 托盘自重
|
||||
|
||||
// ==================== 状态信息 ====================
|
||||
var checkIn: String? = null, // 收运状态。0:待收运,1:已收运,2:收运中
|
||||
@@ -131,13 +131,6 @@ data class GjcMaWb(
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
|
||||
/**
|
||||
* 5.5寸手机版:是否处于「待运抵」Tab(申报状态为空)。
|
||||
* 接口无按申报状态区分的查询参数,Tab 由客户端对已加载数据拆分。
|
||||
*/
|
||||
val isPending: Boolean
|
||||
get() = declareStatus.isNullOrEmpty()
|
||||
|
||||
/**
|
||||
* 5.5寸手机版:申报状态三色标签的着色分类(01=绿/W=靛蓝/其余非空=琥珀)。
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,9 @@ data class GjcMove(
|
||||
var likeNo: String = "", // 部分运单号no(模糊查询)
|
||||
|
||||
var range: String = "",
|
||||
var flight: String = "", // 航班信息(航班日期/航班号,如 20260924/MU2222)
|
||||
var businessName: String = "", // 业务类型名称(中)
|
||||
var opUserName: String = "", // 操作人(移库人)姓名
|
||||
|
||||
// UI扩展字段 - 使用ObservableBoolean实现自动UI更新
|
||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||
@@ -67,6 +70,14 @@ data class GjcMove(
|
||||
val goodsName: String
|
||||
get() = goodsCn.ifEmpty { goods }
|
||||
|
||||
/** 业务类型:优先中文名称,为空回退编码 */
|
||||
val businessDisplay: String
|
||||
get() = businessName.ifEmpty { businessType }
|
||||
|
||||
/** 移库人:优先姓名,为空回退操作人ID */
|
||||
val opUserDisplay: String
|
||||
get() = opUserName.ifEmpty { opId }
|
||||
|
||||
/**
|
||||
* 详情页字段统一空值占位。
|
||||
* 接口对 businessType / opdate / opId 等字段常返回 null,
|
||||
|
||||
@@ -73,6 +73,7 @@ class GjcWeighingRecordBean : Serializable {
|
||||
var paperTime: String = "" // 单据时间
|
||||
|
||||
var userName: String = "" // 收运人
|
||||
var passageWay: String = "" // 通道号(计重时选定的通道号名称)
|
||||
var userId: String = "" // 收运人ID
|
||||
|
||||
var remark: String = "" // 备注
|
||||
|
||||
@@ -10,4 +10,6 @@ class GjcWeighingStatisticsBean {
|
||||
var totalPc: Long = 0 // 总件数
|
||||
var totalWeight: Double = 0.0 // 总重量
|
||||
var cargoWeight: Double = 0.0 // 总货重
|
||||
var waitCheckInNumber: Int = 0 // 待计重票数(IntExpCheckIn/pageQueryTotal)
|
||||
var checkingNumber: Int = 0 // 计重中票数(IntExpCheckIn/pageQueryTotal)
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ class IntImpPickUpDLVBean : Serializable {
|
||||
var dlvId: String = ""
|
||||
var dlvIdType: String = ""
|
||||
var dlvName: String = ""
|
||||
var refUserName: String = "" // 出库人姓名(refId 关联查询)
|
||||
var dlvPhone: String = ""
|
||||
var locFlag: String = ""
|
||||
var origin: String = ""
|
||||
|
||||
@@ -8,5 +8,15 @@ data class ManifestTotalDto(
|
||||
var wbNumber: Int = 0, // 运单票数/总票数
|
||||
var totalPc: Long = 0, // 总件数
|
||||
var totalWeight: Double = 0.0, // 总重量
|
||||
var cargoWeight: Double = 0.0 // 总货重
|
||||
var cargoWeight: Double = 0.0, // 总货重
|
||||
|
||||
// ===== 后端统一统计 DTO 的分项计数(2026-09 后端补齐,按接口各取所需) =====
|
||||
var flightNumber: Int = 0, // 航班数
|
||||
var uldNumber: Int = 0, // 板箱数(出库交接 Tab 角标)
|
||||
var storedNumber: Int = 0, // 已入库票数(出港/进港查询)
|
||||
var departedNumber: Int = 0, // 已离港(出港)/ 已出库(进港)票数
|
||||
var notClearNumber: Int = 0, // 未清仓票数(出港/进港仓库)
|
||||
var clearNumber: Int = 0, // 已清仓票数(出港/进港仓库)
|
||||
var waitCheckInNumber: Int = 0, // 待计重票数(出港计重)
|
||||
var checkingNumber: Int = 0 // 计重中票数(出港计重)
|
||||
)
|
||||
|
||||
@@ -27,7 +27,9 @@ class MoveStashBean : ICheck {
|
||||
var flight: String = "" // 20240711/MU7766
|
||||
var fno: String = "" // MU7766
|
||||
var goods: String = "" // 国际货
|
||||
var mawbId: String = "" // 996422
|
||||
var mawbId: String = "" // 996422(searchMoved 出参不含此字段)
|
||||
var moveId: String = "" // CIII260930141150(已移库,movedDetail 入参)
|
||||
var opUserName: String = "" // 移库人姓名(searchMoved / movedDetail 出参)
|
||||
var no: String = "" // 44445074
|
||||
var opDate: String = "" // null
|
||||
var opId: String = "" // null
|
||||
@@ -63,6 +65,10 @@ class MoveStashBean : ICheck {
|
||||
val agentDisplay: String
|
||||
get() = if (agentName.isNotEmpty()) agentName else agentCode
|
||||
|
||||
/** 移库人:优先姓名,为空回退操作人 ID */
|
||||
val opUserDisplay: String
|
||||
get() = opUserName.ifEmpty { opId }
|
||||
|
||||
/** 详情页/卡片字段统一空值占位 */
|
||||
fun orDash(value: String?): String = if (value.isNullOrEmpty()) "-" else value
|
||||
}
|
||||
@@ -19,18 +19,21 @@ data class ULDBean(
|
||||
var status: String = "",
|
||||
// 备注
|
||||
var remark: String = "",
|
||||
// ========== 以下字段接口出参已有(api-doc /eqm/uld/pageQuery),此前 Bean 未解析 ==========
|
||||
// 进港航班号(语义待后端确认,见 documents/后端接口对接问题清单.xlsx)
|
||||
// ========== 以下字段接口出参已有(api-doc /eqm/uld/pageQuery) ==========
|
||||
// 进港航班号
|
||||
var ifNo: String = "",
|
||||
// 出港航班号
|
||||
var efNo: String = "",
|
||||
// 入库时间
|
||||
var checkInDate: String = "",
|
||||
// 出库时间
|
||||
var checkOutDate: String = "",
|
||||
// ========== 后端暂无对应字段,前端按设计稿预留(提交后端忽略,无副作用) ==========
|
||||
// 来源:空运 / 陆运(后端字段需求已登记清单)
|
||||
// 来源(空运、陆运)
|
||||
var source: String = "",
|
||||
// 入库时间 yyyy-MM-dd HH:mm:ss(后端确认「入库时间」取 inStoreTime,与平板端一致)
|
||||
var inStoreTime: String = "",
|
||||
// 所在港
|
||||
var nowPort: String = "",
|
||||
// 位置信息
|
||||
var nowPosition: String = "",
|
||||
){
|
||||
val checked = ObservableBoolean(false)
|
||||
|
||||
@@ -40,22 +43,18 @@ data class ULDBean(
|
||||
else -> status
|
||||
}
|
||||
|
||||
// ========== 手机版(5.5 寸手持端)三态状态展示 ==========
|
||||
// 设计稿状态为 可用(绿)/占用(橙)/维修(红) 三态;后端当前仅两态(0/1),
|
||||
// 按语义映射 0→可用、1→维修,"2"→占用为后端扩展枚举后的预留(需求已登记清单)。
|
||||
// ========== 手机版(5.5 寸手持端)状态展示 ==========
|
||||
// 后端确认状态枚举维持两态(0 正常 / 1 故障),不新增「占用」;
|
||||
// 手机版按设计稿文案映射 0→可用(绿)、1→维修(红)。
|
||||
|
||||
/** 手机版状态文案 */
|
||||
val statusPhoneName: String
|
||||
get() = when (status) {
|
||||
"0" -> "可用"
|
||||
"1" -> "维修"
|
||||
"2" -> "占用"
|
||||
else -> statusName()
|
||||
}
|
||||
|
||||
/** 可用(绿色标签) */
|
||||
val isStatusAvailable: Boolean get() = status == "0"
|
||||
|
||||
/** 占用(橙色标签,后端扩展枚举后的预留) */
|
||||
val isStatusOccupied: Boolean get() = status == "2"
|
||||
}
|
||||
@@ -1796,6 +1796,13 @@ interface Api {
|
||||
@GET("DomImpMove/detail")
|
||||
suspend fun getGnjMoveStashDetail(@Query("mawbId") mawbId: String): BaseResultBean<GnjYiKuBean>
|
||||
|
||||
/**
|
||||
* 国内进港移库-移库完成详情(已移库运单无 mawbId,按 moveId 查,含 pic 三字段与移库人)
|
||||
* 接口路径: /DomImpMove/movedDetail
|
||||
*/
|
||||
@GET("DomImpMove/movedDetail")
|
||||
suspend fun getGnjMoveStashMovedDetail(@Query("moveId") moveId: String): BaseResultBean<GnjYiKuBean>
|
||||
|
||||
/**
|
||||
* 编辑-国内进港移库(新接口)
|
||||
*/
|
||||
@@ -2091,6 +2098,13 @@ interface Api {
|
||||
@POST("eqm/uld/deleteUld")
|
||||
suspend fun deleteUld(@Query("uld") uld: String): BaseResultBean<Any>
|
||||
|
||||
/**
|
||||
* 批量删除-ULD-信息(请求体为 ULD 编号字符串数组)
|
||||
* 接口路径: /eqm/uld/deleteUldBatch
|
||||
*/
|
||||
@POST("eqm/uld/deleteUldBatch")
|
||||
suspend fun deleteUldBatch(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 冷库登记
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -78,10 +78,9 @@ class GjcWeighingListActivity :
|
||||
|
||||
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
|
||||
fun resetFilter() {
|
||||
viewModel.channelFilter.value = ""
|
||||
viewModel.carrierFilter.value = ""
|
||||
viewModel.awbTypeFilter.value = ""
|
||||
viewModel.flightDate.value = ""
|
||||
viewModel.agentCode.value = ""
|
||||
viewModel.spCode.value = ""
|
||||
}
|
||||
|
||||
/** 手机版筛选:确认 */
|
||||
|
||||
@@ -75,12 +75,9 @@ class GjcWeighingRecordListActivity :
|
||||
|
||||
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
|
||||
fun resetFilter() {
|
||||
viewModel.checkInDateStart.value = ""
|
||||
viewModel.checkInDateEnd.value = ""
|
||||
viewModel.flightDate.value = ""
|
||||
viewModel.agentCode.value = ""
|
||||
viewModel.spCode.value = ""
|
||||
viewModel.destFilter.value = ""
|
||||
viewModel.opUserFilter.value = ""
|
||||
}
|
||||
|
||||
/** 手机版筛选:确认 */
|
||||
|
||||
@@ -96,8 +96,12 @@ class IntExpArriveActivity :
|
||||
viewModel.onTabChangedPhone()
|
||||
}
|
||||
|
||||
/** 卡片长按:展开操作浮层(View.OnLongClickListener 要求返回 Boolean) */
|
||||
/**
|
||||
* 卡片长按:展开操作浮层(View.OnLongClickListener 要求返回 Boolean)。
|
||||
* 仅已运抵 Tab 有操作(重置 / 回执);待运抵 Tab 的「补充信息」页后端确认暂不需要,已移除。
|
||||
*/
|
||||
fun showCardActionPhone(bean: GjcMaWb): Boolean {
|
||||
if (viewModel.currentTab.value != "shipped") return false
|
||||
bean.actionMenuVisible.set(true)
|
||||
return true
|
||||
}
|
||||
@@ -121,7 +125,6 @@ class IntExpArriveActivity :
|
||||
fun resetFilter() {
|
||||
viewModel.flightDate.value = ""
|
||||
viewModel.flightNo.value = ""
|
||||
viewModel.agentCodePhone.value = ""
|
||||
}
|
||||
|
||||
/** 手机版筛选:确认 */
|
||||
@@ -147,16 +150,6 @@ class IntExpArriveActivity :
|
||||
IntExpArriveReceiptActivity.start(this, bean.wbNo.orEmpty(), list)
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入「补充信息」页(手机专属新页):对该运单整个 haWbList 批量应用(参照 Pad 端国际进港
|
||||
* IntArrSupplementInfoViewModel 的批量复制模式)。后端暂无保存接口,见接口问题清单。
|
||||
*/
|
||||
fun openSupplement(bean: GjcMaWb) {
|
||||
bean.actionMenuVisible.set(false)
|
||||
val list = ArrayList<GjcHaWb>(bean.haWbList.orEmpty())
|
||||
IntExpArriveSupplementActivity.start(this, bean.wbNo.orEmpty(), list)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
when (requestCode) {
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
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.ActivityIntExpArriveSupplementBinding
|
||||
import com.lukouguoji.gjc.viewModel.IntExpArriveSupplementViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.GjcHaWb
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
|
||||
/**
|
||||
* 国际出港运抵-补充信息页(5.5寸手机版专属新页,平板端无对应页面)
|
||||
*
|
||||
* 参照 Pad 端国际进港「收发货人信息」补充页的批量应用模式:对该运单整个 haWbList 批量应用
|
||||
* 同一份收发货人表单。后端暂无保存接口,见 IntExpArriveSupplementViewModel 顶部注释。
|
||||
* 对应设计稿 documents/5.5寸手持端设计文件/04_出港运抵/supplement.html。
|
||||
*/
|
||||
class IntExpArriveSupplementActivity :
|
||||
BaseBindingActivity<ActivityIntExpArriveSupplementBinding, IntExpArriveSupplementViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_exp_arrive_supplement
|
||||
override fun viewModelClass() = IntExpArriveSupplementViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("补充信息")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, wbNo: String, haWbList: ArrayList<GjcHaWb>) {
|
||||
val starter = Intent(context, IntExpArriveSupplementActivity::class.java)
|
||||
.putExtra(Constant.Key.CODE, wbNo)
|
||||
.putExtra(Constant.Key.DATA, haWbList)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,12 +72,12 @@ class IntExpOutHandoverActivity :
|
||||
/**
|
||||
* 手机版筛选:重置
|
||||
*
|
||||
* 只清空弹层内的三个条件(航班日期 / 航班号 / 交接人),不影响 Tab 与顶部搜索框。
|
||||
* 只清空弹层内的三个条件(航班日期 / 航班号 / 目的站),不影响 Tab 与顶部搜索框。
|
||||
*/
|
||||
fun resetFilter() {
|
||||
viewModel.flightDate.value = ""
|
||||
viewModel.flightNo.value = ""
|
||||
viewModel.hoId.value = ""
|
||||
viewModel.fdest.value = ""
|
||||
}
|
||||
|
||||
/** 手机版筛选:确认 */
|
||||
|
||||
@@ -7,7 +7,6 @@ import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.holder.GjcQueryViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
@@ -81,14 +80,17 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
// 特码下拉列表(设计稿筛选弹层为下拉;平板筛选为文本输入,不加载)
|
||||
val specialCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
// 三格统计:已入库 / 已离港(总票数复用 totalCount,为服务端全量口径)
|
||||
// 后端无分项统计出参,且文档定义的 isFclose 入参实测被 pageQuery/pageQueryTotal 静默忽略
|
||||
// (2026-07-31 内网 A/B 验证,见接口问题清单)——已入库/已离港暂为「已加载数据」客户端计数口径
|
||||
// 三格统计:总票数 / 已入库 / 已离港,均取 pageQueryTotal 出参(wbNumber / storedNumber / departedNumber),
|
||||
// 与列表同条件、服务端全量口径
|
||||
val storedCount = MutableLiveData("0")
|
||||
val departedCount = MutableLiveData("0")
|
||||
|
||||
// 日期类型(0:入库,1:离港),与主干平板端一致。后端 beginDate/endDate 仅在携带 dateState 时生效
|
||||
// (内网实测:不带 dateState 时起止日期被忽略)。平板布局(本分支)不绑定,phoneExtras 关闭时不进请求
|
||||
val dateState = MutableLiveData("0")
|
||||
val dateStateList = MutableLiveData(listOf(KeyValue("入库", "0"), KeyValue("离港", "1")))
|
||||
|
||||
private var phoneExtrasEnabled = false
|
||||
private var phoneLoadedList: List<GjcMaWb> = emptyList()
|
||||
|
||||
/**
|
||||
* 手机形态专属初始化(Activity 在 DeviceUtil.isPhone() 时调用)。
|
||||
@@ -186,10 +188,15 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
* 核心方法:调用API获取数据并转换PageInfo为BaseListBean
|
||||
*/
|
||||
override fun getData() {
|
||||
// 手机版:日期类型,仅在有起止日期时携带(平板 phoneExtrasEnabled 恒 false → null 不进请求)
|
||||
val hasDate = !flightDateStart.value.isNullOrEmpty() || !flightDateEnd.value.isNullOrEmpty()
|
||||
val dateStateParam = if (phoneExtrasEnabled && hasDate) dateState.value?.toIntOrNull() else null
|
||||
|
||||
// 构建查询参数(列表接口)
|
||||
val listParams = mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit,
|
||||
"dateState" to dateStateParam,
|
||||
"beginDate" to flightDateStart.value!!.ifEmpty { null },
|
||||
"endDate" to flightDateEnd.value!!.ifEmpty { null },
|
||||
"agentCode" to agentId.value!!.ifEmpty { null },
|
||||
@@ -206,6 +213,7 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
|
||||
// 构建查询参数(统计接口 - 使用相同的搜索条件)
|
||||
val totalParams = mapOf(
|
||||
"dateState" to dateStateParam,
|
||||
"beginDate" to flightDateStart.value!!.ifEmpty { null },
|
||||
"endDate" to flightDateEnd.value!!.ifEmpty { null },
|
||||
"agentCode" to agentId.value!!.ifEmpty { null },
|
||||
@@ -227,14 +235,6 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
onSuccess = { pageInfo ->
|
||||
// ⚠️ 核心:使用toBaseListBean()转换PageInfo为BaseListBean
|
||||
pageModel.handleListBean(pageInfo.toBaseListBean())
|
||||
|
||||
// 手机三格统计:对已加载数据做客户端计数(平板不触发)
|
||||
if (phoneExtrasEnabled) {
|
||||
val pageItems = pageInfo.list ?: emptyList()
|
||||
phoneLoadedList =
|
||||
if (pageModel.page <= 1) pageItems else phoneLoadedList + pageItems
|
||||
updatePhoneCounts()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,20 +247,13 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
// 手机三格统计分项(平板布局不绑定,无影响)
|
||||
storedCount.value = (data?.storedNumber ?: 0).toString()
|
||||
departedCount.value = (data?.departedNumber ?: 0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机三格统计(已入库/已离港):与卡片状态标签同一判定口径(fclose / opDate),
|
||||
* 统计范围为已加载的列表数据。
|
||||
*/
|
||||
private fun updatePhoneCounts() {
|
||||
departedCount.value = phoneLoadedList.count { it.isQueryDeparted }.toString()
|
||||
storedCount.value =
|
||||
phoneLoadedList.count { !it.isQueryDeparted && it.isQueryStored }.toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理扫码结果
|
||||
*/
|
||||
|
||||
@@ -145,7 +145,7 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
|
||||
totalWeight.value = String.format("%.2f", sumWeight)
|
||||
|
||||
// 计算托盘总重(手机版顶部卡片)
|
||||
val sumCarWeight = records.sumOf { it.carWeight.toDoubleOrNull() ?: 0.0 }
|
||||
val sumCarWeight = records.sumOf { it.trayTotalWeight }
|
||||
totalCarWeight.value = String.format("%.2f", sumCarWeight)
|
||||
|
||||
// 计算重量误差百分比
|
||||
|
||||
@@ -48,28 +48,19 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
|
||||
|
||||
// ========== 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("")
|
||||
// 手机版筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 代理人 / 特码,
|
||||
// 运单号走顶部搜索框;dest / opId / 收运时间范围后端均不支持(dest、opId 内网实测被忽略)
|
||||
|
||||
/** 由手机形态的 Activity 置 true,平板保持 false(不产生任何额外请求与参数) */
|
||||
private var phoneExtrasEnabled = false
|
||||
|
||||
/**
|
||||
* 开启手机版专属数据:放开「今天」默认日期(设计稿筛选无航班日期)、加载计重人下拉。
|
||||
* 开启手机版专属数据:放开「今天」默认日期(手机默认查全量,航班日期在筛选弹层可选)。
|
||||
* 仅由手机形态的 Activity 调用。
|
||||
*/
|
||||
fun initPhoneExtras() {
|
||||
phoneExtrasEnabled = true
|
||||
flightDate.value = ""
|
||||
DictUtils.getWHSUserList { whsUserList.postValue(it) }
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -173,11 +164,6 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
|
||||
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 }
|
||||
}
|
||||
|
||||
// 构建查询参数(列表接口)
|
||||
|
||||
@@ -72,17 +72,28 @@ 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("")
|
||||
// 托盘信息(与平板端一致:托盘重量 trayTotalWeight = 托盘数量 × 托盘自重,自重默认 18kg 可编辑)
|
||||
/** 托盘数量 → 入参 trayNumber */
|
||||
val trayNumber = MutableLiveData("")
|
||||
|
||||
/** 手机形态标记:为 true 时提交体额外携带 palletNumber / carWeight(后端静默忽略) */
|
||||
/** 单个托盘自重(默认 18kg)→ 与数量相乘得入参 trayTotalWeight */
|
||||
val trayWeight = MutableLiveData("18")
|
||||
|
||||
/** 手机形态标记:为 true 时提交体携带 trayNumber / trayTotalWeight(平板保持原托盘车号链路) */
|
||||
private var phoneMode = false
|
||||
|
||||
/** 托盘重量 = 托盘数量 × 托盘自重 */
|
||||
private fun getTrayTotalWeight(): Double {
|
||||
val num = trayNumber.value?.toIntOrNull() ?: 0
|
||||
val weight = trayWeight.value?.toDoubleOrNull() ?: 0.0
|
||||
return num * weight
|
||||
}
|
||||
|
||||
/** 仅由手机形态的 Activity 调用 */
|
||||
fun initPhoneExtras() {
|
||||
phoneMode = true
|
||||
@@ -406,10 +417,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
|
||||
remark = pageRemark.value
|
||||
|
||||
// 手机版专属:托盘数量/托盘自重(后端暂无对应入参,静默忽略;平板 phoneMode 恒 false,字段为 null 不进请求体)
|
||||
// 手机版:托盘数量/托盘重量(平板 phoneMode 恒 false,字段为 null 不进请求体)
|
||||
if (this@GjcWeighingStartViewModel.phoneMode) {
|
||||
palletNumber = this@GjcWeighingStartViewModel.palletNumber.value?.ifEmpty { null }
|
||||
carWeight = this@GjcWeighingStartViewModel.carWeight.value?.ifEmpty { null }
|
||||
trayNumber = this@GjcWeighingStartViewModel.trayNumber.value?.toIntOrNull()
|
||||
trayTotalWeight = getTrayTotalWeight()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,10 +453,12 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
maWbBean.value = maWbBean.value?.apply {
|
||||
carId = null
|
||||
remark = null
|
||||
palletNumber = null
|
||||
trayNumber = null
|
||||
trayTotalWeight = null
|
||||
}
|
||||
carWeight.value = "0"
|
||||
this@GjcWeighingStartViewModel.palletNumber.value = ""
|
||||
this@GjcWeighingStartViewModel.trayNumber.value = ""
|
||||
trayWeight.value = "18"
|
||||
} else {
|
||||
showToast(result.msg.noNull("分托计重失败"))
|
||||
}
|
||||
@@ -524,9 +537,9 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
"checkIn" to "1", // 收运状态设置为已收运
|
||||
"passageWayId" to channel.value, // 通道号参数
|
||||
"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)
|
||||
// 手机版托盘信息(平板 phoneMode 恒 false → null → removeEmptyOrNull 移除,请求体不变)
|
||||
"trayNumber" to (if (phoneMode) trayNumber.value?.toIntOrNull() else null),
|
||||
"trayTotalWeight" to (if (phoneMode) getTrayTotalWeight() else null)
|
||||
).toRequestBody(removeEmptyOrNull = true)
|
||||
|
||||
launchLoadingCollect({
|
||||
|
||||
@@ -61,33 +61,23 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
||||
/** 手机版顶部搜索关键字(运单号/航班号混输,getData 内分流:含字母→fno,纯数字→likeNo 模糊) */
|
||||
val searchKey = MutableLiveData("")
|
||||
|
||||
/** 主页三格统计:待计重(checkIn=0)/ 计重中(checkIn=2)数量 */
|
||||
/** 主页三格统计:待计重 / 计重中数量(取 pageQueryTotal 出参 waitCheckInNumber / checkingNumber) */
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -271,10 +261,6 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
||||
else -> baseParams["likeNo"] = key
|
||||
}
|
||||
}
|
||||
// 以下三个为后端预留参数(暂无对应入参,后端静默忽略,见接口问题清单)
|
||||
baseParams["passageWayId"] = channelFilter.value?.ifEmpty { null }
|
||||
baseParams["by0"] = carrierFilter.value?.ifEmpty { null }
|
||||
baseParams["awbType"] = awbTypeFilter.value?.ifEmpty { null }
|
||||
}
|
||||
|
||||
// 构建查询参数(列表接口)
|
||||
@@ -304,21 +290,9 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
||||
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
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()
|
||||
}
|
||||
}
|
||||
// 手机版三格统计:后端统计出参直接给出分项计数,无需额外请求
|
||||
pendingCount.value = (data?.waitCheckInNumber ?: 0).toString()
|
||||
weighingCount.value = (data?.checkingNumber ?: 0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
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.GjcHaWb
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||
import dev.utils.app.info.KeyValue
|
||||
|
||||
/**
|
||||
* 国际出港运抵-补充信息 ViewModel(5.5寸手机版专属新页)
|
||||
*
|
||||
* 参照 Pad 端国际进港 [com.lukouguoji.gjj.viewModel.IntArrSupplementInfoViewModel] 的
|
||||
* 「单一表单批量复制到选中列表」模式:对该运单的整个 haWbList 批量应用同一份收发货人信息。
|
||||
*
|
||||
* ⚠️ 后端暂无保存接口,见 [com.lukouguoji.module_base.http.net.Api.supplementArriveHaWb] 注释
|
||||
* 与 documents/后端接口对接问题清单.xlsx。
|
||||
*/
|
||||
class IntExpArriveSupplementViewModel : BaseViewModel() {
|
||||
|
||||
// 表单编辑用数据对象(取首个分单填充,让用户看到已有数据)
|
||||
val dataBean = MutableLiveData(GjcHaWb())
|
||||
|
||||
// 批量应用的目标分单列表
|
||||
private var haWbList: List<GjcHaWb> = emptyList()
|
||||
|
||||
// 国家代码下拉列表
|
||||
val countryCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
// 通讯方式下拉列表
|
||||
val comTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun initOnCreated(intent: Intent) {
|
||||
val list = intent.getSerializableExtra(Constant.Key.DATA) as? ArrayList<GjcHaWb>
|
||||
// .copy() 补上被 Java 序列化跳过的 @Transient 字段(checked 等),见分单明细页同款注释
|
||||
haWbList = (list ?: emptyList()).map { it.copy() }
|
||||
dataBean.value = haWbList.firstOrNull()?.copy() ?: GjcHaWb()
|
||||
|
||||
loadCountryCodeList()
|
||||
loadComTypeList()
|
||||
}
|
||||
|
||||
private fun loadCountryCodeList() {
|
||||
launchCollect({ NetApply.api.getCountryCodeList() }) {
|
||||
onSuccess = { result ->
|
||||
countryCodeList.value = result.data?.mapNotNull { bean ->
|
||||
if (bean.code != null && bean.name != null) KeyValue(bean.name, bean.code) else null
|
||||
} ?: emptyList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadComTypeList() {
|
||||
launchCollect({ NetApply.api.getCommunicateTypeList() }) {
|
||||
onSuccess = { result ->
|
||||
comTypeList.value = result.data?.mapNotNull { bean ->
|
||||
if (bean.code != null && bean.name != null) KeyValue(bean.name, bean.code) else null
|
||||
} ?: emptyList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun cancel() {
|
||||
getTopActivity().finish()
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存按钮点击 - 将表单信息复制到该运单的所有分单,批量提交。
|
||||
*/
|
||||
fun save() {
|
||||
val formBean = dataBean.value ?: return
|
||||
|
||||
if (formBean.consigneeName.verifyNullOrEmpty("收货人名称不能为空")) return
|
||||
if (formBean.consigneeCountryCode.verifyNullOrEmpty("收货人国家代码不能为空")) return
|
||||
if (formBean.consigneeComType.verifyNullOrEmpty("收货人通讯方式不能为空")) return
|
||||
if (formBean.consigneePnum.verifyNullOrEmpty("收货人联系号码不能为空")) return
|
||||
if (formBean.consignorName.verifyNullOrEmpty("发货人名称不能为空")) return
|
||||
if (formBean.consignorCountryCode.verifyNullOrEmpty("发货人国家代码不能为空")) return
|
||||
if (formBean.consignorComType.verifyNullOrEmpty("发货人通讯方式不能为空")) return
|
||||
if (formBean.consignorPnum.verifyNullOrEmpty("发货人联系号码不能为空")) return
|
||||
|
||||
if (haWbList.isEmpty()) {
|
||||
showToast("无可保存的分单数据")
|
||||
return
|
||||
}
|
||||
|
||||
val updatedList = haWbList.map { haWb ->
|
||||
haWb.copy(
|
||||
consigneeName = formBean.consigneeName,
|
||||
consigneeCountryCode = formBean.consigneeCountryCode,
|
||||
consigneeComType = formBean.consigneeComType,
|
||||
consigneePnum = formBean.consigneePnum,
|
||||
consigneeAddress = formBean.consigneeAddress,
|
||||
consignorName = formBean.consignorName,
|
||||
consignorCountryCode = formBean.consignorCountryCode,
|
||||
consignorComType = formBean.consignorComType,
|
||||
consignorPnum = formBean.consignorPnum,
|
||||
consignorAddress = formBean.consignorAddress
|
||||
)
|
||||
}
|
||||
|
||||
launchLoadingCollect({ NetApply.api.supplementArriveHaWb(updatedList.toRequestBody()) }) {
|
||||
onSuccess = {
|
||||
showToast("保存成功")
|
||||
getTopActivity().finish()
|
||||
}
|
||||
onFailed = { code, msg ->
|
||||
showToast("保存失败:$msg(后端接口暂未支持,见接口问题清单)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
|
||||
// ========== 5.5寸手机版专属(平板布局不引用,零影响) ==========
|
||||
|
||||
/** 当前 Tab:"pending"(待运抵) / "shipped"(已运抵)。接口无申报状态查询参数,Tab 由客户端对已加载数据拆分 */
|
||||
/** 当前 Tab:"pending"(待运抵) / "shipped"(已运抵)。查询时映射为入参 arrivalStatus=0/1(与平板端运抵状态筛选一致) */
|
||||
val currentTab = MutableLiveData("pending")
|
||||
|
||||
/** Tab 配置 */
|
||||
@@ -64,7 +64,7 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
listOf(KeyValue("待运抵", "pending"), KeyValue("已运抵", "shipped"))
|
||||
)
|
||||
|
||||
/** 两个 Tab 的角标计数(当前已加载数据的客户端统计,非全量,见接口问题清单) */
|
||||
/** 两个 Tab 的角标计数(同条件 + arrivalStatus=0/1 各调一次 pageQueryTotal 取 wbNumber,全量口径) */
|
||||
val arriveTabCounts = MutableLiveData(listOf("0", "0"))
|
||||
|
||||
/** 手机版空态(当前 Tab 过滤后无数据时显示,对应设计稿 empty-pending) */
|
||||
@@ -77,61 +77,51 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
/** 手机版已选数量(底部操作条「已选 N 项」) */
|
||||
val selectedCountPhone = MutableLiveData("0")
|
||||
|
||||
/** 手机版筛选弹层「代理」(后端 pageQuery 支持 agentCode 入参,复用既有 agentCode 语义查询) */
|
||||
val agentCodePhone = MutableLiveData("")
|
||||
val agentListPhone = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
private var phoneExtrasEnabled = false
|
||||
|
||||
/**
|
||||
* 完整已加载列表(跨分页累计,未按 Tab 过滤)。
|
||||
*
|
||||
* ⚠️ RecyclerView/LinearLayoutManager 不会像普通 ViewGroup 那样让 `View.GONE` 的子项
|
||||
* 自动塌陷为 0 高度——它仍按子项的测量高度参与滚动区域计算,导致"隐藏"的卡片在列表里
|
||||
* 留下一段空白(已实机截图验证)。因此 Tab 切换不能靠给 item 加 visibility 绑定,
|
||||
* 必须真正地把适配器的数据集替换成过滤后的子集([applyTabFilterPhone])。
|
||||
*/
|
||||
private var allLoadedList: List<GjcMaWb> = emptyList()
|
||||
|
||||
/**
|
||||
* 开启手机版专属数据:加载「代理」筛选下拉。仅由手机形态的 Activity 调用。
|
||||
* 开启手机版专属数据:Tab(arrivalStatus)与角标统计。仅由手机形态的 Activity 调用。
|
||||
* 筛选弹层与平板端查询参数一致(航班日期/航班号),agentCode 内网实测被后端忽略,已移除「代理」。
|
||||
*/
|
||||
fun initPhoneExtras() {
|
||||
phoneExtrasEnabled = true
|
||||
launchCollect({ NetApply.api.getIntExpAgentList() }) {
|
||||
onSuccess = { result ->
|
||||
agentListPhone.postValue(
|
||||
listOf(KeyValue("全部", "")) + (result.data ?: emptyList()).map { KeyValue(it.name ?: "", it.code ?: "") }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机版 Tab 切换:将适配器数据集替换为过滤后的子集(不重新请求)。
|
||||
* 手机版 Tab 切换:按 arrivalStatus 重新查询(服务端过滤,分页与角标均为全量口径)。
|
||||
* 由 Activity 在 [com.lukouguoji.module_base.ui.weight.phone.PhoneStatusTab] 的
|
||||
* 双向绑定写入 currentTab 后调用。
|
||||
*/
|
||||
fun onTabChangedPhone() {
|
||||
applyTabFilterPhone()
|
||||
refresh()
|
||||
}
|
||||
|
||||
private fun applyTabFilterPhone() {
|
||||
val isPendingTab = currentTab.value == "pending"
|
||||
val filtered = allLoadedList.filter { it.isPending == isPendingTab }
|
||||
pageModel.rv?.commonAdapter()?.refresh(filtered)
|
||||
emptyVisiblePhone.value = filtered.isEmpty()
|
||||
/** 当前 Tab 对应的运抵状态入参:待运抵=0 / 已运抵=1 */
|
||||
private fun currentArrivalStatus(): String =
|
||||
if (currentTab.value == "shipped") "1" else "0"
|
||||
|
||||
/** 列表加载完成后刷新空态文案(服务端已按 Tab 过滤,adapter 即当前 Tab 数据) */
|
||||
private fun updateEmptyStatePhone() {
|
||||
val isPendingTab = currentTab.value != "shipped"
|
||||
emptyVisiblePhone.value = pageModel.rv?.commonAdapter()?.items.isNullOrEmpty()
|
||||
emptyTextPhone.value = if (isPendingTab) "暂无待运抵的运单" else "暂无已运抵的运单"
|
||||
updateCheckAllStatusPhone()
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据完整已加载列表重新计算 Tab 角标计数(每次数据变化后调用)。
|
||||
* 加载 Tab 角标:同条件 + arrivalStatus=0/1 各调一次 pageQueryTotal,取 wbNumber。
|
||||
*/
|
||||
private fun updatePhoneTabCounts() {
|
||||
val pending = allLoadedList.count { it.isPending }.toString()
|
||||
val shipped = allLoadedList.count { !it.isPending }.toString()
|
||||
arriveTabCounts.value = listOf(pending, shipped)
|
||||
private fun loadPhoneTabCounts(filterParams: Map<String, Any?>) {
|
||||
listOf("0", "1").forEachIndexed { index, status ->
|
||||
launchCollect({
|
||||
NetApply.api.getIntExpArriveTotal((filterParams + mapOf("arrivalStatus" to status)).toRequestBody())
|
||||
}) {
|
||||
onSuccess = { result ->
|
||||
val current = arriveTabCounts.value?.toMutableList() ?: mutableListOf("0", "0")
|
||||
current[index] = (result.data?.wbNumber ?: 0).toString()
|
||||
arriveTabCounts.value = current
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -439,33 +429,30 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
filterParams["wbNo"] = null
|
||||
filterParams["likeNo"] = key
|
||||
}
|
||||
filterParams["agentCode"] = agentCodePhone.value?.ifEmpty { null }
|
||||
}
|
||||
|
||||
// 手机版 Tab 维度(运抵状态),角标需在不含该条件的基础上分别统计
|
||||
val tabParams = if (phoneExtrasEnabled) {
|
||||
filterParams + mapOf("arrivalStatus" to currentArrivalStatus())
|
||||
} else filterParams
|
||||
|
||||
// 列表参数 (含分页)
|
||||
val listParams = (filterParams + mapOf(
|
||||
val listParams = (tabParams + mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit
|
||||
)).toRequestBody()
|
||||
|
||||
// 统计参数 (无分页)
|
||||
val totalParams = filterParams.toRequestBody()
|
||||
val totalParams = tabParams.toRequestBody()
|
||||
|
||||
// 获取列表 (带Loading)
|
||||
launchLoadingCollect({ NetApply.api.getIntExpArriveList(listParams) }) {
|
||||
onSuccess = { result ->
|
||||
// 手机版:自行维护完整累计列表(不依赖 adapter.items 的历史状态,见 allLoadedList 注释)
|
||||
if (phoneExtrasEnabled) {
|
||||
val newPageItems = result.list ?: emptyList()
|
||||
allLoadedList = if (pageModel.page <= 1) newPageItems else allLoadedList + newPageItems
|
||||
}
|
||||
|
||||
pageModel.handleListBean(result) {
|
||||
updateCheckAllStatus()
|
||||
if (phoneExtrasEnabled) {
|
||||
// 用完整列表强制覆盖 adapter 数据集为当前 Tab 的过滤子集
|
||||
applyTabFilterPhone()
|
||||
updatePhoneTabCounts()
|
||||
updateEmptyStatePhone()
|
||||
updateCheckAllStatusPhone()
|
||||
}
|
||||
}
|
||||
// 数据加载完成后,重置全局展开状态为收起
|
||||
@@ -482,5 +469,10 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
}
|
||||
}
|
||||
|
||||
// 手机版 Tab 角标(平板不触发)
|
||||
if (phoneExtrasEnabled) {
|
||||
loadPhoneTabCounts(filterParams)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import dev.utils.common.DateUtils
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
@@ -36,12 +35,8 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
|
||||
val uldNo = MutableLiveData("") // ULD编号
|
||||
|
||||
// ========== 手机版(5.5 寸手持端)专用筛选条件 ==========
|
||||
// 平板布局不含对应控件,两者保持空值 → 不会进入请求参数,平板查询行为与改造前完全一致
|
||||
// 平板布局不含对应控件,保持空值 → 不会进入请求参数,平板查询行为与改造前完全一致
|
||||
val handoverState = MutableLiveData("") // 交接状态:"" 全部 / "0" 待交接 / "1" 已交接
|
||||
val hoId = MutableLiveData("") // 交接人(仓管编码)
|
||||
|
||||
/** 交接人下拉数据(仅手机版筛选弹层使用,由 [initPhoneExtras] 触发加载) */
|
||||
val hoUserList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
/** 手机版状态 Tab 配置 */
|
||||
val handoverStateTabs = MutableLiveData(
|
||||
@@ -52,7 +47,7 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
|
||||
val handoverStateCounts = MutableLiveData(listOf("", ""))
|
||||
|
||||
/**
|
||||
* 是否启用手机版专属数据(Tab 角标计数、交接人下拉)。
|
||||
* 是否启用手机版专属数据(Tab 角标计数)。
|
||||
*
|
||||
* 由 Activity 在手机形态下置 true。平板端保持 false,
|
||||
* 因此不会产生任何额外接口请求,平板行为零变化。
|
||||
@@ -70,15 +65,12 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
|
||||
val selectedCount = MutableLiveData("0")
|
||||
|
||||
/**
|
||||
* 开启手机版专属数据:默认停留「待交接」Tab、加载交接人下拉、启用 Tab 角标计数。
|
||||
* 开启手机版专属数据:默认停留「待交接」Tab、启用 Tab 角标计数。
|
||||
* 仅由手机形态的 Activity 调用。
|
||||
*/
|
||||
fun initPhoneExtras() {
|
||||
phoneExtrasEnabled = true
|
||||
handoverState.value = "0"
|
||||
DictUtils.getWHSUserList(addAll = false) { list ->
|
||||
hoUserList.postValue(list)
|
||||
}
|
||||
}
|
||||
|
||||
fun onItemCheckChanged() {
|
||||
@@ -218,11 +210,10 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
|
||||
"fno" to flightNo.value?.ifEmpty { null },
|
||||
"fdest" to fdest.value?.ifEmpty { null },
|
||||
"uld" to uldNo.value?.ifEmpty { null },
|
||||
// 以下两项为手机版新增筛选维度,平板端保持空值故不参与查询
|
||||
// 手机版 Tab 维度,平板端保持空值故不参与查询
|
||||
// 参数名以 api-doc 为准:交接状态为 handoverState(integer,0 未交接 / 1 已交接)。
|
||||
// hoId(交接人)后端查询入参暂不支持,已记录到 documents/后端接口对接问题清单.xlsx
|
||||
"handoverState" to handoverState.value?.ifEmpty { null },
|
||||
"hoId" to hoId.value?.ifEmpty { null }
|
||||
// 其余筛选与平板端口径一致(fdate/fno/fdest/uld),后端不提供交接人查询入参
|
||||
"handoverState" to handoverState.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
// 列表参数 (含分页)
|
||||
@@ -257,15 +248,15 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
|
||||
/**
|
||||
* 加载「待交接 / 已交接」Tab 角标数量。
|
||||
*
|
||||
* 复用统计接口,分别以 handoverState=0 / 1 各查一次,且沿用当前其余筛选条件,
|
||||
* 保证角标与列表口径一致。仅手机版调用。
|
||||
* 复用统计接口,分别以 handoverState=0 / 1 各查一次,且沿用当前其余筛选条件;
|
||||
* 角标取 uldNumber(板箱数,与列表 pageQuery 的 total 同口径)。仅手机版调用。
|
||||
*/
|
||||
private fun loadTabCounts(filterParams: Map<String, Any?>) {
|
||||
listOf("0", "1").forEachIndexed { index, state ->
|
||||
val params = (filterParams + mapOf("handoverState" to state)).toRequestBody()
|
||||
launchCollect({ NetApply.api.getIntExpOutHandoverTotal(params) }) {
|
||||
onSuccess = { result ->
|
||||
val count = (result.data?.wbNumber ?: 0).toString()
|
||||
val count = (result.data?.uldNumber ?: 0).toString()
|
||||
val current = handoverStateCounts.value?.toMutableList()
|
||||
?: mutableListOf("", "")
|
||||
if (index < current.size) {
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -43,28 +42,11 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
// 筛选弹层显隐
|
||||
val filterVisible = MutableLiveData(false)
|
||||
|
||||
// 筛选条件(设计稿弹层 8 项中平板没有的 6 项;平板布局无对应控件 → 恒为空 → 不进请求)
|
||||
val agentId = MutableLiveData("") // 代理(agentCode)
|
||||
val spCode = MutableLiveData("") // 特码
|
||||
val dest = MutableLiveData("") // 目的站
|
||||
val awbType = MutableLiveData("") // 运单类型(pageQuery 无此入参,预留,见接口问题清单)
|
||||
val businessType = MutableLiveData("") // 业务类型(同上预留)
|
||||
val goodsCn = MutableLiveData("") // 品名(中)(同上预留)
|
||||
// 筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 航班号 / 库位 / 清仓结果,运单号走顶部搜索框。
|
||||
// 代理/特码/目的站/运单类型/业务类型/品名 后端均不支持(内网实测 agentCode/spCode/dest 亦被忽略),已移除
|
||||
|
||||
// 筛选下拉字典(initPhoneExtras 加载,平板不请求)
|
||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||
val specialCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val businessTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("普货", "1"),
|
||||
KeyValue("特货", "2")
|
||||
)
|
||||
)
|
||||
|
||||
// 三格统计:未清仓 / 已清仓(总票数复用 totalWbNumber,服务端全量口径)。
|
||||
// 复用 pageQueryTotal 按 clearNormal=0/1 各查一次(入参 schema 含 clearNormal)。
|
||||
// 三格统计:未清仓 / 已清仓(总票数复用 totalWbNumber),直接取 pageQueryTotal 出参
|
||||
// notClearNumber / clearNumber(与总票数同一次请求、同条件)
|
||||
val unclearedCount = MutableLiveData("0")
|
||||
val clearedCount = MutableLiveData("0")
|
||||
|
||||
@@ -76,22 +58,6 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
*/
|
||||
fun initPhoneExtras() {
|
||||
phoneExtrasEnabled = true
|
||||
// 代理(与 06 出港查询同源接口)
|
||||
launchCollect({ NetApply.api.getIntExpAgentList() }) {
|
||||
onSuccess = { result ->
|
||||
val list = mutableListOf(KeyValue("全部", ""))
|
||||
result.data?.forEach { list.add(KeyValue(it.name ?: "", it.code ?: "")) }
|
||||
agentList.value = list
|
||||
}
|
||||
}
|
||||
// 特码:flag=1 国际;ieFlag 必须留空——传 "E" 后端返回空数组
|
||||
DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "") { list ->
|
||||
specialCodeList.postValue(listOf(KeyValue("全部", "")) + list)
|
||||
}
|
||||
// 运单类型(type=IO 国际出港)
|
||||
DictUtils.getWaybillTypeList(type = Constant.businessType.IO, addAll = true) {
|
||||
awbTypeList.postValue(it)
|
||||
}
|
||||
}
|
||||
|
||||
/** 筛选按钮点击 - 打开筛选面板 */
|
||||
@@ -108,12 +74,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
fun resetFilter() {
|
||||
flightDate.value = ""
|
||||
flightNo.value = ""
|
||||
agentId.value = ""
|
||||
spCode.value = ""
|
||||
dest.value = ""
|
||||
awbType.value = ""
|
||||
businessType.value = ""
|
||||
goodsCn.value = ""
|
||||
location.value = ""
|
||||
clearResult.value = ""
|
||||
}
|
||||
|
||||
/** 确认筛选 - 关闭面板并刷新 */
|
||||
@@ -385,20 +347,13 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
* 获取数据 (重写BasePageViewModel)
|
||||
*/
|
||||
override fun getData() {
|
||||
// 构建搜索条件(手机专属 6 项平板恒为空,不进请求;awbType/businessType/goodsCn
|
||||
// 为 pageQuery 未定义入参,后端静默忽略,补齐后自动生效,见接口问题清单)
|
||||
// 构建搜索条件(与平板端一致)
|
||||
val filterParams = mapOf(
|
||||
"fdate" to flightDate.value?.ifEmpty { null },
|
||||
"fno" to flightNo.value?.ifEmpty { null },
|
||||
"wbNo" to wbNo.value?.ifEmpty { null },
|
||||
"location" to location.value?.ifEmpty { null },
|
||||
"clearNormal" to clearResult.value?.ifEmpty { null },
|
||||
"agentCode" to agentId.value?.ifEmpty { null },
|
||||
"spCode" to spCode.value?.ifEmpty { null },
|
||||
"dest" to dest.value?.ifEmpty { null },
|
||||
"awbType" to awbType.value?.ifEmpty { null },
|
||||
"businessType" to businessType.value?.ifEmpty { null },
|
||||
"goodsCn" to goodsCn.value?.ifEmpty { null }
|
||||
"clearNormal" to clearResult.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
// 列表参数 (含分页)
|
||||
@@ -428,18 +383,9 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
totalWbNumber.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
}
|
||||
}
|
||||
|
||||
// 手机专属:未清仓/已清仓分项统计(同条件 + clearNormal=0/1 各查一次,平板不发)
|
||||
if (phoneExtrasEnabled) {
|
||||
val unclearedParams = (filterParams + mapOf("clearNormal" to "0")).toRequestBody()
|
||||
launchCollect({ NetApply.api.getIntExpStorageUseTotal(unclearedParams) }) {
|
||||
onSuccess = { unclearedCount.value = (it.data?.wbNumber ?: 0).toString() }
|
||||
}
|
||||
val clearedParams = (filterParams + mapOf("clearNormal" to "1")).toRequestBody()
|
||||
launchCollect({ NetApply.api.getIntExpStorageUseTotal(clearedParams) }) {
|
||||
onSuccess = { clearedCount.value = (it.data?.wbNumber ?: 0).toString() }
|
||||
// 手机三格统计分项(平板布局不绑定,无影响)
|
||||
unclearedCount.value = (data?.notClearNumber ?: 0).toString()
|
||||
clearedCount.value = (data?.clearNumber ?: 0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,21 +239,31 @@
|
||||
setOnResetClick="@{(v)-> viewModel.resetFilter()}"
|
||||
title='@{"筛选条件"}'>
|
||||
|
||||
<!-- 航班日期起(平板搜索行字段,手机移入弹层) -->
|
||||
<!-- 日期类型(dateState:入库/离港,与主干平板一致;后端起止日期仅在携带它时生效) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择航班日期"}'
|
||||
title='@{"航班日期起"}'
|
||||
hint='@{"请选择日期类型"}'
|
||||
list="@{viewModel.dateStateList}"
|
||||
title='@{"日期类型"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.dateState}" />
|
||||
|
||||
<!-- 开始日期(平板搜索行字段,手机移入弹层) -->
|
||||
<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.flightDateStart}" />
|
||||
|
||||
<!-- 航班日期止 -->
|
||||
<!-- 结束日期 -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择航班日期"}'
|
||||
title='@{"航班日期止"}'
|
||||
hint='@{"请选择结束日期"}'
|
||||
title='@{"结束日期"}'
|
||||
type="@{PhoneDataLayoutType.DATE}"
|
||||
value="@={viewModel.flightDateEnd}" />
|
||||
|
||||
|
||||
@@ -255,34 +255,16 @@
|
||||
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}" />
|
||||
<!-- 筛选项与平板端查询参数保持一致:fdate / agentCode / spCode(运单号、航班号走顶部搜索框) -->
|
||||
|
||||
<!-- 承运人(后端暂无查询入参,预留,见接口问题清单) -->
|
||||
<!-- 航班日期(复用既有 flightDate,手机默认空 = 全部) -->
|
||||
<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}" />
|
||||
hint='@{"请选择航班日期"}'
|
||||
title='@{"航班日期"}'
|
||||
type="@{PhoneDataLayoutType.DATE}"
|
||||
value="@={viewModel.flightDate}" />
|
||||
|
||||
<!-- 代理人(复用既有 agentCode 查询字段) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
@@ -294,6 +276,16 @@
|
||||
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}" />
|
||||
|
||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
变量 viewModel / activity / editRecord 与平板一致;保留 Activity 中引用的控件 id:recyclerView。
|
||||
|
||||
交互差异(业务逻辑全部复用 GjcWeighingRecordDetailsViewModel):
|
||||
· 顶部卡片:运单号 + 总件数/总重量/托盘总重(totalCarWeight 为手机专属统计字段)
|
||||
· 顶部卡片:运单号 + 总件数/总重量/托盘总重(totalCarWeight = 各记录 trayTotalWeight 之和,手机专属统计字段)
|
||||
· 托盘自重绑 trayTotalWeight(与平板端一致,后端 listRecordByWh / updateRecordList 均支持)
|
||||
· 每条记录卡片带「修改」→ 全屏「修改记录」覆层(isEditMode 驱动显隐,
|
||||
平板端该状态驱动列表内联编辑,互不影响);保存走 onPhoneSaveClick(成功后留在本页)
|
||||
-->
|
||||
@@ -217,15 +218,15 @@
|
||||
required="@{true}"
|
||||
title='@{"托盘自重(kg)"}'
|
||||
type="@{PhoneFormRowType.INPUT}"
|
||||
value="@={editRecord.carWeightStr}" />
|
||||
value="@={editRecord.trayTotalWeightStr}" />
|
||||
|
||||
<!-- 计重人:接口出参仅有操作员编码(无姓名,后端缺口见接口问题清单) -->
|
||||
<!-- 计重人:opUserName 姓名,为空回退 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.opId}" />
|
||||
value="@{editRecord.opUserDisplay}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -238,22 +238,14 @@
|
||||
setOnResetClick="@{(v)-> activity.resetFilter()}"
|
||||
title='@{"筛选条件"}'>
|
||||
|
||||
<!-- 入库日期起/止:后端暂无查询入参,预留(见接口问题清单) -->
|
||||
<!-- 航班日期(与平板端查询参数 fdate 一致;后端不提供入库日期范围入参) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择入库日期"}'
|
||||
title='@{"入库日期起"}'
|
||||
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}" />
|
||||
value="@={viewModel.flightDate}" />
|
||||
|
||||
<!-- 代理人(复用既有 agentCode 查询字段) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
@@ -275,25 +267,6 @@
|
||||
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>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
交互差异(业务逻辑全部复用 GjcWeighingStartViewModel):
|
||||
· 手机版从待计重卡片进入(必带 maWbId),故不做运单号输入行
|
||||
· 平板「地磅称重」输入 → 手机直接编辑「运抵重量」(同一 arriveWeight 字段)
|
||||
· 平板「托盘车号」→ 手机按设计稿为「托盘数量」(palletNumber 预留字段),
|
||||
「托盘自重」相应改为手输(carWeight),两者后端暂无入参,见接口问题清单
|
||||
· 平板「托盘车号」→ 手机按设计稿为「托盘数量」+「托盘自重」(默认 18kg),
|
||||
提交 trayNumber / trayTotalWeight(= 数量 × 自重),与平板端托盘口径一致
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
@@ -182,7 +182,7 @@
|
||||
type="@{PhoneFormRowType.TEXT}"
|
||||
value="@{viewModel.arriveVolume}" />
|
||||
|
||||
<!-- 托盘数量:设计稿字段,后端暂无入参(预留 palletNumber,见接口问题清单) -->
|
||||
<!-- 托盘数量 → trayNumber -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -190,9 +190,9 @@
|
||||
numeric="@{true}"
|
||||
title='@{"托盘数量"}'
|
||||
type="@{PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.palletNumber}" />
|
||||
value="@={viewModel.trayNumber}" />
|
||||
|
||||
<!-- 托盘自重:手机版手输(平板为托盘车号查询回填) -->
|
||||
<!-- 托盘自重(单个,默认 18kg)× 数量 → trayTotalWeight -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -200,7 +200,7 @@
|
||||
numeric="@{true}"
|
||||
title='@{"托盘自重"}'
|
||||
type="@{PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.carWeight}" />
|
||||
value="@={viewModel.trayWeight}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
设计稿:documents/5.5寸手持端设计文件/03_出港计重/detail.html
|
||||
结构:白色卡片「基本信息」 + 两列灰底字段网格(PhoneKvItem 套 bg_phone_stat_box)
|
||||
注:「通道号」在 /IntExpCheckIn/checked/pageQuery 出参中不存在(后端缺口,见接口问题清单),
|
||||
此处绑定空串由组件兜底显示 "-"。
|
||||
「通道号」绑 /IntExpCheckIn/checked/pageQuery 出参 passageWay,空值由组件兜底显示 "-"。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
@@ -196,7 +195,7 @@
|
||||
title='@{"业务类型"}'
|
||||
value="@{viewModel.bean.businessName.empty ? viewModel.bean.businessType : viewModel.bean.businessName}" />
|
||||
|
||||
<!-- 通道号:接口出参无该字段(后端缺口),空值兜底 "-" -->
|
||||
<!-- 通道号:passageWay,空值兜底 "-" -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -205,7 +204,7 @@
|
||||
android:background="@drawable/bg_phone_stat_box"
|
||||
android:padding="12dp"
|
||||
title='@{"通道号"}'
|
||||
value='@{""}' />
|
||||
value="@{viewModel.bean.passageWay}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -177,15 +177,6 @@
|
||||
type="@{com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择代理"}'
|
||||
list="@{viewModel.agentListPhone}"
|
||||
title='@{"代理"}'
|
||||
type="@{com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.agentCodePhone}" />
|
||||
|
||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
国际出港运抵-补充信息 —— 5.5 寸手机版专属新页(平板端无对应页面)
|
||||
|
||||
参照 Pad 端国际进港「收发货人信息」补充页(IntArrSupplementInfoActivity)的批量应用模式:
|
||||
对该运单整个 haWbList 批量应用同一份表单。后端暂无保存接口,见 ViewModel 顶部注释与
|
||||
documents/后端接口对接问题清单.xlsx。对应设计稿 04_出港运抵/supplement.html。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneFormRowType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.IntExpArriveSupplementViewModel" />
|
||||
</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="14dp">
|
||||
|
||||
<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>
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
hint='@{"请输入收货人名称"}'
|
||||
required="@{true}"
|
||||
title='@{"收货人名称"}'
|
||||
type="@{PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.dataBean.consigneeName}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择国家代码"}'
|
||||
list="@{viewModel.countryCodeList}"
|
||||
required="@{true}"
|
||||
title='@{"国家代码"}'
|
||||
type="@{PhoneFormRowType.SELECT}"
|
||||
value="@={viewModel.dataBean.consigneeCountryCode}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择"}'
|
||||
list="@{viewModel.comTypeList}"
|
||||
required="@{true}"
|
||||
title='@{"通讯方式"}'
|
||||
type="@{PhoneFormRowType.SELECT}"
|
||||
value="@={viewModel.dataBean.consigneeComType}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请输入联系号码"}'
|
||||
required="@{true}"
|
||||
title='@{"联系号码"}'
|
||||
type="@{PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.dataBean.consigneePnum}" />
|
||||
|
||||
<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.dataBean.consigneeAddress}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 发货人信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
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">
|
||||
|
||||
<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>
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
hint='@{"请输入发货人名称"}'
|
||||
required="@{true}"
|
||||
title='@{"发货人名称"}'
|
||||
type="@{PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.dataBean.consignorName}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择国家代码"}'
|
||||
list="@{viewModel.countryCodeList}"
|
||||
required="@{true}"
|
||||
title='@{"国家代码"}'
|
||||
type="@{PhoneFormRowType.SELECT}"
|
||||
value="@={viewModel.dataBean.consignorCountryCode}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择"}'
|
||||
list="@{viewModel.comTypeList}"
|
||||
required="@{true}"
|
||||
title='@{"通讯方式"}'
|
||||
type="@{PhoneFormRowType.SELECT}"
|
||||
value="@={viewModel.dataBean.consignorComType}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请输入联系号码"}'
|
||||
required="@{true}"
|
||||
title='@{"联系号码"}'
|
||||
type="@{PhoneFormRowType.INPUT}"
|
||||
value="@={viewModel.dataBean.consignorPnum}" />
|
||||
|
||||
<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.dataBean.consignorAddress}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<!-- 确定 -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/bg_phone_btn_primary"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()-> viewModel.save()}"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -7,8 +7,8 @@
|
||||
· 卡片二:绿色表头「移库信息」+ 移库人 / 移库时间(仅已移库显示)
|
||||
|
||||
字段全部由列表项带入,不额外请求接口。
|
||||
接口 IntExpMove/pageQuery 目前对 businessType / opdate / opId 恒返回 null,
|
||||
按约定占位 "-"(见 GjcMove.orDash),后端补齐后自动显示。
|
||||
业务类型绑 businessName(中文名称),移库人绑 opUserName(姓名),均回退编码;
|
||||
未移库运单 opdate / opId 为空,按约定占位 "-"(见 GjcMove.orDash)。
|
||||
|
||||
设计稿里红色标签写的是「国际进港」,但本页属国际出港,判断为设计稿复制粘贴笔误,
|
||||
实际绑运单类型 awbTypeName(真实值形如「国际出港(国际直航)」)。
|
||||
@@ -121,7 +121,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{viewModel.dataBean.orDash(viewModel.dataBean.businessType)}"
|
||||
android:text="@{viewModel.dataBean.orDash(viewModel.dataBean.businessDisplay)}"
|
||||
android:textColor="@color/phone_text_body"
|
||||
android:textSize="14sp" />
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"移库人"}'
|
||||
value="@{viewModel.dataBean.opId}" />
|
||||
value="@{viewModel.dataBean.opUserDisplay}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -145,15 +145,14 @@
|
||||
type="@{PhoneDataLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<!-- 交接人 -->
|
||||
<!-- 目的站(与平板端查询参数 fdest 一致;后端不提供交接人查询入参) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择交接人"}'
|
||||
list="@{viewModel.hoUserList}"
|
||||
title='@{"交接人"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.hoId}" />
|
||||
hint='@{"请输入目的站"}'
|
||||
title='@{"目的站"}'
|
||||
type="@{PhoneDataLayoutType.INPUT}"
|
||||
value="@={viewModel.fdest}" />
|
||||
|
||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
· 平板独有的 checkIcon(底部全选)手机版不提供,Binding 基类中自动变 @Nullable
|
||||
|
||||
交互差异(均复用既有 IntExpStorageUseViewModel 字段与接口):
|
||||
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层 8 项
|
||||
(设计稿弹层无「库位号/清仓结果」两项,对应平板字段保持空值不参与请求)
|
||||
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层 4 项
|
||||
(航班日期/航班号/库位/清仓结果,后端确认与平板端查询参数保持一致)
|
||||
· 三格统计(总票数/未清仓/已清仓),后两格为手机专属统计请求(initPhoneExtras 开启,
|
||||
复用 pageQueryTotal 按 clearNormal=0/1 各查一次)
|
||||
· 平板底部批量操作条 → 手机卡片级操作按钮(见 item 布局),无全选/批量
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ==================== 筛选弹层(8 项,对应设计稿 filterSheet) ==================== -->
|
||||
<!-- ==================== 筛选弹层(与平板端查询参数一致:航班日期/航班号/库位/清仓结果) ==================== -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -262,63 +262,24 @@
|
||||
type="@{PhoneDataLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<!-- 代理(手机专属筛选,字典由 initPhoneExtras 加载) -->
|
||||
<!-- 库位(与平板端查询参数 location 一致) -->
|
||||
<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.agentId}" />
|
||||
|
||||
<!-- 特码 -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择特码"}'
|
||||
list="@{viewModel.specialCodeList}"
|
||||
title='@{"特码"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.spCode}" />
|
||||
|
||||
<!-- 目的站 -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请输入目的站"}'
|
||||
title='@{"目的站"}'
|
||||
hint='@{"请输入库位"}'
|
||||
title='@{"库位"}'
|
||||
type="@{PhoneDataLayoutType.INPUT}"
|
||||
value="@={viewModel.dest}" />
|
||||
value="@={viewModel.location}" />
|
||||
|
||||
<!-- 运单类型(pageQuery 无此入参,后端补齐后自动生效,见接口问题清单) -->
|
||||
<!-- 清仓结果(与平板端查询参数 clearNormal 一致) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择运单类型"}'
|
||||
list="@{viewModel.awbTypeList}"
|
||||
title='@{"运单类型"}'
|
||||
hint='@{"请选择清仓结果"}'
|
||||
list="@{viewModel.clearResultList}"
|
||||
title='@{"清仓结果"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.awbType}" />
|
||||
|
||||
<!-- 业务类型(pageQuery 无此入参,同上) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择业务类型"}'
|
||||
list="@{viewModel.businessTypeList}"
|
||||
title='@{"业务类型"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.businessType}" />
|
||||
|
||||
<!-- 品名(中)(pageQuery 无此入参,同上) -->
|
||||
<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.goodsCn}" />
|
||||
value="@={viewModel.clearResult}" />
|
||||
|
||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
数据全部来自既有 viewModel.maWbData(IntExpSearch/detail 的 maWb+maWbM 合并 Map),
|
||||
取值统一走 viewModel.str()/dec() 帮助方法(空值兜底 "-")。
|
||||
按设计稿新增展示的字段(承运人/始发站/中转站/目的站/UN编号/锁定状态/计费重量),
|
||||
其中锁定状态(lockStatus)与计费重量(cashWeight)在接口文档中无定义,实机核对后如缺失记入问题清单。
|
||||
按设计稿新增展示的字段(承运人/始发站/中转站/目的站/UN编号);
|
||||
锁定状态与计费重量后端确认无需展示,已移除(问题清单 #22)。
|
||||
入库件数/入库重量为 warehouseList 各批次求和(viewModel.inPcTotal/inWeightTotal)。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
@@ -167,20 +167,13 @@
|
||||
|
||||
</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"
|
||||
title='@{"锁定状态"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "lockStatus")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -188,6 +181,11 @@
|
||||
title='@{"包装类型"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "packageType")}' />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 业务类型 | 入库时间 -->
|
||||
@@ -286,7 +284,7 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="@color/phone_divider" />
|
||||
|
||||
<!-- 运单件数 | 运单重量 | 计费重量 -->
|
||||
<!-- 运单件数 | 运单重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -306,13 +304,6 @@
|
||||
title='@{"运单重量"}'
|
||||
value='@{viewModel.dec(viewModel.maWbData, "weight")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"计费重量"}'
|
||||
value='@{viewModel.dec(viewModel.maWbData, "cashWeight")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 入库件数 | 入库重量 -->
|
||||
@@ -336,12 +327,6 @@
|
||||
title='@{"入库重量"}'
|
||||
value="@{viewModel.inWeightTotal}" />
|
||||
|
||||
<!-- 占位对齐第三列 -->
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 托盘自重(kg) -->
|
||||
<!-- 托盘自重(kg):trayTotalWeight(与平板端一致) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -103,14 +103,14 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{record.carWeight}"
|
||||
android:text="@{String.valueOf(record.trayTotalWeight)}"
|
||||
android:textColor="@color/phone_text_strong"
|
||||
android:textSize="14sp"
|
||||
tools:text="18" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 计重人(接口出参仅操作员编码,无姓名,见接口问题清单) -->
|
||||
<!-- 计重人:opUserName 姓名,为空回退 opId -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -128,7 +128,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{record.opId}"
|
||||
android:text="@{record.opUserDisplay}"
|
||||
android:textColor="@color/phone_text_strong"
|
||||
android:textSize="14sp"
|
||||
tools:text="张三" />
|
||||
|
||||
@@ -217,19 +217,6 @@
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 补充(仅待运抵) -->
|
||||
<TextView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_phone_fab_purple"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()-> activity.openSupplement(bean)}"
|
||||
android:text="补充"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{`pending`.equals(viewModel.currentTab) ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<!-- 重置(仅已运抵) -->
|
||||
<TextView
|
||||
android:layout_width="56dp"
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ==================== 航班信息行(后端暂无字段,占位 "-") ==================== -->
|
||||
<!-- ==================== 航班信息行(flight:航班日期/航班号) ==================== -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -127,7 +127,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_weight="1"
|
||||
android:text="航班信息:-"
|
||||
android:text='@{"航班信息:" + bean.orDash(bean.flight)}'
|
||||
android:textColor="@color/phone_text_body"
|
||||
android:textSize="13sp" />
|
||||
|
||||
|
||||
@@ -70,9 +70,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||
// 筛选弹层显隐
|
||||
val filterVisible = MutableLiveData(false)
|
||||
|
||||
// 筛选条件(flightDate 为 pageQuery 未定义入参 fdate,预留传参,见接口问题清单)
|
||||
val flightDate = MutableLiveData("")
|
||||
val flightNo = MutableLiveData("")
|
||||
// 筛选弹层与平板端查询参数保持一致(后端确认):缴费日期起止 / 代理人 / 特码,运单号走顶部搜索框
|
||||
|
||||
// 特码下拉字典(initPhoneExtras 加载,平板为扫码输入不加载)
|
||||
val specialCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
@@ -107,8 +105,8 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||
|
||||
/** 重置筛选条件 */
|
||||
fun resetFilter() {
|
||||
flightDate.value = ""
|
||||
flightNo.value = ""
|
||||
paymentDateStart.value = ""
|
||||
paymentDateEnd.value = ""
|
||||
agentCode.value = ""
|
||||
spCode.value = ""
|
||||
}
|
||||
@@ -204,17 +202,15 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||
* 获取列表数据
|
||||
*/
|
||||
override fun getData() {
|
||||
// 手机专属 3 项平板恒为空,不进请求;fdate 为 pageQuery 未定义入参
|
||||
//(后端静默忽略,补齐后自动生效,见接口问题清单)
|
||||
// 查询条件与平板端一致;outState 为手机 Tab 维度(平板恒空不进请求)。
|
||||
// 运单号入参用 wbNo(no 为 8 位编号,与主干平板端修复一致)
|
||||
val filterParams = mapOf(
|
||||
"beginDate" to paymentDateStart.value?.ifEmpty { null },
|
||||
"endDate" to paymentDateEnd.value?.ifEmpty { null },
|
||||
"agentCode" to agentCode.value?.ifEmpty { null },
|
||||
"no" to wbNo.value?.ifEmpty { null },
|
||||
"wbNo" to wbNo.value?.ifEmpty { null },
|
||||
"spCode" to spCode.value?.ifEmpty { null },
|
||||
"outState" to outState.value?.ifEmpty { null },
|
||||
"fno" to flightNo.value?.ifEmpty { null },
|
||||
"fdate" to flightDate.value?.ifEmpty { null }
|
||||
"outState" to outState.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
val listParams = (filterParams + mapOf(
|
||||
|
||||
@@ -65,14 +65,12 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
val businessTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
// ==================== 5.5寸手机版专属 ====================
|
||||
// 三格统计:已入库 / 已出库(总票数复用 totalCount,为服务端全量口径)
|
||||
// pageQueryTotal 无分项统计出参——已入库/已出库为「已加载数据」客户端计数口径,
|
||||
// 与卡片状态标签同一判定(dlvTime / inDate,见 IntImpQueryBean)
|
||||
// 三格统计:总票数 / 已入库 / 已出库,均取 pageQueryTotal 出参
|
||||
// (wbNumber / storedNumber / departedNumber),服务端全量口径
|
||||
val storedCount = MutableLiveData("0")
|
||||
val outboundCount = MutableLiveData("0")
|
||||
|
||||
private var phoneExtrasEnabled = false
|
||||
private var phoneLoadedList: List<IntImpQueryBean> = emptyList()
|
||||
|
||||
/**
|
||||
* 手机形态专属初始化(Activity 在 DeviceUtil.isPhone() 时调用)。
|
||||
@@ -183,14 +181,6 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
}) {
|
||||
onSuccess = { pageInfo ->
|
||||
pageModel.handleListBean(pageInfo.toBaseListBean())
|
||||
|
||||
// 手机三格统计:对已加载数据做客户端计数(平板不触发)
|
||||
if (phoneExtrasEnabled) {
|
||||
val pageItems = pageInfo.list ?: emptyList()
|
||||
phoneLoadedList =
|
||||
if (pageModel.page <= 1) pageItems else phoneLoadedList + pageItems
|
||||
updatePhoneCounts()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,20 +192,13 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
// 手机三格统计分项(平板布局不绑定,无影响)
|
||||
storedCount.value = (data?.storedNumber ?: 0).toString()
|
||||
outboundCount.value = (data?.departedNumber ?: 0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机三格统计(已入库/已出库):与卡片状态标签同一判定口径(dlvTime / inDate),
|
||||
* 统计范围为已加载的列表数据。
|
||||
*/
|
||||
private fun updatePhoneCounts() {
|
||||
outboundCount.value = phoneLoadedList.count { it.isQueryOutbound }.toString()
|
||||
storedCount.value =
|
||||
phoneLoadedList.count { !it.isQueryOutbound && it.isQueryStored }.toString()
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
when (requestCode) {
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -47,27 +46,10 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
||||
// 筛选弹层显隐
|
||||
val filterVisible = MutableLiveData(false)
|
||||
|
||||
// 筛选条件(fdep 为接口入参;其余 5 项为后端未定义入参,预留传参,见接口问题清单 #25)
|
||||
val fdep = MutableLiveData("") // 始发站
|
||||
val agentId = MutableLiveData("") // 代理(agentCode,预留)
|
||||
val spCode = MutableLiveData("") // 特码(预留)
|
||||
val awbType = MutableLiveData("") // 运单类型(预留)
|
||||
val businessType = MutableLiveData("") // 业务类型(预留)
|
||||
val goodsCn = MutableLiveData("") // 品名(中)(预留)
|
||||
// 筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 航班号 / 库位 / 清仓结果,运单号/航班号走顶部搜索框。
|
||||
// 始发站/代理/特码/运单类型/业务类型/品名 后端不支持(内网实测 fdep/agentCode 被忽略),已移除
|
||||
|
||||
// 筛选下拉字典(initPhoneExtras 加载,平板不请求)
|
||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||
val specialCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val businessTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("普货", "1"),
|
||||
KeyValue("特货", "2")
|
||||
)
|
||||
)
|
||||
|
||||
// 三格统计:未清仓 / 已清仓(复用 pageQueryTotal 按 clearNormal=0/1 各查一次)
|
||||
// 三格统计:未清仓 / 已清仓,直接取 pageQueryTotal 出参 notClearNumber / clearNumber
|
||||
val unclearedCount = MutableLiveData("0")
|
||||
val clearedCount = MutableLiveData("0")
|
||||
|
||||
@@ -79,18 +61,6 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
||||
*/
|
||||
fun initPhoneExtras() {
|
||||
phoneExtrasEnabled = true
|
||||
// 代理(国际进港口径)
|
||||
DictUtils.getIntImpAgentList(addAll = false) { list ->
|
||||
agentList.postValue(listOf(KeyValue("全部", "")) + list)
|
||||
}
|
||||
// 特码:flag=1 国际;ieFlag 必须留空
|
||||
DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "") { list ->
|
||||
specialCodeList.postValue(listOf(KeyValue("全部", "")) + list)
|
||||
}
|
||||
// 运单类型(type=II 国际进港)
|
||||
DictUtils.getWaybillTypeList(type = Constant.businessType.II, addAll = true) {
|
||||
awbTypeList.postValue(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,12 +99,8 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
||||
fun resetFilter() {
|
||||
flightDate.value = ""
|
||||
flightNo.value = ""
|
||||
fdep.value = ""
|
||||
agentId.value = ""
|
||||
spCode.value = ""
|
||||
awbType.value = ""
|
||||
businessType.value = ""
|
||||
goodsCn.value = ""
|
||||
location.value = ""
|
||||
clearResult.value = ""
|
||||
}
|
||||
|
||||
/** 确认筛选 - 关闭面板并刷新 */
|
||||
@@ -354,20 +320,13 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
||||
}
|
||||
|
||||
override fun getData() {
|
||||
// 手机专属 6 项平板恒为空,不进请求;agentCode/spCode/awbType/businessType/goodsCn
|
||||
// 为 pageQuery 未定义入参(后端静默忽略,补齐后自动生效,见接口问题清单 #25)
|
||||
// 查询条件与平板端一致
|
||||
val filterParams = mapOf(
|
||||
"fdate" to flightDate.value?.ifEmpty { null },
|
||||
"fno" to flightNo.value?.ifEmpty { null },
|
||||
"wbNo" to wbNo.value?.ifEmpty { null },
|
||||
"location" to location.value?.ifEmpty { null },
|
||||
"clearNormal" to clearResult.value?.ifEmpty { null },
|
||||
"fdep" to fdep.value?.ifEmpty { null },
|
||||
"agentCode" to agentId.value?.ifEmpty { null },
|
||||
"spCode" to spCode.value?.ifEmpty { null },
|
||||
"awbType" to awbType.value?.ifEmpty { null },
|
||||
"businessType" to businessType.value?.ifEmpty { null },
|
||||
"goodsCn" to goodsCn.value?.ifEmpty { null }
|
||||
"clearNormal" to clearResult.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
val listParams = (filterParams + mapOf(
|
||||
@@ -391,18 +350,9 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
||||
totalWbNumber.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
}
|
||||
}
|
||||
|
||||
// 手机专属:未清仓/已清仓分项统计(同条件 + clearNormal=0/1 各查一次,平板不发)
|
||||
if (phoneExtrasEnabled) {
|
||||
val unclearedParams = (filterParams + mapOf("clearNormal" to "0")).toRequestBody()
|
||||
launchCollect({ NetApply.api.getIntImpStorageUseTotal(unclearedParams) }) {
|
||||
onSuccess = { unclearedCount.value = (it.data?.wbNumber ?: 0).toString() }
|
||||
}
|
||||
val clearedParams = (filterParams + mapOf("clearNormal" to "1")).toRequestBody()
|
||||
launchCollect({ NetApply.api.getIntImpStorageUseTotal(clearedParams) }) {
|
||||
onSuccess = { clearedCount.value = (it.data?.wbNumber ?: 0).toString() }
|
||||
// 手机三格统计分项(平板布局不绑定,无影响)
|
||||
unclearedCount.value = (data?.notClearNumber ?: 0).toString()
|
||||
clearedCount.value = (data?.clearNumber ?: 0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
国际进港提取出库-运单详情(5.5 寸手机版专属页面,无平板变体——平板端无入口)
|
||||
|
||||
对应设计稿 09_提取出库 的 page-detail:
|
||||
蓝头卡(运单号 + 绿点提取时间)+ 红标签「国际进港」|业务类型 + 品名大标题 +
|
||||
两列 KV(件数/重量/特码/代理/始发港/目的港/航班日期/航班号/库位橙标签/提货单号)
|
||||
蓝头卡(运单号 + 绿点提取时间)+ 红标签「国际进港」+ 品名大标题 +
|
||||
两列 KV(件数/重量/特码/代理/始发港/航班日期/航班号/库位橙标签/提货单号)
|
||||
+ 绿头「提货信息」卡(柜台办理人/时间;已出库追加出库人/出库时间行)。
|
||||
「目的港/业务类型」为 pageQuery 出参缺失字段(见问题清单),空值兜底为双横线占位。
|
||||
「目的港/业务类型」后端无对应出参且确认按平板端口径不提供,已移除;出库人绑 refUserName。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
@@ -90,7 +90,7 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 红标签「国际进港」 | 业务类型 -->
|
||||
<!-- 红标签「国际进港」 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -107,21 +107,6 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:background="@color/phone_divider" />
|
||||
|
||||
<!-- 业务类型(pageQuery 出参无此字段,见问题清单,兜底双横线) -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textColor="@color/phone_text_body"
|
||||
android:textSize="13sp"
|
||||
tools:text="普通货物运输" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 品名大标题 -->
|
||||
@@ -181,7 +166,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 始发港 | 目的港 -->
|
||||
<!-- 始发港(半宽) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -195,13 +180,10 @@
|
||||
title='@{"始发港"}'
|
||||
value='@{bean.origin.empty ? "--" : bean.origin}' />
|
||||
|
||||
<!-- 目的港(pageQuery 出参无此字段,见问题清单,兜底双横线) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"目的港"}'
|
||||
value='@{"--"}' />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -316,7 +298,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"出库人"}'
|
||||
value='@{bean.dlvName.empty ? "--" : bean.dlvName}' />
|
||||
value='@{bean.refUserName.empty ? "--" : bean.refUserName}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -121,23 +121,22 @@
|
||||
setOnResetClick="@{(v)-> viewModel.resetFilter()}"
|
||||
title='@{"筛选条件"}'>
|
||||
|
||||
<!-- 航班日期(pageQuery 无 fdate 入参,预留传参,见问题清单) -->
|
||||
<!-- 缴费日期起 / 止(与平板端查询参数 beginDate / endDate 一致) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择航班日期"}'
|
||||
title='@{"航班日期"}'
|
||||
hint='@{"请选择开始日期"}'
|
||||
title='@{"缴费日期起"}'
|
||||
type="@{PhoneDataLayoutType.DATE}"
|
||||
value="@={viewModel.flightDate}" />
|
||||
value="@={viewModel.paymentDateStart}" />
|
||||
|
||||
<!-- 航班号 -->
|
||||
<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.flightNo}" />
|
||||
hint='@{"请选择结束日期"}'
|
||||
title='@{"缴费日期止"}'
|
||||
type="@{PhoneDataLayoutType.DATE}"
|
||||
value="@={viewModel.paymentDateEnd}" />
|
||||
|
||||
<!-- 代理人(复用平板既有 agentList) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
· 平板独有的 checkIcon(底部全选)手机版不提供,Binding 基类中自动变 @Nullable
|
||||
|
||||
交互差异(均复用既有 IntExpStorageUseViewModel 字段与接口):
|
||||
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层 8 项
|
||||
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层 4 项(航班日期/航班号/库位/清仓结果,与平板查询参数一致)
|
||||
(设计稿弹层无「库位号/清仓结果」两项,对应平板字段保持空值不参与请求)
|
||||
· 三格统计(总票数/未清仓/已清仓),后两格为手机专属统计请求(initPhoneExtras 开启,
|
||||
复用 pageQueryTotal 按 clearNormal=0/1 各查一次)
|
||||
@@ -235,7 +235,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ==================== 筛选弹层(8 项,对应设计稿 filterSheet) ==================== -->
|
||||
<!-- ==================== 筛选弹层(与平板端查询参数一致) ==================== -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -264,63 +264,24 @@
|
||||
type="@{PhoneDataLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<!-- 代理(手机专属筛选,字典由 initPhoneExtras 加载) -->
|
||||
<!-- 库位(与平板端查询参数 location 一致) -->
|
||||
<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.agentId}" />
|
||||
|
||||
<!-- 特码 -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择特码"}'
|
||||
list="@{viewModel.specialCodeList}"
|
||||
title='@{"特码"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.spCode}" />
|
||||
|
||||
<!-- 始发站(进港按始发站筛,入参 fdep) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请输入始发站"}'
|
||||
title='@{"始发站"}'
|
||||
hint='@{"请输入库位"}'
|
||||
title='@{"库位"}'
|
||||
type="@{PhoneDataLayoutType.INPUT}"
|
||||
value="@={viewModel.fdep}" />
|
||||
value="@={viewModel.location}" />
|
||||
|
||||
<!-- 运单类型(pageQuery 无此入参,后端补齐后自动生效,见接口问题清单) -->
|
||||
<!-- 清仓结果(与平板端查询参数 clearNormal 一致) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择运单类型"}'
|
||||
list="@{viewModel.awbTypeList}"
|
||||
title='@{"运单类型"}'
|
||||
hint='@{"请选择清仓结果"}'
|
||||
list="@{viewModel.clearResultList}"
|
||||
title='@{"清仓结果"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.awbType}" />
|
||||
|
||||
<!-- 业务类型(pageQuery 无此入参,同上) -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
hint='@{"请选择业务类型"}'
|
||||
list="@{viewModel.businessTypeList}"
|
||||
title='@{"业务类型"}'
|
||||
type="@{PhoneDataLayoutType.SPINNER}"
|
||||
value="@={viewModel.businessType}" />
|
||||
|
||||
<!-- 品名(中)(pageQuery 无此入参,同上) -->
|
||||
<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.goodsCn}" />
|
||||
value="@={viewModel.clearResult}" />
|
||||
|
||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
数据全部来自既有 viewModel.maWbData(IntImpSearch/detail 的 maWb Map),
|
||||
取值统一走 viewModel.str()/dec() 帮助方法(空值兜底 "-")。
|
||||
字段 key 以平板变体既有绑定为准(awbPc/awbWeight/cashWeight/inPc/inWeight/lockStateText/
|
||||
mftStatus/tallyStatus/command);始发站/中转站/目的站/UN编号/入库时间为设计稿新增展示,
|
||||
key(dep/dest1/dest/unNumber/opDate)按出港同名字段推断,实机核对后如缺失记入问题清单。
|
||||
mftStatus/tallyStatus/command);后端确认按平板端展示(问题清单 #27):
|
||||
航程 range(无经停站,替代始发站/中转站/目的站)、UN编号 unNumber、出库时间 dlvTime。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 始发站 | 中转站 -->
|
||||
<!-- 航程 | UN编号(与平板端一致,无经停站) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -132,31 +132,8 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"始发站"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "dep")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"中转站"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "dest1")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 目的站 | UN编号 -->
|
||||
<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"
|
||||
title='@{"目的站"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "dest")}' />
|
||||
title='@{"航程"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "range")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||
android:layout_width="0dp"
|
||||
@@ -190,7 +167,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 业务类型 | 入库时间 -->
|
||||
<!-- 业务类型 | 出库时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -208,8 +185,8 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
title='@{"入库时间"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "opDate")}' />
|
||||
title='@{"出库时间"}'
|
||||
value='@{viewModel.str(viewModel.maWbData, "dlvTime")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
一套布局覆盖两种卡片形态(bean.isPickedUp = dlvTime 非空):
|
||||
· 待出库:勾选框 + 橙色标签 + 库位行
|
||||
· 已出库:无勾选框 + 绿色标签 + 出库人/出库时间行
|
||||
「提货车辆」为设计稿字段,pageQuery 出参无车牌字段(见问题清单),空值兜底为双横线占位。
|
||||
出库人绑 refUserName(出库人姓名);设计稿「提货车辆」后端无对应字段且确认不提供,已移除。
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
@@ -107,30 +107,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ==================== 提货车辆行(出参无车牌字段,兜底双横线) ==================== -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/ic_phone_airplane" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text='@{"提货车辆:" + "--"}'
|
||||
android:textColor="@color/phone_text_body"
|
||||
android:textSize="13sp"
|
||||
tools:text="提货车辆:皖A88909" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ==================== 三列统计框:代理人 / 件数 / 重量 ==================== -->
|
||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatBox
|
||||
android:layout_width="match_parent"
|
||||
@@ -189,7 +165,7 @@
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text='@{"出库人:" + (bean.dlvName.empty ? "--" : bean.dlvName) + " · 出库时间:" + (bean.dlvTime.empty ? "--" : bean.dlvTime)}'
|
||||
android:text='@{"出库人:" + (bean.refUserName.empty ? "--" : bean.refUserName) + " · 出库时间:" + (bean.dlvTime.empty ? "--" : bean.dlvTime)}'
|
||||
android:textColor="@color/phone_text_body"
|
||||
android:textSize="13sp"
|
||||
tools:text="出库人:张三 · 出库时间:2026-07-05 11:45" />
|
||||
|
||||
Reference in New Issue
Block a user