Compare commits

46 Commits

Author SHA1 Message Date
75bfe85f62 feat: 航班表单三个枚举下拉对接字典接口并补全字段
新增页补上飞行状态输入项;飞行状态、航班服务种类、航班状态三个
下拉改为调用 typeCode 字典接口,替换原有的硬编码选项(旧的航班
状态码值与服务端实际码值完全不同)。详情页加载同一批字典,按值
反查并显示 label。新增页与详情页字段对齐为同一套。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-17 12:21:01 +08:00
f39127436a feat: 国际出港开始组装板型下拉改为控件下方展开
板型由底部弹框选择改为锚定在输入框正下方的 ListPopupWindow,
复用相邻 BUP Spinner 的弹层背景与列表项布局,外观保持一致,
且不影响手动输入。

板型数据源的承运人参数改由 ULD 编号触发:选中运单不再重载,
改为 ULD 信息查询成功后取 ULD 编号后两位作为 carrier 重新加载。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 11:49:06 +08:00
6b02f71e8a fix: 国际进港仓库清仓入参改为 body 传递
清仓原先把 clearNormal/clearRemark 放在 URL query 上,与接口文档不符。
改为与国际出港一致的单对象 body:clearNormal、clearRemark 在顶层,
选中数据放 warehouseList(出港侧对应字段为 maWbList)。
同时移除逐条写入主单 clearRemark 的兼容写法。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 11:24:58 +08:00
50275457a4 feat: 国际出港查询筛选弹框特码改为下拉选择
特码由手动输入改为从特码字典接口获取的下拉列表,
接口参数与国际出港待记重页面一致(flag=1 国际、ieFlag 为空),
首项「全部」表示不过滤

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 12:45:04 +08:00
b14649b228 fix: 国际进港舱单新增/编辑页航程不再随始发站目的站联动
航程改为仅由航班信息决定:航班查询成功取航班起始站-目的站,
编辑模式取舱单 fdep-fdest,从列表页带入时取传入的航班始发/目的站;
用户手动修改始发站、目的站时航程保持不变

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 12:27:31 +08:00
52d1527121 fix: 国际进港原始舱单与装机单未选航班时不再请求列表接口
- 原始舱单、装机单搜索时校验航班号必填,为空提示「请输入航班号」
- 装机单仅在父页面传入 fid 时才初始加载,否则等待手动查询
- 进港舱单、装机单 getData 在 fid 为空时直接清空列表与汇总,不发请求;
  修复装机单编辑保存后广播刷新事件,导致未选航班的父页面请求接口
  并报「业务异常:请先选择航班」

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 12:11:23 +08:00
74cf1346a6 style: 国际出港/进港列表项文字样式统一为四个基准页规范
主题未覆盖 textViewStyle,旧列表项未显式写 textColor 导致文字发灰、
字号与卡片边距不一。以出港运抵/组装/装载/理货为基准统一:
- Key/Value 显式 15sp + text_normal,首要字段 colorPrimary 加粗,
  状态值 14sp 带颜色表达式
- 卡片外边距 10dp/10dp,bg_item 统一为 bg_white_radius_8,
  图标与内容区间距 15dp
- 原始舱单子列表改为标准白卡片 + 表头底色,查询详情表格改用 text_normal
- 修复出港查询布局 xmlns:tools 误绑 android 命名空间
- CLAUDE.md 列表项规范表同步更新为基准页真实数值

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 11:52:36 +08:00
8853405ffc fix: 计重明细重量与托盘自重改为和恒定双向联动并校验非负
原逻辑托盘自重变化时重量同向增减,且修改重量不联动托盘自重。
改为两者之和恒等于接口初始值,修改任一方另一方反向同步变动;
任一方将小于 0 时拒绝输入、提示并回退显示。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 18:25:02 +08:00
ee0606230f fix: 国内进港移库列表项两行列宽不一致导致标签错位
主应用移库列表第三列「重量」weight 为 0.7 而「起始站」为 0.8,
两行 weight 总和不同使各列起点偏移;统一为 0.8 后上下对齐。
同时修正 module_gnj 旧版移库列表项同列 completeSpace 不一致。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 16:30:26 +08:00
07ea8853f3 feat: 国际出港开始组装板型下拉对接后端板型接口
进入页面调用 /typeCode/bordType 取全量板型,选中待组装运单后
以航班号前两位作 carrier 重新加载覆盖下拉数据源;后端 carrier
必填,无承运人时传空串。替换原 BOARDTYPE 字典实现。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 16:20:08 +08:00
6d4908da1a style: 海关回执页面内容区背景改为与列表卡片一致的圆角
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 16:03:46 +08:00
a1d078db7a fix: 国际进港舱单理货完成去掉库位弹框直接调用发放接口
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 15:58:32 +08:00
f6e5b37eaa fix: 国际进港出库特码筛选由输入框改为字典下拉选择
与国际进港查询筛选栏保持一致,加载国际特码字典供选择,
去掉原特码扫码入口。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 15:53:03 +08:00
2f4e723dd7 feat: 国际进港仓库清仓弹框新增备注并在列表第三行显示
清仓时备注同时通过 clearRemark query 参数和运单字段发送,兼容服务端两种取值方式;
列表项新增独占一行的备注展示,与国际出港仓库保持一致。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 15:44:34 +08:00
52584b9cfe fix: 国际出港板箱过磅重进页面时自动选中上次通道号
原实现只把上次通道号排到字典列表首位,但带 hint 的 Spinner 默认停在 hint 项,
导致退出再进入(含从列表点 ULD 进入的编辑模式)时通道号始终显示「请选择通道号」。
改为字典加载完成后按「本条记录通道号 → 上次记住的通道号」优先级显式赋值。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 15:08:50 +08:00
efe7a1d2a9 refactor: 国际出港移库详情/编辑按最新接口文档重新对接
- 新增 GjcMoveDetail Bean 对应 /IntExpMove/detail 返回与 /IntExpMove/update 请求体
- 承运人改取 by、运单类型改取 awbTypeName,去掉文档中不存在的航班字段,新增移交状态展示
- 保存时回传完整详情对象,仅替换备注与 pic/originalPic/picNumber
- 列表 Bean 随 Intent 传入,回填 detail 返回为空的承运人、出运路径等展示字段

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:55:54 +08:00
85fd66b005 refactor: 国际出港查询筛选面板去掉出库状态筛选项
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:29:32 +08:00
de64c8ddb6 style: 国际进港查询筛选栏航班号与代理位置互换
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:26:15 +08:00
2a83c1393e feat: 航班新增/编辑表单精简字段并补充必填校验
去掉进出港、货邮状态、运单前缀三个输入项;地区类型、服务类型、
计划起飞、预计起飞、计划降落、预计降落改为必填并显示星号。
编辑模式下被移除字段仍原值回传,避免更新时被清空。

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:23:02 +08:00
9dddb7c079 feat: 国际出港仓库列表项新增第三行显示清仓备注
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:08:31 +08:00
2ba70d1a09 feat: 国际出港开始组装新增 IMP代码、板型、BUP 输入项
- ULD 信息卡新增第二行:IMP代码(大写过滤)、板型(手输 + 下拉选择,箭头与 Spinner 同源)、BUP(否/是,默认否)
- 装货/卸货提交时 dgrCode、boardType、bupFlag 同时写入顶层参数与 useInfo,输入 ULD 后从 getUld 回填
- 板型选项走通用字典接口,字典 code 暂定 BOARDTYPE,测试环境返回为空时提示手动输入

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-09 10:40:43 +08:00
ea83361102 feat: 国际进出港 5 个列表页侧滑新增海关回执查看
原始舱单、进港理货、出港运抵、出港装载、出港理货主单卡片
新增侧滑「回执」按钮,调用各模块 getResponse 接口后跳转
module_base 共用的只读回执页。请求同时传 prefix、no 与
wbNo,回执优先取 data、为空再取 msg,兼容后端实际返回;
回执为空时提示「暂无海关回执」不跳转。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-09 10:12:52 +08:00
7a09bbbeab feat: 国际出港开始组装运单列表首次装货后显示剩余/总数
首次装货成功前件数、重量列显示总数;成功后表头切换为
「剩余件数/总件数」「剩余重量/总重量」,剩余值由 pc 减
checkInPc、weight 减 checkInWeight 得出。三处接口数据转
Bean 的重复代码合并为扩展函数。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-08 20:43:55 +08:00
6b2006fdb7 feat: 国际出港出库交接新增装机状态显示与允许装机操作
列表项新增「装机状态」列,依据分页接口 allowLoad 字段展示,
允许装机绿色、不允许红色,并重新分配列权重避免长字段换行。
底部新增「允许装机」按钮,支持多选后批量调用允许装机接口。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-08 20:17:31 +08:00
b368efa827 fix: 国际进港仓库列表件数改取 pcLabel 字段
分页接口新增 pcLabel 字段(如 0/8),用于展示已入库/总件数,
列表项件数由 pc 改为优先显示 pcLabel,缺失时回退 pc。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-08 20:04:01 +08:00
fcb247c3f5 feat: 国际出港理货新增分单全选功能
底部栏新增「分单全选」按钮,与主单全选相互独立。
依据分页接口新增的 allTally 字段判断:主单存在分批申报(allTally=0)时跳过其分单,
只有主单全部申报完毕(allTally=1)才允许全选该主单下的分单,跳过时 toast 提示。
分单单个勾选后同步刷新分单全选状态。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-08 19:55:44 +08:00
5edb1bea06 feat: 国际进港装机单列表改为 ULD 主单与运单子单结构
适配装机单查询接口按 ULD 分组的新返回结构,主单展示 ULD 编号、
总件数、总重量、航班信息,展开后显示关联运单的运单号、件数、重量、品名,
样式与展开交互与其他主子单列表一致;点击子单行进入装机单编辑。
右下角“修改库位”“入库”按钮暂时隐藏。同步修正进港舱单页修改库位时
从新分组结构中取运单记录。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-08 19:43:26 +08:00
51c5ac6e96 feat: 国际出港移库新增详情查看与侧滑编辑
列表项右侧增加箭头,点击进入详情页;左滑显示“编辑”按钮进入编辑页。
详情与编辑复用同一表单页,编辑模式仅支持修改备注与交接图片上传/删除,
表单结构参考国内进港移交编辑。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-08 16:00:48 +08:00
ea298ec322 feat: 开始计重新增托盘信息并自动计算运抵重量
国际出港开始计重页面新增托盘数量、托盘自重输入框(自重默认18可编辑),
运抵重量自动按“地磅称重 -(托盘数量 × 托盘自重)”计算;
分托计重与完成计重提交均携带 trayNumber、trayTotalWeight;
“托盘车号”“托盘车自重”标签改为“平板车”“平板车自重”。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-02 13:11:17 +08:00
b57a3cd133 fix: 计重明细托盘自重改取托盘重量并支持编辑联动
托盘自重原误取托盘车重(carWeight),改为托盘重量(trayTotalWeight)。
编辑模式下托盘自重可编辑,重量按编辑前后差值同步浮动,底部统计随之更新。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-02 11:59:13 +08:00
4e6e654558 feat: 国际出港运抵列表新增运抵状态筛选
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-02 11:34:46 +08:00
b65e61595b feat: 国际进港舱单编辑支持交接图片新增与删除
编辑/新增表单页增加交接图片区(选图、上传、长按删除),
保存时随舱单提交 pic/originalPic/picNumber 三字段,
编辑模式回填已有图片且不重复上传。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-02 11:23:43 +08:00
86f77353c0 feat: 国际出港板箱过磅通道号默认沿用上一次选择
称重提交成功后本地记住通道号,后续新增称重自动默认选中;
重置时不再清空通道号,编辑模式仍按记录自带通道号回填。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-02 10:44:31 +08:00
39b5cc3689 feat: 国际出港板箱过磅挂签支持多选批量打印
多选时逐张串行发送,张间节流留出出纸时间,写入失败即中止
并提示已打印张数与失败的 ULD 号;单选与详情页打印路径不变。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-02 10:44:25 +08:00
a1b55f656f feat: 航班管理列表新增增删改功能
- 列表页右上角新增加号入口,新增/编辑共用表单页(HbFlightEditActivity)
- 列表项支持侧滑编辑、删除,删除使用 ConfirmDialogModel 二次确认
- 接入 /flt/saveFlight、/flt/updateFlight、/flt/delete 接口
- 编辑回填增加枚举中文名转代码处理;FlightBean 地区类型兼容中文值显示

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-02 10:13:37 +08:00
13c9c6f5dc feat: 国际出港运抵计重状态改为海关放行
- 主单列表项第二行「计重状态」改为「海关放行」,取运抵分页接口
  返回的 cmdStatus,按普通文本显示,与查询详情页「海关指令」一致
- 展开的分单列表在「申报状态」与「品名(中)」之间新增「海关放行」列
- GjcMaWb 补充 cmdStatus 字段,此前仅 GjcHaWb 有该字段

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 17:27:31 +08:00
de62b903d4 feat: 国际出港板箱过磅新增耗材重量并计入货重
- 过磅表单新增只读的耗材重量,数据随列表项 Bean 带入,扫码新增时
  取 queryUsingUldByUld 返回的 consumeWeight
- 货重公式由「装机重 - ULD自重」改为「装机重 - ULD自重 - 耗材自重」
- queryUsingUldByUld 返回后补触发重量计算,此前该接口异步返回时
  耗材重量不会参与计算
- 表单保持每行三列:第三列自上而下为总重、装机重、耗材重量、货重,
  目的港单独占一行三分之一宽,备注换行整行撑满

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 17:12:21 +08:00
2d42ce9cc3 feat: 国际出港重量回填页改名并新增耗材重量
- 页面标题由「国际出港修改组装重量」改为「国际出港重量回填」
- ULD 信息卡片在货重之后新增耗材重量,取组装分页接口返回的
  consumeWeight 字段,数据随列表页传入的 Bean 一并带过来

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 16:46:01 +08:00
861ce8ca1e feat: 国际出港交接复磅状态改为 IMP 代码
列表项第二行第三列由「复磅状态」改为「IMP 代码」,取交接分页接口
返回的 dgrCode 字段;值非空且不等于 ELI、ELM 时以红色显示,
空值与 ELI、ELM 保持常规颜色。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 16:31:27 +08:00
f312ef866c feat: 国际进港舱单新增开始理货按钮
- 底部「货物发放」改名为「理货完成」,「分拣理货」改名为「装机单」
- 新增蓝色「开始理货」按钮,选中唯一一条运单后弹出修改库位对话框,
  提交 /IntImpManifest/modifyStorage
- 弹窗默认回填该运单已有的理货库位:舱单列表接口不返回 locationTally,
  改为先按 fid + wbNo 查一次装机单记录取出库位再回填
- GjjManifest 补充 locationTallyId 字段
- 装机单列表项运单号、品名列 completeSpace 调整为 5 以对齐

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 16:19:47 +08:00
6f27c15d9a fix: 修复国际进港出库运单号搜索不生效
运单号原本传给了 no 参数,但接口中 no 是不含前缀的主单号
(如 33362265),wbNo 才是完整 11 位运单号,导致条件被忽略。
同模块提取记录、进港查询用的均为 wbNo,此处保持一致。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 15:08:04 +08:00
ded57554fa feat: 国际出港查询新增日期类型与航班航次统计
- 合计栏在总重量后追加航班航次(取统计接口 flightNumber)
- 日期范围前新增日期类型下拉(入库/离港),对应接口 dateState 参数
- 航班号从筛选弹框移至列表上方,出库状态移入筛选弹框
- dateState、outState 按接口文档改为整型传参

原航班号查询无效的原因并非参数名有误(fno 与文档一致),
而是缺少 dateState 导致后端按默认日期口径过滤,补齐后已实测生效。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 14:49:46 +08:00
2f3ae2a814 feat: 国际进港查询统计新增航班航次并调整筛选条件布局
- 底部统计栏在总重量后新增航班航次显示
- 航班号从筛选面板移至页面上方搜索区,出库状态移入筛选面板
- 筛选红点提示与重置逻辑同步调整字段归属

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 17:08:47 +08:00
19d02700b8 feat: 国际出港仓库清仓弹窗增加备注输入框
清仓操作弹窗在「清仓正常」下拉基础上新增选填备注,提交时随 clearRemark 字段传给 updateClear 接口

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 16:41:49 +08:00
aa6cc43bfa feat: 国际事故签证新增支持运单号联想并自动带出舱单信息
- 运单号输入启用自动联想(1条自动填充、多条弹窗选择)
- 运单号满11位自动查询进港舱单,带出航班日期、航班号、始发/目的站、总件数、总重量、品名及交接图片
- 仅新增模式触发带出,避免编辑模式覆盖已保存数据和图片

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 16:31:16 +08:00
dcb335ecdf feat: ULD新增编辑表单增加来源、入库时间、所在港字段
- 编辑表单新增来源(空运/陆运)、入库时间、所在港(默认HFE)三个字段
- 列表项同步显示来源、所在港、位置、入库时间,去掉备注展示并收窄首列
- PadDataLayoutNew 新增 DATETIME 类型,支持年月日时分秒选择

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 15:30:23 +08:00
135 changed files with 4899 additions and 1112 deletions

View File

@@ -402,44 +402,50 @@ fun toggleAllExpand() {
| `radiobtn_unchecked_style` | 未选中 | 透明 + 黑色边框圆 | | `radiobtn_unchecked_style` | 未选中 | 透明 + 黑色边框圆 |
| ~~`radiobtn_checked_gray`~~ | ❌ 禁用 | 灰色实心圆(错误样式) | | ~~`radiobtn_checked_gray`~~ | ❌ 禁用 | 灰色实心圆(错误样式) |
#### 含子列表的列表项 UI 规范(以 `item_int_exp_storage_use.xml` 为基准) #### 列表项 UI 规范(以 `item_int_exp_arrive / assemble / load / tally.xml` 四个基准页为准)
> 应用主题未覆盖 `textViewStyle`,未显式写 `textSize``textColor` 的 TextView 会落到系统默认14sp、偏灰的次级文字色。因此列表项里**每个** KeyValue TextView 都必须显式写 `textSize` 和 `textColor`,不能依赖“默认继承”。
**主列表项卡片** **主列表项卡片**
| 部位 | 属性 | 标准值 | | 部位 | 属性 | 标准值 |
|------|------|--------| |------|------|--------|
| 外层容器 | marginHorizontal / marginTop | 10dp / 10dp | | 外层容器 | marginHorizontal / marginTop | 10dp / 10dp(禁止旧写法 `marginHorizontal=15dp` + `marginVertical=5dp`|
| 卡片背景 | background | `@drawable/bg_white_radius_8` | | 卡片背景 | background | `@drawable/bg_white_radius_8``bg_item` 已废弃,不再引用)|
| 内容区 | padding | **10dp** | | 内容区 | paddingHorizontal / paddingVertical / gravity | **10dp / 20dp** / `center_vertical` |
| 选中图标 | 尺寸 / marginEnd / marginTop | 40×40dp / 10dp / **0.5px**(像素级对齐)| | 选中图标 | 尺寸 / marginTop | 40×40dp / **0.5px**(像素级对齐),不设 marginEnd |
| 内容列(图标右侧的竖向 LinearLayout| layout_marginLeft | **15dp** |
| 选中图标 | 切换资源 | `img_plane_s`(选中)/ `img_plane`(未选中)| | 选中图标 | 切换资源 | `img_plane_s`(选中)/ `img_plane`(未选中)|
| KV 文字 | textSize | **15sp**Key 和 Value 均需显式设置)| | KV 文字 | textSize / textColor | **15sp** / **`@color/text_normal`**Key 和 Value 均需显式设置)|
| 首要字段值(运单号)| textColor | `@color/colorPrimary` | | 首要字段值(运单号ULD编码| textColor / textStyle | `@color/colorPrimary` / **`bold`** |
| 其他字段 | textColor | 无需设置(继承默认 text_normal| | 状态类字段值(带颜色表达式)| textSize | **14sp** + 颜色表达式(如 `text_green / colorPrimary / text_gray`|
| 两行间距 | layout_marginTop | 10dp | | 两行间距 | layout_marginTop | 10dp |
| 右侧箭头(有详情页时)| `img_pda_right` | 30×30dp`layout_marginLeft=10dp` |
**展开/折叠按钮(`iv_show`** **展开/折叠按钮(`iv_show`**
| 属性 | 标准值 | | 属性 | 标准值 |
|------|--------| |------|--------|
| layout_width | `match_parent` | | layout_width | `match_parent` |
| layout_height | **10dp** | | layout_height | **20dp** |
| layout_marginTop | **-10dp**(向上收紧,紧贴卡片底边)| | layout_marginTop | **-20dp**(向上收紧,紧贴卡片底边)|
| scaleType | **centerInside**(保证箭头不被压扁/截断)| | scaleType | **center** |
| src | `@mipmap/img_down` | | src | `@mipmap/img_down` |
| 显示控制 | `visible="@{bean.subList != null && !bean.subList.empty}"` | | 显示控制 | `visible="@{bean.subList != null && !bean.subList.empty}"` |
| 不设 padding不设 layout_marginBottom | — | | 不设 padding不设 layout_marginBottom | — |
> 旧版本18dp + padding=4dp + marginBottom=5dp已统一替换为上述新标准参考 `item_int_exp_arrive.xml`。组装类列表若需展开后翻转箭头,附加 `android:rotation="@{bean.showMore.get() ? 180f : 0f}"`(参考 `item_int_exp_assemble.xml`)。 > 旧版本18dp + padding=4dp + marginBottom=5dp,以及 10dp/-10dp/centerInside)已统一替换为上述新标准,参考 `item_int_exp_arrive.xml`。组装类列表若需展开后翻转箭头,附加 `android:rotation="@{bean.showMore.get() ? 180f : 0f}"`(参考 `item_int_exp_assemble.xml`)。
**子列表区域** **子列表区域**
- 容器:`layout_marginTop="5dp"``background="#e3f6e0"` - 容器:`layout_marginTop="10dp"``background="@drawable/bg_white_radius_8"`(旧的 `#e3f6e0` 绿色容器已废弃)
- 表头行:`layout_marginVertical="10dp"``paddingHorizontal="10dp"` - 空提示:`textSize="14sp"``textColor="@color/text_gray"``paddingVertical="15dp"`
- 表头行:`background="@drawable/bg_arrive_sub_header"``paddingHorizontal="10dp"``paddingVertical="10dp"`
- 表头文字:`textSize="14sp"``textColor="@color/text_normal"``textStyle="bold"``gravity="center"` - 表头文字:`textSize="14sp"``textColor="@color/text_normal"``textStyle="bold"``gravity="center"`
- 表头下方分隔线:`MaterialDivider` 高度 1px`background="@color/c999999"` - 表头下方分隔线:`MaterialDivider` 高度 1px`dividerColor="@color/sub_list_divider"`
- 子列表项 padding`paddingHorizontal="10dp"``paddingVertical="8dp"` - 子列表项`layout_marginVertical="8dp"``paddingHorizontal="10dp"`
- 子列表文字:`textSize="14sp"``textColor="@color/text_normal"``gravity="center"``layout_gravity="center_vertical"` - 子列表文字:`textSize="14sp"``textColor="@color/text_normal"``gravity="center"``layout_gravity="center_vertical"`;首要列(运单号/分单号)`@color/colorPrimary` + `bold`;状态列 `13sp` + 颜色表达式
- 详情页里的表格式列表(如查询详情的库位/仓库 Tab同样 14sp + `text_normal`,禁止 `@android:color/black`
**子列表复选框(关键)** **子列表复选框(关键)**

View File

@@ -222,6 +222,12 @@
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
android:exported="false" android:exported="false"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<!-- 国际出港-出港移库编辑/详情 -->
<activity
android:name="com.lukouguoji.gjc.page.move.IntExpMoveEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity <activity
android:name=".MineActivity" android:name=".MineActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"

View File

@@ -7,6 +7,8 @@ import com.lukouguoji.module_base.bean.FlightBean
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.util.DictUtils
import dev.utils.app.info.KeyValue
class FlightQueryDetailsViewModel : BaseViewModel() { class FlightQueryDetailsViewModel : BaseViewModel() {
@@ -14,9 +16,24 @@ class FlightQueryDetailsViewModel : BaseViewModel() {
var dataBean = MutableLiveData<FlightBean>() var dataBean = MutableLiveData<FlightBean>()
///////////////////////////////////////////////////////////////////////////
// 枚举字段展示文案接口已返回名称时原样显示只返回值code时按字典反查名称
///////////////////////////////////////////////////////////////////////////
val countryTypeText = MutableLiveData("")
val serviceTypeText = MutableLiveData("")
val portCodeText = MutableLiveData("")
val flightStatusText = MutableLiveData("")
private var countryTypeDict = emptyList<KeyValue>()
private var serviceTypeDict = emptyList<KeyValue>()
private var portCodeDict = emptyList<KeyValue>()
private var flightStatusDict = emptyList<KeyValue>()
fun initOnCreated(intent: Intent) { fun initOnCreated(intent: Intent) {
id = intent.getStringExtra(Constant.Key.ID) ?: "" id = intent.getStringExtra(Constant.Key.ID) ?: ""
loadDictLists()
getData() getData()
} }
@@ -27,8 +44,52 @@ class FlightQueryDetailsViewModel : BaseViewModel() {
onSuccess = { onSuccess = {
it.data?.let { data -> it.data?.let { data ->
dataBean.value = data dataBean.value = data
refreshEnumText()
} }
} }
} }
} }
}
/**
* 加载四个枚举字典(与新增/编辑页同源),用于把 code 反查成 label
*/
private fun loadDictLists() {
DictUtils.getCountryTypeList(addAll = false) {
countryTypeDict = it
refreshEnumText()
}
DictUtils.getFlightServiceTypeList(addAll = false) {
serviceTypeDict = it
refreshEnumText()
}
DictUtils.getFlightPortCodeList(addAll = false) {
portCodeDict = it
refreshEnumText()
}
DictUtils.getFlightStatusList(addAll = false) {
flightStatusDict = it
refreshEnumText()
}
}
/**
* 数据或字典任一就绪都重算一次,避免两者返回先后顺序影响展示
*/
private fun refreshEnumText() {
val bean = dataBean.value ?: return
countryTypeText.value = toLabel(countryTypeDict, bean.countryType)
serviceTypeText.value = toLabel(serviceTypeDict, bean.serviceType)
portCodeText.value = toLabel(portCodeDict, bean.portCode)
flightStatusText.value = toLabel(flightStatusDict, bean.flightStatus)
}
/**
* 值转 label先按 code 反查,命中不了再判断是否本身就是 label仍不命中则原样返回
*/
private fun toLabel(dict: List<KeyValue>, raw: String?): String {
if (raw.isNullOrEmpty()) return ""
dict.firstOrNull { it.value == raw }?.let { return it.key }
dict.firstOrNull { it.key == raw }?.let { return it.key }
return raw
}
}

View File

@@ -30,6 +30,14 @@ class UldEditViewModel : BaseViewModel() {
) )
) )
// 来源下拉列表
val sourceList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("空运", "空运"),
KeyValue("陆运", "陆运"),
)
)
// 所属航司下拉列表数据源POST /typeCode/intCarrier // 所属航司下拉列表数据源POST /typeCode/intCarrier
val carrierList = MutableLiveData<List<KeyValue>>(emptyList()) val carrierList = MutableLiveData<List<KeyValue>>(emptyList())
@@ -40,7 +48,8 @@ class UldEditViewModel : BaseViewModel() {
else if (modify) DetailsPageType.Modify else DetailsPageType.Details else if (modify) DetailsPageType.Modify else DetailsPageType.Details
if (id.isEmpty()) { if (id.isEmpty()) {
// 新增:直接加载航司列表 // 新增:所在港默认 HFE直接加载航司列表
uldBean.value = ULDBean(nowPort = "HFE")
loadCarrierList(null) loadCarrierList(null)
} else { } else {
getData() getData()
@@ -79,7 +88,7 @@ class UldEditViewModel : BaseViewModel() {
}) { }) {
onSuccess = { onSuccess = {
showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功")) showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功"))
if (isAdd) uldBean.value = ULDBean() else getData() if (isAdd) uldBean.value = ULDBean(nowPort = "HFE") else getData()
} }
} }
} }

View File

@@ -37,7 +37,7 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="15dp"> android:padding="15dp">
<!-- 第1行航班日期、航班号、航程 --> <!-- 第1行航班日期、航班号、机型 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -68,20 +68,69 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
enable="@{false}" enable="@{false}"
title='@{"航程"}' title='@{"机型"}'
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.range}' /> value='@{viewModel.dataBean.aircraftCode}' />
</LinearLayout> </LinearLayout>
<!-- 第2行地区类型、服务类型、经停站 --> <!-- 第2行始发港、经停港、目的港 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:orientation="horizontal"> android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"始发港"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.fdep}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"经停港"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.jtz}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"目的港"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.fdest}' />
</LinearLayout>
<!-- 第3行航程、地区类型、服务类型 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"航程"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.range}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -90,7 +139,7 @@
title='@{"地区类型"}' title='@{"地区类型"}'
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.countryType}' /> value='@{viewModel.countryTypeText}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
@@ -100,21 +149,50 @@
title='@{"服务类型"}' title='@{"服务类型"}'
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.serviceType}' /> value='@{viewModel.serviceTypeText}' />
</LinearLayout>
<!-- 第4行飞行状态、航班状态、延误原因 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
enable="@{false}" enable="@{false}"
title='@{"经停站"}' title='@{"飞行状态"}'
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.jtz}' /> value='@{viewModel.portCodeText}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"航班状态"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.flightStatusText}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"延误原因"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.delayFreeText}' />
</LinearLayout> </LinearLayout>
<!--3行:计划起飞、预计起飞、实际起飞 --> <!--5行:计划起飞、预计起飞、实际起飞 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -153,7 +231,7 @@
</LinearLayout> </LinearLayout>
<!--4行:计划降落、预计降落、实际降落 --> <!--6行:计划降落、预计降落、实际降落 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -192,72 +270,13 @@
</LinearLayout> </LinearLayout>
<!--5行:飞行状态、航班状态、延误原因 --> <!--7行:机位、机号 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:orientation="horizontal"> android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"飞行状态"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.portCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"航班状态"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.flightStatus}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"延误原因"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.delayFreeText}' />
</LinearLayout>
<!-- 第6行机号、机型、机位 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"机号"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.registration}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"机型"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.aircraftCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -268,6 +287,21 @@
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.standId}' /> value='@{viewModel.dataBean.standId}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"机号"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.registration}' />
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -121,6 +121,49 @@
</LinearLayout> </LinearLayout>
<!-- Row 3: 来源 / 入库时间 / 所在港 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请选择来源"}'
list="@{viewModel.sourceList}"
title='@{"来源"}'
titleLength="@{7}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.uldBean.source}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请选择入库时间"}'
title='@{"入库时间"}'
titleLength="@{5}"
type="@{DataLayoutType.DATETIME}"
value='@={viewModel.uldBean.inStoreTime}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入所在港"}'
title='@{"所在港"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.uldBean.nowPort}' />
</LinearLayout>
<!-- 备注(全行,多行输入) --> <!-- 备注(全行,多行输入) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -95,7 +95,7 @@
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.7" android:layout_weight="0.8"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView

View File

@@ -55,7 +55,7 @@
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.0"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
@@ -109,7 +109,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="自重:" android:text="自重:"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{3}" /> completeSpace="@{4}" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -165,7 +165,7 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行:最大载重 | 备注 --> <!-- 第二行:最大载重 | 来源 | 所在港 | 位置 | 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -175,7 +175,7 @@
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.0"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
@@ -193,24 +193,90 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 备注 --> <!-- 来源 -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3.6" android:layout_weight="0.8"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="备注" android:text="来源"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{3}" /> completeSpace="@{3}" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.remark}" android:text="@{bean.source}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 所在港 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="所在港:"
android:textSize="15sp"
completeSpace="@{4}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.nowPort}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 位置 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="位置:"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.nowPosition}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库时间:"
android:textSize="15sp"
completeSpace="@{7}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.inStoreTime}"
android:textSize="15sp" /> android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -19,6 +19,27 @@ class AssembleWaybillBean {
var originalPieces: String = "" // 原始运单件数 var originalPieces: String = "" // 原始运单件数
var originalWeight: String = "" // 原始运单重量 var originalWeight: String = "" // 原始运单重量
// ========== 剩余/总数显示(开始组装页首次装货成功后切换) ==========
var checkInPieces: Long = 0 // 已组装件数(接口 checkInPc
var checkInWeight: Double = 0.0 // 已组装重量(接口 checkInWeight
var showRemaining: Boolean = false // 是否以“剩余/总数”形式显示
/** 件数列显示:首次装货成功前为总件数,之后为“剩余件数/总件数”(剩余 = pc checkInPc */
val piecesDisplay: String
get() {
if (!showRemaining) return pieces
val total = pieces.toLongOrNull() ?: return pieces
return "${total - checkInPieces}/$pieces"
}
/** 重量列显示:首次装货成功前为总重量,之后为“剩余重量/总重量”(剩余 = weight checkInWeight */
val weightDisplay: String
get() {
if (!showRemaining) return weight
val total = weight.toDoubleOrNull() ?: return weight
return String.format("%.1f", total - checkInWeight) + "/" + weight
}
val fLightInfo: String val fLightInfo: String
get() = "$fno/${fdate.replace("-", "")}" get() = "$fno/${fdate.replace("-", "")}"

View File

@@ -234,7 +234,10 @@ class FlightBean : ICheck {
return when (countryType) { return when (countryType) {
"0" -> "国内" "0" -> "国内"
"1" -> "国际" "1" -> "国际"
else -> "" "2" -> "地区"
"3" -> "混合"
// 部分接口直接返回中文名,原样显示
else -> countryType
} }
} }

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.module_base.bean
import androidx.databinding.BaseObservable import androidx.databinding.BaseObservable
import androidx.databinding.Bindable import androidx.databinding.Bindable
import androidx.databinding.library.baseAdapters.BR import androidx.databinding.library.baseAdapters.BR
import com.lukouguoji.module_base.ktx.showToast
/** /**
* 国际出港计重记录明细Bean * 国际出港计重记录明细Bean
@@ -22,7 +23,9 @@ data class GjcCheckInRecord(
var weight: Double = 0.0, // 运抵重量 var weight: Double = 0.0, // 运抵重量
var volume: Double = 0.0, // 运抵体积 var volume: Double = 0.0, // 运抵体积
var whId: Long = 0, // GJC_WAREHOUSE.ID var whId: Long = 0, // GJC_WAREHOUSE.ID
var carWeight: String = "" // 托盘 var carWeight: String = "", // 托盘
var trayNumber: Int = 0, // 托盘数量
var trayTotalWeight: Double = 0.0 // 托盘重量(托盘自重)
) : BaseObservable() { ) : BaseObservable() {
// 数据变化回调 // 数据变化回调
@@ -41,16 +44,76 @@ data class GjcCheckInRecord(
} }
} }
// 重量 / 托盘自重编辑过程中的原始输入串(保持回显与输入一致,避免光标跳位)
// 不作为构造参数data class copy 备份/恢复时自动丢弃,回退到数值显示
// @Transient仅界面内部状态不参与 Gson 序列化提交
@Transient
private var weightInput: String? = null
@Transient
private var trayTotalWeightInput: String? = null
// 重量的字符串表示(用于双向绑定) // 重量的字符串表示(用于双向绑定)
// 业务规则:重量 + 托盘自重 恒定(等于接口返回初始值之和),修改一方另一方反向同步变动
// 校验:任一方不能小于 0非法输入直接拒绝并回退显示
@get:Bindable @get:Bindable
var weightStr: String var weightStr: String
get() = if (weight == 0.0) "" else weight.toString() get() = weightInput ?: if (weight == 0.0) "" else weight.toString()
set(value) { set(value) {
val newWeight = value.toDoubleOrNull() ?: 0.0 val newWeight = value.toDoubleOrNull() ?: 0.0
if (weight != newWeight) { val newTrayWeight = round2(weight + trayTotalWeight - newWeight)
weight = newWeight when {
notifyPropertyChanged(BR.weightStr) newWeight < 0 -> {
onDataChanged?.invoke() showToast("重量不能小于 0")
notifyPropertyChanged(BR.weightStr)
}
newTrayWeight < 0 -> {
showToast("重量不能超过 ${round2(weight + trayTotalWeight)},否则托盘自重将小于 0")
notifyPropertyChanged(BR.weightStr)
}
else -> {
weightInput = value
if (weight != newWeight) {
weight = newWeight
trayTotalWeight = newTrayWeight
trayTotalWeightInput = null
notifyPropertyChanged(BR.weightStr)
notifyPropertyChanged(BR.trayTotalWeightStr)
onDataChanged?.invoke()
}
}
} }
} }
// 托盘自重的字符串表示(用于双向绑定),联动规则同上
@get:Bindable
var trayTotalWeightStr: String
get() = trayTotalWeightInput ?: if (trayTotalWeight == 0.0) "" else trayTotalWeight.toString()
set(value) {
val newTrayWeight = value.toDoubleOrNull() ?: 0.0
val newWeight = round2(weight + trayTotalWeight - newTrayWeight)
when {
newTrayWeight < 0 -> {
showToast("托盘自重不能小于 0")
notifyPropertyChanged(BR.trayTotalWeightStr)
}
newWeight < 0 -> {
showToast("托盘自重不能超过 ${round2(weight + trayTotalWeight)},否则重量将小于 0")
notifyPropertyChanged(BR.trayTotalWeightStr)
}
else -> {
trayTotalWeightInput = value
if (trayTotalWeight != newTrayWeight) {
trayTotalWeight = newTrayWeight
weight = newWeight
weightInput = null
notifyPropertyChanged(BR.trayTotalWeightStr)
notifyPropertyChanged(BR.weightStr)
onDataChanged?.invoke()
}
}
}
}
private fun round2(v: Double): Double = Math.round(v * 100) / 100.0
} }

View File

@@ -44,6 +44,7 @@ data class GjcMaWb(
// ==================== 货物信息 ==================== // ==================== 货物信息 ====================
var pc: Long? = null, // 预配件数 var pc: Long? = null, // 预配件数
var pcLabel: String? = null, // 件数展示文本(国际进港仓库分页返回,如 0/8、44
var weight: Double? = null, // 预配重量KG var weight: Double? = null, // 预配重量KG
var volume: Double? = null, // 预配体积CBM var volume: Double? = null, // 预配体积CBM
var goods: String? = null, // 品名(英) var goods: String? = null, // 品名(英)
@@ -57,6 +58,8 @@ data class GjcMaWb(
var arriveWeight: Double? = null, // 运抵重量 var arriveWeight: Double? = null, // 运抵重量
var arriveVolume: Double? = null, // 运抵体积 var arriveVolume: Double? = null, // 运抵体积
var arriveFlag: String? = null, // 运抵状态0正常运抵1提前运抵 var arriveFlag: String? = null, // 运抵状态0正常运抵1提前运抵
var trayNumber: Int? = null, // 托盘数量
var trayTotalWeight: Double? = null, // 托盘重量(托盘数量 × 托盘自重)
// ==================== 特码与收货人 ==================== // ==================== 特码与收货人 ====================
var spCode: String? = null, // 特码 var spCode: String? = null, // 特码
@@ -79,9 +82,12 @@ data class GjcMaWb(
// ==================== 状态信息 ==================== // ==================== 状态信息 ====================
var checkIn: String? = null, // 收运状态。0待收运1已收运2收运中 var checkIn: String? = null, // 收运状态。0待收运1已收运2收运中
var declareStatus: String? = null, // 申报状态 var declareStatus: String? = null, // 申报状态
var cmdStatus: String? = null, // 海关放行(命令状态)
var reviewStatus: String? = null, // 审核状态0未审核1通过2退回 var reviewStatus: String? = null, // 审核状态0未审核1通过2退回
var tranFlag: String? = null, // 转运标志 var tranFlag: String? = null, // 转运标志
var clearNormal: String? = null, // 清仓正常01 var clearNormal: String? = null, // 清仓正常01
var clearRemark: String? = null, // 清仓备注
var allTally: String? = null, // 运单理货申报全部通过01为 1 时才允许全选该主单下的分单
// ==================== 操作信息 ==================== // ==================== 操作信息 ====================
var opDate: String? = null, // 操作时间(入库时间) var opDate: String? = null, // 操作时间(入库时间)
@@ -91,6 +97,9 @@ data class GjcMaWb(
// ==================== 备注与其他 ==================== // ==================== 备注与其他 ====================
var remark: String? = null, // 备注 var remark: String? = null, // 备注
var pic: String? = null, // 交接图片缩略图路径(逗号分隔)
var originalPic: String? = null, // 交接图片原图路径(逗号分隔)
var picNumber: String? = null, // 交接图片数量
var ffmMemo: String? = null, // ffm备注 var ffmMemo: String? = null, // ffm备注
var mftMemo: String? = null, // mft备注 var mftMemo: String? = null, // mft备注
var unNumber: String? = null, // UN编号 var unNumber: String? = null, // UN编号
@@ -126,6 +135,13 @@ data class GjcMaWb(
get() = checked.get() get() = checked.get()
set(value) = checked.set(value) set(value) = checked.set(value)
/**
* 是否允许全选该主单下的分单
* 主单存在分批申报(未全部申报完毕)时接口返回 allTally=0此时不允许全选其分单
*/
val canCheckAllHaWb: Boolean
get() = allTally == "1"
// ==================== 状态转换扩展属性 ==================== // ==================== 状态转换扩展属性 ====================
/** /**
* 计重状态中文 * 计重状态中文

View File

@@ -0,0 +1,29 @@
package com.lukouguoji.module_base.bean
/**
* 国际出港移库详情数据模型
* 对应接口:/IntExpMove/detail 返回的 data/IntExpMove/update 的请求体
*/
data class GjcMoveDetail(
var maWbId: Long? = null, // GJC_MAWB.MAWBID
var wbNo: String? = null, // 运单号
var pc: Long? = null, // 件数
var weight: Double? = null, // 重量
var by: String? = null, // 承运人1
var awbTypeName: String? = null, // 运单类型(中文)
var range: String? = null, // 出运路径
var spCode: String? = null, // 特码
var agentCode: String? = null, // 代理人
var moveState: Int? = null, // 交接状态0 未交接1 已交接
var goods: String? = null, // 品名
var remark: String? = null, // 备注
var pic: String? = null, // 交接图片缩略图路径(逗号分隔)
var originalPic: String? = null, // 交接图片原图路径(逗号分隔)
var picNumber: String? = null // 交接图片数量
) {
/**
* 移交状态中文(与列表项文案一致)
*/
val moveStateText: String
get() = if (moveState == 1) "已移交" else "未移交"
}

View File

@@ -51,6 +51,7 @@ class GjcUldUseBean : Serializable {
var uldFlag: String = "" // uld分类 var uldFlag: String = "" // uld分类
var status: String = "" // uld状态0正常1故障 var status: String = "" // uld状态0正常1故障
var dgrCode: String = "" // IMP代码 var dgrCode: String = "" // IMP代码
var bupFlag: String = "" // BUP选项01
var height: String = "" // 高度 var height: String = "" // 高度
var passageway: String = "" // 通道号 var passageway: String = "" // 通道号
var passagewayId: String = "" var passagewayId: String = ""
@@ -65,6 +66,19 @@ class GjcUldUseBean : Serializable {
var loadArea: String = "" // 组装区 var loadArea: String = "" // 组装区
var pc: Long = 0 // 组装件数 var pc: Long = 0 // 组装件数
var allowLoad: String = "" // 允许装机0不允许1允许
// 是否允许装机
val isAllowLoad: Boolean
get() = allowLoad == "1"
// 装机状态文本
val allowLoadText: String
get() = when (allowLoad) {
"1" -> "允许装机"
"0" -> "不允许装机"
else -> ""
}
var fillWeightFlag: String = "" // 回填状态0-未回填1-部分回填2-已回填 var fillWeightFlag: String = "" // 回填状态0-未回填1-部分回填2-已回填
// 回填状态文本 // 回填状态文本

View File

@@ -0,0 +1,36 @@
package com.lukouguoji.module_base.bean
import androidx.databinding.ObservableBoolean
import com.lukouguoji.module_base.interfaces.ICheck
import java.io.Serializable
/**
* 国际进港装机单 ULD 主单 Bean
* 对应接口:/IntImpManifest/pageQueryAir 返回的列表项(按 ULD 分组manifestList 为关联运单)
*/
data class GjjLoadingUld(
var uld: String? = null, // ULD 编号
var flight: String? = null, // 航班信息
var totalPc: Long? = null, // 总件数
var totalWeight: Double? = null, // 总重量
var manifestList: List<GjjManifest>? = null, // 关联运单列表
// 展开/收起状态
@Transient
val showMore: ObservableBoolean = ObservableBoolean(false),
// 选中状态
@Transient
val checked: ObservableBoolean = ObservableBoolean(false)
) : Serializable, ICheck {
override fun getCheckObservable(): ObservableBoolean = checked
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
/** 总重量显示(取整) */
val totalWeightText: String
get() = ((totalWeight ?: 0.0).toInt()).toString()
}

View File

@@ -12,6 +12,8 @@ data class GjjManifest(
var no: String = "", // 编号 var no: String = "", // 编号
var prefix: String = "", // 前缀 var prefix: String = "", // 前缀
var wbNo: String = "", // 运单号 var wbNo: String = "", // 运单号
var fdate: String = "", // 航班日期
var fno: String = "", // 航班号
var origin: String = "", // 货源地(始发站) var origin: String = "", // 货源地(始发站)
var dest: String = "", // 目的站 var dest: String = "", // 目的站
var fdep: String = "", // 航班起始站 var fdep: String = "", // 航班起始站
@@ -58,6 +60,7 @@ data class GjjManifest(
var unNumber: String = "", // 危险品编号 var unNumber: String = "", // 危险品编号
var activeId: Long = 0, // 活动ID var activeId: Long = 0, // 活动ID
var locationTally: String = "", // 理货库位号 var locationTally: String = "", // 理货库位号
var locationTallyId: Long = 0, // 理货库位ID
var pic: String = "", // 交接图片缩略图路径 var pic: String = "", // 交接图片缩略图路径
var originalPic: String = "", // 交接图片原图地址 var originalPic: String = "", // 交接图片原图地址
var picNumber: String = "" // 交接图片数量 var picNumber: String = "" // 交接图片数量

View File

@@ -8,5 +8,6 @@ data class ManifestTotalDto(
var wbNumber: Int = 0, // 运单票数/总票数 var wbNumber: Int = 0, // 运单票数/总票数
var totalPc: Long = 0, // 总件数 var totalPc: Long = 0, // 总件数
var totalWeight: Double = 0.0, // 总重量 var totalWeight: Double = 0.0, // 总重量
var cargoWeight: Double = 0.0 // 总货重 var cargoWeight: Double = 0.0, // 总货重
var flightNumber: Int = 0 // 航班航次
) )

View File

@@ -19,6 +19,14 @@ data class ULDBean(
var status: String = "", var status: String = "",
// 备注 // 备注
var remark: String = "", var remark: String = "",
// 来源(空运、陆运)
var source: String = "",
// 入库时间 yyyy-MM-dd HH:mm:ss
var inStoreTime: String = "",
// 所在港
var nowPort: String = "",
// 位置信息
var nowPosition: String = "",
){ ){
val checked = ObservableBoolean(false) val checked = ObservableBoolean(false)

View File

@@ -13,4 +13,7 @@ class UldInfoBean {
var totalWeight: String = "" // 总重量 var totalWeight: String = "" // 总重量
var status: String = "" // 状态(旧字段,保留兼容) var status: String = "" // 状态(旧字段,保留兼容)
var useId: Long? = null // ULD使用ID来自getUld接口 var useId: Long? = null // ULD使用ID来自getUld接口
var dgrCode: String = "" // IMP代码
var boardType: String = "" // 板型(可下拉选择,也可手动输入)
var bupFlag: String = "0" // BUP选项01默认否
} }

View File

@@ -346,6 +346,9 @@ interface Constant {
// 数据 // 数据
const val DATA = "data" const val DATA = "data"
// 页面标题
const val TITLE = "title"
const val POSITION = "position" const val POSITION = "position"
// 单号 // 单号

View File

@@ -37,6 +37,7 @@ import com.lukouguoji.module_base.bean.GjcHandoverSheetResponse
import com.lukouguoji.module_base.bean.GjcInspectionBean import com.lukouguoji.module_base.bean.GjcInspectionBean
import com.lukouguoji.module_base.bean.GjcMaWb import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.bean.GjcMove import com.lukouguoji.module_base.bean.GjcMove
import com.lukouguoji.module_base.bean.GjcMoveDetail
import com.lukouguoji.module_base.bean.GjcUldUseBean import com.lukouguoji.module_base.bean.GjcUldUseBean
import com.lukouguoji.module_base.bean.GjcWarehouse import com.lukouguoji.module_base.bean.GjcWarehouse
import com.lukouguoji.module_base.bean.GjcWaybillBean import com.lukouguoji.module_base.bean.GjcWaybillBean
@@ -56,6 +57,7 @@ import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
import com.lukouguoji.module_base.bean.IntImpPickUpDLVBean import com.lukouguoji.module_base.bean.IntImpPickUpDLVBean
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
import com.lukouguoji.module_base.bean.IntImpQueryBean import com.lukouguoji.module_base.bean.IntImpQueryBean
import com.lukouguoji.module_base.bean.GjjLoadingUld
import com.lukouguoji.module_base.bean.GjjManifest import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.bean.GjjManifestBean import com.lukouguoji.module_base.bean.GjjManifestBean
import com.lukouguoji.module_base.bean.GjjPackTypeBean import com.lukouguoji.module_base.bean.GjjPackTypeBean
@@ -147,6 +149,14 @@ interface Api {
@POST @POST
suspend fun singleStringPost(@Url url: String): BaseResultBean<String> suspend fun singleStringPost(@Url url: String): BaseResultBean<String>
/**
* 获取海关回执(国际进港原始舱单/进港理货/出港运抵/出港装载/出港理货 共用)
* urlXXX/getResponsebody 传 prefix、no 与拼接的 wbNo后端实测按 prefix + no 匹配),
* 回执文本实测在 msg 字段、data 为 null取值见 CustomsResponseKtx.showCustomsResponse
*/
@POST
suspend fun getCustomsResponse(@Url url: String, @Body data: RequestBody): BaseResultBean<String>
@GET @GET
suspend fun anyGetForId(@Url url: String, @Query("id") id: String): BaseResultBean<Any> suspend fun anyGetForId(@Url url: String, @Query("id") id: String): BaseResultBean<Any>
@@ -302,6 +312,24 @@ interface Api {
@POST("typeCode/countryType") @POST("typeCode/countryType")
suspend fun getCountryTypeList(): DictListBean suspend fun getCountryTypeList(): DictListBean
/**
* 获取飞行状态
*/
@POST("typeCode/flightPortCode")
suspend fun getFlightPortCodeList(): DictListBean
/**
* 获取航班服务种类
*/
@POST("typeCode/flightServiceType")
suspend fun getFlightServiceTypeList(): DictListBean
/**
* 获取航班状态
*/
@POST("typeCode/flightStatus")
suspend fun getFlightStatusList(): DictListBean
/** /**
* 获取国家代码 * 获取国家代码
*/ */
@@ -564,6 +592,14 @@ interface Api {
@POST("typeCode/assembleCompany") @POST("typeCode/assembleCompany")
suspend fun getAssembleCompanyList(): BaseResultBean<List<AssembleCompanyBean>> suspend fun getAssembleCompanyList(): BaseResultBean<List<AssembleCompanyBean>>
/**
* 获取板型下拉列表(国际出港组装-开始组装)
* 接口路径: /typeCode/bordType后端路径即为 bordType非 boardType2026-09-11 实测 boardType 返回 404
* @param carrier 承运人二字码(取待组装运单航班号前两位);该参数后端必填(缺省返回 400进入页面时传空串
*/
@POST("typeCode/bordType")
suspend fun getBoardTypeList(@Query("carrier") carrier: String): DictListBean
/** /**
* 国际出港板箱过磅-分页搜索 * 国际出港板箱过磅-分页搜索
* 接口路径: /IntExpWeighting/pageQuery * 接口路径: /IntExpWeighting/pageQuery
@@ -657,7 +693,8 @@ interface Api {
* 国际出港组装 - 根据全ULD查询ULD状态和耗材重量 * 国际出港组装 - 根据全ULD查询ULD状态和耗材重量
* 接口路径: /IntExpAssemble/getUld * 接口路径: /IntExpAssemble/getUld
* @param uld ULD编号 * @param uld ULD编号
* @return ULD信息包含status0正常1故障consumeWeight耗材重量 * @return ULD信息包含status0正常1故障consumeWeight耗材重量
* dgrCodeIMP代码、boardType板型、bupFlagBUP选项 01
*/ */
@GET("IntExpAssemble/getUld") @GET("IntExpAssemble/getUld")
suspend fun getUldWithConsumeWeight(@Query("uld") uld: String): BaseResultBean<GjcUldUseBean> suspend fun getUldWithConsumeWeight(@Query("uld") uld: String): BaseResultBean<GjcUldUseBean>
@@ -666,7 +703,8 @@ interface Api {
* 国际出港组装 - 卸货 * 国际出港组装 - 卸货
* 接口路径: /IntExpAssemble/drop * 接口路径: /IntExpAssemble/drop
* @param data 请求参数abPc组装件数、abWeight组装重量、consumeWeight耗材重量 * @param data 请求参数abPc组装件数、abWeight组装重量、consumeWeight耗材重量
* ldId组装人、loadArea组装区、useInfoULD信息、wbInfo运单信息、userId用户ID * ldId组装人、loadArea组装区、useInfoULD信息、wbInfo运单信息、userId用户ID
* dgrCodeIMP代码、boardType板型、bupFlagBUP选项 01
*/ */
@POST("IntExpAssemble/drop") @POST("IntExpAssemble/drop")
suspend fun assembleDropCargo(@Body data: RequestBody): BaseResultBean<GjcWarehouse> suspend fun assembleDropCargo(@Body data: RequestBody): BaseResultBean<GjcWarehouse>
@@ -675,7 +713,8 @@ interface Api {
* 国际出港组装 - 装货 * 国际出港组装 - 装货
* 接口路径: /IntExpAssemble/assemble * 接口路径: /IntExpAssemble/assemble
* @param data 请求参数abPc组装件数、abWeight组装重量、consumeWeight耗材重量 * @param data 请求参数abPc组装件数、abWeight组装重量、consumeWeight耗材重量
* ldId组装人、loadArea组装区、useInfoULD信息、wbInfo运单信息、userId用户ID * ldId组装人、loadArea组装区、useInfoULD信息、wbInfo运单信息、userId用户ID
* dgrCodeIMP代码、boardType板型、bupFlagBUP选项 01
*/ */
@POST("IntExpAssemble/assemble") @POST("IntExpAssemble/assemble")
suspend fun assembleLoadCargo(@Body data: RequestBody): BaseResultBean<GjcWarehouse> suspend fun assembleLoadCargo(@Body data: RequestBody): BaseResultBean<GjcWarehouse>
@@ -737,6 +776,14 @@ interface Api {
@POST("IntExpOutHandover/waitingTrans") @POST("IntExpOutHandover/waitingTrans")
suspend fun waitingTrans(@Body data: RequestBody): BaseResultBean<String> suspend fun waitingTrans(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际出港出库交接-允许装机
* 接口路径: /IntExpOutHandover/allow
* @param data 请求参数选中的ULD列表GjcUldUseBean 数组)
*/
@POST("IntExpOutHandover/allow")
suspend fun allowLoading(@Body data: RequestBody): BaseResultBean<Boolean>
/** /**
* 国际出港-出港装载 分页查询 * 国际出港-出港装载 分页查询
* 接口路径: /IntExpLoad/pageQuery * 接口路径: /IntExpLoad/pageQuery
@@ -872,6 +919,20 @@ interface Api {
@POST("IntExpMove/move") @POST("IntExpMove/move")
suspend fun submitIntExpMove(@Body data: RequestBody): BaseResultBean<SimpleResultBean> suspend fun submitIntExpMove(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
/**
* 国际出港移库-详情
* 接口路径: /IntExpMove/detail
*/
@POST("IntExpMove/detail")
suspend fun getIntExpMoveDetail(@Query("maWbId") maWbId: Long): BaseResultBean<GjcMoveDetail>
/**
* 国际出港移库-编辑(仅更新备注与交接图片)
* 接口路径: /IntExpMove/update
*/
@POST("IntExpMove/update")
suspend fun updateIntExpMove(@Body data: RequestBody): BaseResultBean<String>
/** /**
* 国际出港库位操作-清仓 * 国际出港库位操作-清仓
* 接口路径: /IntExpStorageUse/updateClear * 接口路径: /IntExpStorageUse/updateClear
@@ -948,7 +1009,7 @@ interface Api {
* 接口路径: /IntImpStorage/updateClear * 接口路径: /IntImpStorage/updateClear
*/ */
@POST("IntImpStorage/updateClear") @POST("IntImpStorage/updateClear")
suspend fun clearIntImpStorage(@Query("clearNormal") clearNormal: String, @Body data: RequestBody): BaseResultBean<Boolean> suspend fun clearIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/** /**
* 国际进港库位操作-修改库位 * 国际进港库位操作-修改库位
@@ -1391,6 +1452,24 @@ interface Api {
@POST("flt/listFlightDest") @POST("flt/listFlightDest")
suspend fun listFlightDest(@Body data: RequestBody): BaseResultBean<List<String>> suspend fun listFlightDest(@Body data: RequestBody): BaseResultBean<List<String>>
/**
* 航班管理-新增航班
*/
@POST("flt/saveFlight")
suspend fun saveFlight(@Body data: RequestBody): BaseResultBean<String>
/**
* 航班管理-修改航班
*/
@POST("flt/updateFlight")
suspend fun updateFlight(@Body data: RequestBody): BaseResultBean<String>
/**
* 航班管理-删除航班(请求体为航班对象数组)
*/
@POST("flt/delete")
suspend fun deleteFlightList(@Body data: RequestBody): BaseResultBean<String>
/** /**
* 新增或修航司屏蔽 * 新增或修航司屏蔽
*/ */
@@ -1891,6 +1970,14 @@ interface Api {
@POST("IntImpManifest/pageQueryTotal") @POST("IntImpManifest/pageQueryTotal")
suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto> suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港舱单-根据11位具体运单号查询运单信息
* 接口路径: /IntImpManifest/queryWbByNo
* @param wbNo 11位运单号
*/
@POST("IntImpManifest/queryWbByNo")
suspend fun getIntImpManifestByWbNo(@Query("wbNo") wbNo: String): BaseResultBean<GjjManifest>
/** /**
* 国际进港舱单-获取主单下分单 * 国际进港舱单-获取主单下分单
*/ */
@@ -1916,10 +2003,10 @@ interface Api {
suspend fun getMaWbMinusHaWb(@Body data: RequestBody): BaseResultBean<GjjHaWb> suspend fun getMaWbMinusHaWb(@Body data: RequestBody): BaseResultBean<GjjHaWb>
/** /**
* 国际进港舱单-分拣理货(装机单)-分页查询 * 国际进港舱单-分拣理货(装机单)-分页查询(按 ULD 分组manifestList 为关联运单)
*/ */
@POST("IntImpManifest/pageQueryAir") @POST("IntImpManifest/pageQueryAir")
suspend fun getIntImpLoadingList(@Body data: RequestBody): PageInfo<GjjManifest> suspend fun getIntImpLoadingList(@Body data: RequestBody): PageInfo<GjjLoadingUld>
/** /**
* 国际进港舱单-分拣理货(装机单)-分页合计 * 国际进港舱单-分拣理货(装机单)-分页合计

View File

@@ -0,0 +1,53 @@
package com.lukouguoji.module_base.ktx
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ui.page.customs.CustomsResponseActivity
/**
* 海关回执接口地址(各页面对应各自模块的 getResponse
*/
object CustomsResponseUrl {
const val INT_IMP_AIR_MANIFEST = "IntImpAirManifest/getResponse" // 国际进港原始舱单
const val INT_IMP_TALLY = "IntImpTally/getResponse" // 国际进港理货
const val INT_EXP_ARRIVE = "IntExpArrive/getResponse" // 国际出港运抵
const val INT_EXP_LOAD = "IntExpLoad/getResponse" // 国际出港装载
const val INT_EXP_TALLY = "IntExpTally/getResponse" // 国际出港理货
}
/**
* 列表项侧滑「回执」按钮的 onItemClick type
* 现有取值为 0/1/2、101~103、1000~3000 及 view id9001 与之均不冲突
*/
const val ITEM_CLICK_TYPE_CUSTOMS_RESPONSE = 9001
/**
* 查询海关回执并跳转只读详情页
* - 带 Loading 调用 [url],本期只查主单,不传 hno
* - 请求体同时传 prefix、no 与拼接后的 wbNo测试环境实测后端按 prefix + no 匹配,
* 只传 wbNo 会查不到(与文档「运单号必填」描述不一致)
* - 回执文本实测放在 msg 字段data 恒为 null这里优先取 data、为空再取 msg兼容两种返回
* - 回执为空时提示「暂无海关回执」,不跳转
* - 接口失败由 launchLoadingCollect 默认 Toast 错误信息
*/
fun BaseViewModel.showCustomsResponse(url: String, prefix: String?, no: String?, title: String) {
if (prefix.isNullOrEmpty() || no.isNullOrEmpty()) {
showToast("运单号为空")
return
}
val params = mapOf(
"wbNo" to prefix + no,
"prefix" to prefix,
"no" to no
).toRequestBody()
launchLoadingCollect({ NetApply.api.getCustomsResponse(url, params) }) {
onSuccess = { result ->
val content = result.data?.ifEmpty { null } ?: result.msg ?: ""
if (content.isEmpty()) {
showToast("暂无海关回执")
} else {
CustomsResponseActivity.start(getTopActivity(), title, content)
}
}
}
}

View File

@@ -142,6 +142,7 @@ object ARouterConstants {
const val ACTIVITY_URL_INT_EXP_ASSEMBLE = "/gjc/IntExpAssembleActivity" //国际出港 出港组装 const val ACTIVITY_URL_INT_EXP_ASSEMBLE = "/gjc/IntExpAssembleActivity" //国际出港 出港组装
const val ACTIVITY_URL_INT_EXP_ASSEMBLE_START = "/gjc/IntExpAssembleStartActivity" //国际出港 开始组装 const val ACTIVITY_URL_INT_EXP_ASSEMBLE_START = "/gjc/IntExpAssembleStartActivity" //国际出港 开始组装
const val ACTIVITY_URL_INT_EXP_MOVE = "/gjc/IntExpMoveActivity" //国际出港 出港移库 const val ACTIVITY_URL_INT_EXP_MOVE = "/gjc/IntExpMoveActivity" //国际出港 出港移库
const val ACTIVITY_URL_INT_EXP_MOVE_EDIT = "/gjc/IntExpMoveEditActivity" //国际出港 出港移库编辑/详情
const val ACTIVITY_URL_GJC_ASSEMBLE_ALLOCATE = "/gjc/GjcAssembleAllocateActivity" //国际出港 组装分配 const val ACTIVITY_URL_GJC_ASSEMBLE_ALLOCATE = "/gjc/GjcAssembleAllocateActivity" //国际出港 组装分配
const val ACTIVITY_URL_INT_EXP_OUT_HANDOVER = "/gjc/IntExpOutHandoverActivity" //国际出港 出库交接 const val ACTIVITY_URL_INT_EXP_OUT_HANDOVER = "/gjc/IntExpOutHandoverActivity" //国际出港 出库交接
const val ACTIVITY_URL_INT_EXP_LOAD = "/gjc/IntExpLoadActivity" //国际出港 出港装载 const val ACTIVITY_URL_INT_EXP_LOAD = "/gjc/IntExpLoadActivity" //国际出港 出港装载

View File

@@ -0,0 +1,46 @@
package com.lukouguoji.module_base.ui.page.customs
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.module_base.R
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.databinding.ActivityCustomsResponseBinding
import com.lukouguoji.module_base.impl.EmptyViewModel
/**
* 海关回执详情页(只读)
* 回执文本由 Intent 传入页面内不调接口UI 参照国际进港电报详情页
*/
class CustomsResponseActivity :
BaseBindingActivity<ActivityCustomsResponseBinding, EmptyViewModel>() {
override fun layoutId() = R.layout.activity_customs_response
override fun viewModelClass() = EmptyViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(intent.getStringExtra(Constant.Key.TITLE) ?: "海关回执")
binding.etContent.apply {
setText(intent.getStringExtra(Constant.Key.DATA) ?: "")
// 只读:不可输入、无光标,但仍可长按选择复制
keyListener = null
isFocusable = false
isFocusableInTouchMode = false
isCursorVisible = false
}
}
companion object {
@JvmStatic
fun start(context: Context, title: String, content: String) {
context.startActivity(
Intent(context, CustomsResponseActivity::class.java)
.putExtra(Constant.Key.TITLE, title)
.putExtra(Constant.Key.DATA, content)
)
}
}
}

View File

@@ -211,7 +211,7 @@ class PadDataLayout : FrameLayout {
setOnClickListener(null) setOnClickListener(null)
} }
DataLayoutType.DATE -> { DataLayoutType.DATE, DataLayoutType.DATETIME -> {
tv.visibility = VISIBLE tv.visibility = VISIBLE
et.visibility = GONE et.visibility = GONE
spinner.visibility = GONE spinner.visibility = GONE
@@ -258,4 +258,5 @@ enum class DataLayoutType {
INPUT, // 文本 INPUT, // 文本
SPINNER, // 下拉选择 SPINNER, // 下拉选择
DATE, // 日期 DATE, // 日期
DATETIME, // 日期时间yyyy-MM-dd HH:mm:ss
} }

View File

@@ -25,6 +25,7 @@ import com.lukouguoji.module_base.adapter.visible
import com.lukouguoji.module_base.interfaces.IOnFocusChangeListener import com.lukouguoji.module_base.interfaces.IOnFocusChangeListener
import com.lukouguoji.module_base.interfaces.IOnSpinnerSelected import com.lukouguoji.module_base.interfaces.IOnSpinnerSelected
import com.lukouguoji.module_base.ktx.formatDate import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.module_base.ktx.formatDateTime
import com.lukouguoji.module_base.ktx.getActivity import com.lukouguoji.module_base.ktx.getActivity
import com.lukouguoji.module_base.ktx.loge import com.lukouguoji.module_base.ktx.loge
import com.lukouguoji.module_base.util.Common import com.lukouguoji.module_base.util.Common
@@ -182,6 +183,18 @@ class PadDataLayoutNew : FrameLayout {
} }
} }
// 选择日期时间yyyy-MM-dd HH:mm:ss
private val dateTimeClick: (v: View) -> Unit = {
if (enable) {
Common.onYearMonthDayTime(context.getActivity(), value) { year, month, day, hour, minute, second ->
val calendar = Calendar.getInstance()
calendar.set(year, month - 1, day, hour, minute, second)
value = calendar.time.formatDateTime()
refreshCallBack?.invoke()
}
}
}
init { init {
initView() initView()
} }
@@ -252,7 +265,7 @@ class PadDataLayoutNew : FrameLayout {
setOnClickListener(null) setOnClickListener(null)
} }
DataLayoutType.DATE -> { DataLayoutType.DATE, DataLayoutType.DATETIME -> {
tv.visibility = VISIBLE tv.visibility = VISIBLE
et.visibility = GONE et.visibility = GONE
spinner.visibility = GONE spinner.visibility = GONE
@@ -263,7 +276,7 @@ class PadDataLayoutNew : FrameLayout {
iv.layoutParams.width = dp20 iv.layoutParams.width = dp20
iv.layoutParams.height = dp20 iv.layoutParams.height = dp20
setOnClickListener(dateClick) setOnClickListener(if (type == DataLayoutType.DATETIME) dateTimeClick else dateClick)
} }
} }
} }

View File

@@ -490,6 +490,60 @@ object DictUtils {
} }
} }
/**
* 飞行状态0:前方起飞 1:过站登机 2:登机结束 6:到达 7:登机 9:正在值机 …)
*/
fun getFlightPortCodeList(
addAll: Boolean = true,
checkedValue: String? = null,
callBack: (List<KeyValue>) -> Unit
) {
launchCollect({
NetApply.api
.getFlightPortCodeList()
}) {
onSuccess = {
handleCallBack(it, checkedValue, addAll, callBack)
}
}
}
/**
* 航班服务种类0:客机 1:货机 2:卡车)
*/
fun getFlightServiceTypeList(
addAll: Boolean = true,
checkedValue: String? = null,
callBack: (List<KeyValue>) -> Unit
) {
launchCollect({
NetApply.api
.getFlightServiceTypeList()
}) {
onSuccess = {
handleCallBack(it, checkedValue, addAll, callBack)
}
}
}
/**
* 航班状态3:返航 4:地面滑回 5:备降 8:取消 12:延误 15:删除 16:未知)
*/
fun getFlightStatusList(
addAll: Boolean = true,
checkedValue: String? = null,
callBack: (List<KeyValue>) -> Unit
) {
launchCollect({
NetApply.api
.getFlightStatusList()
}) {
onSuccess = {
handleCallBack(it, checkedValue, addAll, callBack)
}
}
}
/** /**
* 获取角色列表 * 获取角色列表
*/ */
@@ -625,6 +679,22 @@ object DictUtils {
} }
} }
/**
* 板型列表(国际出港组装-开始组装)
* 接口 /typeCode/bordType
* @param carrier 承运人二字码(运单航班号前两位);为空时传空串(后端该参数必填,不传返回 400
*/
fun getBoardTypeList(carrier: String? = null, callBack: (List<KeyValue>) -> Unit) {
launchCollect({
NetApply.api
.getBoardTypeList(carrier?.trim() ?: "")
}) {
onSuccess = {
callBack(it.data?.map { b -> b.toKeyValue() } ?: emptyList())
}
}
}
// 报文类型 // 报文类型
fun getTelegramTypeList(callBack: (List<KeyValue>) -> Unit) { fun getTelegramTypeList(callBack: (List<KeyValue>) -> Unit) {
launchCollect({ launchCollect({

View File

@@ -27,7 +27,12 @@ import com.lukouguoji.module_base.ktx.permission
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.model.LoadingModel import com.lukouguoji.module_base.model.LoadingModel
import dev.DevUtils import dev.DevUtils
import dev.utils.app.HandlerUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.withContext
import okio.internal.commonToUtf8String import okio.internal.commonToUtf8String
import java.io.IOException
object PrinterUtils { object PrinterUtils {
@@ -315,6 +320,50 @@ object PrinterUtils {
* 打印国际出港板箱过磅挂签2列布局支持合并单元格 * 打印国际出港板箱过磅挂签2列布局支持合并单元格
*/ */
fun printGjcBoxWeighing(bean: GjcUldUseBean) { fun printGjcBoxWeighing(bean: GjcUldUseBean) {
printMergedGrid(buildGjcBoxWeighingRows(bean))
}
/**
* 批量打印国际出港板箱过磅挂签
* 逐张串行发送,张间节流,任一张发送失败即中止并提示已完成张数
*/
suspend fun printGjcBoxWeighingBatch(beans: List<GjcUldUseBean>) = withContext(Dispatchers.IO) {
var printed = 0
loading.showLoading()
try {
for ((index, bean) in beans.withIndex()) {
// 连接断开(含上一张写入异常后 SDK 置为断开)则不再继续发送
if (portManager?.connectStatus != true) break
HandlerUtils.postRunnable {
loading.setMessage("正在打印 ${index + 1}/${beans.size}")
}
val bytes = buildMergedGridBytes(buildGjcBoxWeighingRows(bean))
val ok = try {
portManager?.writeDataImmediately(bytes) == true
} catch (e: IOException) {
showLog("批量打印第 ${index + 1} 张写入异常 : ${e.message}")
false
}
if (!ok) break
printed++
// 张间留出出纸时间,避免连续灌入导致打印机缓冲溢出
if (index < beans.lastIndex) delay(800)
}
} finally {
loading.dismissLoading()
}
if (printed == beans.size) {
showToast("${beans.size} 张挂签打印完成")
} else {
val failBean = beans[printed]
showToast("已打印 $printed 张,第 ${printed + 1}ULD ${failBean.uld})发送失败,请检查打印机后重试")
}
}
/**
* 组装板箱过磅挂签的表格行数据
*/
private fun buildGjcBoxWeighingRows(bean: GjcUldUseBean): ArrayList<GridRow> {
val rows = arrayListOf<GridRow>() val rows = arrayListOf<GridRow>()
// 第1行日期 | 航班号 // 第1行日期 | 航班号
@@ -345,7 +394,7 @@ object PrinterUtils {
merged = CellData("备注:", "NOTES:", bean.remark) merged = CellData("备注:", "NOTES:", bean.remark)
)) ))
printMergedGrid(rows) return rows
} }
private fun printCommonGrid(rowItem: ArrayList<List<String>>) { private fun printCommonGrid(rowItem: ArrayList<List<String>>) {
@@ -456,6 +505,13 @@ object PrinterUtils {
* 打印支持合并单元格的表格 * 打印支持合并单元格的表格
*/ */
private fun printMergedGrid(rows: ArrayList<GridRow>) { private fun printMergedGrid(rows: ArrayList<GridRow>) {
portManager?.writeDataImmediately(buildMergedGridBytes(rows))
}
/**
* 生成支持合并单元格的表格标签字节流(自包含一张完整标签的 TSPL 指令)
*/
private fun buildMergedGridBytes(rows: ArrayList<GridRow>): ByteArray {
val gridStartX = 30 val gridStartX = 30
val titleTopMargin = 50 // 标题顶部间距 val titleTopMargin = 50 // 标题顶部间距
val titleFontSize = 130 // 标题字体大小 val titleFontSize = 130 // 标题字体大小
@@ -536,7 +592,7 @@ object PrinterUtils {
addPrint(1) addPrint(1)
}.bytes }.bytes
portManager?.writeDataImmediately(bytes) return bytes
} }
/** /**

View File

@@ -34,6 +34,13 @@
android:exported="false" android:exported="false"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<!-- 海关回执(只读) -->
<activity
android:name=".ui.page.customs.CustomsResponseActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 屏幕适配 --> <!-- 屏幕适配 -->
<meta-data <meta-data
android:name="design_width_in_dp" android:name="design_width_in_dp"

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 输入框边框 + 与 Spinnerbg_spinner_pda_new完全一致的下拉箭头用于“手动输入 + 下拉选择”组合输入框 -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/bg_data_layout_new" />
<item
android:width="8.7dp"
android:height="6dp"
android:drawable="@drawable/img_sp_down"
android:gravity="center_vertical|right"
android:right="10dp" />
</layer-list>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<!-- 标题栏 -->
<include layout="@layout/title_tool_bar" />
<!-- 回执内容区域(只读,可滚动、可长按复制) -->
<EditText
android:id="@+id/etContent"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_margin="20dp"
android:background="@drawable/bg_white_radius_8"
android:gravity="top|start"
android:inputType="textMultiLine"
android:lineSpacingExtra="4dp"
android:overScrollMode="always"
android:padding="20dp"
android:scrollbars="vertical"
android:textColor="@color/black"
android:textSize="16sp" />
</LinearLayout>
</layout>

View File

@@ -30,7 +30,7 @@ class GjcAssembleWeightEditActivity :
override fun viewModelClass() = GjcAssembleWeightEditViewModel::class.java override fun viewModelClass() = GjcAssembleWeightEditViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港修改组装重量") setBackArrow("国际出港重量回填")
binding.viewModel = viewModel binding.viewModel = viewModel

View File

@@ -54,7 +54,7 @@ class GjcQueryActivity :
} }
// 航班号:大写字母+数字 // 航班号:大写字母+数字
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter() binding.flightNoSearch.et.setUpperCaseAlphanumericFilter()
// 目的港:仅大写字母 // 目的港:仅大写字母
binding.filterPanel.filterDest.et.setUpperCaseLetterFilter() binding.filterPanel.filterDest.et.setUpperCaseLetterFilter()

View File

@@ -79,7 +79,8 @@ class IntExpStorageUseActivity :
IntExpMoveClearDialogModel { dialog -> IntExpMoveClearDialogModel { dialog ->
// 用户点击保存后,执行清仓操作 // 用户点击保存后,执行清仓操作
val clearNormal = dialog.clearNormal.value ?: "" val clearNormal = dialog.clearNormal.value ?: ""
viewModel.performClear(clearNormal, maWbListForClear) val clearRemark = dialog.clearRemark.value ?: ""
viewModel.performClear(clearNormal, clearRemark, maWbListForClear)
}.show(this) }.show(this)
} }

View File

@@ -18,6 +18,9 @@ class IntExpMoveClearDialogModel(
// 清仓正常(存储的是 code"0" 或 "1" // 清仓正常(存储的是 code"0" 或 "1"
val clearNormal = MutableLiveData("") val clearNormal = MutableLiveData("")
// 清仓备注(选填)
val clearRemark = MutableLiveData("")
// 清仓正常选项列表 // 清仓正常选项列表
val clearNormalList = MutableLiveData<List<KeyValue>>().apply { val clearNormalList = MutableLiveData<List<KeyValue>>().apply {
value = listOf( value = listOf(

View File

@@ -9,6 +9,7 @@ import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjcMaWb import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.ktx.refresh import com.lukouguoji.module_base.ktx.refresh
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
/** /**
* 国际出港-出港运抵 列表项ViewHolder * 国际出港-出港运抵 列表项ViewHolder
@@ -22,6 +23,12 @@ class IntExpArriveViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 侧滑菜单 - 回执按钮(关闭侧滑后分发到 ViewModel
binding.btnResponse.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, ITEM_CLICK_TYPE_CUSTOMS_RESPONSE)
}
// 添加图标点击事件 - 切换选择状态 // 添加图标点击事件 - 切换选择状态
binding.ivIcon.setOnClickListener { binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get()) bean.checked.set(!bean.checked.get())

View File

@@ -6,6 +6,7 @@ import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.common.ConstantEvent import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjcExportLoad import com.lukouguoji.module_base.bean.GjcExportLoad
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
/** /**
* 国际出港-出港装载 列表项ViewHolder * 国际出港-出港装载 列表项ViewHolder
@@ -19,6 +20,12 @@ class IntExpLoadViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 侧滑菜单 - 回执按钮(关闭侧滑后分发到 ViewModel
binding.btnResponse.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, ITEM_CLICK_TYPE_CUSTOMS_RESPONSE)
}
// 添加图标点击事件 - 切换选择状态 // 添加图标点击事件 - 切换选择状态
binding.ivIcon.setOnClickListener { binding.ivIcon.setOnClickListener {
// 反转checked状态 // 反转checked状态

View File

@@ -2,6 +2,7 @@ package com.lukouguoji.gjc.holder
import android.view.View import android.view.View
import com.lukouguoji.gjc.databinding.ItemIntExpMoveBinding import com.lukouguoji.gjc.databinding.ItemIntExpMoveBinding
import com.lukouguoji.gjc.page.move.IntExpMoveEditActivity
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcMove import com.lukouguoji.module_base.bean.GjcMove
import com.lukouguoji.module_base.common.ConstantEvent import com.lukouguoji.module_base.common.ConstantEvent
@@ -31,6 +32,17 @@ class IntExpMoveViewHolder(view: View) :
} }
} }
// 点击列表项进入移库详情
binding.ll.setOnClickListener {
IntExpMoveEditActivity.startForDetails(itemView.context, bean)
}
// 侧滑菜单 - 编辑按钮
binding.btnEdit.setOnClickListener {
binding.swipeMenu.quickClose()
IntExpMoveEditActivity.startForEdit(itemView.context, bean)
}
binding.executePendingBindings() binding.executePendingBindings()
} }
} }

View File

@@ -4,6 +4,8 @@ import android.view.View
import com.lukouguoji.gjc.databinding.ItemIntExpTallySubBinding import com.lukouguoji.gjc.databinding.ItemIntExpTallySubBinding
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcHaWb import com.lukouguoji.module_base.bean.GjcHaWb
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
/** /**
* 国际出港-出港理货 子订单(分单) ViewHolder * 国际出港-出港理货 子订单(分单) ViewHolder
@@ -20,6 +22,8 @@ class IntExpTallySubViewHolder(view: View) :
// checkbox点击切换选择状态 // checkbox点击切换选择状态
binding.ivCheckbox.setOnClickListener { binding.ivCheckbox.setOnClickListener {
bean.checked.set(!bean.checked.get()) bean.checked.set(!bean.checked.get())
// 通知页面刷新分单全选状态
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
binding.executePendingBindings() binding.executePendingBindings()
} }
} }

View File

@@ -9,6 +9,7 @@ import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjcMaWb import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.ktx.refresh import com.lukouguoji.module_base.ktx.refresh
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
/** /**
* 国际出港-出港理货 ViewHolder * 国际出港-出港理货 ViewHolder
@@ -22,6 +23,12 @@ class IntExpTallyViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 侧滑菜单 - 回执按钮(关闭侧滑后分发到 ViewModel
binding.btnResponse.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, ITEM_CLICK_TYPE_CUSTOMS_RESPONSE)
}
// 图标点击切换选择状态(主单和分单独立,互不干扰) // 图标点击切换选择状态(主单和分单独立,互不干扰)
binding.ivIcon.setOnClickListener { binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get()) bean.checked.set(!bean.checked.get())

View File

@@ -4,6 +4,11 @@ import android.app.Activity
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.View
import android.view.inputmethod.InputMethodManager
import android.widget.ArrayAdapter
import androidx.appcompat.widget.AppCompatSpinner
import androidx.appcompat.widget.ListPopupWindow
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R import com.lukouguoji.gjc.R
@@ -18,6 +23,7 @@ import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.interfaces.IOnItemClickListener import com.lukouguoji.module_base.interfaces.IOnItemClickListener
import com.lukouguoji.module_base.ktx.addOnItemClickListener import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
/** /**
@@ -28,6 +34,7 @@ class IntExpAssembleStartActivity :
BaseBindingActivity<ActivityIntExpAssembleStartBinding, IntExpAssembleStartViewModel>(), BaseBindingActivity<ActivityIntExpAssembleStartBinding, IntExpAssembleStartViewModel>(),
IOnItemClickListener { IOnItemClickListener {
private var boardTypePopup: ListPopupWindow? = null
private var assembleInfoAdapter: CommonAdapter? = null private var assembleInfoAdapter: CommonAdapter? = null
private var assemblePositionAdapter: CommonAdapter? = null private var assemblePositionAdapter: CommonAdapter? = null
private var waybillAdapter: CommonAdapter? = null private var waybillAdapter: CommonAdapter? = null
@@ -66,8 +73,18 @@ class IntExpAssembleStartActivity :
setBackArrow("国际出港开始组装") setBackArrow("国际出港开始组装")
binding.viewModel = viewModel binding.viewModel = viewModel
// 为ULD编号添加大写字母和数字的输入限制 // 为ULD编号、IMP代码添加大写字母和数字的输入限制
binding.uldNoInput.et.setUpperCaseAlphanumericFilter() binding.uldNoInput.et.setUpperCaseAlphanumericFilter()
binding.impCodeInput.et.setUpperCaseAlphanumericFilter()
// 板型:手动输入 + 下拉选择组合框。箭头复用 Spinner 同款背景绘制(同资源、同尺寸、同边距),
// 图标位不放图片,仅作为覆盖在箭头上的透明点击区域
binding.boardTypeInput.apply {
ll.setBackgroundResource(com.lukouguoji.module_base.R.drawable.bg_data_layout_new_dropdown)
iv.setImageDrawable(null)
iv.visibility = View.VISIBLE
iv.setOnClickListener { showBoardTypeDropdown() }
}
// 初始化列表 // 初始化列表
initRecyclerViews() initRecyclerViews()
@@ -81,6 +98,9 @@ class IntExpAssembleStartActivity :
// 加载组装人列表 // 加载组装人列表
viewModel.loadAssemblerList() viewModel.loadAssemblerList()
// 加载板型选项列表
viewModel.loadBoardTypeList()
// 监听登出事件,清空缓存 // 监听登出事件,清空缓存
FlowBus.with<Any>(ConstantEvent.LOGOUT).observe(this) { FlowBus.with<Any>(ConstantEvent.LOGOUT).observe(this) {
viewModel.clearCachedOperator() viewModel.clearCachedOperator()
@@ -93,6 +113,51 @@ class IntExpAssembleStartActivity :
handleEditModeIntent() handleEditModeIntent()
} }
/**
* 板型下拉:锚定在板型输入框正下方展开(外观与相邻 BUP 的 Spinner 下拉一致),选中后回填,仍可手动输入
*/
private fun showBoardTypeDropdown() {
val list = viewModel.boardTypeList.value ?: emptyList()
if (list.isEmpty()) {
showToast("暂无板型选项,请手动输入")
return
}
val anchor = binding.boardTypeInput.ll
// 先收起软键盘,避免下拉被输入法遮挡
(getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager)
?.hideSoftInputFromWindow(anchor.windowToken, 0)
boardTypePopup?.dismiss()
boardTypePopup = ListPopupWindow(this).apply {
anchorView = anchor
width = anchor.width
isModal = true
// 复用 BUP Spinner 的弹窗背景,保证两者下拉外观完全一致
(binding.bupFlagInput.spinner as? AppCompatSpinner)?.popupBackground
?.constantState?.newDrawable()?.mutate()
?.let { setBackgroundDrawable(it) }
setAdapter(
ArrayAdapter(
this@IntExpAssembleStartActivity,
com.lukouguoji.module_base.R.layout.item_spinner_list,
list.map { it.key }
)
)
setOnItemClickListener { _, _, position, _ ->
viewModel.onBoardTypeSelected(position)
dismiss()
}
show()
}
}
override fun onDestroy() {
boardTypePopup?.dismiss()
boardTypePopup = null
super.onDestroy()
}
/** /**
* 处理修改模式的 Intent 参数 * 处理修改模式的 Intent 参数
*/ */

View File

@@ -0,0 +1,76 @@
package com.lukouguoji.gjc.page.move
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpMoveEditBinding
import com.lukouguoji.gjc.viewModel.IntExpMoveEditViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcMove
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港移库编辑/详情页
* 编辑模式仅支持拍照上传与备注修改
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE_EDIT)
class IntExpMoveEditActivity :
BaseBindingActivity<ActivityIntExpMoveEditBinding, IntExpMoveEditViewModel>() {
override fun layoutId() = R.layout.activity_int_exp_move_edit
override fun viewModelClass() = IntExpMoveEditViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
viewModel.initOnCreated(intent)
when (viewModel.pageType.value) {
DetailsPageType.Modify -> setBackArrow("国际出港移库编辑")
else -> setBackArrow("国际出港移库详情")
}
binding.viewModel = viewModel
// 绑定图片 RecyclerView 引用
viewModel.rvImages = binding.rvImages
// 绑定图片列表点击事件(编辑模式下可删除图片)
binding.rvImages.addOnItemClickListener(viewModel)
// 监听图片列表变化并更新 adapter
viewModel.imageList.observe(this) { images ->
binding.rvImages.commonAdapter()?.refresh(images)
}
}
companion object {
/**
* 列表 Bean 一并传入detail 接口的承运人、出运路径等字段可能为空,
* 由 ViewModel 用列表数据回填
*/
@JvmStatic
fun startForEdit(context: Context, bean: GjcMove) {
start(context, bean, DetailsPageType.Modify)
}
@JvmStatic
fun startForDetails(context: Context, bean: GjcMove) {
start(context, bean, DetailsPageType.Details)
}
private fun start(context: Context, bean: GjcMove, pageType: DetailsPageType) {
val starter = Intent(context, IntExpMoveEditActivity::class.java)
.putExtra(Constant.Key.PAGE_TYPE, pageType.name)
.putExtra(Constant.Key.ID, bean.maWbId.toString())
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
context.startActivity(starter)
}
}
}

View File

@@ -38,6 +38,7 @@ class GjcAssembleWeightEditViewModel : BaseViewModel() {
val totalPc = MutableLiveData("") // 总件数 val totalPc = MutableLiveData("") // 总件数
val totalWeight = MutableLiveData("") // 总重量 val totalWeight = MutableLiveData("") // 总重量
val cargoWeight = MutableLiveData("") // 货重 val cargoWeight = MutableLiveData("") // 货重
val consumeWeight = MutableLiveData("") // 耗材重量
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 底部统计字段 // 底部统计字段
@@ -74,6 +75,7 @@ class GjcAssembleWeightEditViewModel : BaseViewModel() {
totalPc.value = it.pc.toString() totalPc.value = it.pc.toString()
totalWeight.value = it.totalWeight.toString() totalWeight.value = it.totalWeight.toString()
cargoWeight.value = it.cargoWeight.toString() cargoWeight.value = it.cargoWeight.toString()
consumeWeight.value = it.consumeWeight.toString()
// 保存参数用于API调用 // 保存参数用于API调用
useId = it.useId useId = it.useId

View File

@@ -20,6 +20,7 @@ import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
import com.lukouguoji.module_base.model.BluetoothDialogModel import com.lukouguoji.module_base.model.BluetoothDialogModel
import com.lukouguoji.module_base.model.ScanModel import com.lukouguoji.module_base.model.ScanModel
import com.lukouguoji.module_base.util.Common import com.lukouguoji.module_base.util.Common
@@ -34,6 +35,11 @@ import java.util.Date
*/ */
class GjcBoxWeighingAddViewModel : BaseViewModel() { class GjcBoxWeighingAddViewModel : BaseViewModel() {
companion object {
// 记录上一次称重完成时使用的通道号,后续称重默认选中
private const val KEY_LAST_PASSAGEWAY_ID = "gjc_box_weighing_last_passageway_id"
}
// 数据Bean // 数据Bean
val dataBean = MutableLiveData(GjcUldUseBean()) val dataBean = MutableLiveData(GjcUldUseBean())
@@ -51,6 +57,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
val totalWeight = MutableLiveData("0") // 总重(红色) val totalWeight = MutableLiveData("0") // 总重(红色)
val netWeight = MutableLiveData("0") // 装机重(蓝色) val netWeight = MutableLiveData("0") // 装机重(蓝色)
val cargoWeight = MutableLiveData("0") // 货重(绿色) val cargoWeight = MutableLiveData("0") // 货重(绿色)
val consumeWeight = MutableLiveData("0") // 耗材重量(只读,随 ULD 记录带出)
// 需要自动查询的独立字段(用于监听输入变化) // 需要自动查询的独立字段(用于监听输入变化)
val carId = MutableLiveData("") // 架子车号 val carId = MutableLiveData("") // 架子车号
@@ -113,9 +120,11 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
val editBean = intent?.getSerializableExtra(Constant.Key.BEAN) as? GjcUldUseBean val editBean = intent?.getSerializableExtra(Constant.Key.BEAN) as? GjcUldUseBean
if (editBean != null) { if (editBean != null) {
prefillFromBean(editBean) prefillFromBean(editBean)
loadPassagewayList(editBean.passagewayId) // 优先本条记录自带的通道号没有则回退到上一次称重记住的通道号App 级持久化)
loadPassagewayList(editBean.passagewayId.ifEmpty { null })
loadPlCloseList(editBean.plClose) loadPlCloseList(editBean.plClose)
} else { } else {
// 新增模式:默认选中上一次称重使用的通道号
loadPassagewayList(null) loadPassagewayList(null)
loadPlCloseList(null) loadPlCloseList(null)
} }
@@ -138,6 +147,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
totalWeight.value = bean.totalWeight.toString() totalWeight.value = bean.totalWeight.toString()
netWeight.value = bean.netWeight.toString() netWeight.value = bean.netWeight.toString()
cargoWeight.value = bean.cargoWeight.toString() cargoWeight.value = bean.cargoWeight.toString()
consumeWeight.value = bean.consumeWeight.toString()
diBangWeight.value = bean.totalWeight.toString() diBangWeight.value = bean.totalWeight.toString()
// 通道号 Spinner 绑定到 channelKeyValue.value 即 passagewayId // 通道号 Spinner 绑定到 channelKeyValue.value 即 passagewayId
@@ -229,15 +239,27 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
/** /**
* 加载通道号列表 * 加载通道号列表
* @param checkedValue 编辑模式下需要选中的 passagewayId为空则按返回顺序展示 * @param preferredId 编辑模式下本条记录自带的 passagewayId为空则回退到上一次称重记住的通道号
*
* 注意Spinner 带 hint 时默认停在 hint 项,并不会显示列表首项,
* 所以必须显式给 channel 赋值才能选中,只调列表顺序无效。
*/ */
private fun loadPassagewayList(checkedValue: String?) { private fun loadPassagewayList(preferredId: String?) {
launchCollect({ launchCollect({
NetApply.api.getDictList("GJPASSAGEWAY") NetApply.api.getDictList("GJPASSAGEWAY")
}) { }) {
onSuccess = { onSuccess = {
val list = (it.data ?: emptyList()).map { b -> b.toKeyValue() } val list = (it.data ?: emptyList()).map { b -> b.toKeyValue() }
passagewayList.value = reorderChecked(list, checkedValue) passagewayList.value = list
// 选中优先级:本条记录的通道号 → 上一次称重记住的通道号SharedPreference跨页面、跨启动保留
val lastPassagewayId = SharedPreferenceUtil.getString(KEY_LAST_PASSAGEWAY_ID)
val selected = listOf(preferredId, lastPassagewayId).firstOrNull { id ->
!id.isNullOrEmpty() && list.any { kv -> kv.value == id }
}
if (selected != null) {
channel.value = selected
}
} }
} }
} }
@@ -273,15 +295,16 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
/** /**
* 计算重量字段 * 计算重量字段
* 装机重 = 总重 - 架子车自重 * 装机重 = 总重 - 架子车自重
* 货重 = 装机重 - ULD自重 * 货重 = 装机重 - ULD自重 - 耗材自重
*/ */
private fun calculateWeights() { private fun calculateWeights() {
val total = totalWeight.value?.toDoubleOrNull() ?: 0.0 val total = totalWeight.value?.toDoubleOrNull() ?: 0.0
val carW = dataBean.value?.carWeight ?: 0.0 val carW = dataBean.value?.carWeight ?: 0.0
val uldW = dataBean.value?.uldWeight ?: 0.0 val uldW = dataBean.value?.uldWeight ?: 0.0
val consumeW = consumeWeight.value?.toDoubleOrNull() ?: 0.0
val net = total - carW val net = total - carW
val cargo = net - uldW val cargo = net - uldW - consumeW
netWeight.value = if (net > 0) net.toString() else "0" netWeight.value = if (net > 0) net.toString() else "0"
cargoWeight.value = if (cargo > 0) cargo.toString() else "0" cargoWeight.value = if (cargo > 0) cargo.toString() else "0"
@@ -334,7 +357,8 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
totalWeight.value = "0" totalWeight.value = "0"
netWeight.value = "0" netWeight.value = "0"
cargoWeight.value = "0" cargoWeight.value = "0"
channel.value = "" consumeWeight.value = "0"
// 通道号不清空:保留当前选择,与 Spinner 显示保持一致,后续称重沿用上一次的通道号
printTag.value = false printTag.value = false
// 重置独立字段 // 重置独立字段
@@ -437,6 +461,11 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
if (result.verifySuccess()) { if (result.verifySuccess()) {
showToast("完成复磅") showToast("完成复磅")
// 记住本次使用的通道号,后续称重默认选中
if (bean.passagewayId.isNotEmpty()) {
SharedPreferenceUtil.addString(KEY_LAST_PASSAGEWAY_ID, bean.passagewayId)
}
// 如果勾选了打印挂签,则执行打印 // 如果勾选了打印挂签,则执行打印
if (printTag.value == true) { if (printTag.value == true) {
executePrint() executePrint()
@@ -519,6 +548,9 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
if (usingData != null && usingData.useId > 0) { if (usingData != null && usingData.useId > 0) {
// 保存返回的数据,用于提交时传递 // 保存返回的数据,用于提交时传递
usingUldData = usingData usingUldData = usingData
// 耗材重量随该记录带回,需要重新参与货重计算
consumeWeight.value = usingData.consumeWeight.toString()
calculateWeights()
} else { } else {
// 没有 useId说明未组装不可复磅 // 没有 useId说明未组装不可复磅
usingUldData = null usingUldData = null

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.gjc.viewModel
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjc.R import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.holder.GjcBoxWeighingViewHolder import com.lukouguoji.gjc.holder.GjcBoxWeighingViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel import com.lukouguoji.module_base.base.BasePageViewModel
@@ -20,6 +21,7 @@ import com.lukouguoji.module_base.util.PrinterUtils
import dev.utils.app.info.KeyValue import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils import dev.utils.common.DateUtils
import com.lukouguoji.module_base.ktx.formatDate import com.lukouguoji.module_base.ktx.formatDate
import kotlinx.coroutines.launch
/** /**
* 国际出港板箱过磅 ViewModel * 国际出港板箱过磅 ViewModel
@@ -96,16 +98,19 @@ class GjcBoxWeighingViewModel : BasePageViewModel() {
return return
} }
// 校验多选 if (selectedItems.size == 1) {
if (selectedItems.size > 1) { // 单条:保持原有打印路径
showToast("只能选择一条记录进行打印") val bean = selectedItems.first()
return BluetoothDialogModel().showCallBack {
} PrinterUtils.printGjcBoxWeighing(bean)
}
// 执行打印 } else {
val bean = selectedItems.first() // 多条:逐张串行批量打印
BluetoothDialogModel().showCallBack { BluetoothDialogModel().showCallBack {
PrinterUtils.printGjcBoxWeighing(bean) viewModelScope.launch {
PrinterUtils.printGjcBoxWeighingBatch(selectedItems)
}
}
} }
} }

View File

@@ -25,33 +25,34 @@ import com.lukouguoji.module_base.ktx.formatDate
class GjcQueryViewModel : BasePageViewModel() { class GjcQueryViewModel : BasePageViewModel() {
// ==================== 搜索条件 ==================== // ==================== 搜索条件 ====================
val dateState = MutableLiveData("0") // 日期类型0入库1离港
val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期起 val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期起
val flightDateEnd = MutableLiveData("") // 航班日期止 val flightDateEnd = MutableLiveData("") // 航班日期止
val agentId = MutableLiveData("") // 代理ID val agentId = MutableLiveData("") // 代理ID
val outStatus = MutableLiveData("") // 出库状态 val flightNo = MutableLiveData("") // 航班号
val waybillNo = MutableLiveData("") // 运单号 val waybillNo = MutableLiveData("") // 运单号
// ==================== 下拉列表 ==================== // ==================== 下拉列表 ====================
// 代理下拉列表(从API获取 // 日期类型下拉列表(对应接口 dateState
val agentList = MutableLiveData(listOf(KeyValue("全部", ""))) val dateStateList = MutableLiveData(
// 出库状态下拉列表
val outStatusList = MutableLiveData(
listOf( listOf(
KeyValue("全部", ""), KeyValue("入库", "0"),
KeyValue("未出库", "0"), KeyValue("离港", "1")
KeyValue("已出库", "1")
) )
) )
// 代理下拉列表从API获取
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
// ==================== 适配器配置 ==================== // ==================== 适配器配置 ====================
val itemViewHolder = GjcQueryViewHolder::class.java val itemViewHolder = GjcQueryViewHolder::class.java
val itemLayoutId = R.layout.item_gjc_query val itemLayoutId = R.layout.item_gjc_query
// ==================== 统计数据 ==================== // ==================== 统计数据 ====================
val totalCount = MutableLiveData("0") // 合计票数 val totalCount = MutableLiveData("0") // 合计票数
val totalPc = MutableLiveData("0") // 总件数 val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0") // 总重量 val totalWeight = MutableLiveData("0") // 总重量
val totalFlightNumber = MutableLiveData("0") // 航班航次
// ==================== 筛选面板 ==================== // ==================== 筛选面板 ====================
val filterVisible = MutableLiveData(false) val filterVisible = MutableLiveData(false)
@@ -59,6 +60,9 @@ class GjcQueryViewModel : BasePageViewModel() {
// 运单类型列表(字典接口 typeCode/awbtype=IO 国际出港) // 运单类型列表(字典接口 typeCode/awbtype=IO 国际出港)
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList()) val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
// 特码列表与国际出港待记重页面同源flag=1 国际ieFlag 为空)
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
// 业务类型列表 // 业务类型列表
val businessTypeList = MutableLiveData( val businessTypeList = MutableLiveData(
listOf( listOf(
@@ -70,7 +74,6 @@ class GjcQueryViewModel : BasePageViewModel() {
// ==================== 筛选条件 ==================== // ==================== 筛选条件 ====================
val spCode = MutableLiveData("") // 特码 val spCode = MutableLiveData("") // 特码
val flightNo = MutableLiveData("") // 航班号
val dest = MutableLiveData("") // 目的港 val dest = MutableLiveData("") // 目的港
val awbType = MutableLiveData("") // 运单类型 val awbType = MutableLiveData("") // 运单类型
val businessType = MutableLiveData("") // 业务类型 val businessType = MutableLiveData("") // 业务类型
@@ -79,11 +82,10 @@ class GjcQueryViewModel : BasePageViewModel() {
// 是否有筛选条件(任意一个非空则为 true用于筛选按钮红点 // 是否有筛选条件(任意一个非空则为 true用于筛选按钮红点
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply { val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
val update = { _: Any? -> val update = { _: Any? ->
value = listOf(spCode, flightNo, dest, awbType, businessType, goodsCn) value = listOf(spCode, dest, awbType, businessType, goodsCn)
.any { !it.value.isNullOrEmpty() } .any { !it.value.isNullOrEmpty() }
} }
addSource(spCode, update) addSource(spCode, update)
addSource(flightNo, update)
addSource(dest, update) addSource(dest, update)
addSource(awbType, update) addSource(awbType, update)
addSource(businessType, update) addSource(businessType, update)
@@ -127,7 +129,6 @@ class GjcQueryViewModel : BasePageViewModel() {
*/ */
fun resetFilter() { fun resetFilter() {
spCode.value = "" spCode.value = ""
flightNo.value = ""
dest.value = "" dest.value = ""
awbType.value = "" awbType.value = ""
businessType.value = "" businessType.value = ""
@@ -143,7 +144,7 @@ class GjcQueryViewModel : BasePageViewModel() {
} }
/** /**
* 初始化筛选下拉列表(运单类型从字典接口获取type=IO 国际出港 * 初始化筛选下拉列表(运单类型、特码均从字典接口获取)
*/ */
fun initFilterLists() { fun initFilterLists() {
DictUtils.getWaybillTypeList( DictUtils.getWaybillTypeList(
@@ -153,6 +154,15 @@ class GjcQueryViewModel : BasePageViewModel() {
) { ) {
awbTypeList.postValue(it) awbTypeList.postValue(it)
} }
// 特码列表(参数与国际出港待记重页面一致)
DictUtils.getSpecialCodeList(
flag = 1, // 国际
ieFlag = "", // 空字符串
parentcode = "" // 无父级
) {
spCodeList.postValue(it)
}
} }
/** /**
@@ -160,39 +170,31 @@ class GjcQueryViewModel : BasePageViewModel() {
* 核心方法调用API获取数据并转换PageInfo为BaseListBean * 核心方法调用API获取数据并转换PageInfo为BaseListBean
*/ */
override fun getData() { override fun getData() {
// 公共查询条件(列表与统计接口共用)
val commonParams = mapOf(
// 日期类型0入库1离港+ 日期范围
"dateState" to dateState.value?.ifEmpty { null }?.toIntOrNull(),
"beginDate" to flightDateStart.value?.ifEmpty { null },
"endDate" to flightDateEnd.value?.ifEmpty { null },
"agentCode" to agentId.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"wbNo" to waybillNo.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 }
)
// 构建查询参数(列表接口) // 构建查询参数(列表接口)
val listParams = mapOf( val listParams = (commonParams + mapOf(
"pageNum" to pageModel.page, "pageNum" to pageModel.page,
"pageSize" to pageModel.limit, "pageSize" to pageModel.limit
"beginDate" to flightDateStart.value!!.ifEmpty { null }, )).toRequestBody()
"endDate" to flightDateEnd.value!!.ifEmpty { null },
"agentCode" to agentId.value!!.ifEmpty { null },
"outState" to outStatus.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
// 筛选条件(暂未使用)
"spCode" to spCode.value!!.ifEmpty { null },
"fno" to flightNo.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 }
).toRequestBody()
// 构建查询参数(统计接口 - 使用相同的搜索条件) // 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf( val totalParams = commonParams.toRequestBody()
"beginDate" to flightDateStart.value!!.ifEmpty { null },
"endDate" to flightDateEnd.value!!.ifEmpty { null },
"agentCode" to agentId.value!!.ifEmpty { null },
"outState" to outStatus.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
// 筛选条件
"spCode" to spCode.value!!.ifEmpty { null },
"fno" to flightNo.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 }
).toRequestBody()
// 获取列表数据显示loading // 获取列表数据显示loading
launchLoadingCollect({ launchLoadingCollect({
@@ -213,6 +215,7 @@ class GjcQueryViewModel : BasePageViewModel() {
totalCount.value = (data?.wbNumber ?: 0).toString() totalCount.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString() totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString() totalWeight.value = (data?.totalWeight ?: 0.0).toString()
totalFlightNumber.value = (data?.flightNumber ?: 0).toString()
} }
} }
} }

View File

@@ -66,6 +66,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
val pageRemark = MutableLiveData("") // 备注 val pageRemark = MutableLiveData("") // 备注
// 托盘信息(运抵重量 = 地磅称重 - 托盘数量 × 托盘自重)
val trayNumber = MutableLiveData("") // 托盘数量
val trayWeight = MutableLiveData("18") // 托盘自重默认18可编辑
// 下拉选择数据源 // 下拉选择数据源
val channelList = MutableLiveData<List<KeyValue>>() // 通道号列表 val channelList = MutableLiveData<List<KeyValue>>() // 通道号列表
val agentList = MutableLiveData<List<KeyValue>>() // 代理人列表 val agentList = MutableLiveData<List<KeyValue>>() // 代理人列表
@@ -82,11 +86,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
// 获取传入的运单ID // 获取传入的运单ID
maWbId = intent.getLongExtra(Constant.Key.MAWB_ID, 0) maWbId = intent.getLongExtra(Constant.Key.MAWB_ID, 0)
// 监听地磅称重输入,单向同步到运抵重量 // 监听地磅称重、托盘数量、托盘自重输入,自动计算运抵重量
diBangWeight.observe(activity as LifecycleOwner) { weight -> diBangWeight.observe(activity as LifecycleOwner) { recalculateArriveWeight() }
// 同步到运抵重量(单向,不做反向同步) trayNumber.observe(activity as LifecycleOwner) { recalculateArriveWeight() }
arriveWeight.value = weight ?: "0" trayWeight.observe(activity as LifecycleOwner) { recalculateArriveWeight() }
}
// 监听运抵重量变化,自动计算运抵体积 // 监听运抵重量变化,自动计算运抵体积
arriveWeight.observe(activity as LifecycleOwner) { weightStr -> arriveWeight.observe(activity as LifecycleOwner) { weightStr ->
@@ -113,6 +116,32 @@ class GjcWeighingStartViewModel : BaseViewModel() {
} }
} }
/**
* 自动计算运抵重量:地磅称重 - (托盘数量 × 托盘自重)
*/
private fun recalculateArriveWeight() {
val gross = diBangWeight.value?.toDoubleOrNull() ?: 0.0
val trayTotal = getTrayTotalWeight()
val net = gross - trayTotal
arriveWeight.value = if (net > 0) formatWeight(net) else "0"
}
/**
* 托盘总重量 = 托盘数量 × 托盘自重
*/
private fun getTrayTotalWeight(): Double {
val num = trayNumber.value?.toIntOrNull() ?: 0
val weight = trayWeight.value?.toDoubleOrNull() ?: 0.0
return num * weight
}
/**
* 重量格式化最多保留两位小数去掉多余的0
*/
private fun formatWeight(value: Double): String {
return String.format("%.2f", value).trimEnd('0').trimEnd('.')
}
/** /**
* 加载通道号列表 (国际出港专用) * 加载通道号列表 (国际出港专用)
*/ */
@@ -391,6 +420,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
passageWay = this@GjcWeighingStartViewModel.channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: "" passageWay = this@GjcWeighingStartViewModel.channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
passageWayId = this@GjcWeighingStartViewModel.channel.value passageWayId = this@GjcWeighingStartViewModel.channel.value
// 托盘信息
trayNumber = this@GjcWeighingStartViewModel.trayNumber.value?.toIntOrNull()
trayTotalWeight = getTrayTotalWeight()
remark = pageRemark.value remark = pageRemark.value
} }
@@ -417,6 +450,8 @@ class GjcWeighingStartViewModel : BaseViewModel() {
arrivePc.value = "" arrivePc.value = ""
arriveWeight.value = "" arriveWeight.value = ""
arriveVolume.value = "" arriveVolume.value = ""
trayNumber.value = ""
trayWeight.value = "18"
pageRemark.value = "" pageRemark.value = ""
@@ -499,6 +534,8 @@ class GjcWeighingStartViewModel : BaseViewModel() {
"goodsCn" to bean.goodsCn, "goodsCn" to bean.goodsCn,
"businessType" to bean.businessType, "businessType" to bean.businessType,
"carId" to bean.carId, "carId" to bean.carId,
"trayNumber" to trayNumber.value?.toIntOrNull(),
"trayTotalWeight" to getTrayTotalWeight(),
"remark" to pageRemark.value, "remark" to pageRemark.value,
"checkIn" to "1", // 收运状态设置为已收运 "checkIn" to "1", // 收运状态设置为已收运
"passageWayId" to channel.value, // 通道号参数 "passageWayId" to channel.value, // 通道号参数

View File

@@ -15,11 +15,15 @@ import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.CustomsResponseUrl
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
import com.lukouguoji.module_base.ktx.showCustomsResponse
import com.lukouguoji.module_base.ktx.launchCollect import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel import com.lukouguoji.module_base.model.ScanModel
import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils import dev.utils.common.DateUtils
import com.lukouguoji.module_base.ktx.formatDate import com.lukouguoji.module_base.ktx.formatDate
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@@ -34,6 +38,16 @@ class IntExpArriveViewModel : BasePageViewModel() {
val flightNo = MutableLiveData("") // 航班号 val flightNo = MutableLiveData("") // 航班号
val waybillNo = MutableLiveData("") // 运单号 val waybillNo = MutableLiveData("") // 运单号
val hno = MutableLiveData("") // 分单号 val hno = MutableLiveData("") // 分单号
val arrivalStatus = MutableLiveData("") // 运抵状态0未运抵1已运抵
// 运抵状态下拉列表
val arrivalStatusList = MutableLiveData(
listOf(
KeyValue("全部", ""),
KeyValue("已运抵", "1"),
KeyValue("未运抵", "0")
)
)
// ========== 统计信息 ========== // ========== 统计信息 ==========
val totalCount = MutableLiveData("0") // 合计票数 val totalCount = MutableLiveData("0") // 合计票数
@@ -301,7 +315,8 @@ class IntExpArriveViewModel : BasePageViewModel() {
"fdate" to flightDate.value?.ifEmpty { null }, "fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null }, "fno" to flightNo.value?.ifEmpty { null },
"wbNo" to waybillNo.value?.ifEmpty { null }, "wbNo" to waybillNo.value?.ifEmpty { null },
"hno" to hno.value?.ifEmpty { null } "hno" to hno.value?.ifEmpty { null },
"arrivalStatus" to arrivalStatus.value?.ifEmpty { null }
) )
// 列表参数 (含分页) // 列表参数 (含分页)
@@ -332,4 +347,14 @@ class IntExpArriveViewModel : BasePageViewModel() {
} }
} }
} }
/**
* 列表项点击分发:侧滑「回执」按钮 → 查询海关回执并跳转只读详情页
*/
override fun onItemClick(position: Int, type: Int) {
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? GjcMaWb ?: return
if (type == ITEM_CLICK_TYPE_CUSTOMS_RESPONSE) {
showCustomsResponse(CustomsResponseUrl.INT_EXP_ARRIVE, bean.prefix, bean.no, "出港运抵回执")
}
}
} }

View File

@@ -18,6 +18,7 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel import com.lukouguoji.module_base.model.ScanModel
import com.lukouguoji.module_base.util.DictUtils
import dev.utils.app.info.KeyValue import dev.utils.app.info.KeyValue
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@@ -75,6 +76,12 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
// ========== 组装人列表 ========== // ========== 组装人列表 ==========
val assemblerList = MutableLiveData<List<KeyValue>>(emptyList()) val assemblerList = MutableLiveData<List<KeyValue>>(emptyList())
// ========== BUP选项01默认否 ==========
val bupFlagList = listOf(KeyValue("", "0"), KeyValue("", "1"))
// ========== 板型选项(字典;支持下拉选择,也支持手动输入)==========
val boardTypeList = MutableLiveData<List<KeyValue>>(emptyList())
// ========== 标记位,避免重复查询 ========== // ========== 标记位,避免重复查询 ==========
private var lastQueriedUldNo = "" private var lastQueriedUldNo = ""
@@ -107,6 +114,12 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
*/ */
val isLoadEnabled = MutableLiveData(true) val isLoadEnabled = MutableLiveData(true)
/**
* 本页面是否已至少一次装货成功
* 首次装货成功前,运单列表件数/重量列显示总数;成功后显示“剩余/总数”
*/
val hasLoadedOnce = MutableLiveData(false)
/** /**
* 卸货按钮启用状态(编辑模式时启用) * 卸货按钮启用状态(编辑模式时启用)
*/ */
@@ -274,6 +287,27 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL) ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
} }
/**
* 待组装运单接口数据转右侧运单列表 Bean
* 同时带上已组装件数/重量与“剩余/总数”显示开关(首次装货成功后生效)
*/
private fun GjcWarehouse.toAssembleWaybillBean(): AssembleWaybillBean {
val warehouse = this
return AssembleWaybillBean().apply {
waybillNo = warehouse.wbNo
pieces = warehouse.pc.toString()
weight = String.format("%.1f", warehouse.weight)
flight = warehouse.flight
fno = warehouse.fno
fdate = warehouse.fdate
whId = warehouse.whId // 运单ID用于接口调用
isMarked = false
checkInPieces = warehouse.checkInPc
checkInWeight = warehouse.checkInWeight
showRemaining = hasLoadedOnce.value == true
}
}
/** /**
* 加载待组装运单列表 * 加载待组装运单列表
*/ */
@@ -285,18 +319,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
onSuccess = { result -> onSuccess = { result ->
// 数据转换: GjcWarehouse -> AssembleWaybillBean // 数据转换: GjcWarehouse -> AssembleWaybillBean
val warehouseList = result.data ?: mutableListOf() val warehouseList = result.data ?: mutableListOf()
val waybillBeanList = warehouseList.map { warehouse -> val waybillBeanList = warehouseList.map { it.toAssembleWaybillBean() }.toMutableList()
AssembleWaybillBean().apply {
waybillNo = warehouse.wbNo
pieces = warehouse.pc.toString()
weight = String.format("%.1f", warehouse.weight)
flight = warehouse.flight
fno = warehouse.fno
fdate = warehouse.fdate
whId = warehouse.whId // 添加运单ID
isMarked = false
}
}.toMutableList()
// 更新列表 // 更新列表
waybillList.value = waybillBeanList waybillList.value = waybillBeanList
@@ -335,18 +358,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
launchLoadingCollect({ NetApply.api.queryWaitingAssemble("") }) { launchLoadingCollect({ NetApply.api.queryWaitingAssemble("") }) {
onSuccess = { result -> onSuccess = { result ->
val warehouseList = result.data ?: mutableListOf() val warehouseList = result.data ?: mutableListOf()
val waybillBeanList = warehouseList.map { warehouse -> val waybillBeanList = warehouseList.map { it.toAssembleWaybillBean() }.toMutableList()
AssembleWaybillBean().apply {
waybillNo = warehouse.wbNo
pieces = warehouse.pc.toString()
weight = String.format("%.1f", warehouse.weight)
flight = warehouse.flight
fno = warehouse.fno
fdate = warehouse.fdate
whId = warehouse.whId // 添加运单ID
isMarked = false
}
}.toMutableList()
waybillList.value = waybillBeanList waybillList.value = waybillBeanList
@@ -399,6 +411,25 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
} }
/**
* 加载板型选项列表
* @param carrier 承运人二字码ULD 编号后两位进入页面时不传取全量ULD 信息查询成功后按承运人重新加载并覆盖数据源
*/
fun loadBoardTypeList(carrier: String? = null) {
DictUtils.getBoardTypeList(carrier) { boardTypeList.value = it }
}
/**
* 板型下拉选中回调:回填到板型输入框(回填后仍可手动修改)
* 下拉列表由 Activity 以锚定在输入框下方的 ListPopupWindow 弹出(外观与 BUP 的 Spinner 一致)
*/
fun onBoardTypeSelected(position: Int) {
val list = boardTypeList.value ?: emptyList()
uldInfo.value = uldInfo.value?.apply {
boardType = list.getOrNull(position)?.value ?: ""
}
}
/** /**
* ULD编号输入完成时调用 * ULD编号输入完成时调用
*/ */
@@ -433,8 +464,16 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
} }
// 保存useId用于装货/卸货接口) // 保存useId用于装货/卸货接口)
useId = uldBean.useId useId = uldBean.useId
// 回填 IMP代码 / 板型 / BUP服务端有值时覆盖修改模式回显为空时保留当前输入
if (!uldBean.dgrCode.isNullOrEmpty()) dgrCode = uldBean.dgrCode
if (!uldBean.boardType.isNullOrEmpty()) boardType = uldBean.boardType
if (!uldBean.bupFlag.isNullOrEmpty()) bupFlag = uldBean.bupFlag
} }
// 按 ULD 编号后两位(承运人二字码)重新加载板型选项,覆盖下拉数据源
val carrier = uldNo.trim().takeLast(2)
if (carrier.length == 2) loadBoardTypeList(carrier)
// 【新增】从ULD信息提取航班信息 // 【新增】从ULD信息提取航班信息
if (uldBean.fno.isNotEmpty() && uldBean.fdate.isNotEmpty()) { if (uldBean.fno.isNotEmpty() && uldBean.fdate.isNotEmpty()) {
assembleFlightNo.value = uldBean.fno assembleFlightNo.value = uldBean.fno
@@ -601,9 +640,17 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
val loadAreaId = selectedPosition.value?.positionCode?.trim() ?: "" val loadAreaId = selectedPosition.value?.positionCode?.trim() ?: ""
// IMP代码 / 板型 / BUP接口新增字段useInfo 与顶层参数均需携带)
val dgrCode = uldInfo.value?.dgrCode?.trim() ?: ""
val boardType = uldInfo.value?.boardType?.trim() ?: ""
val bupFlag = uldInfo.value?.bupFlag?.ifEmpty { "0" } ?: "0"
// 2. 构建useInfoULD信息 // 2. 构建useInfoULD信息
val useInfo = mapOf( val useInfo = mapOf(
"uld" to uldNo, "uld" to uldNo,
"dgrCode" to dgrCode.ifEmpty { null },
"boardType" to boardType.ifEmpty { null },
"bupFlag" to bupFlag,
"consumeWeight" to materialWeight.toDoubleOrNull(), "consumeWeight" to materialWeight.toDoubleOrNull(),
"status" to when (uldInfo.value?.uldStatus) { "status" to when (uldInfo.value?.uldStatus) {
"正常" -> "0" "正常" -> "0"
@@ -688,6 +735,9 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
"ldId" to operatorValue, "ldId" to operatorValue,
"loadArea" to loadArea, "loadArea" to loadArea,
"loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID "loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID
"dgrCode" to dgrCode.ifEmpty { null }, // IMP代码
"boardType" to boardType.ifEmpty { null }, // 板型
"bupFlag" to bupFlag, // BUP选项01
"useInfo" to useInfo, "useInfo" to useInfo,
"wbInfo" to wbInfo, "wbInfo" to wbInfo,
"userId" to SharedPreferenceUtil.getString(Constant.Share.account) "userId" to SharedPreferenceUtil.getString(Constant.Share.account)
@@ -724,6 +774,11 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
) { ) {
showToast("${operationName}成功") showToast("${operationName}成功")
// 首次装货成功后,运单列表件数/重量列切换为“剩余/总数”显示
if (isLoad) {
hasLoadedOnce.value = true
}
// 发送刷新事件,通知出港组装列表页面更新数据 // 发送刷新事件,通知出港组装列表页面更新数据
viewModelScope.launch { viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh") FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
@@ -780,18 +835,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
launchLoadingCollect({ NetApply.api.queryWaitingAssemble(wbNo) }) { launchLoadingCollect({ NetApply.api.queryWaitingAssemble(wbNo) }) {
onSuccess = { result -> onSuccess = { result ->
val warehouseList = result.data ?: mutableListOf() val warehouseList = result.data ?: mutableListOf()
val waybillBeanList = warehouseList.map { warehouse -> val waybillBeanList = warehouseList.map { it.toAssembleWaybillBean() }.toMutableList()
AssembleWaybillBean().apply {
waybillNo = warehouse.wbNo
pieces = warehouse.pc.toString()
weight = String.format("%.1f", warehouse.weight)
flight = warehouse.flight
fno = warehouse.fno
fdate = warehouse.fdate
whId = warehouse.whId
isMarked = false
}
}.toMutableList()
waybillList.value = waybillBeanList waybillList.value = waybillBeanList
} }

View File

@@ -15,6 +15,9 @@ import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.CustomsResponseUrl
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
import com.lukouguoji.module_base.ktx.showCustomsResponse
import com.lukouguoji.module_base.ktx.launchCollect import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.noNull import com.lukouguoji.module_base.ktx.noNull
@@ -310,4 +313,14 @@ class IntExpLoadViewModel : BasePageViewModel() {
} }
} }
} }
/**
* 列表项点击分发:侧滑「回执」按钮 → 查询海关回执并跳转只读详情页
*/
override fun onItemClick(position: Int, type: Int) {
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? GjcExportLoad ?: return
if (type == ITEM_CLICK_TYPE_CUSTOMS_RESPONSE) {
showCustomsResponse(CustomsResponseUrl.INT_EXP_LOAD, bean.prefix, bean.no, "出港装载回执")
}
}
} }

View File

@@ -0,0 +1,186 @@
package com.lukouguoji.gjc.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjc.R
import com.lukouguoji.module_base.base.BaseViewModel
import com.google.gson.Gson
import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.bean.GjcMove
import com.lukouguoji.module_base.bean.GjcMoveDetail
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.ImageSelectNewViewHolder
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
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.util.MediaUtil
import com.lukouguoji.module_base.util.UploadUtil
import kotlinx.coroutines.launch
/**
* 国际出港移库编辑/详情 ViewModel
* 详情:/IntExpMove/detail?maWbId= 返回 GjcMoveDetail
* 编辑:/IntExpMove/update 请求体为 GjcMoveDetail仅允许修改备注与交接图片
*/
class IntExpMoveEditViewModel : BaseViewModel(), IOnItemClickListener {
val pageType = MutableLiveData(DetailsPageType.Details)
private var maWbId: Long = 0L
// 列表页传入的运单数据,用于回填 detail 接口返回为空的展示字段(承运人、出运路径等)
private var listBean: GjcMove? = null
val dataBean = MutableLiveData(GjcMoveDetail())
// 备注单独用 LiveData 双向绑定,避免修改 data class 属性后需重新赋值
val remark = MutableLiveData("")
// 图片列表
val imageList = MutableLiveData<MutableList<FileBean>>(mutableListOf())
// 图片适配器配置
val imageItemLayoutId = R.layout.item_image_select_new
val imageItemViewHolder = ImageSelectNewViewHolder::class.java
// 详情模式下无图片时显示占位提示
val showNoImage = MutableLiveData(false)
// 图片 RecyclerView 引用(用于从 adapter 实时获取图片)
var rvImages: RecyclerView? = null
fun initOnCreated(intent: Intent) {
pageType.value = DetailsPageType.valueOf(
intent.getStringExtra(Constant.Key.PAGE_TYPE) ?: DetailsPageType.Details.name
)
maWbId = intent.getStringExtra(Constant.Key.ID)?.toLongOrNull() ?: 0L
listBean = intent.getStringExtra(Constant.Key.DATA)
?.takeIf { it.isNotEmpty() }
?.let { runCatching { Gson().fromJson(it, GjcMove::class.java) }.getOrNull() }
loadData()
}
private fun loadData() {
launchLoadingCollect({ NetApply.api.getIntExpMoveDetail(maWbId) }) {
onSuccess = {
val bean = it.data ?: GjcMoveDetail()
if (bean.maWbId == null) bean.maWbId = maWbId
fillFromListBean(bean)
dataBean.value = bean
remark.value = bean.remark ?: ""
// 解析图片pic 为缩略图、originalPic 为原图,二者按逗号分隔且一一对应
val picList = (bean.pic ?: "").split(",").filter { p -> p.isNotEmpty() }
val originalPicList = (bean.originalPic ?: "").split(",").filter { p -> p.isNotEmpty() }
val images = if (picList.isNotEmpty()) {
picList.mapIndexed { index, picUrl ->
val originalUrl = originalPicList.getOrElse(index) { picUrl }
FileBean(
path = MediaUtil.fillUrl(originalUrl),
url = picUrl,
originalPic = originalUrl
)
}.toMutableList()
} else {
originalPicList.map { url ->
FileBean(path = MediaUtil.fillUrl(url), url = url, originalPic = url)
}.toMutableList()
}
// 编辑模式添加空 FileBean 用于显示“添加照片”按钮
if (pageType.value == DetailsPageType.Modify) {
images.add(FileBean())
}
imageList.value = images
// 详情模式下无图片时显示占位提示
showNoImage.value = pageType.value == DetailsPageType.Details && images.isEmpty()
}
}
}
/**
* detail 接口的部分展示字段(承运人 by、出运路径 range 等)在测试环境返回 null
* 列表接口有值时用列表数据回填,仅影响展示
*/
private fun fillFromListBean(bean: GjcMoveDetail) {
val src = listBean ?: return
if (bean.wbNo.isNullOrEmpty()) bean.wbNo = src.wbNo.ifEmpty { src.prefix + src.no }
if (bean.by.isNullOrEmpty()) bean.by = src.by1
if (bean.range.isNullOrEmpty()) bean.range = src.range
if (bean.spCode.isNullOrEmpty()) bean.spCode = src.spCode
if (bean.agentCode.isNullOrEmpty()) bean.agentCode = src.agentCode
if (bean.awbTypeName.isNullOrEmpty()) bean.awbTypeName = src.awbTypeName
if (bean.goods.isNullOrEmpty()) bean.goods = src.goodsCn.ifEmpty { src.goods }
}
/**
* 提交保存:按接口文档回传完整详情对象,仅备注与交接图片三字段取页面上的新值
*/
fun submit() {
// 从 adapter 实时获取所有非空图片ViewHolder 新增图片直接操作 adapter items
val allItems = (rvImages?.commonAdapter()?.items as? List<*>)
?.filterIsInstance<FileBean>() ?: imageList.value!!
val images = allItems.filter { it.path.isNotEmpty() }
if (images.size > 7) {
showToast("最多上传7张图片")
return
}
launchLoadingCollect({
// 上传本地新图片;已上传的图片保持原有 url 与 originalPic
images.forEach { fileBean ->
if (fileBean.url.isEmpty()) {
// UploadUtil 返回newName=原图(较大)zipFileName=缩略图(较小)
// FileBean.url 用作缩略图标识FileBean.originalPic 用作原图标识
val data = UploadUtil.upload(fileBean.path).data
fileBean.url = data?.zipFileName ?: ""
fileBean.originalPic = data?.newName ?: ""
}
}
val bean = (dataBean.value ?: GjcMoveDetail()).copy(
maWbId = maWbId,
remark = remark.value ?: "",
picNumber = images.size.toString(),
pic = images.joinToString(",") { MediaUtil.removeUrl(it.url) },
originalPic = images.joinToString(",") { MediaUtil.removeUrl(it.originalPic) }
)
NetApply.api.updateIntExpMove(bean.toRequestBody())
}) {
onSuccess = {
showToast("保存成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
getTopActivity().finish()
}
}
}
fun cancel() {
getTopActivity().finish()
}
/**
* 处理图片删除点击事件
*/
override fun onItemClick(position: Int, type: Int) {
if (type == R.id.iv_delete) {
val adapter = rvImages?.commonAdapter() ?: return
if (position < adapter.items.size) {
adapter.removeItem(position)
}
}
}
}

View File

@@ -106,6 +106,36 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
} }
} }
/**
* 允许装机(多选,批量操作)
*/
fun allowLoadClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcUldUseBean> ?: return
val selectedItems = list.filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要允许装机的ULD")
return
}
if (selectedItems.all { it.isAllowLoad }) {
showToast("所选ULD均已允许装机")
return
}
val requestData = selectedItems.toRequestBody()
launchLoadingCollect({ NetApply.api.allowLoading(requestData) }) {
onSuccess = {
showToast("允许装机成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
}
}
/** /**
* 待配运按钮点击 * 待配运按钮点击
*/ */

View File

@@ -140,9 +140,10 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
/** /**
* 执行清仓操作 * 执行清仓操作
* @param clearNormal 清仓正常("0"或"1" * @param clearNormal 清仓正常("0"或"1"
* @param clearRemark 清仓备注(选填)
* @param maWbListForClear 包含选中子列表项的主列表数据 * @param maWbListForClear 包含选中子列表项的主列表数据
*/ */
fun performClear(clearNormal: String, maWbListForClear: List<GjcMaWb>) { fun performClear(clearNormal: String, clearRemark: String, maWbListForClear: List<GjcMaWb>) {
if (maWbListForClear.isEmpty()) { if (maWbListForClear.isEmpty()) {
showToast("请至少选择一个库位") showToast("请至少选择一个库位")
return return
@@ -151,6 +152,7 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
// 构建请求参数:完整的主子列表结构 // 构建请求参数:完整的主子列表结构
val params = mapOf( val params = mapOf(
"clearNormal" to clearNormal, "clearNormal" to clearNormal,
"clearRemark" to clearRemark.ifEmpty { null },
"maWbList" to maWbListForClear "maWbList" to maWbListForClear
).toRequestBody() ).toRequestBody()

View File

@@ -16,6 +16,9 @@ import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.CustomsResponseUrl
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
import com.lukouguoji.module_base.ktx.showCustomsResponse
import com.lukouguoji.module_base.ktx.launchCollect import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
@@ -42,7 +45,8 @@ class IntExpTallyViewModel : BasePageViewModel() {
val totalWeight = MutableLiveData("0") // 总重量 val totalWeight = MutableLiveData("0") // 总重量
// ========== 全选状态 ========== // ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false) val isAllChecked = MutableLiveData(false) // 主单全选状态
val isAllHaWbChecked = MutableLiveData(false) // 分单全选状态(仅统计允许全选的主单下的分单)
fun onItemCheckChanged() { fun onItemCheckChanged() {
updateCheckAllStatus() updateCheckAllStatus()
@@ -51,6 +55,10 @@ class IntExpTallyViewModel : BasePageViewModel() {
fun updateCheckAllStatus() { fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() } isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
// 分单全选状态:只看允许全选的主单下的分单
val eligibleHaWbList = list.filter { it.canCheckAllHaWb }.flatMap { it.haWbList ?: emptyList() }
isAllHaWbChecked.value = eligibleHaWbList.isNotEmpty() && eligibleHaWbList.all { it.checked.get() }
} }
// ========== 全局展开状态 ========== // ========== 全局展开状态 ==========
@@ -86,6 +94,43 @@ class IntExpTallyViewModel : BasePageViewModel() {
pageModel.rv?.commonAdapter()?.notifyDataSetChanged() pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
} }
/**
* 分单全选按钮点击 (只切换分单的选中状态,主单选择独立)
* 规则:主单存在分批申报(接口 allTally=0不允许选中该主单下的分单
* 只有主单全部申报完毕allTally=1才允许全选其分单。
*/
fun checkAllHaWbClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
val shouldCheckAll = !isAllHaWbChecked.value!!
var eligibleCount = 0 // 允许全选的分单数
var skippedMaWbCount = 0 // 因未全部申报而跳过的主单数
list.forEach { maWb ->
val haWbList = maWb.haWbList
if (haWbList.isNullOrEmpty()) return@forEach
if (maWb.canCheckAllHaWb) {
eligibleCount += haWbList.size
haWbList.forEach { it.checked.set(shouldCheckAll) }
} else if (shouldCheckAll) {
// 主单未全部申报完毕,跳过其分单(保持原有选中状态不变)
skippedMaWbCount++
}
}
isAllHaWbChecked.value = shouldCheckAll && eligibleCount > 0
if (shouldCheckAll) {
if (eligibleCount == 0) {
showToast("暂无可全选的分单,主单需全部申报完毕后才可全选其分单")
} else if (skippedMaWbCount > 0) {
showToast("${skippedMaWbCount}票主单未全部申报完毕,其分单未选中")
}
}
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
/** /**
* 切换全局展开/收起状态 * 切换全局展开/收起状态
*/ */
@@ -344,4 +389,14 @@ class IntExpTallyViewModel : BasePageViewModel() {
} }
} }
} }
/**
* 列表项点击分发:侧滑「回执」按钮 → 查询海关回执并跳转只读详情页
*/
override fun onItemClick(position: Int, type: Int) {
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? GjcMaWb ?: return
if (type == ITEM_CLICK_TYPE_CUSTOMS_RESPONSE) {
showCustomsResponse(CustomsResponseUrl.INT_EXP_TALLY, bean.prefix, bean.no, "出港理货回执")
}
}
} }

View File

@@ -139,6 +139,29 @@
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<!-- 耗材重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="耗材重量:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.consumeWeight}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -259,7 +259,7 @@
</LinearLayout> </LinearLayout>
<!-- 第5行架子车自重、ULD自重、货重(绿色只读) --> <!-- 第5行架子车自重、ULD自重、耗材重量(只读) -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -289,10 +289,10 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}" enable="@{false}"
title='@{"货重"}' title='@{"耗材重量"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.cargoWeight}' value='@{viewModel.consumeWeight}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
@@ -300,7 +300,7 @@
</LinearLayout> </LinearLayout>
<!-- 第6行航班日期、航班号、目的港 --> <!-- 第6行航班日期、航班号、货重(绿色只读) -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -331,11 +331,11 @@
android:layout_weight="1" /> android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入目的港"}' enable="@{false}"
title='@{"目的港"}' title='@{"货重"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.fdest}' value='@{viewModel.cargoWeight}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
@@ -343,7 +343,32 @@
</LinearLayout> </LinearLayout>
<!-- 第7行备注 --> <!-- 第7行目的港(占 1/3 宽度) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入目的港"}'
title='@{"目的港"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.fdest}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 占位:保持目的港与上方各行第一列同宽 -->
<Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="2" />
</LinearLayout>
<!-- 第8行备注整行 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -42,6 +42,16 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<!-- 日期类型(入库/离港) -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
hint='@{"请选择日期类型"}'
list="@{viewModel.dateStateList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.dateState}" />
<!-- 航班日期起 --> <!-- 航班日期起 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp" android:layout_width="0dp"
@@ -72,15 +82,15 @@
type="@{SearchLayoutType.SPINNER}" type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentId}" /> value="@={viewModel.agentId}" />
<!-- 出库状态 --> <!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/flight_no_search"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
hint='@{"请选择出库状态"}' hint='@{"请输入航班号"}'
list="@{viewModel.outStatusList}" type="@{SearchLayoutType.INPUT}"
type="@{SearchLayoutType.SPINNER}" value="@={viewModel.flightNo}" />
value="@={viewModel.outStatus}" />
<!-- 运单号 --> <!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
@@ -204,6 +214,16 @@
android:textStyle="bold" android:textStyle="bold"
tools:text="总重量100" /> tools:text="总重量100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`航班航次:` + viewModel.totalFlightNumber}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="航班航次2" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -313,7 +313,45 @@
</LinearLayout> </LinearLayout>
<!-- 第6行运抵件数、运抵重量、运抵体积 --> <!-- 第6行托盘数量、托盘自重(用于自动计算运抵重量) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘数量"}'
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER}"
title='@{"托盘数量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.trayNumber}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘自重"}'
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title='@{"托盘自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.trayWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<View
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第7行运抵件数、运抵重量、运抵体积 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -356,7 +394,7 @@
</LinearLayout> </LinearLayout>
<!--7行:托盘车号、托盘车自重、业务类型 --> <!--8行:平板车、平板车自重、业务类型 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -364,9 +402,9 @@
android:orientation="horizontal"> android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘车号"}' hint='@{"请输入平板车号"}'
setRefreshCallBack="@{viewModel::onCarIdInputComplete}" setRefreshCallBack="@{viewModel::onCarIdInputComplete}"
title='@{"托盘车号"}' title='@{"平 板 车"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.carId}' value='@={viewModel.maWbBean.carId}'
@@ -376,7 +414,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}" enable="@{false}"
title='@{"托盘车自重"}' title='@{"平板车自重"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.carWeight}' value='@{viewModel.carWeight}'
@@ -399,7 +437,7 @@
</LinearLayout> </LinearLayout>
<!--8行:备注 --> <!--9行:备注 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入备注"}' hint='@{"请输入备注"}'
inputHeight="@{80}" inputHeight="@{80}"

View File

@@ -79,6 +79,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
<!-- 运抵状态 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择运抵状态"}'
list="@{viewModel.arrivalStatusList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.arrivalStatus}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 --> <!-- 搜索按钮 -->
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
@@ -151,7 +161,7 @@
<ImageView <ImageView
android:id="@+id/checkIcon" android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}" setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp" android:layout_width="24dp"
android:layout_height="24dp" android:layout_height="24dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"

View File

@@ -190,7 +190,7 @@
android:layout_width="120dp" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="件数" android:text='@{viewModel.hasLoadedOnce ? "剩余件数/总件数" : "件数"}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="13sp" /> android:textSize="13sp" />
@@ -199,7 +199,7 @@
android:layout_width="120dp" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="重量" android:text='@{viewModel.hasLoadedOnce ? "剩余重量/总重量" : "重量"}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="13sp" /> android:textSize="13sp" />
@@ -293,6 +293,54 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
<!-- 第二行IMP代码、板型下拉选择 + 手动输入、BUP -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/impCodeInput"
enable="@{true}"
hint='@{"请输入IMP代码"}'
required="@{false}"
title='@{"IMP代码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.dgrCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/boardTypeInput"
enable="@{true}"
hint='@{"请输入或选择"}'
required="@{false}"
setTextAllCaps="@{true}"
title='@{"板型:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.boardType}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/bupFlagInput"
enable="@{true}"
list="@{viewModel.bupFlagList}"
required="@{false}"
title='@{"BUP"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value="@={viewModel.uldInfo.bupFlag}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<!-- 运单信息卡片 --> <!-- 运单信息卡片 -->

View File

@@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
<import type="android.view.View" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpMoveEditViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="15dp">
<!-- 第一行:运单号、件数、重量(均只读) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.wbNo}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.pc == null ? "" : String.valueOf(viewModel.dataBean.pc)}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.weight == null ? "" : String.valueOf(viewModel.dataBean.weight)}' />
</LinearLayout>
<!-- 第二行:特码、代理人、品名(均只读) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"特码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"代理人"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.agentCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"品名"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.goods}' />
</LinearLayout>
<!-- 第三行:出运路径、运单类型、承运人(均只读,字段名以 /IntExpMove/detail 文档为准) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"出运路径"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.range}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.awbTypeName}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"承运人"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.by}' />
</LinearLayout>
<!-- 第四行:移交状态(只读)、备注(编辑模式可编辑) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"移交状态"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.moveStateText}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入备注"}'
title='@{"备注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.remark}' />
</LinearLayout>
<!-- 交接图片区域label 在左,图片在右 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="交接图片"
android:textColor="@color/text_gray"
completeSpace="@{5}" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_images"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:overScrollMode="never"
itemLayoutId="@{viewModel.imageItemLayoutId}"
viewHolder="@{viewModel.imageItemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="9" />
</LinearLayout>
<!-- 详情模式下无图片时的占位提示 -->
<TextView
android:id="@+id/tv_no_image"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="暂无图片"
android:textColor="@color/text_gray"
android:textSize="14sp"
android:visibility="@{viewModel.showNoImage ? View.VISIBLE : View.GONE}" />
</LinearLayout>
<!-- 底部按钮(详情模式不显示) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginBottom="15dp"
android:gravity="center"
android:orientation="horizontal"
android:visibility="@{viewModel.pageType != DetailsPageType.Details ? View.VISIBLE : View.GONE}">
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.cancel()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.submit()}"
android:text="保存" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -173,6 +173,12 @@
</LinearLayout> </LinearLayout>
<!-- 允许装机按钮(多选) -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.allowLoadClick()}"
android:text="允许装机" />
<!-- 待配运按钮 --> <!-- 待配运按钮 -->
<TextView <TextView
style="@style/tv_bottom_btn" style="@style/tv_bottom_btn"

View File

@@ -167,6 +167,32 @@
</LinearLayout> </LinearLayout>
<!-- 分单全选按钮(仅选中已全部申报完毕的主单下的分单) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="5dp"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.checkAllHaWbClick()}"
android:orientation="horizontal">
<ImageView
setIVCheckAllImage="@{viewModel.isAllHaWbChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="分单全选"
android:textColor="@color/color_66"
android:textSize="18sp" />
</LinearLayout>
<!-- 统计信息 --> <!-- 统计信息 -->
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View File

@@ -61,6 +61,32 @@
</LinearLayout> </LinearLayout>
<!-- 备注 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="备注:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请输入备注"}'
type="@{SearchLayoutType.INPUT}"
value="@={model.clearRemark}" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<!-- 底部按钮 --> <!-- 底部按钮 -->

View File

@@ -43,8 +43,8 @@
android:minWidth="20dp" android:minWidth="20dp"
android:paddingHorizontal="4dp" android:paddingHorizontal="4dp"
android:text="@{String.valueOf(bean.uldIndex)}" android:text="@{String.valueOf(bean.uldIndex)}"
android:textColor="@color/c333333" android:textColor="@color/text_normal"
android:textSize="13sp" android:textSize="14sp"
android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}" android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}"
tools:text="1" /> tools:text="1" />
@@ -96,7 +96,7 @@
android:layout_weight="1" android:layout_weight="1"
android:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/text_gray" android:textColor="@color/text_gray"
android:textSize="13sp" /> android:textSize="14sp" />
<!-- 件数/重量 --> <!-- 件数/重量 -->
<TextView <TextView
@@ -105,8 +105,8 @@
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginEnd="28dp" android:layout_marginEnd="28dp"
android:text='@{String.valueOf(bean.waybillPieces) + "/" + String.format("%.1f", bean.waybillWeight) + "kg"}' android:text='@{String.valueOf(bean.waybillPieces) + "/" + String.format("%.1f", bean.waybillWeight) + "kg"}'
android:textColor="#e89e42" android:textColor="@color/text_orange"
android:textSize="13sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -55,7 +55,7 @@
android:layout_width="120dp" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="@{bean.pieces}" android:text="@{bean.piecesDisplay}"
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}" android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -64,7 +64,7 @@
android:layout_width="120dp" android:layout_width="120dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:text="@{bean.weight}" android:text="@{bean.weightDisplay}"
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}" android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
android:textSize="14sp" /> android:textSize="14sp" />

View File

@@ -14,9 +14,9 @@
android:id="@+id/ll" android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp" android:layout_marginTop="10dp"
android:background="@drawable/bg_item" android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingVertical="20dp" android:paddingVertical="20dp"
android:paddingHorizontal="10dp"> android:paddingHorizontal="10dp">
@@ -27,13 +27,14 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginLeft="10dp" android:layout_marginLeft="15dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- 第一行数据:航班日期 | 航班号 | 航程 | 组装人 | 分配人 --> <!-- 第一行数据:航班日期 | 航班号 | 航程 | 组装人 | 分配人 -->
@@ -53,14 +54,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班日期:" /> android:text="航班日期:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.fdate}" android:text="@{bean.fdate}"
tools:text="2025-09-05" /> tools:text="2025-09-05"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -76,7 +79,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="航班号:" /> android:text="航班号:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -84,7 +88,8 @@
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.fno}' android:text='@{bean.fno}'
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="MU2023" /> tools:text="MU2023"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -100,14 +105,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{3}" completeSpace="@{3}"
android:text="航程:" /> android:text="航程:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.range ?? (bean.fdep + "-" + bean.fdest)}' android:text='@{bean.range ?? (bean.fdep + "-" + bean.fdest)}'
tools:text="HFE - LAX" /> tools:text="HFE - LAX"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -123,14 +130,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="组装人:" /> android:text="组装人:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.abName ?? ``}" android:text="@{bean.abName ?? ``}"
tools:text="徵远" /> tools:text="徵远"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -146,14 +155,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="分配人:" /> android:text="分配人:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.acName ?? ``}' android:text='@{bean.acName ?? ``}'
tools:text="张三" /> tools:text="张三"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -171,14 +182,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="分配时间:" /> android:text="分配时间:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.acDate ?? ``}" android:text="@{bean.acDate ?? ``}"
tools:text="2024-01-15 14:27:12" /> tools:text="2024-01-15 14:27:12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -12,8 +12,8 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp" android:layout_marginTop="10dp"
android:orientation="vertical"> android:orientation="vertical">
<com.mcxtzhang.swipemenulib.SwipeMenuLayout <com.mcxtzhang.swipemenulib.SwipeMenuLayout
@@ -25,7 +25,7 @@
android:id="@+id/ll" android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_item" android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingVertical="20dp" android:paddingVertical="20dp"
android:paddingHorizontal="10dp"> android:paddingHorizontal="10dp">
@@ -35,12 +35,13 @@
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="15dp"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
@@ -61,7 +62,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="ULD编号" /> android:text="ULD编号"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -69,7 +71,8 @@
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.uld}" android:text="@{bean.uld}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="PMC12345MU" /> tools:text="PMC12345MU"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -85,14 +88,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="架子车号:" /> android:text="架子车号:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.carId}' android:text='@{bean.carId}'
tools:text="527" /> tools:text="527"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -108,14 +113,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="总重:" /> android:text="总重:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{String.valueOf(bean.totalWeight)}" android:text="@{String.valueOf(bean.totalWeight)}"
tools:text="200" /> tools:text="200"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -131,14 +138,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="装机重量:" /> android:text="装机重量:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{String.valueOf(bean.netWeight)}' android:text='@{String.valueOf(bean.netWeight)}'
tools:text="150" /> tools:text="150"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -154,14 +163,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="货重:" /> android:text="货重:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{String.valueOf(bean.cargoWeight)}' android:text='@{String.valueOf(bean.cargoWeight)}'
tools:text="150" /> tools:text="150"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -185,14 +196,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="航班日期:" /> android:text="航班日期:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.fdate != null &amp;&amp; bean.fdate.length() >= 10 ? bean.fdate.substring(0, 10) : (bean.fdate ?? ``)}' android:text='@{bean.fdate != null &amp;&amp; bean.fdate.length() >= 10 ? bean.fdate.substring(0, 10) : (bean.fdate ?? ``)}'
tools:text="2025-09-05" /> tools:text="2025-09-05"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -208,14 +221,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="航班号:" /> android:text="航班号:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.fno}' android:text='@{bean.fno}'
tools:text="MU2023" /> tools:text="MU2023"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -231,14 +246,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="目的港:" /> android:text="目的港:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.fdest}" android:text="@{bean.fdest}"
tools:text="PEK" /> tools:text="PEK"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -254,14 +271,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="过磅人:" /> android:text="过磅人:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.wtUsername}' android:text='@{bean.wtUsername}'
tools:text="张三" /> tools:text="张三"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -277,14 +296,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="过磅时间:" /> android:text="过磅时间:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.wtDate}' android:text='@{bean.wtDate}'
tools:text="2024-01-15 14:27:12" /> tools:text="2024-01-15 14:27:12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -67,17 +67,19 @@
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value="@={record.weightStr}" /> value="@={record.weightStr}" />
<!-- 托盘自重字段(只读 --> <!-- 托盘自重字段(取托盘重量 trayTotalWeight可编辑 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_weight="1" android:layout_weight="1"
enable="@{false}" enable="@{isEditMode}"
hint="@{`托盘自重`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title="@{`托盘自重`}" title="@{`托盘自重`}"
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value="@{record.carWeight}" /> value="@={record.trayTotalWeightStr}" />
<!-- 计重时间字段(只读) --> <!-- 计重时间字段(只读) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew

View File

@@ -16,9 +16,9 @@
android:id="@+id/ll" android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp" android:layout_marginTop="10dp"
android:background="@drawable/bg_item" android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingVertical="20dp" android:paddingVertical="20dp"
android:paddingHorizontal="10dp"> android:paddingHorizontal="10dp">
@@ -29,13 +29,14 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}" loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginLeft="10dp" android:layout_marginLeft="15dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- 第一行数据 --> <!-- 第一行数据 -->
@@ -55,7 +56,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="运单号:" /> android:text="运单号:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -63,7 +65,8 @@
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="78109081212" /> tools:text="78109081212"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -79,14 +82,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="代理人:" /> android:text="代理人:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.agentCode}' android:text='@{bean.agentCode}'
tools:text="SF" /> tools:text="SF"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -102,14 +107,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="特码:" /> android:text="特码:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.spCode}" android:text="@{bean.spCode}"
tools:text="NOR" /> tools:text="NOR"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -125,14 +132,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="预配件数:" /> android:text="预配件数:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{String.valueOf(bean.pc)}' android:text='@{String.valueOf(bean.pc)}'
tools:text="11" /> tools:text="11"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -148,14 +157,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="预配重量:" /> android:text="预配重量:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{String.valueOf(bean.weight)}' android:text='@{String.valueOf(bean.weight)}'
tools:text="12" /> tools:text="12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -179,14 +190,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="计划航班:" /> android:text="计划航班:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.flight}" android:text="@{bean.flight}"
tools:text="20240216/MU2026" /> tools:text="20240216/MU2026"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -202,14 +215,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="航程:" /> android:text="航程:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.range}' android:text='@{bean.range}'
tools:text="HFE - PEK" /> tools:text="HFE - PEK"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -225,14 +240,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="预计起飞:" /> android:text="预计起飞:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.scheduledTackOffHM}" android:text="@{bean.scheduledTackOffHM}"
tools:text="09:12" /> tools:text="09:12"
android:textColor="@color/text_normal" />
<TextView <TextView
android:id="@+id/tvDayPlus" android:id="@+id/tvDayPlus"
@@ -241,7 +258,8 @@
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:text="+1" android:text="+1"
android:textColor="@color/text_red" android:textColor="@color/text_red"
android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}" /> android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -257,14 +275,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="业务类型:" /> android:text="业务类型:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.businessName}' android:text='@{bean.businessName}'
tools:text="普通货物运输" /> tools:text="普通货物运输"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -280,7 +300,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="审核状态:" /> android:text="审核状态:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:id="@+id/tv_status" android:id="@+id/tv_status"
@@ -288,7 +309,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="已通过" /> tools:text="已通过"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/apk/res/android"> xmlns:tools="http://schemas.android.com/tools">
<data> <data>
<variable <variable
@@ -21,9 +21,9 @@
android:id="@+id/ll" android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp" android:layout_marginTop="10dp"
android:background="@drawable/bg_item" android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingVertical="20dp" android:paddingVertical="20dp"
android:paddingHorizontal="10dp"> android:paddingHorizontal="10dp">
@@ -32,13 +32,14 @@
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginLeft="10dp" android:layout_marginLeft="15dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- 第一行数据:运单号、件数、重量、代理人、入库时间 --> <!-- 第一行数据:运单号、件数、重量、代理人、入库时间 -->
@@ -58,7 +59,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="运单号:" android:text="运单号:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -66,7 +68,8 @@
android:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="15sp" android:textSize="15sp"
tools:text="78109081212" /> tools:text="78109081212"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -82,14 +85,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="件数:" android:text="件数:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.pc)}' android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp" android:textSize="15sp"
tools:text="10" /> tools:text="10"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -105,14 +110,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{3}" completeSpace="@{3}"
android:text="重量:" android:text="重量:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.weight)}' android:text='@{String.valueOf(bean.weight)}'
android:textSize="15sp" android:textSize="15sp"
tools:text="200" /> tools:text="200"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -128,14 +135,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="代理人:" android:text="代理人:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.agentName ?? bean.agentCode}' android:text='@{bean.agentName ?? bean.agentCode}'
android:textSize="15sp" android:textSize="15sp"
tools:text="SF" /> tools:text="SF"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -151,14 +160,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="入库时间:" android:text="入库时间:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.opDate ?? ""}' android:text='@{bean.opDate ?? ""}'
android:textSize="15sp" android:textSize="15sp"
tools:text="2024-05-13 17:10:22" /> tools:text="2024-05-13 17:10:22"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -182,14 +193,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="航班:" android:text="航班:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.flight}" android:text="@{bean.flight}"
android:textSize="15sp" android:textSize="15sp"
tools:text="20240513/MU2026" /> tools:text="20240513/MU2026"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -205,14 +218,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="目的港:" android:text="目的港:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.dest}" android:text="@{bean.dest}"
android:textSize="15sp" android:textSize="15sp"
tools:text="PEK" /> tools:text="PEK"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -228,14 +243,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{3}" completeSpace="@{3}"
android:text="特码:" android:text="特码:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.spCode}" android:text="@{bean.spCode}"
android:textSize="15sp" android:textSize="15sp"
tools:text="NOR" /> tools:text="NOR"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -251,14 +268,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="运单类型:" android:text="运单类型:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.awbName ?? bean.awbType}' android:text='@{bean.awbName ?? bean.awbType}'
android:textSize="15sp" android:textSize="15sp"
tools:text="国际出港(直航)" /> tools:text="国际出港(直航)"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -274,14 +293,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="离港时间:" android:text="离港时间:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.fclose ?? ""}' android:text='@{bean.fclose ?? ""}'
android:textSize="15sp" android:textSize="15sp"
tools:text="2024-05-13 17:10:22" /> tools:text="2024-05-13 17:10:22"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -34,7 +34,7 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:gravity="center" android:gravity="center"
android:text="@{String.valueOf(position + 1)}" android:text="@{String.valueOf(position + 1)}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 库位号 --> <!-- 库位号 -->
@@ -44,7 +44,7 @@
android:layout_weight="1.5" android:layout_weight="1.5"
android:gravity="center" android:gravity="center"
android:text="@{bean.location ?? `--`}" android:text="@{bean.location ?? `--`}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 入库人 --> <!-- 入库人 -->
@@ -54,7 +54,7 @@
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="@{bean.inOpId ?? `--`}" android:text="@{bean.inOpId ?? `--`}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 入库时间 --> <!-- 入库时间 -->
@@ -64,7 +64,7 @@
android:layout_weight="1.5" android:layout_weight="1.5"
android:gravity="center" android:gravity="center"
android:text="@{bean.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() >= 16 ? String.valueOf(bean.inDate).substring(0, 16) : (bean.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() > 0 ? String.valueOf(bean.inDate) : `--`)}" android:text="@{bean.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() >= 16 ? String.valueOf(bean.inDate).substring(0, 16) : (bean.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() > 0 ? String.valueOf(bean.inDate) : `--`)}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 出库人 --> <!-- 出库人 -->
@@ -74,7 +74,7 @@
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="@{bean.outOpId ?? `--`}" android:text="@{bean.outOpId ?? `--`}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 出库时间 --> <!-- 出库时间 -->
@@ -84,7 +84,7 @@
android:layout_weight="1.5" android:layout_weight="1.5"
android:gravity="center" android:gravity="center"
android:text="@{bean.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() >= 16 ? String.valueOf(bean.outDate).substring(0, 16) : (bean.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() > 0 ? String.valueOf(bean.outDate) : `--`)}" android:text="@{bean.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() >= 16 ? String.valueOf(bean.outDate).substring(0, 16) : (bean.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() > 0 ? String.valueOf(bean.outDate) : `--`)}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@@ -93,7 +93,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/line" /> android:background="@color/sub_list_divider" />
</LinearLayout> </LinearLayout>
</layout> </layout>

View File

@@ -34,7 +34,7 @@
android:layout_weight="0.5" android:layout_weight="0.5"
android:gravity="center" android:gravity="center"
android:text="@{String.valueOf(position + 1)}" android:text="@{String.valueOf(position + 1)}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 集装器 --> <!-- 集装器 -->
@@ -44,7 +44,7 @@
android:layout_weight="1.2" android:layout_weight="1.2"
android:gravity="center" android:gravity="center"
android:text="@{bean.location}" android:text="@{bean.location}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 件数 --> <!-- 件数 -->
@@ -54,7 +54,7 @@
android:layout_weight="0.8" android:layout_weight="0.8"
android:gravity="center" android:gravity="center"
android:text="@{String.valueOf(bean.pc)}" android:text="@{String.valueOf(bean.pc)}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 重量 --> <!-- 重量 -->
@@ -64,7 +64,7 @@
android:layout_weight="0.8" android:layout_weight="0.8"
android:gravity="center" android:gravity="center"
android:text="@{String.valueOf(bean.weight)}" android:text="@{String.valueOf(bean.weight)}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 航班日期 --> <!-- 航班日期 -->
@@ -74,7 +74,7 @@
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="@{bean.fdate}" android:text="@{bean.fdate}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 航班号 --> <!-- 航班号 -->
@@ -84,7 +84,7 @@
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="@{bean.fno}" android:text="@{bean.fno}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 航程 --> <!-- 航程 -->
@@ -94,7 +94,7 @@
android:layout_weight="0.8" android:layout_weight="0.8"
android:gravity="center" android:gravity="center"
android:text="@{bean.range}" android:text="@{bean.range}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
<!-- 分批 --> <!-- 分批 -->
@@ -104,7 +104,7 @@
android:layout_weight="0.8" android:layout_weight="0.8"
android:gravity="center" android:gravity="center"
android:text="@{`1`}" android:text="@{`1`}"
android:textColor="@android:color/black" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@@ -113,7 +113,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1px" android:layout_height="1px"
android:background="@color/line" /> android:background="@color/sub_list_divider" />
</LinearLayout> </LinearLayout>
</layout> </layout>

View File

@@ -19,9 +19,9 @@
android:id="@+id/ll" android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp" android:layout_marginTop="10dp"
android:background="@{bean.checkIn.equals(`2`) ? @drawable/bg_item_green : @drawable/bg_item}" android:background="@{bean.checkIn.equals(`2`) ? @drawable/bg_item_green : @drawable/bg_white_radius_8}"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingVertical="20dp" android:paddingVertical="20dp"
android:paddingHorizontal="10dp"> android:paddingHorizontal="10dp">
@@ -32,12 +32,13 @@
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="15dp"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
@@ -58,7 +59,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="运单号:" /> android:text="运单号:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -66,7 +68,8 @@
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="78109081212" /> tools:text="78109081212"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -82,7 +85,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="代理人:" /> android:text="代理人:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -92,7 +96,8 @@
android:lines="1" android:lines="1"
android:ellipsize="end" android:ellipsize="end"
android:text='@{bean.agentName}' android:text='@{bean.agentName}'
tools:text="SF" /> tools:text="SF"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -108,14 +113,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="特码:" /> android:text="特码:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.spCode}" android:text="@{bean.spCode}"
tools:text="NOR" /> tools:text="NOR"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -131,14 +138,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="预配件数:" /> android:text="预配件数:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{String.valueOf(bean.pc)}' android:text='@{String.valueOf(bean.pc)}'
tools:text="11" /> tools:text="11"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -154,14 +163,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="预配重量:" /> android:text="预配重量:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{String.valueOf(bean.weight)}' android:text='@{String.valueOf(bean.weight)}'
tools:text="12" /> tools:text="12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -185,14 +196,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="计划航班:" /> android:text="计划航班:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.flight}" android:text="@{bean.flight}"
tools:text="20240216/MU2026" /> tools:text="20240216/MU2026"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -208,14 +221,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="航程:" /> android:text="航程:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.range}' android:text='@{bean.range}'
tools:text="HFE - PEK" /> tools:text="HFE - PEK"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -231,14 +246,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="预计起飞:" /> android:text="预计起飞:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.scheduledTackOffHM}" android:text="@{bean.scheduledTackOffHM}"
tools:text="09:12" /> tools:text="09:12"
android:textColor="@color/text_normal" />
<TextView <TextView
android:id="@+id/tvDayPlus" android:id="@+id/tvDayPlus"
@@ -247,7 +264,8 @@
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:text="+1" android:text="+1"
android:textColor="@color/text_red" android:textColor="@color/text_red"
android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}" /> android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -263,14 +281,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="业务类型:" /> android:text="业务类型:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text='@{bean.businessName}' android:text='@{bean.businessName}'
tools:text="普通货物运输" /> tools:text="普通货物运输"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -286,7 +306,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="品名(中)" /> android:text="品名(中)"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -296,7 +317,8 @@
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:text='@{bean.goodsCn}' android:text='@{bean.goodsCn}'
tools:text="电子元器件" /> tools:text="电子元器件"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -13,9 +13,9 @@
android:id="@+id/ll" android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp" android:layout_marginHorizontal="10dp"
android:layout_marginVertical="5dp" android:layout_marginTop="10dp"
android:background="@drawable/bg_item" android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingVertical="20dp" android:paddingVertical="20dp"
android:paddingHorizontal="10dp"> android:paddingHorizontal="10dp">
@@ -26,12 +26,13 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginLeft="15dp"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
@@ -52,7 +53,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="运单号:" android:text="运单号:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -60,7 +62,8 @@
android:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="15sp" android:textSize="15sp"
tools:text="78109081212" /> tools:text="78109081212"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -76,14 +79,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="预配件数:" android:text="预配件数:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.pc)}' android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp" android:textSize="15sp"
tools:text="10" /> tools:text="10"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -99,14 +104,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="预配重量:" android:text="预配重量:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{String.valueOf((int)bean.weight)}' android:text='@{String.valueOf((int)bean.weight)}'
android:textSize="15sp" android:textSize="15sp"
tools:text="100" /> tools:text="100"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -122,14 +129,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="入库件数:" android:text="入库件数:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInPc)}' android:text='@{String.valueOf(bean.checkInPc)}'
android:textSize="15sp" android:textSize="15sp"
tools:text="11" /> tools:text="11"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -145,14 +154,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="入库重量:" android:text="入库重量:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInWeight)}' android:text='@{String.valueOf(bean.checkInWeight)}'
android:textSize="15sp" android:textSize="15sp"
tools:text="12" /> tools:text="12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -176,14 +187,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="代理人:" android:text="代理人:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.agentName}' android:text='@{bean.agentName}'
android:textSize="15sp" android:textSize="15sp"
tools:text="顺丰" /> tools:text="顺丰"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -199,14 +212,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="特码:" android:text="特码:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.spCode}' android:text='@{bean.spCode}'
android:textSize="15sp" android:textSize="15sp"
tools:text="NOR" /> tools:text="NOR"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -222,14 +237,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="收运人:" android:text="收运人:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.userName}' android:text='@{bean.userName}'
android:textSize="15sp" android:textSize="15sp"
tools:text="张三" /> tools:text="张三"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -245,14 +262,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="入库时间:" android:text="入库时间:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.opDate}' android:text='@{bean.opDate}'
android:textSize="15sp" android:textSize="15sp"
tools:text="2024-02-16 09:12" /> tools:text="2024-02-16 09:12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -22,6 +22,12 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- 侧滑布局:白色卡片(含展开按钮)+ 侧滑菜单 -->
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:id="@+id/swipe_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 白色卡片 --> <!-- 白色卡片 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -198,7 +204,7 @@
</LinearLayout> </LinearLayout>
<!-- 第二行:航程、计重状态、运抵状态、运单类型、分单数 --> <!-- 第二行:航程、海关放行、运抵状态、运单类型、分单数 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -231,7 +237,7 @@
</LinearLayout> </LinearLayout>
<!-- 计重状态 --> <!-- 海关放行 -->
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -243,20 +249,16 @@
completeSpace="@{5}" completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="计重状态" android:text="海关放行"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@{`1`.equals(bean.checkIn) ? @drawable/tag_status_green : (`2`.equals(bean.checkIn) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}" android:text="@{bean.cmdStatus}"
android:paddingHorizontal="8dp" android:textColor="@color/text_normal"
android:paddingVertical="2dp" android:textSize="15sp" />
android:text="@{bean.checkInText}"
android:textColor="@{`1`.equals(bean.checkIn) ? @color/text_green : (`2`.equals(bean.checkIn) ? @color/colorPrimary : @color/text_gray)}"
android:textSize="14sp"
android:visibility="@{bean.checkIn != null &amp;&amp; !bean.checkIn.isEmpty() ? View.VISIBLE : View.GONE}" />
</LinearLayout> </LinearLayout>
@@ -357,6 +359,23 @@
</LinearLayout> </LinearLayout>
<!-- 侧滑菜单区 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- 回执按钮 -->
<TextView
android:id="@+id/btnResponse"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="回执" />
</LinearLayout>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
<!-- 子订单列表容器(白色圆角卡片,圆角同主单) --> <!-- 子订单列表容器(白色圆角卡片,圆角同主单) -->
<LinearLayout <LinearLayout
visible="@{bean.showMore}" visible="@{bean.showMore}"
@@ -439,6 +458,16 @@
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.9"
android:gravity="center"
android:text="海关放行"
android:textColor="@color/text_normal"
android:textSize="14sp"
android:textStyle="bold" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -90,6 +90,16 @@
</LinearLayout> </LinearLayout>
<!-- 海关放行 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.9"
android:gravity="center"
android:text="@{bean.cmdStatus ?? ``}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 品名(中) --> <!-- 品名(中) -->
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"

View File

@@ -90,7 +90,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.uld}" android:text="@{bean.uld}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="15sp" /> android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>

View File

@@ -20,11 +20,23 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp" android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8" android:orientation="vertical">
android:gravity="center_vertical"
android:orientation="horizontal" <!-- 侧滑布局:白色卡片 + 侧滑菜单 -->
android:paddingVertical="20dp" <com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:paddingHorizontal="10dp"> android:id="@+id/swipe_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 白色卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 选中图标 (飞机图标,根据选择状态切换图片) --> <!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
<ImageView <ImageView
android:id="@+id/iv_icon" android:id="@+id/iv_icon"
@@ -32,7 +44,8 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@drawable/img_plane" android:src="@drawable/img_plane"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" /> loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:layout_marginTop="0.5px" />
<!-- 数据信息区域 --> <!-- 数据信息区域 -->
<LinearLayout <LinearLayout
@@ -96,7 +109,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.loadStatus}" android:text="@{bean.loadStatus}"
android:textColor="@{`01`.equals(bean.loadStatus) ? @color/text_green : (`W`.equals(bean.loadStatus) ? @color/text_blue : @color/text_normal)}" android:textColor="@{`01`.equals(bean.loadStatus) ? @color/text_green : (`W`.equals(bean.loadStatus) ? @color/text_blue : @color/text_normal)}"
android:textSize="15sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@@ -298,6 +311,25 @@
</LinearLayout> </LinearLayout>
</LinearLayout>
<!-- 侧滑菜单区 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- 回执按钮 -->
<TextView
android:id="@+id/btnResponse"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="回执" />
</LinearLayout>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
</LinearLayout> </LinearLayout>
</layout> </layout>

View File

@@ -21,8 +21,15 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- 侧滑布局 -->
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:id="@+id/swipe_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 白色卡片 --> <!-- 白色卡片 -->
<LinearLayout <LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8" android:background="@drawable/bg_white_radius_8"
@@ -38,7 +45,8 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<!-- 运单信息区域 --> <!-- 运单信息区域 -->
<LinearLayout <LinearLayout
@@ -68,14 +76,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="运单号:" /> android:text="运单号:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" /> android:textColor="@color/colorPrimary"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
@@ -92,13 +102,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{3}" completeSpace="@{3}"
android:text="件数:" /> android:text="件数:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{String.valueOf(bean.pc)}" /> android:text="@{String.valueOf(bean.pc)}"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -115,13 +127,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="重量:" /> android:text="重量:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{String.valueOf((int)bean.weight)}" /> android:text="@{String.valueOf((int)bean.weight)}"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -138,13 +152,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="承运人:" /> android:text="承运人:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.by1}" /> android:text="@{bean.by1}"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -161,7 +177,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="运单类型:" /> android:text="运单类型:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -170,7 +187,8 @@
android:text="@{bean.awbTypeName}" android:text="@{bean.awbTypeName}"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" /> android:ellipsize="end"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -197,7 +215,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="出运路径:" /> android:text="出运路径:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -206,7 +225,8 @@
android:text='@{bean.range}' android:text='@{bean.range}'
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" /> android:ellipsize="end"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -223,13 +243,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{3}" completeSpace="@{3}"
android:text="特码:" /> android:text="特码:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
android:text="@{bean.spCode}" /> android:text="@{bean.spCode}"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -246,7 +268,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{4}" completeSpace="@{4}"
android:text="代理人:" /> android:text="代理人:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -255,7 +278,8 @@
android:text="@{bean.agentCode}" android:text="@{bean.agentCode}"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" /> android:ellipsize="end"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -272,13 +296,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="移交状态:" /> android:text="移交状态:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="14sp"
android:text="@{bean.moveState == 1 ? `已移交` : `未移交`}" /> android:text="@{bean.moveState == 1 ? `已移交` : `未移交`}"
android:textColor="@{bean.moveState == 1 ? @color/text_green : @color/text_gray}" />
</LinearLayout> </LinearLayout>
@@ -295,7 +321,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{5}" completeSpace="@{5}"
android:text="品名:" /> android:text="品名:"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -304,7 +331,8 @@
android:text="@{bean.goodsCn.isEmpty() ? bean.goods : bean.goodsCn}" android:text="@{bean.goodsCn.isEmpty() ? bean.goods : bean.goodsCn}"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" /> android:ellipsize="end"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -312,8 +340,33 @@
</LinearLayout> </LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</LinearLayout> </LinearLayout>
<!-- 侧滑菜单区域 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- 编辑按钮 -->
<TextView
android:id="@+id/btn_edit"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="编辑" />
</androidx.appcompat.widget.LinearLayoutCompat>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
</LinearLayout> </LinearLayout>
</layout> </layout>

View File

@@ -33,7 +33,8 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_gravity="center" android:layout_gravity="center"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<!-- ULD信息区域 --> <!-- ULD信息区域 -->
<LinearLayout <LinearLayout
@@ -54,7 +55,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.1" android:layout_weight="1.0"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -63,13 +64,16 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="ULD编码" android:text="ULD编码"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.uld}" android:text="@{bean.uld}"
android:textSize="15sp"/> android:textSize="15sp"
android:textColor="@color/colorPrimary"
android:textStyle="bold"/>
</LinearLayout> </LinearLayout>
@@ -77,7 +81,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -86,13 +90,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="架子车号:" android:text="架子车号:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.carId}" android:text="@{bean.carId}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -100,7 +106,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.7"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -109,13 +115,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="装机重:" android:text="装机重:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.netWeight)}" android:text="@{String.valueOf((int)bean.netWeight)}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -123,7 +131,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.75"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -132,13 +140,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="板型:" android:text="板型:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.boardType}" android:text="@{bean.boardType}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -146,7 +156,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.2" android:layout_weight="1.3"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -155,19 +165,46 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班信息:" android:text="航班信息:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.flight}" android:text="@{bean.flight}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 装机状态(允许装机绿色,不允许装机红色) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="装机状态:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.allowLoadText}"
android:textColor="@{bean.isAllowLoad() ? @color/text_green : @color/text_red}"
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<!-- 第二行:目的港、库位号、复磅状态、交接人、交接时间 --> <!-- 第二行:目的港、库位号、IMP代码、交接人、交接时间 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -179,7 +216,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.1" android:layout_weight="1.0"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -188,13 +225,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="目的港:" android:text="目的港:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.fdest}" android:text="@{bean.fdest}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -202,7 +241,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.8"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -211,21 +250,23 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="库位号:" android:text="库位号:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.transArea}" android:text="@{bean.transArea}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
<!-- 复磅状态 --> <!-- IMP代码非空且不是 ELI/ELM 时标红) -->
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.7"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -233,14 +274,15 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="复磅状态" android:text="IMP代码"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}" android:text="@{bean.dgrCode}"
android:textColor="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}" android:textColor="@{bean.dgrCode != null &amp;&amp; !bean.dgrCode.isEmpty() &amp;&amp; !bean.dgrCode.equals(`ELI`) &amp;&amp; !bean.dgrCode.equals(`ELM`) ? @color/text_red : @color/text_normal}"
android:textSize="15sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -249,7 +291,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.8" android:layout_weight="0.75"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -258,13 +300,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="交接人:" android:text="交接人:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.hoUserName}" android:text="@{bean.hoUserName}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -272,7 +316,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.2" android:layout_weight="1.3"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -281,16 +325,24 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="交接时间:" android:text="交接时间:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.hoDate}" android:text="@{bean.hoDate}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
<!-- 占位(与第一行装机状态列等宽,保持列对齐) -->
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1.0" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -46,7 +46,6 @@
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginTop="0.5px" android:layout_marginTop="0.5px"
android:layout_marginEnd="10dp"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" /> android:src="@drawable/img_plane" />
@@ -55,7 +54,8 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical"
android:layout_marginLeft="15dp">
<!-- 第一行:运单号、航班信息、航程、品名、重量 --> <!-- 第一行:运单号、航班信息、航程、品名、重量 -->
<LinearLayout <LinearLayout
@@ -75,14 +75,16 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="运单号:" android:text="运单号:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="15sp" /> android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout> </LinearLayout>
@@ -98,13 +100,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班信息:" android:text="航班信息:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.flightInfo}" android:text="@{bean.flightInfo}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -120,13 +124,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航程:" android:text="航程:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.range}" android:text="@{bean.range}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -142,7 +148,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="品名(英)" android:text="品名(英)"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -150,7 +157,8 @@
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:text="@{bean.goods}" android:text="@{bean.goods}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -166,13 +174,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="重量:" android:text="重量:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.weight)}" android:text="@{String.valueOf((int)bean.weight)}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -197,13 +207,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="代理人:" android:text="代理人:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.agentCode}" android:text="@{bean.agentCode}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -219,13 +231,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="件数:" android:text="件数:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.pc)}" android:text="@{String.valueOf(bean.pc)}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -241,7 +255,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="清仓正常:" android:text="清仓正常:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -268,13 +283,15 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="入库时间:" android:text="入库时间:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.opDate}" android:text="@{bean.opDate}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
@@ -290,18 +307,45 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="库位数:" android:text="库位数:"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.storageUseNumber)}" android:text="@{String.valueOf(bean.storageUseNumber)}"
android:textSize="15sp" /> android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<!-- 第三行:清仓备注(独占整行) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="备注:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{bean.clearRemark}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -7,14 +7,20 @@
</data> </data>
<!-- 主列表项容器 --> <!-- 主列表项容器 -->
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" android:layout_marginTop="10dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="10dp" android:layout_marginTop="10dp" android:orientation="vertical">
<!-- 侧滑布局:白色卡片(含展开按钮)+ 侧滑菜单 -->
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:id="@+id/swipe_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 白色卡片主要内容区域 --> <!-- 白色卡片主要内容区域 -->
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_white_radius_8" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_white_radius_8" android:orientation="vertical">
<!-- 主要内容区域 --> <!-- 主要内容区域 -->
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" android:paddingVertical="20dp" android:paddingHorizontal="10dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" android:paddingVertical="20dp" android:paddingHorizontal="10dp">
<!-- 选中图标 --> <!-- 选中图标 -->
<ImageView android:id="@+id/iv_icon" android:layout_width="40dp" android:layout_height="40dp" android:layout_marginTop="0.5px" android:layout_marginEnd="10dp" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" android:src="@drawable/img_plane"/> <ImageView android:id="@+id/iv_icon" android:layout_width="40dp" android:layout_height="40dp" android:layout_marginTop="0.5px" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" android:src="@drawable/img_plane"/>
<!-- 数据展示区域 --> <!-- 数据展示区域 -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical" android:layout_marginLeft="15dp">
<!-- 第一行:运单号、状态、代理、件数、重量 --> <!-- 第一行:运单号、状态、代理、件数、重量 -->
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<!-- 运单号 (weight=1.5) --> <!-- 运单号 (weight=1.5) -->
@@ -83,6 +89,23 @@
android:scaleType="center" android:scaleType="center"
android:src="@mipmap/img_down" /> android:src="@mipmap/img_down" />
</LinearLayout> </LinearLayout>
<!-- 侧滑菜单区 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- 回执按钮 -->
<TextView
android:id="@+id/btnResponse"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="回执" />
</LinearLayout>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
<!-- 子订单列表容器(在白色卡片外面) --> <!-- 子订单列表容器(在白色卡片外面) -->
<LinearLayout visible="@{bean.showMore}" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:background="@drawable/bg_white_radius_8" android:orientation="vertical" android:visibility="gone"> <LinearLayout visible="@{bean.showMore}" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:background="@drawable/bg_white_radius_8" android:orientation="vertical" android:visibility="gone">
<!-- 暂无数据提示 --> <!-- 暂无数据提示 -->

View File

@@ -56,29 +56,18 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<!-- 特码 --> <!-- 特码(下拉选择,数据来源与国际出港待记重页面一致) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
hint='@{"请输入特码"}' hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}' title='@{"特码"}'
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.SPINNER}"
value='@={viewModel.spCode}' /> value='@={viewModel.spCode}' />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/filter_flight_no"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
hint='@{"请输入航班号"}'
title='@{"航班号"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.flightNo}' />
<!-- 目的港 --> <!-- 目的港 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/filter_dest" android:id="@+id/filter_dest"

View File

@@ -10,6 +10,7 @@ import com.lukouguoji.gjj.viewModel.GjjManifestAddViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.DetailsPageType import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.noNull import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
@@ -31,6 +32,10 @@ class GjjManifestAddActivity :
binding.actualWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL binding.actualWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
binding.billingWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL binding.billingWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
// 交接图片列表
viewModel.rv = binding.rvPic
binding.rvPic.addOnItemClickListener(viewModel)
viewModel.initOnCreated(intent) viewModel.initOnCreated(intent)
// 动态设置标题(必须在 initOnCreated 之后pageType 已从 Intent 解析) // 动态设置标题(必须在 initOnCreated 之后pageType 已从 Intent 解析)

View File

@@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.text.InputType import android.text.InputType
import androidx.core.widget.doOnTextChanged
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
@@ -29,6 +30,10 @@ class IntImpAccidentVisaEditActivity :
binding.fnoInput.et.setUpperCaseAlphanumericFilter() binding.fnoInput.et.setUpperCaseAlphanumericFilter()
// 运单号纯数字11位 // 运单号纯数字11位
binding.wbNoInput.et.inputType = InputType.TYPE_CLASS_NUMBER binding.wbNoInput.et.inputType = InputType.TYPE_CLASS_NUMBER
// 运单号满11位后自动查询舱单信息带出表单数据覆盖手输、联想填充、弹窗选择
binding.wbNoInput.et.doOnTextChanged { text, _, _, _ ->
viewModel.onWbNoChanged(text?.toString()?.trim() ?: "")
}
viewModel.rv = binding.rv viewModel.rv = binding.rv
binding.rv.addOnItemClickListener(viewModel) binding.rv.addOnItemClickListener(viewModel)

View File

@@ -10,13 +10,11 @@ import com.lukouguoji.gjj.dialog.IntImpInStorageDialogModel
import com.lukouguoji.gjj.dialog.IntImpModifyStorageDialogModel import com.lukouguoji.gjj.dialog.IntImpModifyStorageDialogModel
import com.lukouguoji.gjj.viewModel.IntImpLoadingListViewModel import com.lukouguoji.gjj.viewModel.IntImpLoadingListViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.observe import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.ktx.addOnItemClickListener import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
@@ -43,7 +41,7 @@ class IntImpLoadingListActivity :
// 监听刷新事件 // 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() } FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) { FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh() viewModel.refresh()
} }
@@ -70,16 +68,18 @@ class IntImpLoadingListActivity :
viewModel.onFlightNoInputComplete() viewModel.onFlightNoInputComplete()
} }
// 初始加载数据 // 列表/汇总接口必须带航班fid仅在父页面已选航班并传入 fid 时才初始加载
viewModel.refresh() // 否则等用户输入航班号后手动查询,避免后端返回「请先选择航班」
if (viewModel.fid.isNotEmpty()) {
viewModel.refresh()
}
} }
/** /**
* 显示入库操作对话框 * 显示入库操作对话框
*/ */
fun showInStorageDialog() { fun showInStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return val selectedItems = viewModel.getSelectedManifests()
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
if (selectedItems.isEmpty()) { if (selectedItems.isEmpty()) {
showToast("请选择要入库的记录") showToast("请选择要入库的记录")
@@ -97,8 +97,7 @@ class IntImpLoadingListActivity :
* 显示修改库位对话框 * 显示修改库位对话框
*/ */
fun showModifyStorageDialog() { fun showModifyStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return val selectedItems = viewModel.getSelectedManifests()
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
if (selectedItems.isEmpty()) { if (selectedItems.isEmpty()) {
showToast("请选择要修改库位的记录") showToast("请选择要修改库位的记录")

View File

@@ -38,8 +38,9 @@ class IntImpPickUpDLVActivity :
viewModel.refresh() viewModel.refresh()
} }
// 初始化代理人列表 // 初始化代理人、特码下拉列表
viewModel.initAgentList() viewModel.initAgentList()
viewModel.initSpecialCodeList()
// 初始加载数据 // 初始加载数据
viewModel.refresh() viewModel.refresh()

View File

@@ -55,8 +55,8 @@ class IntImpQueryActivity :
if (visible) showFilterPanel() else hideFilterPanel() if (visible) showFilterPanel() else hideFilterPanel()
} }
// 航班号:大写字母+数字 // 航班号(顶部搜索区):大写字母+数字
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter() binding.flightNoSearch.et.setUpperCaseAlphanumericFilter()
// 始发港:仅大写字母 // 始发港:仅大写字母
binding.filterPanel.filterOrigin.et.setUpperCaseLetterFilter() binding.filterPanel.filterOrigin.et.setUpperCaseLetterFilter()

View File

@@ -56,7 +56,7 @@ class IntImpStorageUseActivity :
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val allItems = list.filterIsInstance<com.lukouguoji.module_base.bean.GjcMaWb>() val allItems = list.filterIsInstance<com.lukouguoji.module_base.bean.GjcMaWb>()
val maWbListForClear = allItems.mapNotNull { maWb -> val warehouseListForClear = allItems.mapNotNull { maWb ->
if (maWb.isSelected) { if (maWb.isSelected) {
// 勾选运单号 → 默认全选该运单号下的所有库位 // 勾选运单号 → 默认全选该运单号下的所有库位
maWb.copy(storageUseList = maWb.storageUseList ?: emptyList()) maWb.copy(storageUseList = maWb.storageUseList ?: emptyList())
@@ -71,14 +71,15 @@ class IntImpStorageUseActivity :
} }
} }
if (maWbListForClear.isEmpty()) { if (warehouseListForClear.isEmpty()) {
showToast("请至少选择一个库位") showToast("请至少选择一个库位")
return return
} }
IntImpMoveClearDialogModel { dialog -> IntImpMoveClearDialogModel { dialog ->
val clearNormal = dialog.clearNormal.value ?: "" val clearNormal = dialog.clearNormal.value ?: ""
viewModel.performClear(clearNormal, maWbListForClear) val clearRemark = dialog.clearRemark.value ?: ""
viewModel.performClear(clearNormal, clearRemark, warehouseListForClear)
}.show(this) }.show(this)
} }

View File

@@ -18,6 +18,9 @@ class IntImpMoveClearDialogModel(
// 清仓正常(存储的是 code"0" 或 "1" // 清仓正常(存储的是 code"0" 或 "1"
val clearNormal = MutableLiveData("") val clearNormal = MutableLiveData("")
// 清仓备注(选填)
val clearRemark = MutableLiveData("")
// 清仓正常选项列表 // 清仓正常选项列表
val clearNormalList = MutableLiveData<List<KeyValue>>().apply { val clearNormalList = MutableLiveData<List<KeyValue>>().apply {
value = listOf( value = listOf(

View File

@@ -9,6 +9,7 @@ import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjjAirManifest import com.lukouguoji.module_base.bean.GjjAirManifest
import com.lukouguoji.module_base.ktx.refresh import com.lukouguoji.module_base.ktx.refresh
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
/** /**
* 国际进港原始舱单 ViewHolder * 国际进港原始舱单 ViewHolder
@@ -25,6 +26,12 @@ class IntArrAirManifestViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 侧滑菜单 - 回执按钮(关闭侧滑后分发到 ViewModel
binding.btnResponse.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, ITEM_CLICK_TYPE_CUSTOMS_RESPONSE)
}
// 整卡点击 - 跳转详情页 // 整卡点击 - 跳转详情页
notifyItemClick(position, binding.ll) notifyItemClick(position, binding.ll)

View File

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

View File

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

View File

@@ -13,6 +13,7 @@ import com.google.gson.Gson
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.launchCollect import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.refresh import com.lukouguoji.module_base.ktx.refresh
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
/** /**
@@ -27,6 +28,12 @@ class IntImpTallyViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 侧滑菜单 - 回执按钮(关闭侧滑后分发到 ViewModel
binding.btnResponse.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, ITEM_CLICK_TYPE_CUSTOMS_RESPONSE)
}
// 选中图标点击 - 切换选择状态(独立选择,不联动分单) // 选中图标点击 - 切换选择状态(独立选择,不联动分单)
binding.ivIcon.setOnClickListener { binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get()) bean.checked.set(!bean.checked.get())

View File

@@ -2,29 +2,47 @@ package com.lukouguoji.gjj.viewModel
import android.content.Intent import android.content.Intent
import android.view.View import android.view.View
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.R
import com.lukouguoji.module_base.base.BaseViewModel import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.common.DetailsPageType import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.ImageSelectNewViewHolder
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.finish import com.lukouguoji.module_base.ktx.finish
import com.lukouguoji.module_base.ktx.formatDate import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.module_base.ktx.launchCollect import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.loadMore
import com.lukouguoji.module_base.ktx.noNull import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DictUtils import com.lukouguoji.module_base.util.DictUtils
import com.lukouguoji.module_base.util.MediaUtil
import com.lukouguoji.module_base.util.UploadUtil
import dev.utils.app.info.KeyValue import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils import dev.utils.common.DateUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onCompletion
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
class GjjManifestAddViewModel : BaseViewModel() { class GjjManifestAddViewModel : BaseViewModel(), IOnItemClickListener {
// 页面类型必须用LiveData // 页面类型必须用LiveData
val pageType = MutableLiveData(DetailsPageType.Add) val pageType = MutableLiveData(DetailsPageType.Add)
@@ -84,10 +102,12 @@ class GjjManifestAddViewModel : BaseViewModel() {
fid = flight.fid.noNull() fid = flight.fid.noNull()
departure.value = flight.fdep.noNull() departure.value = flight.fdep.noNull()
destination.value = flight.fdest.noNull() destination.value = flight.fdest.noNull()
range.value = flight.getHangCheng()
} else { } else {
fid = "" fid = ""
departure.value = "" departure.value = ""
destination.value = "" destination.value = ""
range.value = ""
showToast(it.msg.noNull("获取航班信息失败")) showToast(it.msg.noNull("获取航班信息失败"))
} }
} }
@@ -95,6 +115,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
fid = "" fid = ""
departure.value = "" departure.value = ""
destination.value = "" destination.value = ""
range.value = ""
} }
} }
} }
@@ -123,15 +144,15 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 目的港 // 目的港
val destination = MutableLiveData("") val destination = MutableLiveData("")
// 航程(自动拼接:始发站-目的站 // 航程(航班起始站-航班目的站,仅随航班信息变化,不随用户修改始发站/目的站联动
val range = MediatorLiveData<String>().apply { val range = MutableLiveData("")
val update = {
val dep = departure.value ?: "" /**
val dest = destination.value ?: "" * 按航班起始站/目的站拼接航程,起始站为空时返回空
value = if (dep.isNotEmpty() || dest.isNotEmpty()) "$dep-$dest" else "" */
} private fun buildRange(fdep: String?, fdest: String?): String {
addSource(departure) { update() } if (fdep.isNullOrEmpty()) return ""
addSource(destination) { update() } return "$fdep-${fdest ?: ""}"
} }
// 品名(中) // 品名(中)
@@ -167,6 +188,11 @@ class GjjManifestAddViewModel : BaseViewModel() {
val waybillTypeList = MutableLiveData<List<KeyValue>>() val waybillTypeList = MutableLiveData<List<KeyValue>>()
val waybillType = MutableLiveData("") val waybillType = MutableLiveData("")
// ========== 交接图片 ==========
val itemLayoutId = R.layout.item_image_select_new
val itemViewHolder = ImageSelectNewViewHolder::class.java
var rv: RecyclerView? = null
/** /**
* 初始化从Intent获取参数 * 初始化从Intent获取参数
*/ */
@@ -180,6 +206,8 @@ class GjjManifestAddViewModel : BaseViewModel() {
fid = intent.getStringExtra(Constant.Key.ID).noNull() fid = intent.getStringExtra(Constant.Key.ID).noNull()
departure.value = intent.getStringExtra(Constant.Key.DEPARTURE).noNull() departure.value = intent.getStringExtra(Constant.Key.DEPARTURE).noNull()
destination.value = intent.getStringExtra(Constant.Key.DESTINATION).noNull() destination.value = intent.getStringExtra(Constant.Key.DESTINATION).noNull()
// 列表页传入的是航班的始发站/目的站,用于初始化航程
range.value = buildRange(departure.value, destination.value)
// 回填航班日期和航班号(从列表页传入) // 回填航班日期和航班号(从列表页传入)
val passedFlightDate = intent.getStringExtra("flightDate").noNull() val passedFlightDate = intent.getStringExtra("flightDate").noNull()
@@ -205,6 +233,9 @@ class GjjManifestAddViewModel : BaseViewModel() {
} }
} }
// 交接图片:末尾追加空白占位项作为添加按钮
rv?.post { rv?.commonAdapter()?.addItem(FileBean()) }
// 加载下拉列表(在编辑数据加载之后,以便使用 checkedValue 将选中项置顶) // 加载下拉列表(在编辑数据加载之后,以便使用 checkedValue 将选中项置顶)
loadDictLists() loadDictLists()
} }
@@ -290,6 +321,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
billingWeight.value = manifest.cashWeight.toString() billingWeight.value = manifest.cashWeight.toString()
departure.value = manifest.origin departure.value = manifest.origin
destination.value = manifest.dest destination.value = manifest.dest
range.value = buildRange(manifest.fdep, manifest.fdest)
goodsNameCn.value = manifest.goodsCn goodsNameCn.value = manifest.goodsCn
goodsNameEn.value = manifest.goods goodsNameEn.value = manifest.goods
unNumber.value = manifest.unNumber unNumber.value = manifest.unNumber
@@ -302,6 +334,21 @@ class GjjManifestAddViewModel : BaseViewModel() {
businessType.value = manifest.businessType businessType.value = manifest.businessType
goodsType.value = manifest.cargoType goodsType.value = manifest.cargoType
waybillType.value = manifest.awbType waybillType.value = manifest.awbType
// 回填交接图片path 取原图 URL 确保预览清晰url 取缩略图用于提交
val picList = manifest.pic.noNull().split(",").filter { it.isNotEmpty() }
val originalList = manifest.originalPic.noNull().split(",").filter { it.isNotEmpty() }
if (picList.isNotEmpty()) {
val images = picList.mapIndexed { index, picUrl ->
val originalUrl = originalList.getOrElse(index) { picUrl }
FileBean(
path = MediaUtil.fillUrl(originalUrl),
url = picUrl,
originalPic = originalUrl
)
}
rv?.loadMore(images)
}
} }
/** /**
@@ -320,6 +367,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
actualWeight.value = manifest.weight.toString() actualWeight.value = manifest.weight.toString()
departure.value = manifest.origin departure.value = manifest.origin
destination.value = manifest.dest destination.value = manifest.dest
range.value = buildRange(manifest.fdep, manifest.fdest)
goodsNameCn.value = manifest.goodsCn goodsNameCn.value = manifest.goodsCn
goodsNameEn.value = manifest.goods goodsNameEn.value = manifest.goods
unNumber.value = manifest.unNumber unNumber.value = manifest.unNumber
@@ -411,30 +459,82 @@ class GjjManifestAddViewModel : BaseViewModel() {
paramsMap["prefix"] = prefix paramsMap["prefix"] = prefix
} }
val params = paramsMap.toRequestBody() // 先上传本地新增的交接图片,全部完成后再组装三字段提交表单
var uploadFailed = false
launchLoadingCollect({ (rv?.commonAdapter()?.items ?: emptyList())
if (isModify) { .asFlow()
NetApply.api.gjjManifestUpdate(params) .map { it as FileBean }
} else { .filter { it.path.isNotEmpty() && it.url.isEmpty() }
NetApply.api.gjjManifestInsert(params) .onEach {
val data = UploadUtil.upload(it.path).data
// UploadUtil 返回newName=原图(较大)zipFileName=缩略图(较小)
// FileBean.url 用作缩略图标识FileBean.originalPic 用作原图标识
it.url = data?.zipFileName ?: ""
it.originalPic = data?.newName ?: ""
} }
}) { .flowOn(Dispatchers.IO)
onSuccess = { .onStart { showLoading() }
if (it.verifySuccess()) { .catch {
val successMsg = if (isModify) "修改成功" else "保存成功" uploadFailed = true
showToast(successMsg) showToast(it.message.noNull("上传图片失败"))
dismissLoading()
}
.onCompletion {
if (uploadFailed) return@onCompletion
// 发送刷新事件 // 交接图片三字段pic=缩略图、originalPic=原图、picNumber=数量
viewModelScope.launch { val picBeans = (rv?.commonAdapter()?.items ?: emptyList())
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh") .filterIsInstance<FileBean>()
.filter { it.path.isNotEmpty() }
paramsMap["picNumber"] = picBeans.size.toString()
paramsMap["pic"] = picBeans.joinToString(",") { MediaUtil.removeUrl(it.url) }
paramsMap["originalPic"] =
picBeans.joinToString(",") { MediaUtil.removeUrl(it.originalPic) }
val params = paramsMap.toRequestBody()
launchLoadingCollect({
if (isModify) {
NetApply.api.gjjManifestUpdate(params)
} else {
NetApply.api.gjjManifestInsert(params)
} }
}) {
onSuccess = {
if (it.verifySuccess()) {
val successMsg = if (isModify) "修改成功" else "保存成功"
showToast(successMsg)
view.context.finish() // 发送刷新事件
} else { viewModelScope.launch {
showToast(it.msg.noNull("保存失败")) FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
view.context.finish()
} else {
showToast(it.msg.noNull("保存失败"))
}
}
} }
} }
.launchIn(viewModelScope)
}
/**
* 交接图片列表点击回调
* 长按图片R.id.rl切换删除按钮显隐点击删除按钮R.id.iv_delete移除该图片
*/
override fun onItemClick(position: Int, type: Int) {
val adapter = rv?.commonAdapter() ?: return
val bean = adapter.getItem(position) as? FileBean ?: return
when (type) {
R.id.rl -> {
bean.canDelete.set(!bean.canDelete.get())
}
R.id.iv_delete -> {
adapter.removeItem(position)
}
else -> {}
} }
} }

View File

@@ -16,6 +16,9 @@ import com.lukouguoji.gjj.dialog.IntImpTallyResetDialogModel
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.CustomsResponseUrl
import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
import com.lukouguoji.module_base.ktx.showCustomsResponse
import com.lukouguoji.module_base.ktx.launchCollect import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
@@ -60,8 +63,13 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
/** /**
* 搜索按钮点击 * 搜索按钮点击
* 航班号必填,校验通过后再请求列表与汇总(与国际进港舱单页面交互一致)
*/ */
fun searchClick() { fun searchClick() {
if (flightNo.value.isNullOrEmpty()) {
showToast("请输入航班号")
return
}
refresh() refresh()
} }
@@ -293,10 +301,19 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
// 获取主单数据 // 获取主单数据
val manifest = airManifest.maWb ?: return val manifest = airManifest.maWb ?: return
// 跳转到详情页 when (type) {
com.lukouguoji.gjj.activity.IntArrAirManifestDetailsActivity.start( // 侧滑「回执」按钮:查询海关回执并跳转只读详情页
getTopActivity(), ITEM_CLICK_TYPE_CUSTOMS_RESPONSE -> showCustomsResponse(
manifest CustomsResponseUrl.INT_IMP_AIR_MANIFEST,
) manifest.prefix,
manifest.no,
"原始舱单回执"
)
// 整卡点击type 为 view id跳转到详情页
else -> com.lukouguoji.gjj.activity.IntArrAirManifestDetailsActivity.start(
getTopActivity(),
manifest
)
}
} }
} }

View File

@@ -233,6 +233,65 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
} }
} }
///////////////////////////////////////////////////////////////////////////
// 运单号带出国际进港舱单信息
///////////////////////////////////////////////////////////////////////////
private var lastQueriedWbNo = ""
/**
* 运单号文本变化回调Activity 中监听输入框)
* 满11位且与上次查询不同时查询进港舱单信息并回填表单
* 仅新增模式生效:编辑模式下 loadDetail 回显运单号会触发本回调,
* 若不拦截会用舱单数据覆盖已保存的表单和图片列表
*/
fun onWbNoChanged(wbNo: String) {
if (pageType.value != DetailsPageType.Add) return
if (wbNo.length != 11) return
if (wbNo == lastQueriedWbNo) return
lastQueriedWbNo = wbNo
queryWbInfo(wbNo)
}
private fun queryWbInfo(wbNo: String) {
launchLoadingCollect({ NetApply.api.getIntImpManifestByWbNo(wbNo) }) {
onSuccess = {
val data = it.data
if (it.verifySuccess() && data != null) {
// 接口可能返回 null 字段Gson 反射注入会绕过 Kotlin 非空默认值),统一 noNull 防护
val b = dataBean.value ?: GjAccidentVisaEditBean()
b.fdate = data.fdate.noNull().take(10)
b.fno = data.fno.noNull()
b.dep = data.origin.noNull()
b.dest = data.dest.noNull()
b.pc = (if (data.totalPc > 0) data.totalPc else data.pc).toString()
b.weight = (if (data.totalWeight > 0.0) data.totalWeight else data.weight).toString()
b.goods = data.goods.noNull().ifEmpty { data.goodsCn.noNull() }
dataBean.value = b
// 与航班级联查询判重键同步,避免航班输入框失焦后重复查询覆盖带出的始发/目的站
lastQueriedFlight = "${b.fdate}-${b.fno}"
// 回填交接图片path 取原图完整 URL 用于预览url 取缩略图相对路径用于提交
val picList = data.pic.noNull().split(",").filter { p -> p.isNotEmpty() }
val originalList = data.originalPic.noNull().split(",").filter { p -> p.isNotEmpty() }
val images = picList.mapIndexed { index, picUrl ->
val originalUrl = originalList.getOrElse(index) { picUrl }
FileBean(
path = MediaUtil.fillUrl(originalUrl),
url = picUrl,
originalPic = originalUrl
)
}
// 重置图片区:舱单图片 + 末尾空白添加占位
rv?.commonAdapter()?.refresh(images + FileBean())
} else {
showToast(it.msg.noNull("未查询到该运单的进港舱单信息"))
}
}
}
}
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 保存 // 保存
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View File

@@ -5,6 +5,7 @@ import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.holder.IntImpLoadingListViewHolder import com.lukouguoji.gjj.holder.IntImpLoadingListViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.GjjLoadingUld
import com.lukouguoji.module_base.bean.GjjManifest import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent import com.lukouguoji.module_base.common.ConstantEvent
@@ -109,15 +110,23 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
// ========== 全选状态 ========== // ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false) val isAllChecked = MutableLiveData(false)
fun onItemCheckChanged() { fun onItemCheckChanged() {
updateCheckAllStatus() updateCheckAllStatus()
} }
fun updateCheckAllStatus() { fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjjLoadingUld> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() } isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
} }
/**
* 获取选中 ULD 下的全部运单(供修改库位/入库使用)
*/
fun getSelectedManifests(): List<GjjManifest> {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjLoadingUld> ?: return emptyList()
return list.filter { it.checked.get() }.flatMap { it.manifestList ?: emptyList() }
}
// ========== 适配器配置 ========== // ========== 适配器配置 ==========
val itemViewHolder = IntImpLoadingListViewHolder::class.java val itemViewHolder = IntImpLoadingListViewHolder::class.java
@@ -130,6 +139,13 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
fun searchClick() { fun searchClick() {
val fdate = flightDate.value val fdate = flightDate.value
val fno = flightNo.value val fno = flightNo.value
// 校验航班号必填(与国际进港舱单页面交互一致)
if (fno.isNullOrEmpty()) {
showToast("请输入航班号")
return
}
if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) { if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) {
val key = "$fdate-$fno" val key = "$fdate-$fno"
if (key != lastQueriedFlight || fid.isEmpty()) { if (key != lastQueriedFlight || fid.isEmpty()) {
@@ -191,7 +207,7 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
* 全选按钮点击(切换全选状态) * 全选按钮点击(切换全选状态)
*/ */
fun checkAllClick() { fun checkAllClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjjLoadingUld> ?: return
// 切换全选状态 // 切换全选状态
val shouldCheckAll = !isAllChecked.value!! val shouldCheckAll = !isAllChecked.value!!
@@ -280,17 +296,9 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
} }
/** /**
* 列表项点击回调(侧滑菜单 * 列表项点击回调(运单编辑已改为在子列表 ViewHolder 中直接跳转
*/ */
override fun onItemClick(position: Int, type: Int) { override fun onItemClick(position: Int, type: Int) {
when (type) {
2000 -> {
// 编辑操作
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
val bean = list.getOrNull(position) ?: return
com.lukouguoji.gjj.activity.IntImpLoadingListEditActivity.start(getTopActivity(), bean)
}
}
} }
/** /**
@@ -298,6 +306,12 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
* 查询参数与父页面国际进港舱单保持一致使用FID和FDGP * 查询参数与父页面国际进港舱单保持一致使用FID和FDGP
*/ */
override fun getData() { override fun getData() {
// 接口必须带航班fid未选航班时不请求直接清空列表与汇总
if (fid.isEmpty()) {
clearListAndTotal()
return
}
// 构建搜索条件与父页面一致fid + fdep + wbNo // 构建搜索条件与父页面一致fid + fdep + wbNo
val filterParams = mapOf( val filterParams = mapOf(
"fid" to fid.ifEmpty { null }, "fid" to fid.ifEmpty { null },
@@ -331,4 +345,16 @@ class IntImpLoadingListViewModel : BasePageViewModel(), IOnItemClickListener {
} }
} }
} }
/**
* 无航班信息时清空列表与底部汇总,并结束刷新状态
*/
private fun clearListAndTotal() {
pageModel.handleDataList(emptyList())
pageModel.haveMore.postValue(false)
totalCount.value = "0"
totalPc.value = "0"
totalWeight.value = "0"
isAllChecked.value = false
}
} }

View File

@@ -125,15 +125,15 @@ class IntImpManifestViewModel : BasePageViewModel() {
// ========== 全选状态 ========== // ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false) val isAllChecked = MutableLiveData(false)
fun onItemCheckChanged() { fun onItemCheckChanged() {
updateCheckAllStatus() updateCheckAllStatus()
} }
fun updateCheckAllStatus() { fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() } isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
} }
// ========== 展开/收起 ========== // ========== 展开/收起 ==========
val isAllExpanded = MutableLiveData(false) val isAllExpanded = MutableLiveData(false)
@@ -482,7 +482,81 @@ class IntImpManifestViewModel : BasePageViewModel() {
} }
/** /**
* 货物发放 * 开始理货(弹出修改库位对话框,提交理货库位)
*/
fun startTallyClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
val selectedItems = list.filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要理货的运单")
return
}
if (selectedItems.size > 1) {
showToast("只能选择一个运单")
return
}
// 舱单列表接口不返回理货库位,需先查装机单记录取出该运单已有的库位再弹窗回填
val selectedItem = selectedItems.first()
val queryParams = mapOf(
"fid" to fid.ifEmpty { null },
"fdep" to fdep.ifEmpty { null },
"wbNo" to selectedItem.wbNo.ifEmpty { null },
"pageNum" to 1,
"pageSize" to 1
).toRequestBody()
launchLoadingCollect({ NetApply.api.getIntImpLoadingList(queryParams) }) {
onSuccess = { result ->
// 装机单接口已按 ULD 分组,运单记录在 manifestList 中
val tallyRecord = result.list
?.flatMap { it.manifestList ?: emptyList() }
?.let { list -> list.firstOrNull { it.wbNo == selectedItem.wbNo || it.getWaybillNo() == selectedItem.wbNo } ?: list.firstOrNull() }
showModifyStorageDialog(
selectedItems = selectedItems,
currentLocationId = tallyRecord?.locationTallyId?.takeIf { it > 0 }?.toString() ?: "",
currentLocationName = tallyRecord?.locationTally ?: ""
)
}
// 查询失败不阻断操作,直接弹出空白库位的对话框
onFailed = { _, _ -> showModifyStorageDialog(selectedItems, "", "") }
}
}
/**
* 弹出修改库位对话框并提交currentLocation* 用于回填该运单已有的理货库位)
*/
private fun showModifyStorageDialog(
selectedItems: List<GjjManifest>,
currentLocationId: String,
currentLocationName: String
) {
IntImpModifyStorageDialogModel(
currentLocationId = currentLocationId,
currentLocationName = currentLocationName
) { dialog ->
val params = mapOf(
"location" to dialog.locationName,
"locationId" to dialog.locationId.toLongOrNull(),
"manifestList" to selectedItems
).toRequestBody()
launchLoadingCollect({ NetApply.api.modifyIntImpLoadingStorage(params) }) {
onSuccess = {
if (it.verifySuccess()) {
showToast(it.msg.noNull("修改库位成功"))
refresh()
} else {
showToast(it.msg.noNull("修改库位失败"))
}
}
}
}.show()
}
/**
* 理货完成(货物发放):库位已在「开始理货」时录入,此处不再弹库位框,直接提交所选运单
*/ */
fun cargoReleaseClick() { fun cargoReleaseClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
@@ -493,24 +567,18 @@ class IntImpManifestViewModel : BasePageViewModel() {
return return
} }
IntImpModifyStorageDialogModel { dialog -> val params = mapOf("manifestList" to selectedItems).toRequestBody()
val params = mapOf(
"location" to dialog.locationName,
"locationId" to dialog.locationId.toLongOrNull(),
"manifestList" to selectedItems
).toRequestBody()
launchLoadingCollect({ NetApply.api.intImpManifestPutUpCargo(params) }) { launchLoadingCollect({ NetApply.api.intImpManifestPutUpCargo(params) }) {
onSuccess = { onSuccess = {
if (it.verifySuccess()) { if (it.verifySuccess()) {
showToast(it.msg.noNull("货物发放成功")) showToast(it.msg.noNull("货物发放成功"))
refresh() refresh()
} else { } else {
showToast(it.msg.noNull("货物发放失败")) showToast(it.msg.noNull("货物发放失败"))
}
} }
} }
}.show() }
} }
/** /**
@@ -518,6 +586,13 @@ class IntImpManifestViewModel : BasePageViewModel() {
* 通过FID查询列表而不是直接通过航班号和航班日期 * 通过FID查询列表而不是直接通过航班号和航班日期
*/ */
override fun getData() { override fun getData() {
// 接口必须带航班fid未选航班时不请求直接清空列表与汇总
// (如子页面装机单修改成功后广播 EVENT_REFRESH本页尚未查航班也会被触发刷新
if (fid.isEmpty()) {
clearListAndTotal()
return
}
// 构建搜索条件使用FID代替fdate/fno // 构建搜索条件使用FID代替fdate/fno
val filterParams = mapOf( val filterParams = mapOf(
"fid" to fid.ifEmpty { null }, "fid" to fid.ifEmpty { null },
@@ -552,6 +627,18 @@ class IntImpManifestViewModel : BasePageViewModel() {
} }
} }
/**
* 无航班信息时清空列表与底部汇总,并结束刷新状态
*/
private fun clearListAndTotal() {
pageModel.handleDataList(emptyList())
pageModel.haveMore.postValue(false)
totalCount.value = "0"
totalPc.value = "0"
totalWeight.value = "0"
isAllChecked.value = false
}
/** /**
* 加载主单下的分单列表(按需加载,加载完成后自动展开) * 加载主单下的分单列表(按需加载,加载完成后自动展开)
*/ */

Some files were not shown because too many files have changed in this diff Show More