Compare commits

..

48 Commits

Author SHA1 Message Date
623ebc22f7 feat: opt pic 2026-04-17 14:59:16 +08:00
1157a0c4ed fix: 修复图片上传字段语义颠倒及加载缺失鉴权头导致的 403
- 修正 UploadUtil 返回字段到 FileBean 的映射:
  newName 是原图(较大)、zipFileName 是缩略图(较小)
- 保证 bean.pic 存缩略图、bean.originalPic 存原图
- 全局 loadImage BindingAdapter 对 http(s) URL 自动包装
  GlideUrl + Authorization,避免 /file/getImg/ 接口 403
- ImageSelectViewHolder 缩略图带鉴权加载,点击预览传原图
- 覆盖国内/国际事故签证、国内进港移库/移交编辑页面
- CLAUDE.md 同步修正 UploadBean 字段语义文档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 14:57:26 +08:00
6ad7f0d3d4 fix: fix 国内出港出库 2026-04-16 17:10:07 +08:00
9d7453d3ee fix: 进港舱单编辑页运单号改用 prefix+no 拼接取值
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 17:47:21 +08:00
60478327e2 fix: 修复图片二次编辑丢失旧图及预览模糊问题
- 国内进港移交编辑:loadData 时同时从 pic/originalPic 构建
  FileBean,确保二次编辑保存时原有图片不被覆盖
- 国际事故签证:loadDetail 改用 originalPic URL 作为 FileBean.path,
  保证全屏预览取原图而非缩略图;同时修正保存时 pic/originalPic 字段赋值颠倒的问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 15:02:54 +08:00
1d2b11bfd2 refactor: 确保舱单编辑页保存时始终传递 no 和 prefix 参数
重构 GjjManifestAddViewModel 的参数构建方式:
- 改用 mutableMapOf 手动处理可选字段,替代 removeEmptyOrNull = true
- 编辑模式下 mfId、no、prefix 单独追加,不受空字符串过滤影响

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 14:50:28 +08:00
4117cbb489 fix: 修复国际进港仓库入库接口参数格式,去除主子列表选中联动,更新分单理货报告字段
- 入库接口请求体改为 {location, locationId, warehouseList} 结构
- 移除主列表与子列表之间的双向选中联动,保留全选按钮同时选中两者
- 舱单子列表理货报告字段从 lastMftStatus 改为 tallyStatus
- GjjHaWb 新增 tallyStatus 字段

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 14:13:22 +08:00
4451b790de fix: 国际进港装机单编辑页库位号取 locationTally,查询详情运单信息取 awbPc/awbWeight
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 13:42:03 +08:00
1fa0f6dde4 fix: 操作日志详情时间线调整显示顺序
第一行改为显示操作环节名称(status 映射)加时间,
第二行改为灰色小字展示操作内容(content)。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 12:07:23 +08:00
faf343301f fix: 事故签证列表查询改用 fdate+fno,理货主分单取消联动选择
- IntImpAccidentVisaViewModel: 移除 fid 逻辑,始终使用 fdate+fno+fdep+fdest 查询
- IntImpTallyViewHolder/SubViewHolder: 主单与分单选择状态改为独立,不再互相联动

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 12:00:18 +08:00
27d6e55cbe feat: new-page skill 2026-04-12 20:23:26 +08:00
262ce8f099 feat: fix @Deprecated 2026-04-11 10:44:52 +08:00
c7ab89b836 feat: improve claude 2026-04-10 21:19:49 +08:00
ecbe7d9a5c feat: improve claude 2026-04-10 20:44:01 +08:00
1ec08b4847 fix: 国际进港修改舱单接口补充 no 和 prefix 字段
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 15:11:09 +08:00
2c7cf0c255 feat: update claude conf 2026-04-07 10:57:33 +08:00
2865e2fd2d feat: add jks file 2026-04-02 17:05:22 +08:00
76ace545cd feat: 国际进港原始舱单补充信息页按始发站/目的站自动匹配国家代码
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 16:48:40 +08:00
cf8a7f38fb fix: 修复图片上传字段、航班查询接口及图片鉴权加载问题
- 国际进港舱单列表页航班查询接口改为 /flt/searchFlightList,支持多航班校验
- 修复国内进港移库编辑/交接页图片上传缺少 pic、picNumber 字段
- 国际进港舱单详情页对接交接图片展示
- 图片缩略图和大图预览加载带 Authorization header 解决 403
- CLAUDE.md 新增图片上传与展示规范

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 16:25:24 +08:00
52171c94df fix: 进港舱单详情页业务类型回显取 businessName 字段
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 19:24:07 +08:00
39934df970 feat: 国际进港舱单详情页展示交接图片缩略图并支持点击查看大图
从舱单列表接口新增的 pic/originalPic/picNumber 字段透传至详情页,
缩略图以水平 RecyclerView 展示,点击后通过 PreviewActivity 查看原图。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 19:10:58 +08:00
624331ca68 feat: 国际进港查询筛选按钮有效时显示红点提示
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:39:28 +08:00
3e5f185721 fix: 修复意外签注编辑页运单号校验及字段拼写错误
- 修正 GjjImportManifest 中 dgrContactMame 字段名拼写错误为 dgrContactName
- 同步修复 IntArrSupplementInfoViewModel 和布局中对应字段引用
- 意外签注编辑页运单号输入改为纯数字模式,并新增11位格式+校验位验证
- 修改航班日期/航班号输入完成时清空始发站和目的站,避免旧数据残留
- 保存前新增始发站/目的站非空校验
- 布局微调:图片上传区域边距和对齐优化

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:35:30 +08:00
936af73ec0 feat: 国际进港舱单主分单独立选择及分离删除接口
主分单选择解除联动,删除操作使用独立接口,先删分单再删主单

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:23:20 +08:00
43acf0a2de fix: 国际进港装机单修改库位弹框仅单选时自动带出库位号
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 18:01:32 +08:00
c9625f6bfd fix: 国际进港舱单编辑页下拉框回填及移除404接口
- 使用 DictUtils checkedValue 机制回填编辑模式下拉框选中项
- 移除已404的 searchCargoType 接口调用
- PadDataLayoutNew 增加 updateSpinnerSilently 防止 adapter 重建覆盖值
- CLAUDE.md 补充编辑表单 SPINNER 回填规范

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 17:55:19 +08:00
67b2dc6d71 feat: fix issues 2026-03-26 20:00:41 +08:00
bfc39b5d96 feat: query toast 2026-03-26 15:41:01 +08:00
fcf5b7ac02 feat: ui opt 2026-03-26 15:27:04 +08:00
da5137887c fix: 图片控件优化及多处字段修正
- 图片选择控件:加号按钮灰色背景、label 样式统一、图片区域并入表单卡片
- 国内进港移交:修复图片上传未提交 bug,从 adapter 实时获取图片列表
- 国内进港移库列表:添加右侧箭头,已出库禁止编辑
- 国际事故签证列表:修正 Bean 字段名匹配 API(dep/dest/pc/weight/dpc)
- 国际进港舱单:实到件数、计费重量、品名(中) 设为必填

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 13:37:47 +08:00
9e0a26f3bc feat: 进港签证 2026-03-26 12:03:09 +08:00
3918ad64d6 feat: 新增图片选择控件并修正事故签证字段
- 新增 ImageSelectNewViewHolder 和 item_image_select_new 布局,支持正方形缩略图、
  加号按钮始终在末尾、详情模式隐藏加号及"暂无图片"占位
- 国际事故签证编辑页和国内进港移交页应用新图片选择控件
- 修正事故签证字段:reweight → reWeight,opName/opDate → opId/opdate

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 12:02:16 +08:00
88bbd73fa1 fix: 国际事故签证新增时不传 id 字段
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 10:25:03 +08:00
9402d895db style: 统一列表项 UI 规范(textSize/颜色/间距/checkbox 资源)
- 国际出/进港所有列表项 KV 文字统一为 15sp
- 子列表 checkbox 资源由 _gray 系列改为 _style 系列
- 含子列表卡片 padding 统一为 10dp,展开按钮高度 18dp/padding 4dp
- ULD 管理状态字段"正常"改用 text_green
- 日志查询标签格式规范化(补冒号、修正 completeSpace)
- 航班管理非到达航班文字颜色改为 text_gray,保留航班号 colorPrimary 及 +1 text_red

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 10:02:32 +08:00
56945f8488 fix: 国际进港分单编辑主分校验使用总件数,并加大件数与重量间距
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:43:34 +08:00
471c81bdc7 feat: 国际进港舱单列表 REF 绿色高亮及装机单库位号字段修正
- 舱单列表项 REF=1 时显示浅绿色背景,展开按钮同步变为黑色
- 装机单列表库位号取值改为 locationTally 字段
- GjjManifest 新增 locationTally 字段

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:33:44 +08:00
6d2a79a639 fix: fix 出库 2026-03-25 17:20:42 +08:00
5981a60d68 Merge branch 'main' of ssh://git.njcqit.com:2222/eric/aerologic-app 2026-03-23 15:53:34 +08:00
9ed6a4e494 feat: opt 进港查询 filter form 2026-03-23 15:53:24 +08:00
26e7c040b3 feat: update ignore file 2026-03-23 13:12:45 +08:00
b2daabe2ab feat: opt log 2026-03-23 13:08:44 +08:00
de69eeefd8 feat: 日志详情页数据驱动渲染(流转状态+操作详情)
- 入口页传递运单号和运单类型至日志详情页
- 区分国际出港(9步骤)/国际进港(6步骤)流转节点
- 用status字段匹配节点状态(蓝色/白色/绿色)
- 修复API返回裸数组被拦截器包装导致解析失败的问题
- ScrollView改为NestedScrollView修复竖向列表不渲染

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 12:58:48 +08:00
56090e5092 feat: 国际出港/进港查询详情页增加日志详情入口
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 11:31:23 +08:00
59138535da feat: visa delete/detail 2026-03-22 22:50:38 +08:00
c7bf51bd9a feat: visa 2026-03-22 22:28:40 +08:00
d2a0648238 feat: fix issues 2026-03-22 21:54:16 +08:00
0ae77ffbf8 feat: 国际进港舱单新增页面优化(航班代入、必填校验、特码默认值)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:38:57 +08:00
78238907b0 feat: 国际进港舱单分单编辑页主分校验功能
将主分校验从接口查询改为本地实时计算,显示"分单之和/主单"格式,
超出主单时红色提示并禁止保存,品名(中)优先取goodsCn兜底取goods。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:23:02 +08:00
135 changed files with 5561 additions and 2818 deletions

159
.claude.local.md Normal file
View File

@@ -0,0 +1,159 @@
# 首页菜单页面地图
> **重要**:修改任何业务页面前,先在此处确认目标 Activity 是否为当前活跃页面。
> 若存在新旧两个同名/近名实现,以本文件中列出的为准(旧版已加 `@Deprecated`)。
>
> 菜单入口代码:`app/src/main/java/com/lukouguoji/aerologic/ui/fragment/HomeFragment.kt`
> 路由常量:`module_base/src/main/java/com/lukouguoji/module_base/router/ARouterConstants.kt`
---
## 一级菜单总览
| 菜单ID | 名称 | 模块 |
|--------|------|------|
| `DomExp` | 国内出港 | `module_gnc` |
| `DomImp` | 国内进港 | `app/page/gnj` |
| `IntExp` | 国际出港 | `module_gjc` |
| `IntImp` | 国际进港 | `module_gjj` |
| `Flight` | 航班查询 | `module_hangban` |
| `CargoStatus` | 货物追踪 | `module_cargo` |
| `Supervision` | 监装监卸 | `module_mit` + `app/page` |
| `Comprehensive` | 综合管理 | `app/page` |
---
## 国内出港DomExp& 国内进港DomImp
> ⛔ **不在维护范围内**:国内出港(`module_gnc`)和国内进港(`module_gnj` / `app/page/gnj`)不会涉及历史修改,也不会有新的需求。**无需关注这两个模块的任何页面。**
---
## 国际出港IntExp
路由前缀:`/gjc/`
### 二级菜单
| 菜单名 | 权限ID | Activity | 路由常量 |
|--------|--------|----------|---------|
| 收运检查 | `AppIntExpInspection` | `GjcInspectionActivity` | `ACTIVITY_URL_GJC_INSPECTION` |
| 出港计重 | `AppIntExpCheckWeighing` | `GjcWeighingListActivity` | `ACTIVITY_URL_GJC_WEIGHING_LIST` |
| 出港运抵 | `AppIntExpArrive` | `IntExpArriveActivity` | `ACTIVITY_URL_INT_EXP_ARRIVE` |
| 组装分配 | `AppIntExpAssembleAllocate` | `GjcAssembleAllocateActivity` | `ACTIVITY_URL_GJC_ASSEMBLE_ALLOCATE` |
| 出港组装 | `AppIntExpAssemble` | `IntExpAssembleActivity` | `ACTIVITY_URL_INT_EXP_ASSEMBLE` |
| 板箱过磅 | `GjcFuBangActivity`权限ID非类名| `GjcBoxWeighingActivity` | `ACTIVITY_URL_GJC_BOX_WEIGHING` |
| 出港装载 | `AppIntExpLoad` | `IntExpLoadActivity` | `ACTIVITY_URL_INT_EXP_LOAD` |
| 出库交接 | `AppIntExpOutHandover` | `IntExpOutHandoverActivity` | `ACTIVITY_URL_INT_EXP_OUT_HANDOVER` |
| 出港理货 | `AppIntExpTally` | `IntExpTallyActivity` | `ACTIVITY_URL_INT_EXP_TALLY` |
| 出港移库 | `AppIntExpMove` | `IntExpMoveActivity` | `ACTIVITY_URL_INT_EXP_MOVE` |
| 出港仓库 | `AppIntExpStorageUse` | `IntExpStorageUseActivity` | `ACTIVITY_URL_INT_EXP_STORAGE_USE` |
| 出港查询 | `AppIntExpSearch` | `GjcQueryListActivity` | `ACTIVITY_URL_GJC_QUERY_LIST` |
> ⚠️ 旧版文件(已加 `@Deprecated``GjcFuBangActivity``module_gjc/.../activity/`),已被 `GjcBoxWeighingActivity` 替代
---
## 国际进港IntImp
路由前缀:`/gjj/`
### 二级菜单
| 菜单名 | 权限ID | Activity | 路由常量 |
|--------|--------|----------|---------|
| 电报解析 | `AppIntImpMsgParse` | `IntImpMsgParseActivity` | `ACTIVITY_URL_INT_IMP_MSG_PARSE` |
| 进港舱单 | `AppIntImpManifest` | `IntImpManifestActivity` | `ACTIVITY_URL_INT_IMP_MANIFEST` |
| 原始舱单 | `AppIntArrAirManifest` | `IntArrAirManifestActivity` | `ACTIVITY_URL_INT_ARR_AIR_MANIFEST` |
| 理货报告 | `AppIntImpTally` | `IntImpTallyActivity` | `ACTIVITY_URL_INT_IMP_TALLY` |
| 进港仓库 | `AppIntImpWareHouse` | `GjjWareHouseActivity` | `ACTIVITY_URL_GJJ_WARE_HOUSE` |
| 提取记录 | `AppIntImpPickUpRecord` | `IntImpPickUpRecordActivity` | `ACTIVITY_URL_INT_IMP_PICK_UP_RECORD` |
| 提取出库 | `AppIntImpPickUpDLV` | `IntImpPickUpDLVActivity` | `ACTIVITY_URL_INT_IMP_PICK_UP_DLV` |
| 进港查询 | `AppIntImpSearch` | `IntImpQueryActivity` ⚡ | `ACTIVITY_URL_GJJ_QUERY_LIST` |
| 事故签证 | `AppIntImpAccidentVisa` | `IntImpAccidentVisaActivity` | `ACTIVITY_URL_INT_IMP_ACCIDENT_VISA` |
### 三级页面(进港舱单)
| 页面名 | Activity | 说明 |
|--------|----------|------|
| 舱单列表(入口) | `IntImpManifestActivity` | 二级入口页 |
| 舱单子列表 | `GjjManifestListActivity` | 活跃,独立路由 `ACTIVITY_URL_GJJ_MANIFEST` |
| 舱单详情 | `GjjManifestDetailsActivity` / `IntImpManifestDetailsActivity` | 两个活跃详情页 |
| 分单编辑 | `GjjManifestAddActivity` / `IntImpManifestSubEditActivity` | 活跃编辑页 |
### 三级页面(进港查询)
| 页面名 | Activity | 说明 |
|--------|----------|------|
| 查询列表(入口) | `IntImpQueryActivity` | 二级入口页(注意:非 GjjQueryListActivity|
| 查询详情 | `IntImpQueryDetailsActivity` | 活跃 |
| 运单修改 | `IntImpQueryEditActivity` | 活跃 |
> ⚠️ 旧版(已加 `@Deprecated``GjjQueryListActivity`、`GjjQueryInfoActivity`
---
## 航班查询Flight
直接跳转,无二级菜单。
| Activity | 路由 | 文件路径 |
|----------|------|---------|
| `HbQueryListActivity` | `/hb/HbQueryListActivity` | `module_hangban/...` |
> ⚠️ 旧版:`FlightQueryListActivity``app/.../page/flight/query/list/`)已加 `@Deprecated`,由 HomeFragment 注释确认废弃
---
## 货物追踪CargoStatus
直接跳转,无二级菜单。
| Activity | 路由 |
|----------|------|
| `CargoTrackingActivity` | `/cg/CargoTrackingActivity` |
---
## 监装监卸Supervision
### 二级菜单
| 菜单名 | 权限ID | Activity | 文件路径 |
|--------|--------|----------|---------|
| 进港卸机 | `AppImpLoad` | `GnjUnloadListActivity` | `app/.../page/gnj/unload/list/` |
| 事故签证(监装) | `AppAccidentVisa` | `AccidentVisaActivity` | 路由 `/mit/AccidentVisaActivity` |
| 事故签证(综合) | `AppComprehensiveAccidentVisa` | `AccidentVisaListActivity` | `app/.../page/accident/visa/list/` |
| 出港装板 | `AppExpLoad` | `OutLoadingActivity` | 路由 `/mit/OutLoadingActivity` |
---
## 综合管理Comprehensive
### 二级菜单
| 菜单名 | 权限ID | Activity | 文件路径 |
|--------|--------|----------|---------|
| 消息管理 | `AppComprehensiveMessage` | `MessageListActivity` | `app/.../page/message/list/` |
| 电报管理 | `AppComprehensiveTelegram` | `TelegramListActivity` | `app/.../page/telegram/list/` |
| 货物转运 | `AppComprehensiveTransfer` | `GoodsTransportActivity` | `app/.../page/transport/` |
| 平板车管理 | `AppComprehensiveCar` | `CarListActivity` | `app/.../page/car/list/` |
| 日志查询 | `AppComprehensiveLog` | `LogQueryActivity` | `app/.../page/log/list/` |
| 转运记录 | `AppTransportLog` | `TransportLogActivity` | `app/.../page/transportLog/list/` |
| ULD管理 | `AppComprehensiveUld` | `UldListActivity` | `app/.../page/uld/list/` |
| 冷库登记 | `AppComprehensiveColdStorage` | `ColdStorageActivity` | `app/.../page/coldStorage/list/` |
---
## 废弃页面清单(已加 @Deprecated
以下页面确认废弃,勿修改、勿参考:
| 废弃类名 | 文件路径 | 替代页面 | 依据 |
|----------|---------|---------|------|
| `FlightQueryListActivity` | `app/.../page/flight/query/list/` | `HbQueryListActivity` | HomeFragment 注释"已废弃" |
| `HangBanQueryActivity` | `module_hangban/.../activity/` | `HbQueryListActivity` | 路由注释"已废弃,使用 HbQueryListActivity" |
| `HangBanQueryInfoActivity` | `module_hangban/.../activity/` | — | 仅被废弃的 HangBanQueryActivity 调用,实际不可达 |
| `GjcFuBangActivity` | `module_gjc/.../activity/` | `GjcBoxWeighingActivity` | HomeFragment 注释"旧版跳转" |
| `GjjQueryListActivity` | `module_gjj/.../activity/` | `IntImpQueryActivity` | 路由被注释IntImpQueryActivity 接管同一路由 |
| `GjjQueryInfoActivity` | `module_gjj/.../activity/` | `IntImpQueryDetailsActivity` | 路由注释"已替换为 IntImpQueryDetailsActivity" |

View File

@@ -103,13 +103,48 @@
"mcp__apifox__read_project_oas_ref_resources_kcl8s7", "mcp__apifox__read_project_oas_ref_resources_kcl8s7",
"mcp__apifox__read_project_oas_x3v6fh", "mcp__apifox__read_project_oas_x3v6fh",
"mcp__apifox__read_project_oas_ref_resources_x3v6fh", "mcp__apifox__read_project_oas_ref_resources_x3v6fh",
"mcp__plugin_claude-mem_mcp-search__smart_outline" "mcp__plugin_claude-mem_mcp-search__smart_outline",
"Bash(find /Users/kid/Development/Fusion/Projects/aerologic-app/module_gjj/src/main -type f \\\\\\(-name *IntImpAccidentVisa* -o -name *AccidentVisa* \\\\\\))",
"mcp__apifox__read_project_oas_g3xqex",
"mcp__apifox__read_project_oas_ref_resources_g3xqex",
"mcp__apifox__refresh_project_oas_g3xqex",
"mcp__apifox__read_project_oas_4h0w3b",
"mcp__apifox__read_project_oas_ref_resources_4h0w3b",
"mcp__apifox__read_project_oas_6i29va",
"mcp__apifox__read_project_oas_ref_resources_6i29va",
"mcp__plugin_claude-mem_mcp-search__smart_search",
"Bash(echo \"exit:$?\")",
"mcp__apifox__read_project_oas_j7j64k",
"mcp__apifox__read_project_oas_ref_resources_j7j64k",
"mcp__apifox__read_project_oas_ruugy8",
"mcp__apifox__read_project_oas_ref_resources_ldmedm",
"mcp__apifox__read_project_oas_ldmedm",
"mcp__apifox__refresh_project_oas_ldmedm",
"Skill(update-config)",
"mcp__apidoc__get_project_overview",
"mcp__apidoc__search_endpoints",
"mcp__apidoc__list_endpoints",
"mcp__apidoc__get_endpoint_detail",
"mcp__api-doc__search_endpoints",
"mcp__api-doc__get_endpoint_detail",
"mcp__api-doc__list_modules",
"mcp__api-doc__list_endpoints",
"Bash(sed -n '11,15p' /Users/kid/Development/Fusion/Projects/aerologic-app/app/src/main/java/com/lukouguoji/aerologic/page/flight/query/list/FlightQueryListActivity.kt)",
"Bash(sed -n '23,27p' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gjc/src/main/java/com/lukouguoji/gjc/activity/GjcFuBangActivity.kt)",
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港出库,已由 Gnc 前缀新版页面替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutChuKuListActivity.kt)",
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港收运,已由 Gnc 前缀新版页面替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutCollectionActivity.kt)",
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港复磅,使用 GncFuBangListActivity 替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutFuBangActivity.kt)",
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港复磅(组合),使用 GncFuBangListActivity 替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutFuBangCotActivity.kt)",
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港收运开始,使用 GncShouYunUnListActivity 替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutStartCotActivity.kt)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []
}, },
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [ "enabledMcpjsonServers": [
"空港集团 - API 文档", "空港集团 - API 文档",
"apifox" "apifox",
"aerologic-app",
"apidoc"
] ]
} }

View File

@@ -0,0 +1,465 @@
---
name: new-page
description: 根据设计截图和菜单入口名称,在 AirLogistics 项目中创建新的业务页面。自动分析截图判断页面类型6种典型类型之一规划所需文件然后完整实现Kotlin + XML + 路由注册 + 菜单接入)。当用户说"创建页面"、"新建页面"、"实现这个页面"、"做这个页面"或提供设计截图要求开发时触发。
---
# 新建业务页面
根据设计截图和菜单入口名称,在 AirLogistics 项目中完整创建一个新的业务页面。
## 前置要求
用户需要提供:
1. **设计截图**(必须)— 页面 UI 设计图
2. **菜单入口名称**(必须)— 页面在首页菜单中显示的名称
3. **所属模块**(可选)— 如 module_gjj国际进港、module_gjc国际出港可从截图标题推断
## 执行步骤
### 第 1 步:分析截图,判定页面类型
仔细阅读截图,提取以下信息:
1. **页面标题**(标题栏文字)
2. **搜索区字段**(每个搜索控件的 hint 文本、类型:日期/输入/下拉/扫码)
3. **列表项字段**(每个数据字段的标签名和显示格式)
4. **底部操作栏**(统计项 + 操作按钮)
5. **特殊交互**(全选、展开/收起、右箭头、子列表等)
然后对照 CLAUDE.md 中的 **6 种典型页面类型**判定:
| 类型 | 关键特征 | 判定依据 |
|------|----------|----------|
| **类型 1列表查询页** | 搜索 + 分页列表 + 底部统计 | 无全选、无勾选,纯查看 |
| **类型 2多选列表 + 批量操作页** | 类型 1 + 全选按钮 + 飞机图标选中态 + 操作按钮 | 有全选、有批量操作按钮(如"清除提货" |
| **类型 3嵌套多选列表页** | 类型 2 + 子列表(展开/收起)+ 主子联动全选 | 有展开按钮、列表项内含子 RecyclerView |
| **类型 4Tab 详情页** | 自定义 Tab 栏 + ViewPager2 + 多 Fragment | 有 Tab 切换、无列表搜索 |
| **类型 5编辑表单页** | ScrollView + PadDataLayoutNew 表单 + 保存/取消 | 有可编辑字段、有保存按钮 |
| **类型 6添加表单页** | 类型 5 + 输入回调 + 实时计算 | 有 setRefreshCallBack 联动 |
**向用户确认**判定结果,格式:
```
📋 页面分析结果:
页面标题XXX
页面类型:类型 N — XXXX
所属模块module_xxx
搜索条件:
1. XXXDATE
2. XXXSPINNER
3. XXXINPUT + 扫码)
列表字段第一行XXX | XXX | XXX
列表字段第二行XXX | XXX | XXX
底部操作:全选 + 统计(合计/总件数/总重量) + [操作按钮名称]
是否正确?确认后开始实现。
```
### 第 2 步:查找参考模板并提取 UI 设计规范
根据判定的页面类型,在项目中找到**同类型的最新参考实现**,并严格提取 UI 设计规范。
**查找策略**(优先级从高到低):
1. 优先查找**最近提交的同类型页面**(最新的页面代表最新的 UI 规范)
2. 其次在**同模块**内查找同类型页面
3. 最后在 **module_gjc**(国际出港)查找
**最新典型参考页面**2024年后新增代表当前 UI 规范):
| 页面类型 | 参考页面 | 布局文件 |
|----------|----------|----------|
| 列表查询页 | 航班查询列表 | `activity_flight_query_list.xml` / `item_flight_query_list.xml` |
| 列表查询页 | 日志查询页 | `activity_log_query.xml` / `item_log_query.xml` |
| 详情页 | 航班查询详情 | `activity_flight_query_details.xml` |
| 详情页 | 日志详情 | `activity_log_detail.xml` |
**必须读取的参考文件**
- 上述最新典型参考页面中**与当前页面类型匹配的布局 XML**Activity 布局 + Item 布局)
- 对应的 Activity、ViewModel、ViewHolder Kotlin 代码
- Dialog如有批量操作弹窗
**UI 设计规范提取(必做)**
读取参考布局后,必须逐一确认以下规范项,并在开发计划中明确列出:
| 规范项 | 必须确认的内容 |
|--------|---------------|
| 页面背景色 | 根容器 `background` 属性(新规范:`@color/color_f2` |
| 搜索区样式 | 使用的搜索控件类型、间距、布局方式 |
| 搜索按钮样式 | 图标资源、尺寸、style新规范`@drawable/img_search`36dp |
| 底部栏背景色 | 背景色 + 文字颜色(新规范有两种变体) |
| 底部栏文字样式 | 字号、粗细、颜色 |
| 列表项背景 | 背景、间距、padding |
| 详情页卡片样式 | 背景、圆角、padding、行间距 |
| 表单控件 | 使用 PadDataLayoutNew非旧版 PadDataLayout |
**同时检查**
- 该页面需要的**下拉列表数据源 API** 是否已存在(代理人、特码等)
- 该页面需要的 **Bean 类**是否已存在,或需要新建
- `ARouterConstants` 中是否已有对应路由常量
- `Constant.AuthName` 中是否已有对应权限名
### 第 3 步:制定文件清单
列出所有需要**新建**和**修改**的文件。
**新建文件清单**(根据页面类型调整):
| 类别 | 文件 | 路径 |
|------|------|------|
| Bean | `XxxBean.kt`(如需) | `module_base/.../bean/` |
| Activity | `XxxActivity.kt` | `module_xxx/.../activity/` |
| ViewModel | `XxxViewModel.kt` | `module_xxx/.../viewModel/` |
| ViewHolder | `XxxViewHolder.kt` | `module_xxx/.../holder/` |
| Dialog | `XxxDialogModel.kt`(如需) | `module_xxx/.../dialog/` |
| Activity 布局 | `activity_xxx.xml` | `module_xxx/.../res/layout/` |
| Item 布局 | `item_xxx.xml` | `module_xxx/.../res/layout/` |
| Dialog 布局 | `dialog_xxx.xml`(如需) | `module_xxx/.../res/layout/` |
**修改文件清单**(固定):
| 文件 | 修改内容 |
|------|----------|
| `Api.kt` | 添加 API 接口方法 + import |
| `ARouterConstants.kt` | 添加路由常量(如不存在) |
| `Constant.kt` | 添加 AuthName 常量(如不存在) |
| `AndroidManifest.xml` | 注册 Activity |
| `HomeFragment.kt` | 添加菜单项 + 点击路由处理 |
| 旧版 Activity如有 | 注释掉 `@Route` 注解避免冲突 |
### 第 4 步:创建 Bean如需
如果截图中的列表字段与现有 Bean 不匹配,创建新的 Bean 类。
**规则**
- 放在 `module_base/.../bean/` 目录下
- 如果是类型 2/3多选必须包含 `ObservableBoolean` 选中状态:
```kotlin
val checked: ObservableBoolean = ObservableBoolean(false)
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
```
- 字段类型映射:数字用 `Int/Long/Double`,文本用 `String = ""`,时间用 `String = ""`
-`Api.kt` 的 import 区按字母顺序添加 import
### 第 5 步:添加 API 接口
`Api.kt` 中添加 API 方法。
**标准 API 组合**(根据页面需要选取):
- `getXxxList(@Body)` — 分页查询,返回 `PageInfo<XxxBean>`
- `getXxxTotal(@Body)` — 分页合计,返回 `BaseResultBean<ManifestTotalDto>`
- 批量操作 API — 返回 `BaseResultBean<Boolean>`
- 下拉列表 API代理人、特码等— 如不存在则添加
**API 路径命名**:先使用 `ModuleName/methodName` 格式占位(如 `IntImpPickUpRecord/pageQuery`),后续由第 13 步替换为真实接口路径
### 第 6 步:添加路由和权限常量
1.`ARouterConstants.kt` 添加路由(如不存在):
```kotlin
const val ACTIVITY_URL_XXX = "/module/XxxActivity"
```
2.`Constant.kt``AuthName` 中添加权限名(如不存在):
```kotlin
const val XxxPage = "AppXxxPage"
```
### 第 7 步:创建 ViewHolder
根据 item 布局创建 ViewHolder。
**类型 1**:基础绑定
**类型 2**:增加图标点击切换 `checked` 状态
**类型 3**:增加子列表 `setCommonAdapter` + 展开按钮 + 父子联动
### 第 8 步:创建 ViewModel
**必须包含的元素**(根据截图):
- 搜索条件 `MutableLiveData`(与搜索区对应)
- 下拉列表数据源 `MutableLiveData<List<KeyValue>>`
- 统计字段 `MutableLiveData<String>`
- 适配器配置:`itemViewHolder` + `itemLayoutId`
- `searchClick()` 方法
- `getData()` override调用列表 API + 统计 API
**类型 2 额外**`isAllChecked` + `checkAllClick()` + 批量操作方法
**类型 3 额外**`isAllExpanded` + `toggleAllExpand()` + 联动全选逻辑
**下拉列表初始化**
- 代理人:`DictUtils.getAgentList()` / `NetApply.api.getIntImpAgentList()` / `getIntExpAgentList()`
- 特码:`DictUtils.getSpecialCodeList(flag, ieFlag, parentcode)`
- 其他字典:`DictUtils` 或自定义 API
### 第 9 步:创建布局文件
**⚠️ 重要:所有布局必须严格遵循最新 UI 设计规范,参照第 2 步中提取的规范项。**
---
#### 新版 UI 设计规范(强制执行)
**1. 页面背景色**
```xml
<!-- 根容器必须使用 color_f2 背景色 -->
<LinearLayout
android:background="@color/color_f2"
android:orientation="vertical">
```
**2. 搜索区规范**
```xml
<!-- 搜索区marginHorizontal=10dp, marginTop=10dp, gravity=center_vertical -->
<LinearLayout
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical">
<!-- 搜索控件使用 PadSearchLayout -->
<PadSearchLayout
type="@{SearchLayoutType.DATE}"
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
value="@={viewModel.date}"
android:layout_width="0dp"
android:layout_weight="1" />
<!-- 搜索按钮img_search 图标36x36dppadding=2dp -->
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:padding="2dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
```
**3. 底部统计栏规范**(两种变体,根据截图选择):
**变体 A — 深蓝色底部栏**(多数列表页使用):
```xml
<LinearLayout
android:layout_height="50dp"
android:background="@color/color_bottom_layout"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<TextView
android:text='@{"合计:"+viewModel.count+"条"}'
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
```
**变体 B — 白色底部栏**
```xml
<LinearLayout
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<TextView
android:text='@{"合计:" + viewModel.count + "条"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
```
**4. 详情页/表单页规范**
- 必须使用 **PadDataLayoutNew**(非旧版 PadDataLayout
- 卡片背景:`@drawable/bg_white_radius_8`padding `15dp`
- 行间距:`marginTop="8dp"`
- 三列标准布局,每列 `layout_weight="1"`
```xml
<ScrollView android:fillViewport="true">
<LinearLayout android:padding="15dp" android:orientation="vertical">
<LinearLayout android:background="@drawable/bg_white_radius_8"
android:padding="15dp" android:orientation="vertical">
<LinearLayout android:orientation="horizontal">
<PadDataLayoutNew layout_weight="1" enable="@{false}"
title='@{"航班日期"}' type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.fdate}' />
<!-- 更多列... -->
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:layout_marginTop="8dp">
<!-- 第二行... -->
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
```
---
#### Activity 布局完整结构
```xml
<layout>
<data>
<import SearchLayoutType />
<variable viewModel />
<variable activity /> <!-- 类型 3 或有 Dialog 操作时 -->
</data>
<LinearLayout background="@color/color_f2" vertical> <!-- ← 新规范:背景色 -->
<include title_tool_bar />
<!-- 搜索区marginHorizontal=10dp, marginTop=10dp -->
<LinearLayout horizontal marginHorizontal="10dp" marginTop="10dp">
PadSearchLayout × N + 搜索按钮(img_search, 36dp) <!-- ← 新规范:搜索按钮 -->
</LinearLayout>
<!-- 列表 -->
<SmartRefreshLayout> <RecyclerView /> </SmartRefreshLayout>
<!-- 底部栏50dp根据截图选择深蓝/白色变体 --> <!-- ← 新规范:底部栏 -->
<LinearLayout height="50dp" background="..." paddingHorizontal="15dp">
<TextView textSize="18sp" textStyle="bold" />
</LinearLayout>
</LinearLayout>
</layout>
```
#### Item 布局(从截图精确还原每一行每一列)
- 逐行对照截图中的字段顺序和标签文本
- 使用 `completeSpace` 对齐 Key 文本
- 运单号等关键字段用 `@color/colorPrimary`
- 类型 2/3 左侧有飞机图标:`loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"`
- 列表项背景统一使用 `@drawable/bg_item`
- 间距统一:`marginHorizontal="15dp"`, `marginVertical="5dp"`, `padding="10dp"`
**关键原则:务必尽可能还原截图上的页面设计,不推测不假想。**
### 第 10 步:创建 Activity
**固定结构**
```kotlin
@Route(path = ARouterConstants.ACTIVITY_URL_XXX)
class XxxActivity : BaseBindingActivity<XxxBinding, XxxViewModel>() {
override fun layoutId() = R.layout.activity_xxx
override fun viewModelClass() = XxxViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("页面标题") // 与截图标题一致
binding.viewModel = viewModel
binding.activity = this // 类型 3 或有 Dialog 时
// 类型 2/3观察全选状态
viewModel.isAllChecked.observe(this) { binding.checkIcon.alpha = if (it) 1.0f else 0.5f }
// 绑定分页
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) { viewModel.refresh() }
// 初始化下拉列表(如有)
viewModel.initAgentList()
viewModel.initSpecialCodeList()
viewModel.refresh()
}
}
```
### 第 11 步:注册 Activity + 菜单入口
1. **AndroidManifest.xml**:在其他 gjj Activity 注册附近添加:
```xml
<activity android:name="com.lukouguoji.xxx.activity.XxxActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false" android:screenOrientation="userLandscape" />
```
2. **HomeFragment.kt**
- 在对应模块的菜单列表区添加 `RightMenu` 项(图标 + 标题)
- 在 onClick 处理区添加路由跳转
3. **旧版 Activity**(如有):注释掉 `@Route` 注解
### 第 12 步:编译验证
```bash
./gradlew assembleDebug
```
编译必须通过0 errors。如有错误立即修复后重新编译。
### 第 13 步:查找并对接 API 接口
页面创建并编译通过后,通过"空港集团 - API 文档"Apifox MCP 工具查找真实接口,替换第 5 步中的占位路径。
**A. 基础接口查找(每次必查):**
1. 根据页面所属业务路径(如"国际进港 → 原始舱单"),在 Apifox MCP 中按模块目录搜索
2. 查找以下基础接口:
- **列表接口**(分页查询,如 `pageQuery``list`
- **合计接口**(统计,如 `total``count``statistics`
- **修改/保存接口**(如 `update``save``edit`
- **删除接口**(如 `delete``remove`
**B. 智能接口匹配(根据页面分析):**
3. 根据**页面类型特性**查找对应接口:
- 类型 2多选批量操作→ 查找批量操作接口(如批量删除、批量确认等)
- 类型 3嵌套列表→ 查找子列表相关接口
- 类型 5/6表单页→ 查找详情查询接口、下拉选项字典接口
- 类型 4Tab 详情)→ 查找各 Tab 对应的数据接口
4. 根据**页面中的按钮和文案**,逐一匹配对应接口:
- 例如页面有"审核"按钮 → 查找审核接口
- 例如页面有"导出"按钮 → 查找导出接口
- 例如页面有"打印"按钮 → 查找打印相关接口
- 例如底部栏有"清除提货"按钮 → 查找清除提货接口
- 例如搜索区有下拉框(代理人、状态等)→ 查找对应的字典/下拉数据接口
5. 根据**截图中可见的交互元素**,推断可能需要的接口:
- 列表项有右箭头 → 可能需要详情接口
- 列表项有编辑图标 → 可能需要编辑/更新接口
- 有扫码图标 → 可能需要扫码查询接口
**C. 对接与校准:**
6. 找到接口后,更新 `Api.kt` 中的占位路径为真实路径
7. 根据接口的请求参数和返回字段结构,校准 Bean 类的字段名和类型
8. 遵循 memory 中的 API 搜索原则:不跨模块混用接口,遇到不确定的接口询问用户确认
### 第 14 步:重新编译验证
对接真实 API 后重新编译,确保无错误:
```bash
./gradlew assembleDebug
```
编译必须通过0 errors。如有错误立即修复后重新编译。
## 注意事项
### UI 设计规范(强制)
- **必须使用最新 UI 规范**:不管是新增页面、覆盖旧页面还是修改旧页面,都必须完全采用最新典型参考页面的 UI 设计规范
- **页面背景色**:根容器必须使用 `@color/color_f2``#F2F2F2`),禁止使用旧的白色或其他背景
- **搜索按钮**:使用 `@drawable/img_search` 图标36x36dp + padding 2dp不使用旧的 `iv_search_action` style
- **底部栏**:高度 50dp文字 18sp bold根据截图选择深蓝色`@color/color_bottom_layout` + 白字)或白色(`@color/white` + `@color/bottom_tool_tips_text_color`
- **详情页/表单页**:必须使用 **PadDataLayoutNew**(非旧版 PadDataLayout卡片用 `bg_white_radius_8`
- **严格匹配典型页面**:在写开发计划前,必须先读取最新典型参考页面(如航班查询列表、日志查询页等),总结并列出 UI 设计规范要点
### 通用规则
- **资源引用必须存在**:使用 drawable/color/mipmap 前确认资源存在,不存在则换用已有资源
- **import 路径查阅 CLAUDE.md**:基类和扩展函数的正确 import 路径参见开发指南的 Import 速查表
- **不创建不需要的文件**:如果截图中没有 Dialog 弹窗,不要创建 Dialog 文件
- **Bean 复用优先**:如果现有 Bean 的字段足以覆盖截图需求,直接复用
- **API 接口对接**:页面创建完成后,通过空港集团 API 文档 MCP 查找真实接口并替换占位路径。遵循 API 搜索原则,按业务模块目录查找,不跨模块混用
- **DataBinding 规则**:遵循 CLAUDE.md 中的 DataBinding 关键规则双向绑定、字符串拼接、View 导入等)

3
.gitignore vendored
View File

@@ -113,7 +113,7 @@ captures/
*.swp *.swp
# Keystore files # Keystore files
*.jks # *.jks
*.keystore *.keystore
# Google Services (e.g. APIs or Firebase) # Google Services (e.g. APIs or Firebase)
@@ -192,6 +192,7 @@ fabric.properties
# End of https://www.toptal.com/developers/gitignore/api/androidstudio,gradle,java,kotlin # End of https://www.toptal.com/developers/gitignore/api/androidstudio,gradle,java,kotlin
.vfox/ .vfox/
.vfox/sdks/java
# Auto Claude data directory # Auto Claude data directory
.auto-claude/ .auto-claude/

View File

@@ -1,14 +1,10 @@
{ {
"mcpServers": { "mcpServers": {
"apifox": { "api-doc": {
"command": "npx", "type": "http",
"args": [ "url": "https://www.agentfoxapp.com/mcp/976caff7-5f98-4487-bccf-3aa20c92cf1f",
"-y", "headers": {
"apifox-mcp-server@latest", "Authorization": "Bearer afk_G_VKmHTdXUi3GjQdg5AeHeH-0BSYQEPP"
"--project-id=7382863"
],
"env": {
"APIFOX_ACCESS_TOKEN": "APS-S2aVVwqasbdByzPLgSqryRC8BB0ZFqhQ"
} }
} }
} }

View File

@@ -1 +0,0 @@
/Users/kid/.version-fox/cache/java/v-17+35-amzn/java-17+35-amzn

241
CLAUDE.md
View File

@@ -402,6 +402,55 @@ fun toggleAllExpand() {
| `radiobtn_unchecked_style` | 未选中 | 透明 + 黑色边框圆 | | `radiobtn_unchecked_style` | 未选中 | 透明 + 黑色边框圆 |
| ~~`radiobtn_checked_gray`~~ | ❌ 禁用 | 灰色实心圆(错误样式) | | ~~`radiobtn_checked_gray`~~ | ❌ 禁用 | 灰色实心圆(错误样式) |
#### 含子列表的列表项 UI 规范(以 `item_int_exp_storage_use.xml` 为基准)
**主列表项卡片**
| 部位 | 属性 | 标准值 |
|------|------|--------|
| 外层容器 | marginHorizontal / marginTop | 10dp / 10dp |
| 卡片背景 | background | `@drawable/bg_white_radius_8` |
| 内容区 | padding | **10dp** |
| 选中图标 | 尺寸 / marginEnd | 40×40dp / 10dp |
| 选中图标 | 切换资源 | `img_plane_s`(选中)/ `img_plane`(未选中)|
| KV 文字 | textSize | **15sp**Key 和 Value 均需显式设置)|
| 首要字段值(运单号)| textColor | `@color/colorPrimary` |
| 其他字段 | textColor | 无需设置(继承默认 text_normal|
| 两行间距 | layout_marginTop | 10dp |
**展开/折叠按钮(`iv_show`**
| 属性 | 标准值 |
|------|--------|
| layout_height | **18dp** |
| padding | **4dp** |
| layout_marginBottom | 5dp**不设 marginTop**|
| src | `@mipmap/img_down` |
| 显示控制 | `visible="@{bean.subList != null && !bean.subList.empty}"` |
**子列表区域**
- 容器:`layout_marginTop="5dp"``background="#e3f6e0"`
- 表头行:`layout_marginVertical="10dp"``paddingHorizontal="10dp"`
- 表头文字:`textSize="14sp"``textColor="@color/text_normal"``textStyle="bold"``gravity="center"`
- 表头下方分隔线:`MaterialDivider` 高度 1px`background="@color/c999999"`
- 子列表项 padding`paddingHorizontal="10dp"``paddingVertical="8dp"`
- 子列表文字:`textSize="14sp"``textColor="@color/text_normal"``gravity="center"``layout_gravity="center_vertical"`
**子列表复选框(关键)**
```xml
<ImageView
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:src="@drawable/radiobtn_unchecked_style" />
```
> `loadImage` 和 `android:src` **均须**使用 `_style` 系列,**禁止**使用 `_gray` 系列(参见上方复选框样式表)
**参考文件**: `module_gjc/.../IntExpStorageUseActivity.kt``IntExpStorageUseViewModel.kt` **参考文件**: `module_gjc/.../IntExpStorageUseActivity.kt``IntExpStorageUseViewModel.kt`
--- ---
@@ -638,6 +687,8 @@ fun resetClick() {
基于 `BaseDialogModel`XPopup 封装),支持 5 种弹窗类型。 基于 `BaseDialogModel`XPopup 封装),支持 5 种弹窗类型。
> ⚠️ **强制规则**:所有二次确认弹框**必须**使用 `ConfirmDialogModel``com.lukouguoji.module_base.model.ConfirmDialogModel`**禁止**使用系统 `AlertDialog`。
### 基础模板 ### 基础模板
```kotlin ```kotlin
@@ -763,6 +814,25 @@ adb logcat | grep "com.lukouguoji.aerologic" # 日志
`completeSpace="@{5}"` 设置 Key 文本宽度(以"一"字宽度为单位),用于 Key-Value 布局对齐。 `completeSpace="@{5}"` 设置 Key 文本宽度(以"一"字宽度为单位),用于 Key-Value 布局对齐。
### AutoQuery 自动查询PadSearchLayout / PadDataLayoutNew
两个组件均支持输入时自动联想查询,只需在 XML 添加属性,无需修改 Kotlin
```xml
<PadSearchLayout
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpSearch/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
... />
```
- 1条结果 → 直接填充;多条结果 → 弹出选择列表0条结果 → 无处理
- 通用 API 方法:`Api.getWbNoList(@Url url, @Body data)` 返回 `BaseResultBean<List<String>>`
- 关键文件:`module_base/.../ui/weight/data/layout/AutoQueryManager.kt`
--- ---
## Import 路径速查 ## Import 路径速查
@@ -789,7 +859,20 @@ adb logcat | grep "com.lukouguoji.aerologic" # 日志
### 扩展函数(均在 `com.lukouguoji.module_base.ktx` 包下) ### 扩展函数(均在 `com.lukouguoji.module_base.ktx` 包下)
`launchCollect``launchLoadingCollect``showToast``toRequestBody``verifyNullOrEmpty``noNull``formatDate` `launchCollect``launchLoadingCollect``showToast``toRequestBody``verifyNullOrEmpty``noNull``formatDate``setUpperCaseAlphanumericFilter`
### 工具类
| 类 | 正确路径 |
|----|----------|
| `DictUtils` | `com.lukouguoji.module_base.util.DictUtils` |
| `MediaUtil` | `com.lukouguoji.module_base.util.MediaUtil` |
| `UploadUtil` | `com.lukouguoji.module_base.util.UploadUtil` |
| `KeyValue` | `dev.utils.app.info.KeyValue` |
| `DateUtils` | `dev.utils.common.DateUtils` |
| `SharedPreferenceUtil` | `com.lukouguoji.module_base.db.perference.SharedPreferenceUtil` |
| `ScanModel` | `com.lukouguoji.module_base.model.ScanModel` |
| `ConfirmDialogModel` | `com.lukouguoji.module_base.model.ConfirmDialogModel` |
--- ---
@@ -812,6 +895,59 @@ adb logcat | grep "com.lukouguoji.aerologic" # 日志
--- ---
## 编辑表单下拉框SPINNER回填规范
编辑页面DetailsPageType.Modify下拉框需要根据已有数据自动选中对应项。**必须使用 `DictUtils``checkedValue` 参数**,禁止依赖组件自动匹配 value。
### 原理
`DictUtils``handleCallBack` 会将 `checkedValue` 匹配的 `KeyValue` 置于列表首位。`PadDataLayoutNew` 的 SPINNER 默认显示列表第 0 项,因此匹配项自动成为选中项,无需额外设置 selectedIndex。
### 标准做法(参考 `GjjManifestDetailsViewModel`、`GjjManifestAddViewModel`
1. **字典加载必须在编辑数据加载之后**(不能放在 `init` 中),确保 `checkedValue` 可用
2. **编辑模式传入 `checkedValue`**,新增模式传 `null`
3. **编辑模式不预置空 `KeyValue("", "")`**(否则空项会占据首位,覆盖 checkedValue 排序)
```kotlin
fun initOnCreated(intent: Intent) {
// 1. 先解析页面类型和编辑数据
if (pageType.value == DetailsPageType.Modify) {
loadManifestFromBean(bean) // 设置 agent.value、specialCode.value 等
}
// 2. 再加载字典列表(此时 checkedValue 已可用)
loadDictLists()
}
private fun loadDictLists() {
val isModify = pageType.value == DetailsPageType.Modify
DictUtils.getXxxList(
addAll = false,
checkedValue = if (isModify) field.value else null // 编辑模式传值,新增传 null
) {
xxxList.postValue(if (isModify) it else listOf(KeyValue("", "")) + it)
}
}
```
### checkedValue 取值规则
提交时用的哪个字段值,`checkedValue` 就传哪个。对照 `toKeyValue()``value` 字段确认匹配:
| DictUtils 方法 | KeyValue.value 来源 | checkedValue 示例 |
|---|---|---|
| 通用(`handleCallBack` | `DictBean.code` | `manifest.agentCode`(如 "SFINT" |
| `getShouYunPackageTypeList` | `PackageBean.name` | `manifest.packageType`(如 "木框" |
### 禁止做法
- ❌ 在 `init` 中加载字典(编辑数据尚未可用,无法传 `checkedValue`
- ❌ 依赖 `PadDataLayoutNew``value` 属性自动匹配列表Spinner adapter 重建时 `onItemSelected` 回调会覆盖已有值)
- ❌ 编辑模式下在列表前添加 `KeyValue("", "")`(会干扰 `checkedValue` 置顶排序)
---
## 开发检查清单 ## 开发检查清单
### 新页面开发必做 ### 新页面开发必做
@@ -854,6 +990,109 @@ companion object {
} }
``` ```
### API 接口目录对应规则
为某页面查找接口时,**必须按业务路径匹配对应 API 目录**,不能跨模块借用。
| API 前缀 | 所属模块 |
|----------|---------|
| `IntImpManiFest/` | 国际进港-进港舱单(增删改查) |
| `IntImpAirManifest/` | 国际进港-原始舱单(申报、补充信息等) |
不同前缀代表不同业务,即使功能语义相似(如"更新"),也不能混用。不确定时询问用户。
### 页面定位规则
修改代码前,必须确认目标文件是**首页菜单实际跳转到的 Activity/ViewModel**,而非同名旧版文件。同一业务有多个实现时,以首页菜单入口链路为准。
---
## 图片上传与展示规范
### 图片上传三字段规范
上传图片后提交表单时,**必须同时传 `pic``originalPic``picNumber` 三个字段**,缺一不可。
**`UploadUtil.upload()` 返回值**(注意:**与字面意思相反**:
- `data?.newName` — **原图**文件名(较大)
- `data?.zipFileName` — **缩略图/压缩图**文件名(较小)
**提交时字段映射**(参考事故签证 `AccidentVisaDetailsViewModel``IntImpAccidentVisaEditViewModel`:
```kotlin
// FileBean 字段含义(约定用途,与 UploadBean 字段名不一致):
// - FileBean.url 作缩略图标识(提交到 bean.pic
// - FileBean.originalPic 作原图标识(提交到 bean.originalPic
// 上传新图片(注意 UploadBean 字段名的误导性,按实际含义赋值)
val data = UploadUtil.upload(fileBean.path).data
fileBean.url = data?.zipFileName ?: "" // 缩略图
fileBean.originalPic = data?.newName ?: "" // 原图
// 提交时设置三个字段
bean.picNumber = list.size.toString()
bean.pic = list.joinToString(",") { MediaUtil.removeUrl(it.url) } // 缩略图
bean.originalPic = list.joinToString(",") { MediaUtil.removeUrl(it.originalPic) } // 原图
```
**常见错误**:
- ❌ 只传 `images``originalPic` 单个字段 — 接口不认或数据不完整
- ❌ 只取 `newName` 不取 `zipFileName` — 丢失缩略图/原图之一
- ❌ 按 `UploadBean` 字段字面含义赋值(`url = newName`)— 会导致 pic/originalPic 内容和字段语义颠倒(缩略图字段装原图、原图字段装缩略图)
- ❌ 用 `fileBean.path.startsWith("http")` 判断已上传 — 应该用 `fileBean.url.isNotEmpty()`
### 编辑页加载已有图片
从详情接口获取图片后,需要同时解析 `pic`(缩略图)和 `originalPic`(原图),构建完整的 `FileBean`
```kotlin
val picList = bean.pic.split(",").filter { it.isNotEmpty() }
val originalPicList = bean.originalPic.split(",").filter { it.isNotEmpty() }
val images = picList.mapIndexed { index, picUrl ->
val originalFile = originalPicList.getOrElse(index) { picUrl }
FileBean(
path = MediaUtil.fillUrl(picUrl), // 完整URL用于显示
url = picUrl, // 相对路径,提交时用
originalPic = MediaUtil.fillUrl(originalFile) // 原图完整URL
)
}.toMutableList()
```
### 图片加载必须带 Authorization Header
`/file/getImg/` 接口需要鉴权Glide 默认不带 token直接用 `loadImage` BindingAdapter 会 **403 Forbidden**
**正确做法** — 在 ViewHolder 中使用 `GlideUrl` + `LazyHeaders`
```kotlin
// 缩略图加载ViewHolder 中)
val glideUrl = GlideUrl(
bean.path,
LazyHeaders.Builder()
.addHeader("Authorization", SharedPreferenceUtil.getString(Constant.Share.token))
.build()
)
Glide.with(itemView.context).load(glideUrl).into(binding.ivThumbnail)
```
**同时必须去掉 XML 布局中的 `loadImage` 属性**,否则 BindingAdapter 会触发不带 token 的请求覆盖手动加载:
```xml
<!-- ❌ 错误:会触发不带 token 的 Glide 请求 -->
<ImageView loadImage="@{bean.path}" />
<!-- ✅ 正确:只保留 id由 ViewHolder 手动加载 -->
<ImageView android:id="@+id/iv_thumbnail" />
```
**大图预览同理**`PreviewImageViewHolder` 也需要用 `GlideUrl` 带 token 加载网络图片。
**参考文件**:
- 缩略图加载: `module_gjj/.../GjjManifestPicViewHolder.kt`
- 大图预览: `module_base/.../PreviewImageViewHolder.kt`
- 图片上传提交: `app/.../AccidentVisaDetailsViewModel.kt`
- 带 token 的 Glide 加载: `module_mit/.../PictureAdapter.kt`
--- ---
## 开发原则 ## 开发原则

View File

@@ -383,6 +383,27 @@
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape"/> android:screenOrientation="userLandscape"/>
<activity
android:name="com.lukouguoji.gnj.page.yiku.list.GnjYiKuListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name="com.lukouguoji.gnj.page.yiku.edit.GnjYiKuEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name="com.lukouguoji.gnj.page.yiku.details.GnjYiKuDetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name="com.lukouguoji.gnj.page.yiku.handover.GnjYiKuHandoverActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-电报解析 --> <!-- 国际进港-电报解析 -->
<activity <activity
android:name="com.lukouguoji.gjj.activity.IntImpMsgParseActivity" android:name="com.lukouguoji.gjj.activity.IntImpMsgParseActivity"

View File

@@ -75,23 +75,18 @@ class AccidentVisaDetailsViewModel : BaseViewModel(), IOnItemClickListener {
onSuccess = { onSuccess = {
dataBean.value = it.data ?: AccidentVisaBean() dataBean.value = it.data ?: AccidentVisaBean()
// 渲染图片 // 渲染图片pic 存缩略图文件名originalPic 存原图文件名
val list = dataBean.value!!.pic.split(",") val picList = dataBean.value!!.pic.split(",").filter { it.isNotEmpty() }
.filter { url -> url.isNotEmpty() } val originalPicList = dataBean.value!!.originalPic.split(",").filter { it.isNotEmpty() }
.map { url -> val list = picList.mapIndexed { index, picFilename ->
FileBean(MediaUtil.fillUrl(url), url) val originalFilename = originalPicList.getOrElse(index) { picFilename }
} FileBean(
val zipList = dataBean.value!!.originalPic.split(",") path = MediaUtil.fillUrl(picFilename),
.filter { url -> url.isNotEmpty() } url = picFilename,
.map { url -> originalPic = MediaUtil.fillUrl(originalFilename)
FileBean(MediaUtil.fillUrl(url)) )
}
for ((index, fileBean) in list.withIndex()) {
val originalPic = zipList.get(index).path
list.get(index).originalPic = originalPic
} }
rv?.commonAdapter() rv?.commonAdapter()?.loadMore(list)
?.loadMore(list)
} }
} }
} }
@@ -110,8 +105,10 @@ class AccidentVisaDetailsViewModel : BaseViewModel(), IOnItemClickListener {
.filter { it.path.isNotEmpty() && it.url.isEmpty() } .filter { it.path.isNotEmpty() && it.url.isEmpty() }
.onEach { .onEach {
val data = UploadUtil.upload(it.path).data val data = UploadUtil.upload(it.path).data
it.url = data?.newName ?: "" // UploadUtil 返回newName=原图(较大)zipFileName=缩略图(较小)
it.originalPic = data?.zipFileName ?: "" // FileBean.url 用作缩略图标识FileBean.originalPic 用作原图标识
it.url = data?.zipFileName ?: ""
it.originalPic = data?.newName ?: ""
} }
.flowOn(Dispatchers.IO) .flowOn(Dispatchers.IO)
.onStart { showLoading() } .onStart { showLoading() }
@@ -124,8 +121,8 @@ class AccidentVisaDetailsViewModel : BaseViewModel(), IOnItemClickListener {
val list = val list =
(rv?.commonAdapter()?.items as List<FileBean>).filter { it.path.isNotEmpty() } (rv?.commonAdapter()?.items as List<FileBean>).filter { it.path.isNotEmpty() }
bean.picnumber = list.size.toString() bean.picnumber = list.size.toString()
bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) } bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) }
bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) } bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) }
NetApply.api.anyPost( NetApply.api.anyPost(
url = if (pageType.value == DetailsPageType.Add) "GnAccidentVisa/saveVisa" else "GnAccidentVisa/updateVisa", url = if (pageType.value == DetailsPageType.Add) "GnAccidentVisa/saveVisa" else "GnAccidentVisa/updateVisa",

View File

@@ -24,7 +24,7 @@ class FlightQueryListViewModel : BasePageViewModel() {
val serviceType = MutableLiveData("") val serviceType = MutableLiveData("")
val addressTypeList = MutableLiveData(listOf(KeyValue("全部", ""))).apply { val addressTypeList = MutableLiveData(listOf(KeyValue("全部", ""))).apply {
DictUtils.getAreaTypeList { DictUtils.getCountryTypeList {
value = it value = it
} }
} }

View File

@@ -1,21 +1,36 @@
package com.lukouguoji.aerologic.page.gnj.move.stash.list package com.lukouguoji.aerologic.page.gnj.move.stash.list
import android.view.View import android.view.View
import com.lukouguoji.aerologic.databinding.ItemGnjMoveStashListBinding import android.widget.Toast
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.aerologic.databinding.ItemGnjMoveStashListBinding
import com.lukouguoji.module_base.bean.MoveStashBean import com.lukouguoji.gnj.page.yiku.handover.GnjYiKuHandoverActivity
import com.lukouguoji.module_base.bean.SimpleCheckBean import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.MoveStashBean
class GnjMoveStashListViewHolder(view: View) :
BaseViewHolder<MoveStashBean, ItemGnjMoveStashListBinding>(view) { class GnjMoveStashListViewHolder(view: View) :
BaseViewHolder<MoveStashBean, ItemGnjMoveStashListBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item)!! override fun onBind(item: Any?, position: Int) {
binding.bean = bean val bean = getItemBean(item)!!
binding.bean = bean
binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get()) binding.ivIcon.setOnClickListener {
} bean.checked.set(!bean.checked.get())
} }
} // 点击列表项进入移交详情
binding.ll.setOnClickListener {
GnjYiKuHandoverActivity.startForDetails(itemView.context, bean.mawbId)
}
// 侧滑菜单 - 编辑按钮
binding.btnEdit.setOnClickListener {
binding.swipeMenu.quickClose()
if (bean.pickFlag == "1") {
Toast.makeText(itemView.context, "已出库,不可编辑", Toast.LENGTH_SHORT).show()
return@setOnClickListener
}
GnjYiKuHandoverActivity.startForEdit(itemView.context, bean.mawbId)
}
}
}

View File

@@ -38,19 +38,32 @@ class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetai
// 配置操作详情 RecyclerView垂直时间线 // 配置操作详情 RecyclerView垂直时间线
binding.rvTimeline.adapter = timelineAdapter binding.rvTimeline.adapter = timelineAdapter
// 观察流转状态变化,程序化构建步骤进度条 // 观察数据变化,重新构建步骤进度条
viewModel.currentStepIndex.observe(this) { index -> viewModel.allSteps.observe(this) { rebuildSteps() }
buildStepProgressBar(viewModel.allSteps, index) viewModel.activeStepCodes.observe(this) { rebuildSteps() }
} viewModel.latestStepCode.observe(this) { rebuildSteps() }
viewModel.statusLogList.observe(this) { list -> viewModel.statusLogList.observe(this) { list ->
timelineAdapter.setData(list) val stepMap = viewModel.allSteps.value?.associate { it.code to it.name } ?: emptyMap()
timelineAdapter.setData(list, stepMap)
} }
viewModel.initOnCreated(intent) viewModel.initOnCreated(intent)
} }
private fun buildStepProgressBar(steps: List<String>, currentIndex: Int) { private fun rebuildSteps() {
val steps = viewModel.allSteps.value ?: return
val activeCodes = viewModel.activeStepCodes.value ?: emptySet()
val latestCode = viewModel.latestStepCode.value ?: ""
if (steps.isEmpty()) return
buildStepProgressBar(steps, activeCodes, latestCode)
}
private fun buildStepProgressBar(
steps: List<StepInfo>,
activeCodes: Set<String>,
latestCode: String
) {
val container = binding.llSteps val container = binding.llSteps
container.removeAllViews() container.removeAllViews()
@@ -60,30 +73,38 @@ class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetai
val dotSize = dp(10) val dotSize = dp(10)
val lineHeight = dp(2) val lineHeight = dp(2)
// 计算每个节点宽度:屏幕宽度的 80% 均分给所有节点
val screenWidth = resources!!.displayMetrics.widthPixels
val stepWidth = (screenWidth * 0.8 / steps.size).toInt()
// 找到最新节点在步骤列表中的索引
val latestIndex = steps.indexOfFirst { it.code == latestCode }
for (i in steps.indices) { for (i in steps.indices) {
val isCompleted = i <= currentIndex val step = steps[i]
val isCurrent = i == currentIndex val isActive = step.code in activeCodes
val isLatest = step.code == latestCode
val isFirst = i == 0 val isFirst = i == 0
val isLast = i == steps.size - 1 val isLast = i == steps.size - 1
// 每个步骤的根容器(等宽) // 每个步骤的根容器
val stepLayout = LinearLayout(this).apply { val stepLayout = LinearLayout(this).apply {
orientation = LinearLayout.VERTICAL orientation = LinearLayout.VERTICAL
gravity = Gravity.CENTER_HORIZONTAL gravity = Gravity.CENTER_HORIZONTAL
layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f) layoutParams = LinearLayout.LayoutParams(stepWidth, LinearLayout.LayoutParams.WRAP_CONTENT)
} }
// 步骤名称(所有步骤统一 padding 确保高度一致) // 步骤名称(所有步骤统一 padding 确保高度一致)
val tvName = TextView(this).apply { val tvName = TextView(this).apply {
text = steps[i] text = step.name
setTextSize(TypedValue.COMPLEX_UNIT_SP, 13f) setTextSize(TypedValue.COMPLEX_UNIT_SP, 13f)
gravity = Gravity.CENTER gravity = Gravity.CENTER
setPadding(dp(6), dp(2), dp(6), dp(2)) setPadding(dp(6), dp(2), dp(6), dp(2))
if (isCurrent) { if (isLatest) {
setBackgroundResource(R.drawable.bg_step_current_badge) setBackgroundResource(R.drawable.bg_step_current_badge)
setTextColor(0xFFFFFFFF.toInt()) setTextColor(0xFFFFFFFF.toInt())
} else { } else {
setTextColor(if (isCompleted) 0xFF333333.toInt() else 0xFF999999.toInt()) setTextColor(if (isActive) 0xFF333333.toInt() else 0xFF999999.toInt())
} }
layoutParams = LinearLayout.LayoutParams( layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT,
@@ -99,10 +120,12 @@ class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetai
).apply { topMargin = dp(8) } ).apply { topMargin = dp(8) }
} }
// 左半连线(从左边缘到中心,略超过中心以避免断层 // 左半连线(从左边缘到中心)
if (!isFirst) { if (!isFirst) {
// 如果当前节点索引 <= latestIndex左半线为蓝色否则为浅灰色
val leftLineColor = if (latestIndex >= 0 && i <= latestIndex) colorBlue else colorGray
val lineLeft = View(this).apply { val lineLeft = View(this).apply {
setBackgroundColor(if (isCompleted) colorBlue else colorGray) setBackgroundColor(leftLineColor)
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply { layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
gravity = Gravity.CENTER_VERTICAL or Gravity.START gravity = Gravity.CENTER_VERTICAL or Gravity.START
} }
@@ -115,9 +138,10 @@ class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetai
} }
} }
// 右半连线(从中心到右边缘,略超过中心以避免断层 // 右半连线(从中心到右边缘)
if (!isLast) { if (!isLast) {
val rightLineColor = if (isCompleted && !isCurrent) colorBlue else colorGray // 如果当前节点索引 < latestIndex右半线为蓝色否则为浅灰色
val rightLineColor = if (latestIndex >= 0 && i < latestIndex) colorBlue else colorGray
val lineRight = View(this).apply { val lineRight = View(this).apply {
setBackgroundColor(rightLineColor) setBackgroundColor(rightLineColor)
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply { layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
@@ -136,8 +160,8 @@ class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetai
val dot = View(this).apply { val dot = View(this).apply {
setBackgroundResource( setBackgroundResource(
when { when {
isCurrent -> R.drawable.bg_step_dot_green isLatest -> R.drawable.bg_step_dot_green
isCompleted -> R.drawable.bg_step_dot_blue isActive -> R.drawable.bg_step_dot_blue
else -> R.drawable.bg_step_dot_gray else -> R.drawable.bg_step_dot_gray
} }
) )

View File

@@ -11,9 +11,11 @@ import com.lukouguoji.module_base.bean.StatusLogBean
class LogDetailTimelineAdapter : RecyclerView.Adapter<LogDetailTimelineAdapter.TimelineViewHolder>() { class LogDetailTimelineAdapter : RecyclerView.Adapter<LogDetailTimelineAdapter.TimelineViewHolder>() {
private var items: List<StatusLogBean> = emptyList() private var items: List<StatusLogBean> = emptyList()
private var statusNameMap: Map<String, String> = emptyMap()
fun setData(list: List<StatusLogBean>) { fun setData(list: List<StatusLogBean>, stepMap: Map<String, String> = emptyMap()) {
items = list items = list
statusNameMap = stepMap
notifyDataSetChanged() notifyDataSetChanged()
} }
@@ -28,8 +30,9 @@ class LogDetailTimelineAdapter : RecyclerView.Adapter<LogDetailTimelineAdapter.T
val isFirst = position == 0 val isFirst = position == 0
val isLast = position == items.size - 1 val isLast = position == items.size - 1
holder.tvContent.text = item.content val statusName = statusNameMap[item.status] ?: item.status
holder.tvTime.text = item.opDate holder.tvContent.text = if (statusName.isNotEmpty()) "$statusName ${item.opDate}" else item.opDate
holder.tvTime.text = item.content
// 最后一项(当前步骤)用绿色圆点 // 最后一项(当前步骤)用绿色圆点
holder.dotView.setBackgroundResource( holder.dotView.setBackgroundResource(

View File

@@ -2,14 +2,19 @@ package com.lukouguoji.aerologic.page.log.detail
import android.content.Intent import android.content.Intent
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.google.gson.Gson import com.google.gson.Gson
import com.lukouguoji.module_base.base.BaseViewModel import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.LogBean import com.lukouguoji.module_base.bean.LogBean
import com.lukouguoji.module_base.bean.StatusLogBean import com.lukouguoji.module_base.bean.StatusLogBean
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.launchCollect
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
data class StepInfo(val code: String, val name: String)
class LogDetailViewModel : BaseViewModel() { class LogDetailViewModel : BaseViewModel() {
@@ -18,71 +23,100 @@ class LogDetailViewModel : BaseViewModel() {
val statusLogList = MutableLiveData<List<StatusLogBean>>(emptyList()) val statusLogList = MutableLiveData<List<StatusLogBean>>(emptyList())
// 流转状态步骤定义 // 流转状态步骤(根据运单类型动态设置)
val allSteps = listOf( val allSteps = MutableLiveData<List<StepInfo>>(emptyList())
"预录入", "完成收运", "运抵申报", "海关放行",
"完成组装", "完成复磅", "装载申报", "航班关闭", "理货申报"
)
// 当前完成到哪一步(索引) // 操作详情中出现的步骤 code 集合
val activeStepCodes = MutableLiveData<Set<String>>(emptySet())
// 最新步骤的 code
val latestStepCode = MutableLiveData("")
// 当前完成到哪一步(索引),用于线条着色
val currentStepIndex = MutableLiveData(-1) val currentStepIndex = MutableLiveData(-1)
private var awbType = ""
// 国际出港步骤(来自 AwbGjcStatus.java
private val gjcSteps = listOf(
StepInfo("1", "预录入"), StepInfo("2", "收运完成"),
StepInfo("3", "运抵申报"), StepInfo("4", "海关放行"),
StepInfo("5", "组装完成"), StepInfo("6", "复磅完成"),
StepInfo("7", "装载申报"), StepInfo("8", "航班关闭"),
StepInfo("9", "理货申报")
)
// 国际进港步骤(来自 AwbGjjStatus.java
private val gjjSteps = listOf(
StepInfo("1", "原始舱单"), StepInfo("2", "分拣理货"),
StepInfo("3", "理货申报"), StepInfo("4", "海关放行"),
StepInfo("5", "柜台办结"), StepInfo("6", "提取出库")
)
fun initOnCreated(intent: Intent) { fun initOnCreated(intent: Intent) {
val json = intent.getStringExtra(Constant.Key.DATA) ?: "" // 优先从 ARouter 参数获取
if (json.isNotEmpty()) { val key = intent.getStringExtra(Constant.Key.KEY) ?: ""
val bean = Gson().fromJson(json, LogBean::class.java) awbType = intent.getStringExtra(Constant.Key.AWB_TYPE) ?: ""
waybillNo.value = bean.key
waybillType.value = getAwbTypeName(bean.logType) // 如果没有 ARouter 参数,尝试从 LogBean 解析
loadStatusList(bean.key, bean.logType) if (key.isEmpty()) {
val json = intent.getStringExtra(Constant.Key.DATA) ?: ""
if (json.isNotEmpty()) {
val bean = Gson().fromJson(json, LogBean::class.java)
waybillNo.value = bean.key
awbType = bean.logType
}
} else {
waybillNo.value = key
}
waybillType.value = getAwbTypeName(awbType)
allSteps.value = if (awbType == "II") gjjSteps else gjcSteps
if (waybillNo.value?.isNotEmpty() == true) {
loadStatusList(waybillNo.value!!, awbType)
} }
} }
private fun loadStatusList(key: String, logType: String) { private fun loadStatusList(key: String, logType: String) {
if (key.isEmpty()) { viewModelScope.launch {
loadMockData() try {
return // 注意SelfLoginInterceptor 会把裸数组 [...] 包装成 {"data": [...]}
} // 所以 API 返回类型必须是 BaseResultBean从 .data 取实际列表
launchCollect({ val result = withContext(Dispatchers.IO) {
NetApply.api.getLogStatusList( NetApply.api.getLogStatusList(
mapOf( mapOf(
"key" to key, "key" to key,
"awbType" to logType "awbType" to logType
).toRequestBody() ).toRequestBody()
) )
}) {
onSuccess = {
val list = it.data ?: emptyList()
if (list.isNotEmpty()) {
statusLogList.value = list
val lastStatus = list.last().content
val index = allSteps.indexOfFirst { step ->
lastStatus.contains(step)
}
currentStepIndex.value = if (index >= 0) index else list.size - 1
} else {
loadMockData()
} }
}
onFailed = { _, _ -> val list = result.data ?: emptyList()
loadMockData() statusLogList.value = list
if (list.isNotEmpty()) {
// 提取所有出现的 status code用 status 字段匹配)
val codes = list.mapNotNull { item ->
item.status.ifEmpty { null }
}.toSet()
activeStepCodes.value = codes
// 最新节点 = 列表最后一条的 status
val latestCode = list.last().status
latestStepCode.value = latestCode
// 计算最新节点在步骤列表中的索引
val steps = allSteps.value ?: emptyList()
val index = steps.indexOfFirst { step -> step.code == latestCode }
currentStepIndex.value = if (index >= 0) index else -1
}
} catch (e: Exception) {
e.printStackTrace()
} }
} }
} }
private fun loadMockData() {
// Mock 数据:模拟到"装载申报"步骤
currentStepIndex.value = 6 // "装载申报" 在 allSteps 中的索引
statusLogList.value = listOf(
StatusLogBean(content = "托书录入", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "完成收运", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "完成组装", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "已复磅", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "海关已放行", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "装载申报", opDate = "2017-04-01 12:00:00")
)
}
private fun getAwbTypeName(logType: String): String { private fun getAwbTypeName(logType: String): String {
return when (logType) { return when (logType) {
"CI" -> "国内进港" "CI" -> "国内进港"

View File

@@ -37,6 +37,7 @@ import com.lukouguoji.gnc.page.deposit.list.GncDepositListActivity
import com.lukouguoji.gnc.page.distribution.home.GncDistributionHomeActivity import com.lukouguoji.gnc.page.distribution.home.GncDistributionHomeActivity
import com.lukouguoji.gnc.page.fubang.list.GncFuBangListActivity import com.lukouguoji.gnc.page.fubang.list.GncFuBangListActivity
import com.lukouguoji.gnc.page.shouyun.unlist.GncShouYunUnListActivity import com.lukouguoji.gnc.page.shouyun.unlist.GncShouYunUnListActivity
import com.lukouguoji.gnj.activity.GnjChuKuListActivity
import com.lukouguoji.module_base.MyApplication import com.lukouguoji.module_base.MyApplication
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
@@ -314,7 +315,8 @@ class HomeFragment : Fragment() {
} }
//出库 //出库
Constant.AuthName.GnjChuKuList -> { Constant.AuthName.GnjChuKuList -> {
GnjMoveStashListActivity.start(requireContext()) ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNJ_CHU_KU_LIST)
.navigation()
} }
//仓库管理 //仓库管理
Constant.AuthName.GnjWareHouse -> { Constant.AuthName.GnjWareHouse -> {
@@ -840,14 +842,14 @@ class HomeFragment : Fragment() {
list.add( list.add(
RightMenu( RightMenu(
Constant.AuthName.IntImpTally, Constant.AuthName.IntImpTally,
R.mipmap.img_bwjx, R.drawable.img_gjc_chugang_lihuo,
"理货报告" "理货报告"
) )
) )
list.add( list.add(
RightMenu( RightMenu(
Constant.AuthName.GjjWareHouseActivity, Constant.AuthName.GjjWareHouseActivity,
R.mipmap.gnj_cang_ku_icon, R.drawable.gjc_cang_ku_icon,
"进港仓库" "进港仓库"
) )
) )
@@ -861,14 +863,14 @@ class HomeFragment : Fragment() {
list.add( list.add(
RightMenu( RightMenu(
Constant.AuthName.IntImpPickUpDLV, Constant.AuthName.IntImpPickUpDLV,
R.mipmap.gnj_cang_ku_icon, R.drawable.img_gjc_chuku_jiaojie,
"提取出库" "提取出库"
) )
) )
list.add( list.add(
RightMenu( RightMenu(
Constant.AuthName.GjjQueryListActivity, Constant.AuthName.GjjQueryListActivity,
R.mipmap.img_bwjx, R.drawable.gjc_query_icon,
"进港查询" "进港查询"
) )
) )

View File

@@ -17,7 +17,7 @@
<include layout="@layout/title_tool_bar" /> <include layout="@layout/title_tool_bar" />
<ScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fillViewport="true"> android:fillViewport="true">
@@ -59,7 +59,7 @@
<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:textColor="#666666" android:textColor="#666666"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -81,7 +81,7 @@
<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:textColor="#666666" android:textColor="#666666"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -153,7 +153,7 @@
</LinearLayout> </LinearLayout>
</ScrollView> </androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>
</layout> </layout>

View File

@@ -1,245 +1,287 @@
<?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:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<data> <data>
<variable <variable
name="bean" name="bean"
type="com.lukouguoji.module_base.bean.MoveStashBean" /> type="com.lukouguoji.module_base.bean.MoveStashBean" />
</data> </data>
<androidx.appcompat.widget.LinearLayoutCompat <!-- 外层容器承载间距 -->
android:id="@+id/ll" <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="15dp"
android:layout_marginVertical="5dp" android:layout_marginVertical="5dp"
android:background="@drawable/bg_item" android:orientation="vertical">
android:orientation="horizontal"
android:padding="10dp"> <!-- 侧滑布局 -->
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
<ImageView android:id="@+id/swipe_menu"
android:id="@+id/iv_icon" android:layout_width="match_parent"
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}" android:layout_height="wrap_content">
android:layout_width="40dp"
android:layout_height="40dp" <!-- 主列表项容器 -->
android:layout_gravity="center" <androidx.appcompat.widget.LinearLayoutCompat
android:src="@drawable/img_plane" /> android:id="@+id/ll"
android:layout_width="match_parent"
<LinearLayout android:layout_height="wrap_content"
android:layout_width="match_parent" android:background="@drawable/bg_item"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_marginLeft="10dp" android:padding="10dp">
android:orientation="vertical">
<ImageView
<androidx.appcompat.widget.LinearLayoutCompat android:id="@+id/iv_icon"
android:layout_width="match_parent" loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
android:layout_height="wrap_content"> android:layout_width="40dp"
android:layout_height="40dp"
<androidx.appcompat.widget.LinearLayoutCompat android:layout_gravity="center"
android:layout_width="0dp" android:src="@drawable/img_plane" />
android:layout_height="wrap_content"
android:layout_weight="1.1" <LinearLayout
android:gravity="center_vertical"> android:layout_width="0dp"
android:layout_height="wrap_content"
<TextView android:layout_marginLeft="10dp"
completeSpace="@{4}" android:layout_weight="1"
android:layout_width="wrap_content" android:orientation="vertical">
android:layout_height="wrap_content"
android:text="运单号:" /> <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
<TextView android:layout_height="wrap_content">
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.wbNo}" android:layout_width="0dp"
android:textColor="@color/colorPrimary" android:layout_height="wrap_content"
tools:text="789165431" /> android:layout_weight="1.1"
android:gravity="center_vertical">
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
<androidx.appcompat.widget.LinearLayoutCompat completeSpace="@{4}"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:text="运单号:" />
android:gravity="center_vertical">
<TextView
<TextView android:layout_width="wrap_content"
completeSpace="@{4}" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:text="@{bean.wbNo}"
android:layout_height="wrap_content" android:textColor="@color/colorPrimary"
android:text="件数:" /> tools:text="789165431" />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text='@{bean.pc}' /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="0.8"
android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" completeSpace="@{4}"
android:layout_weight="1" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="件数:" />
<TextView
completeSpace="@{4}" <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='@{bean.pc}' />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.weight}" /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="0.7"
android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" completeSpace="@{4}"
android:layout_weight="1" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="重量:" />
<TextView
completeSpace="@{4}" <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="@{bean.weight}" />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text='@{bean.agentCode}' /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="0.8"
android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" completeSpace="@{4}"
android:layout_weight="1.1" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="代理人:" />
<TextView
completeSpace="@{5}" <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='@{bean.agentCode}' />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text='@{bean.awbType}' /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="1.1"
android:gravity="center_vertical">
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
<androidx.appcompat.widget.LinearLayoutCompat completeSpace="@{5}"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="10dp"> android:text="运单类型:" />
<androidx.appcompat.widget.LinearLayoutCompat <TextView
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.1" android:text='@{bean.awbType}' />
android:gravity="center_vertical">
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
completeSpace="@{4}" </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="航班:" /> android:layout_width="match_parent"
android:layout_height="wrap_content"
<TextView android:layout_marginTop="10dp">
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.flight}" /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="1.1"
android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" completeSpace="@{4}"
android:layout_weight="1" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="航班:" />
<TextView
completeSpace="@{4}" <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="@{bean.flight}" />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.origin}" /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="0.8"
android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" completeSpace="@{4}"
android:layout_weight="1" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="始发港:" />
<TextView
completeSpace="@{4}" <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="@{bean.origin}" />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.dep}" /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="0.8"
android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" completeSpace="@{4}"
android:layout_weight="1" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="起始站:" />
<TextView
completeSpace="@{4}" <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="@{bean.dep}" />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.dest}" /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="0.8"
android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" completeSpace="@{4}"
android:layout_weight="1.1" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="目的港:" />
<TextView
completeSpace="@{5}" <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="@{bean.dest}" />
<TextView </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_width="wrap_content"
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.goods}" /> android:layout_width="0dp"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_weight="1.1"
android:gravity="center_vertical">
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
</LinearLayout> completeSpace="@{5}"
android:layout_width="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_height="wrap_content"
</layout> android:text="品名:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.goods}" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 侧滑菜单区域 -->
<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>
</layout>

View File

@@ -29,15 +29,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="关键字 " /> android:text="关键字"
android:textSize="15sp"
completeSpace="@{4}" />
<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.key}" /> android:text="@{bean.key}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -48,15 +50,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="日志类型 " /> android:text="日志类型"
android:textSize="15sp"
completeSpace="@{5}" />
<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.logType}" /> android:text="@{bean.logType}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -67,15 +71,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="操作员 " /> android:text="操作员"
android:textSize="15sp"
completeSpace="@{4}" />
<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.opId}" /> android:text="@{bean.opId}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -86,15 +92,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="操作时间 " /> android:text="操作时间"
android:textSize="15sp"
completeSpace="@{5}" />
<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.opTime}" /> android:text="@{bean.opTime}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -107,15 +115,17 @@
android:layout_marginTop="10dp"> android:layout_marginTop="10dp">
<TextView <TextView
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:textSize="15sp"
completeSpace="@{5}" />
<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.content}" /> android:text="@{bean.content}"
android:textSize="15sp" />
</LinearLayout> </LinearLayout>

View File

@@ -46,7 +46,7 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical">
<!-- 第一行 --> <!-- 第一行ULD编号 | 状态 | 自重 | 所属航司 | 最大装载容积 -->
<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">
@@ -59,16 +59,18 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="ULD编号" /> android:text="ULD编号"
android:textSize="15sp"
completeSpace="@{5}" />
<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:textColor="@color/colorPrimary" /> android:textColor="@color/colorPrimary"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -80,16 +82,18 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{3}"
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"
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.statusName()}" android:text="@{bean.statusName()}"
android:textColor='@{bean.status.equals("0") ? @color/text_normal : @color/red}' /> android:textColor='@{bean.status.equals("0") ? @color/text_green : @color/red}'
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -101,15 +105,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{3}"
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"
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.uldWeight}" /> android:text="@{bean.uldWeight}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -121,15 +127,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="所属航司:" /> android:text="所属航司:"
android:textSize="15sp"
completeSpace="@{5}" />
<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.carrier}" /> android:text="@{bean.carrier}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -141,21 +149,23 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{7}"
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"
completeSpace="@{7}" />
<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.maxVolume}" /> android:text="@{bean.maxVolume}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
</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"
@@ -169,15 +179,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="最大载重:" /> android:text="最大载重:"
android:textSize="15sp"
completeSpace="@{5}" />
<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.maxWeight}" /> android:text="@{bean.maxWeight}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -189,15 +201,17 @@
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
completeSpace="@{3}"
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"
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.remark}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

BIN
key.jks Normal file

Binary file not shown.

View File

@@ -12,12 +12,16 @@ import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.model.LazyHeaders
import com.bumptech.glide.load.resource.bitmap.CenterCrop import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.bumptech.glide.load.resource.bitmap.GranularRoundedCorners import com.bumptech.glide.load.resource.bitmap.GranularRoundedCorners
import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.base.CommonAdapter import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
import com.lukouguoji.module_base.ktx.loge import com.lukouguoji.module_base.ktx.loge
import com.lukouguoji.module_base.util.SizeUtils import com.lukouguoji.module_base.util.SizeUtils
@@ -111,10 +115,22 @@ fun loadImage(
com.bumptech.glide.request.target.Target.SIZE_ORIGINAL com.bumptech.glide.request.target.Target.SIZE_ORIGINAL
) )
// 对 http(s) 字符串 URL自动包装为带 Authorization header 的 GlideUrl避免 /file/getImg/ 接口 403
val actualSource: Any? = if (source is String && (source.startsWith("http://") || source.startsWith("https://"))) {
GlideUrl(
source,
LazyHeaders.Builder()
.addHeader("Authorization", SharedPreferenceUtil.getString(Constant.Share.token))
.build()
)
} else {
source
}
// 设置图片加载 // 设置图片加载
val load = Glide.with(imageView) val load = Glide.with(imageView)
.setDefaultRequestOptions(requestOptions) .setDefaultRequestOptions(requestOptions)
.load(source) .load(actualSource)
.diskCacheStrategy(diskCacheStrategy) .diskCacheStrategy(diskCacheStrategy)
.encodeFormat(encodeFormat) .encodeFormat(encodeFormat)

View File

@@ -10,12 +10,12 @@ class GjAccidentVisaEditBean {
var dpc: String = "" // 不正常件数 var dpc: String = "" // 不正常件数
var pc: String = "" // 运单总件数 var pc: String = "" // 运单总件数
var weight: String = "" // 运单总重量 var weight: String = "" // 运单总重量
var reweight: String = "" // 复称重量 var reWeight: String = "" // 复称重量
var goods: String = "" // 品名 var goods: String = "" // 品名
var opacking: String = "" // 外包装 var opacking: String = "" // 外包装
var damage: String = "" // 包装破损情况 var damage: String = "" // 包装破损情况
var condition: String = "" // 内容物情况 var condition: String = "" // 内容物情况
var problem: String = "" // 不正常类型 var kdamage: String = "" // 不正常类型
var seachDate: String = "" // 发现时间 var seachDate: String = "" // 发现时间
var photo: String = "" // 图片是否留底 var photo: String = "" // 图片是否留底
var remarks: String = "" // 备注 var remarks: String = "" // 备注

View File

@@ -29,7 +29,8 @@ data class GjjHaWb(
var opDate: String = "", var opDate: String = "",
var billsNo: String = "", var billsNo: String = "",
var remark: String = "", var remark: String = "",
var response: String = "" var response: String = "",
var tallyStatus: String = ""
) : Serializable { ) : Serializable {
@Transient @Transient
val checked: ObservableBoolean = ObservableBoolean(false) val checked: ObservableBoolean = ObservableBoolean(false)

View File

@@ -44,7 +44,7 @@ data class GjjImportManifest(
// 目的地 // 目的地
var dest: String = "", var dest: String = "",
// 危险品收货人通讯方式 // 危险品收货人通讯方式
var dgrContactMame: String = "", var dgrContactName: String = "",
// 危险品收货人通讯方式 // 危险品收货人通讯方式
var dgrContactNumber: String = "", var dgrContactNumber: String = "",
// 航班日期 // 航班日期

View File

@@ -28,6 +28,7 @@ data class GjjManifest(
var awbType: String = "", // 运单类型 var awbType: String = "", // 运单类型
var awbTypeName: String = "", // 运单类型(中) var awbTypeName: String = "", // 运单类型(中)
var businessType: String = "", // 业务类型 var businessType: String = "", // 业务类型
var businessName: String = "", // 业务类型名称
var cargoType: String = "", // 货物类型 var cargoType: String = "", // 货物类型
var spCode: String = "", // 特码 var spCode: String = "", // 特码
var packageType: String = "", // 包装类型 var packageType: String = "", // 包装类型
@@ -54,7 +55,11 @@ data class GjjManifest(
var splitFlag: String = "", // 分批标志 var splitFlag: String = "", // 分批标志
var subCode: String = "", // 子代码 var subCode: String = "", // 子代码
var unNumber: String = "", // 危险品编号 var unNumber: String = "", // 危险品编号
var activeId: Long = 0 // 活动ID var activeId: Long = 0, // 活动ID
var locationTally: String = "", // 理货库位号
var pic: String = "", // 交接图片缩略图路径
var originalPic: String = "", // 交接图片原图地址
var picNumber: String = "" // 交接图片数量
) : Serializable { ) : Serializable {
// 分单列表 // 分单列表
var haWbList: List<GjjHaWb>? = null var haWbList: List<GjjHaWb>? = null

View File

@@ -10,6 +10,7 @@ class GjjManifestBean(
var awbType: String = "", var awbType: String = "",
var awbpc: Int = 0, var awbpc: Int = 0,
var businessType: String? = "", var businessType: String? = "",
var businessName: String? = "",
var cargoType: String? = "", var cargoType: String? = "",
var cashWeight: String? = "", var cashWeight: String? = "",
var cneeCode: String? = "", var cneeCode: String? = "",
@@ -73,7 +74,10 @@ class GjjManifestBean(
var wbNo: String = "", var wbNo: String = "",
var weight: String = "", var weight: String = "",
var storageTime: String = "", var storageTime: String = "",
var whslocation: String? = "" var whslocation: String? = "",
var pic: String = "",
var originalPic: String = "",
var picNumber: String = ""
) : BaseObservable(), ICheck { ) : BaseObservable(), ICheck {
// 展示逻辑 // 展示逻辑

View File

@@ -16,19 +16,25 @@ class GnjYiKuBean : ICheck {
var agentCode: String = "" // 代理人 var agentCode: String = "" // 代理人
var goods: String = "" // 品名 var goods: String = "" // 品名
var flight: String = "" // 进港航班(格式: 20240712/MU2023) var flight: String = "" // 进港航班(格式: 20240712/MU2023)
var route: String = "" // 航程(格式: LAX-PEK-HFE) var route: String = "" // 航程(格式: LAX-PEK-HFE)(旧接口字段)
var range: String = "" // 航程(格式: LAX-PEK-HFE)GnjMawb 接口字段)
var origin: String = "" // 始发港 var origin: String = "" // 始发港
var dest: String = "" // 目的港 var dest: String = "" // 目的港
var awbType: String = "" // 运单类型(转国际进港/转国内出港等) var awbType: String = "" // 运单类型(转国际进港/转国内出港等)
var telegramNo: String = "" // 电报号 var telegramNo: String = "" // 电报号(旧接口字段)
var telegramId: String = "" // 电报号GnjMawb 接口字段)
var remark: String = "" // 备注 var remark: String = "" // 备注
var handoverStatus: String = "" // 移交状态(未移交/已移交) var handoverStatus: String = "" // 移交状态(未移交/已移交)
var images: String = "" // 交接图片(逗号分隔的URL列表) var images: String = "" // 交接图片(逗号分隔的URL列表)
var originalPic: String = "" // 交接图片原图地址
var pic: String = "" // 交接图片缩略图
var picNumber: String = "" // 交接图片数量
var fdate: String = "" // 航班日期 var fdate: String = "" // 航班日期
var fno: String = "" // 航班号 var fno: String = "" // 航班号
var businessType: String = "" // 业务类型 var businessType: String = "" // 业务类型
var opDate: String = "" // 操作日期 var opDate: String = "" // 操作日期
var carrier: String = "" // 承运人 var carrier: String = "" // 承运人
var pickFlag: String = "" // 出库标志1=已出库)
// 多选状态绑定 // 多选状态绑定
val checked = ObservableBoolean(false) val checked = ObservableBoolean(false)
@@ -41,10 +47,17 @@ class GnjYiKuBean : ICheck {
* 获取图片列表 * 获取图片列表
*/ */
fun getImageList(): List<String> { fun getImageList(): List<String> {
return if (images.isNotEmpty()) { val source = originalPic.ifEmpty { images }
images.split(",").filter { it.isNotEmpty() } return if (source.isNotEmpty()) {
source.split(",").filter { it.isNotEmpty() }
} else { } else {
emptyList() emptyList()
} }
} }
/** 获取航程(兼容新旧接口) */
fun getRouteDisplay(): String = range.ifEmpty { route }
/** 获取电报号(兼容新旧接口) */
fun getTelegramDisplay(): String = telegramId.ifEmpty { telegramNo }
} }

View File

@@ -6,14 +6,14 @@ class IntImpAccidentVisaBean {
var id: Long = 0 var id: Long = 0
var fdate: String = "" // 航班日期 var fdate: String = "" // 航班日期
var fno: String = "" // 航班号 var fno: String = "" // 航班号
var fdep: String = "" // 始发站 var dep: String = "" // 始发站
var fdest: String = "" // 目的站 var dest: String = "" // 目的站
var wbNo: String = "" // 运单号 var wbNo: String = "" // 运单号
var totalPc: Int = 0 // 运单总件数 var pc: Int = 0 // 运单总件数
var totalWeight: Double = 0.0 // 运单总重量 var weight: Double = 0.0 // 运单总重量
var abnPc: Int = 0 // 不正常件数 var dpc: Int = 0 // 不正常件数
var opName: String = "" // 经办人 var opId: String = "" // 经办人
var opDate: String = "" // 经办时间 var opdate: String = "" // 经办时间
val checked: ObservableBoolean = ObservableBoolean(false) val checked: ObservableBoolean = ObservableBoolean(false)

View File

@@ -23,6 +23,7 @@ class IntImpPickUpDLVBean : Serializable {
var cashWeight: Double = 0.0 // 计费重量 var cashWeight: Double = 0.0 // 计费重量
var pkId: String = "" // 提货编号(提货单号) var pkId: String = "" // 提货编号(提货单号)
var location: String = "" // 库位 var location: String = "" // 库位
var locationInStore: String = "" // 入库库位
var chargeTime: String = "" // 缴费时间(提取时间) var chargeTime: String = "" // 缴费时间(提取时间)
var dlvTime: String = "" // 出库时间 var dlvTime: String = "" // 出库时间
var goods: String = "" // 品名 var goods: String = "" // 品名

View File

@@ -395,5 +395,14 @@ interface Constant {
// Bean对象传递 // Bean对象传递
const val BEAN = "bean" const val BEAN = "bean"
// 运单号(日志详情)
const val KEY = "key"
// 运单类型
const val AWB_TYPE = "awbType"
const val PIC = "pic"
const val ORIGINAL_PIC = "originalPic"
} }
} }

View File

@@ -300,7 +300,7 @@ interface Api {
* 获取地区类型 * 获取地区类型
*/ */
@POST("typeCode/countryType") @POST("typeCode/countryType")
suspend fun getAreaTypeList(): DictListBean suspend fun getCountryTypeList(): DictListBean
/** /**
* 获取国家代码 * 获取国家代码
@@ -308,6 +308,12 @@ interface Api {
@POST("typeCode/countryCode") @POST("typeCode/countryCode")
suspend fun getCountryCodeList(): DictListBean suspend fun getCountryCodeList(): DictListBean
/**
* 获取国家代码(带始发站筛选)
*/
@POST("typeCode/countryCode")
suspend fun getCountryCodeListByFdep(@Query("fDep") fDep: String): DictListBean
/** /**
* 获取通讯方式类型 * 获取通讯方式类型
*/ */
@@ -957,7 +963,7 @@ interface Api {
* 接口路径: /IntImpStorage/inStorage * 接口路径: /IntImpStorage/inStorage
*/ */
@POST("IntImpStorage/inStorage") @POST("IntImpStorage/inStorage")
suspend fun inIntImpStorage(@Query("location") location: String, @Body data: RequestBody): BaseResultBean<Boolean> suspend fun inIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/** /**
* 国际进港提取记录-分页查询 * 国际进港提取记录-分页查询
@@ -1280,6 +1286,18 @@ interface Api {
@POST("IntImpManiFest/deleteFestList") @POST("IntImpManiFest/deleteFestList")
suspend fun gjjManifestDeleteBatch(@Body data: RequestBody): BaseResultBean<Any> suspend fun gjjManifestDeleteBatch(@Body data: RequestBody): BaseResultBean<Any>
/**
* 删除舱单(主单)- 请求体为 GjjManifest 对象数组
*/
@POST("IntImpManifest/deleteManifest")
suspend fun intImpManifestDeleteManifest(@Body data: RequestBody): BaseResultBean<Any>
/**
* 删除分单 - 请求体为 GjjHaWb 对象数组
*/
@POST("IntImpManifest/deleteHawb")
suspend fun intImpManifestDeleteHawb(@Body data: RequestBody): BaseResultBean<Any>
/** /**
* 新增-国际进港舱单 * 新增-国际进港舱单
*/ */
@@ -1355,6 +1373,12 @@ interface Api {
@POST("flt/queryFlight") @POST("flt/queryFlight")
suspend fun queryFlightByDateAndNo(@Body data: RequestBody): BaseResultBean<FlightBean> suspend fun queryFlightByDateAndNo(@Body data: RequestBody): BaseResultBean<FlightBean>
/**
* 根据航班日期、航班号、地区类型、进出港查询航班(返回列表)
*/
@POST("flt/searchFlightList")
suspend fun searchFlightList(@Body data: RequestBody): BaseResultBean<List<FlightBean>>
/** /**
* 获取航班目的站、经停站 * 获取航班目的站、经停站
*/ */
@@ -1744,6 +1768,18 @@ interface Api {
@POST("DomImpMove/save") @POST("DomImpMove/save")
suspend fun saveGnjYiKu(@Body data: RequestBody): BaseResultBean<SimpleResultBean> suspend fun saveGnjYiKu(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
/**
* 获取-国内进港移库-详情(新接口)
*/
@GET("DomImpMove/detail")
suspend fun getGnjMoveStashDetail(@Query("mawbId") mawbId: String): BaseResultBean<GnjYiKuBean>
/**
* 编辑-国内进港移库(新接口)
*/
@POST("DomImpMove/modify")
suspend fun modifyGnjMoveStash(@Body data: RequestBody): BaseResultBean<String>
/** /**
* 执行-国内进港移库操作 * 执行-国内进港移库操作
*/ */

View File

@@ -0,0 +1,66 @@
package com.lukouguoji.module_base.impl
import android.view.View
import android.view.ViewTreeObserver
import com.lukouguoji.module_base.adapter.loadImage
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.databinding.ItemImageSelectNewBinding
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.logd
import com.lukouguoji.module_base.ktx.loge
import com.lukouguoji.module_base.ui.page.preview.PreviewActivity
import com.lukouguoji.module_base.util.MediaUtil
class ImageSelectNewViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSelectNewBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item)!!
binding.bean = bean
// 让高度等于宽度,实现正方形
binding.rl.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
binding.rl.viewTreeObserver.removeOnGlobalLayoutListener(this)
val width = binding.rl.width
if (width > 0 && binding.rl.height != width) {
val lp = binding.rl.layoutParams
lp.height = width
binding.rl.layoutParams = lp
}
}
})
binding.rl.setOnClickListener {
if (bean.path.isEmpty()) {
MediaUtil.pickImage(itemView.context, maxNum = 10) { results ->
val adapter = getRecyclerView()?.commonAdapter() ?: return@pickImage
results.forEach { result ->
logd("添加了图片 : ${result.realPath}")
// 在加号按钮(最后一项)之前插入图片
val insertPos = adapter.items.size - 1
adapter.items.add(insertPos, FileBean(path = result.realPath))
adapter.notifyItemInserted(insertPos)
}
}
} else {
PreviewActivity.start(itemView.context, listOf(bean))
}
}
// 长按事件
binding.rl.setOnLongClickListener {
clickListener?.onItemClick(bindingAdapterPosition, binding.rl.id)
true
}
notifyItemClick(position, binding.ivDelete)
if (bean.isOnlineResource()) {
loge("开始下载 : ${bean.path}")
bean.download {
loadImage(binding.iv, it)
}
}
}
}

View File

@@ -1,51 +1,69 @@
package com.lukouguoji.module_base.impl package com.lukouguoji.module_base.impl
import android.view.View import android.view.View
import com.luck.picture.lib.adapter.holder.PreviewImageHolder import com.bumptech.glide.Glide
import com.luck.picture.lib.basic.PictureSelector import com.bumptech.glide.load.model.GlideUrl
import com.lukouguoji.module_base.adapter.loadImage import com.bumptech.glide.load.model.LazyHeaders
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.FileBean import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.databinding.ItemImageSelectBinding import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.ktx.commonAdapter import com.lukouguoji.module_base.databinding.ItemImageSelectBinding
import com.lukouguoji.module_base.ktx.logd import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
import com.lukouguoji.module_base.ktx.loge import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ui.page.preview.PreviewActivity import com.lukouguoji.module_base.ktx.logd
import com.lukouguoji.module_base.util.MediaUtil import com.lukouguoji.module_base.ui.page.preview.PreviewActivity
import com.lukouguoji.module_base.util.MediaUtil
class ImageSelectViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSelectBinding>(view) { import java.io.File
override fun onBind(item: Any?, position: Int) { class ImageSelectViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSelectBinding>(view) {
val bean = getItemBean(item)!!
binding.bean = bean override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item)!!
binding.rl.setOnClickListener { binding.bean = bean
if (bean.path.isEmpty()) {
MediaUtil.pickImage(itemView.context, maxNum = 10) { // 加载缩略图
it.forEach { if (bean.path.isNotEmpty()) {
logd("添加了图片 : ${it.realPath}") if (bean.isOnlineResource()) {
getRecyclerView()?.commonAdapter()?.addItem(FileBean(path = it.realPath)) val glideUrl = GlideUrl(
} bean.path,
} LazyHeaders.Builder()
} else { .addHeader("Authorization", SharedPreferenceUtil.getString(Constant.Share.token))
PreviewActivity.start(itemView.context, listOf(bean)) .build()
} )
} Glide.with(itemView.context).load(glideUrl).into(binding.iv)
} else {
// 长按事件 Glide.with(itemView.context).load(File(bean.path)).into(binding.iv)
binding.rl.setOnLongClickListener { }
clickListener?.onItemClick(bindingAdapterPosition, binding.rl.id) }
true
} binding.rl.setOnClickListener {
if (bean.path.isEmpty()) {
notifyItemClick(position, binding.ivDelete) MediaUtil.pickImage(itemView.context, maxNum = 10) {
it.forEach {
if (bean.isOnlineResource()) { logd("添加了图片 : ${it.realPath}")
loge("开始下载 : ${bean.path}") getRecyclerView()?.commonAdapter()?.addItem(FileBean(path = it.realPath))
bean.download { }
loadImage(binding.iv, it) }
} } else {
} val items = getRecyclerView()?.commonAdapter()?.items
} ?.filterIsInstance<FileBean>()
?.filter { it.path.isNotEmpty() }
} ?: listOf(bean)
val previewList = items.map { fb ->
FileBean(path = if (fb.originalPic.isNotEmpty()) fb.originalPic else fb.path)
}
val previewPosition = items.indexOfFirst { it === bean }.coerceAtLeast(0)
PreviewActivity.start(itemView.context, previewList, previewPosition)
}
}
// 长按事件
binding.rl.setOnLongClickListener {
clickListener?.onItemClick(bindingAdapterPosition, binding.rl.id)
true
}
notifyItemClick(position, binding.ivDelete)
}
}

View File

@@ -56,4 +56,43 @@ class UpperCaseAlphanumericInputFilter : InputFilter {
*/ */
fun EditText.setUpperCaseAlphanumericFilter() { fun EditText.setUpperCaseAlphanumericFilter() {
this.filters = arrayOf(UpperCaseAlphanumericInputFilter()) this.filters = arrayOf(UpperCaseAlphanumericInputFilter())
}
/**
* 大写字母输入过滤器
* 只允许输入大写字母(A-Z),小写字母自动转为大写
*/
class UpperCaseLetterInputFilter : InputFilter {
override fun filter(
source: CharSequence?,
start: Int,
end: Int,
dest: Spanned?,
dstart: Int,
dend: Int
): CharSequence? {
if (source.isNullOrEmpty()) return null
val filtered = StringBuilder()
for (i in start until end) {
val char = source[i]
if (char in 'A'..'Z' || char in 'a'..'z') {
filtered.append(char.uppercaseChar())
}
}
return if (filtered.toString() == source.subSequence(start, end).toString()) {
null
} else {
filtered.toString()
}
}
}
/**
* 为 EditText 设置大写字母输入过滤器
* 使用方式: editText.setUpperCaseLetterFilter()
*/
fun EditText.setUpperCaseLetterFilter() {
this.filters = arrayOf(UpperCaseLetterInputFilter())
} }

View File

@@ -106,6 +106,7 @@ object ARouterConstants {
const val ACTIVITY_URL_GNJ_YIKU_LIST = "/gnj/GnjYiKuListActivity" //国内进港 移库列表 const val ACTIVITY_URL_GNJ_YIKU_LIST = "/gnj/GnjYiKuListActivity" //国内进港 移库列表
const val ACTIVITY_URL_GNJ_YIKU_DETAILS = "/gnj/GnjYiKuDetailsActivity" //国内进港 移库详情 const val ACTIVITY_URL_GNJ_YIKU_DETAILS = "/gnj/GnjYiKuDetailsActivity" //国内进港 移库详情
const val ACTIVITY_URL_GNJ_YIKU_EDIT = "/gnj/GnjYiKuEditActivity" //国内进港 移库编辑 const val ACTIVITY_URL_GNJ_YIKU_EDIT = "/gnj/GnjYiKuEditActivity" //国内进港 移库编辑
const val ACTIVITY_URL_GNJ_YIKU_HANDOVER = "/gnj/GnjYiKuHandoverActivity" //国内进港 移交编辑/详情
///////////////// 国际出港模块 ///////////////// 国际出港模块
/** /**

View File

@@ -1,9 +1,14 @@
package com.lukouguoji.module_base.ui.page.preview package com.lukouguoji.module_base.ui.page.preview
import android.view.View import android.view.View
import com.bumptech.glide.Glide
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.model.LazyHeaders
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.FileBean import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.databinding.ItemPreviewImageBinding import com.lukouguoji.module_base.databinding.ItemPreviewImageBinding
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
/** /**
* @author孟凡华 * @author孟凡华
@@ -14,8 +19,26 @@ class PreviewImageViewHolder(view: View) :
BaseViewHolder<FileBean, ItemPreviewImageBinding>(view) { BaseViewHolder<FileBean, ItemPreviewImageBinding>(view) {
override fun onBind(item: Any?, position: Int) { override fun onBind(item: Any?, position: Int) {
binding.bean = getItemBean(item) val bean = getItemBean(item) ?: return
binding.bean = bean
// 加载图片
val path = bean.path
if (path.isNotEmpty()) {
if (path.startsWith("http")) {
// 网络图片带 Authorization header
val glideUrl = GlideUrl(
path,
LazyHeaders.Builder()
.addHeader("Authorization", SharedPreferenceUtil.getString(Constant.Share.token))
.build()
)
Glide.with(itemView.context).load(glideUrl).into(binding.photoView)
} else {
// 本地图片直接加载
Glide.with(itemView.context).load(path).into(binding.photoView)
}
}
} }
} }

View File

@@ -47,7 +47,9 @@ fun setDataLayoutData(
hint?.let { hint?.let {
dataLayout.hint = hint dataLayout.hint = hint
} }
dataLayout.icon = icon icon?.let {
dataLayout.icon = it
}
} }
@@ -189,7 +191,9 @@ fun setDataLayoutDataNew(
hint?.let { hint?.let {
dataLayout.hint = hint dataLayout.hint = hint
} }
dataLayout.icon = icon icon?.let {
dataLayout.icon = it
}
} }
@@ -293,108 +297,108 @@ fun setTextAllCapsNew(layout: PadDataLayoutNew, textAllCaps: Boolean) {
} else { } else {
layout.et.filters = emptyArray<InputFilter>() layout.et.filters = emptyArray<InputFilter>()
} }
} }
// ========== 自动查询功能 BindingAdapter新增 ========== // ========== 自动查询功能 BindingAdapter新增 ==========
/** /**
* 启用自动查询功能 * 启用自动查询功能
* @param enabled 是否启用 * @param enabled 是否启用
*/ */
@BindingAdapter("autoQueryEnabled") @BindingAdapter("autoQueryEnabled")
fun setAutoQueryEnabled(layout: PadDataLayoutNew, enabled: Boolean) { fun setAutoQueryEnabled(layout: PadDataLayoutNew, enabled: Boolean) {
layout.autoQueryConfig.enabled = enabled layout.autoQueryConfig.enabled = enabled
} }
/** /**
* 设置查询接口地址 * 设置查询接口地址
* @param url 接口地址(如:/IntExpCheckIn/checked/queryWbNoList * @param url 接口地址(如:/IntExpCheckIn/checked/queryWbNoList
*/ */
@BindingAdapter("autoQueryUrl") @BindingAdapter("autoQueryUrl")
fun setAutoQueryUrl(layout: PadDataLayoutNew, url: String?) { fun setAutoQueryUrl(layout: PadDataLayoutNew, url: String?) {
layout.autoQueryConfig.url = url ?: "" layout.autoQueryConfig.url = url ?: ""
} }
/** /**
* 设置查询参数的 key 名称 * 设置查询参数的 key 名称
* @param paramKey 参数名(默认 "value" * @param paramKey 参数名(默认 "value"
*/ */
@BindingAdapter("autoQueryParamKey") @BindingAdapter("autoQueryParamKey")
fun setAutoQueryParamKey(layout: PadDataLayoutNew, paramKey: String?) { fun setAutoQueryParamKey(layout: PadDataLayoutNew, paramKey: String?) {
layout.autoQueryConfig.paramKey = paramKey ?: "value" layout.autoQueryConfig.paramKey = paramKey ?: "value"
} }
/** /**
* 设置触发查询的最小长度 * 设置触发查询的最小长度
* @param minLength 最小长度(默认 4 * @param minLength 最小长度(默认 4
*/ */
@BindingAdapter("autoQueryMinLength") @BindingAdapter("autoQueryMinLength")
fun setAutoQueryMinLength(layout: PadDataLayoutNew, minLength: Int?) { fun setAutoQueryMinLength(layout: PadDataLayoutNew, minLength: Int?) {
layout.autoQueryConfig.minLength = minLength ?: 4 layout.autoQueryConfig.minLength = minLength ?: 4
} }
/** /**
* 设置触发查询的最大长度 * 设置触发查询的最大长度
* @param maxLength 最大长度(默认 8 * @param maxLength 最大长度(默认 8
*/ */
@BindingAdapter("autoQueryMaxLength") @BindingAdapter("autoQueryMaxLength")
fun setAutoQueryMaxLength(layout: PadDataLayoutNew, maxLength: Int?) { fun setAutoQueryMaxLength(layout: PadDataLayoutNew, maxLength: Int?) {
layout.autoQueryConfig.maxLength = maxLength ?: 8 layout.autoQueryConfig.maxLength = maxLength ?: 8
} }
/** /**
* 设置弹框标题 * 设置弹框标题
* @param title 标题(默认 "请选择" * @param title 标题(默认 "请选择"
*/ */
@BindingAdapter("autoQueryTitle") @BindingAdapter("autoQueryTitle")
fun setAutoQueryTitle(layout: PadDataLayoutNew, title: String?) { fun setAutoQueryTitle(layout: PadDataLayoutNew, title: String?) {
layout.autoQueryConfig.title = title ?: "请选择" layout.autoQueryConfig.title = title ?: "请选择"
} }
/** /**
* 设置防抖延迟 * 设置防抖延迟
* @param debounceMillis 延迟毫秒数(默认 300ms * @param debounceMillis 延迟毫秒数(默认 300ms
*/ */
@BindingAdapter("autoQueryDebounce") @BindingAdapter("autoQueryDebounce")
fun setAutoQueryDebounce(layout: PadDataLayoutNew, debounceMillis: Long?) { fun setAutoQueryDebounce(layout: PadDataLayoutNew, debounceMillis: Long?) {
layout.autoQueryConfig.debounceMillis = debounceMillis ?: 300L layout.autoQueryConfig.debounceMillis = debounceMillis ?: 300L
} }
/** /**
* 统一配置自动查询(所有属性设置完成后调用) * 统一配置自动查询(所有属性设置完成后调用)
* *
* ⚠️ 重要:必须在所有 autoQuery* 属性之后绑定,使用 requireAll = false * ⚠️ 重要:必须在所有 autoQuery* 属性之后绑定,使用 requireAll = false
*/ */
@BindingAdapter( @BindingAdapter(
"autoQueryEnabled", "autoQueryEnabled",
"autoQueryUrl", "autoQueryUrl",
"autoQueryParamKey", "autoQueryParamKey",
"autoQueryMinLength", "autoQueryMinLength",
"autoQueryMaxLength", "autoQueryMaxLength",
"autoQueryTitle", "autoQueryTitle",
"autoQueryDebounce", "autoQueryDebounce",
requireAll = false requireAll = false
) )
fun configureAutoQuery( fun configureAutoQuery(
layout: PadDataLayoutNew, layout: PadDataLayoutNew,
enabled: Boolean?, enabled: Boolean?,
url: String?, url: String?,
paramKey: String?, paramKey: String?,
minLength: Int?, minLength: Int?,
maxLength: Int?, maxLength: Int?,
title: String?, title: String?,
debounceMillis: Long? debounceMillis: Long?
) { ) {
// 应用所有配置 // 应用所有配置
enabled?.let { layout.autoQueryConfig.enabled = it } enabled?.let { layout.autoQueryConfig.enabled = it }
url?.let { layout.autoQueryConfig.url = it } url?.let { layout.autoQueryConfig.url = it }
paramKey?.let { layout.autoQueryConfig.paramKey = it } paramKey?.let { layout.autoQueryConfig.paramKey = it }
minLength?.let { layout.autoQueryConfig.minLength = it } minLength?.let { layout.autoQueryConfig.minLength = it }
maxLength?.let { layout.autoQueryConfig.maxLength = it } maxLength?.let { layout.autoQueryConfig.maxLength = it }
title?.let { layout.autoQueryConfig.title = it } title?.let { layout.autoQueryConfig.title = it }
debounceMillis?.let { layout.autoQueryConfig.debounceMillis = it } debounceMillis?.let { layout.autoQueryConfig.debounceMillis = it }
// 验证并启用自动查询 // 验证并启用自动查询
if (layout.autoQueryConfig.isValid()) { if (layout.autoQueryConfig.isValid()) {
layout.enableAutoQuery(layout.autoQueryConfig) layout.enableAutoQuery(layout.autoQueryConfig)
} }
} }

View File

@@ -212,6 +212,11 @@ class PadDataLayout : FrameLayout {
et.visibility = GONE et.visibility = GONE
spinner.visibility = GONE spinner.visibility = GONE
tvSpinner.visibility = GONE tvSpinner.visibility = GONE
iv.visibility = VISIBLE
iv.setImageResource(R.mipmap.img_date)
val dp20 = dev.utils.app.SizeUtils.dp2px(20f)
iv.layoutParams.width = dp20
iv.layoutParams.height = dp20
setOnClickListener(dateClick) setOnClickListener(dateClick)
} }

View File

@@ -97,7 +97,7 @@ class PadDataLayoutNew : FrameLayout {
et.hint = value et.hint = value
tv.hint = value tv.hint = value
bindAdapter(spinner, list, hint) updateSpinnerSilently { bindAdapter(spinner, list, hint) }
} }
var required = false var required = false
@@ -106,11 +106,29 @@ class PadDataLayoutNew : FrameLayout {
tvM.visibility = if (value) VISIBLE else INVISIBLE tvM.visibility = if (value) VISIBLE else INVISIBLE
} }
private val spinnerCallback = object : IOnSpinnerSelected {
override fun onSelected(position: Int) {
value = list.getOrNull(position)?.value ?: ""
refreshCallBack?.invoke()
}
}
private val restoreListenerRunnable = Runnable {
bindOnSelected(spinner, spinnerCallback)
}
private fun updateSpinnerSilently(block: () -> Unit) {
spinner.onItemSelectedListener = null
spinner.removeCallbacks(restoreListenerRunnable)
block()
onValueSet()
spinner.post(restoreListenerRunnable)
}
var list = emptyList<KeyValue>() var list = emptyList<KeyValue>()
set(value) { set(value) {
field = value field = value
bindAdapter(spinner, value, hint) updateSpinnerSilently { bindAdapter(spinner, value, hint) }
onValueSet()
} }
var icon: Any? = null var icon: Any? = null
@@ -183,12 +201,7 @@ class PadDataLayoutNew : FrameLayout {
et.doOnTextChanged { text, _, _, _ -> et.doOnTextChanged { text, _, _, _ ->
value = text.toString() value = text.toString()
} }
bindOnSelected(spinner, object : IOnSpinnerSelected { bindOnSelected(spinner, spinnerCallback)
override fun onSelected(position: Int) {
value = list.getOrNull(position)?.value ?: ""
refreshCallBack?.invoke()
}
})
// 监听输入框焦点变化 // 监听输入框焦点变化
com.lukouguoji.module_base.adapter.setOnFocusChangeListener( com.lukouguoji.module_base.adapter.setOnFocusChangeListener(
et, object : IOnFocusChangeListener { et, object : IOnFocusChangeListener {
@@ -240,6 +253,11 @@ class PadDataLayoutNew : FrameLayout {
et.visibility = GONE et.visibility = GONE
spinner.visibility = GONE spinner.visibility = GONE
tvSpinner.visibility = GONE tvSpinner.visibility = GONE
iv.visibility = VISIBLE
iv.setImageResource(R.mipmap.img_date)
val dp20 = dev.utils.app.SizeUtils.dp2px(20f)
iv.layoutParams.width = dp20
iv.layoutParams.height = dp20
setOnClickListener(dateClick) setOnClickListener(dateClick)
} }

View File

@@ -457,14 +457,14 @@ object DictUtils {
/** /**
* 地区类型 * 地区类型
*/ */
fun getAreaTypeList( fun getCountryTypeList(
addAll: Boolean = true, addAll: Boolean = true,
checkedValue: String? = null, checkedValue: String? = null,
callBack: (List<KeyValue>) -> Unit callBack: (List<KeyValue>) -> Unit
) { ) {
launchCollect({ launchCollect({
NetApply.api NetApply.api
.getAreaTypeList() .getCountryTypeList()
}) { }) {
onSuccess = { onSuccess = {
handleCallBack(it, checkedValue, addAll, callBack) handleCallBack(it, checkedValue, addAll, callBack)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp" />
<solid android:color="#A5D6A7" />
</shape>

View File

@@ -10,9 +10,9 @@
<RelativeLayout <RelativeLayout
android:id="@+id/rl" android:id="@+id/rl"
android:layout_width="match_parent" android:layout_width="100dp"
android:layout_height="150dp" android:layout_height="100dp"
android:layout_margin="10dp" android:layout_margin="5dp"
android:background="@color/white"> android:background="@color/white">
<ImageView <ImageView
@@ -24,7 +24,6 @@
<ImageView <ImageView
android:id="@+id/iv" android:id="@+id/iv"
loadImage="@{bean.path}"
visible="@{bean.path}" visible="@{bean.path}"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.FileBean" />
</data>
<RelativeLayout
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="5dp"
android:background="@{bean.path.length() == 0 ? @color/color_f2 : @color/white}">
<ImageView
visible="@{bean.path.length() == 0}"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:src="@drawable/img_add" />
<ImageView
android:id="@+id/iv"
loadImage="@{bean.path}"
visible="@{bean.path}"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
<View
visible="@{bean.canDelete}"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_tran10" />
<ImageView
android:id="@+id/iv_delete"
visible="@{bean.canDelete}"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerInParent="true"
android:src="@drawable/img_delete_red" />
</RelativeLayout>
</layout>

View File

@@ -13,7 +13,7 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.luck.picture.lib.photoview.PhotoView <com.luck.picture.lib.photoview.PhotoView
loadImage="@{bean.path}" android:id="@+id/photo_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />

View File

@@ -21,6 +21,7 @@ import com.lukouguoji.module_base.util.Common
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
@Deprecated("旧版板箱过磅,使用 GjcBoxWeighingActivity 替代")
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_FU_BANG) @Route(path = ARouterConstants.ACTIVITY_URL_GJC_FU_BANG)
class GjcFuBangActivity : BaseActivity(), View.OnClickListener { class GjcFuBangActivity : BaseActivity(), View.OnClickListener {
private lateinit var viewModel: GjcFuBangViewModel private lateinit var viewModel: GjcFuBangViewModel

View File

@@ -3,7 +3,12 @@ package com.lukouguoji.gjc.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.Gravity
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.appcompat.widget.Toolbar
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.lukouguoji.gjc.R import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcQueryDetailsBinding import com.lukouguoji.gjc.databinding.ActivityGjcQueryDetailsBinding
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel
@@ -43,10 +48,37 @@ class GjcQueryDetailsActivity :
binding.vp.setCurrentItem(it, false) // false:无动画 binding.vp.setCurrentItem(it, false) // false:无动画
} }
// 标题栏右侧添加日志查询图标
val toolbar = findViewById<Toolbar>(com.lukouguoji.module_base.R.id.toolbar)
val logIcon = ImageView(this).apply {
setImageResource(com.lukouguoji.module_base.R.drawable.img_log)
layoutParams = Toolbar.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
).apply {
gravity = Gravity.END or Gravity.CENTER_VERTICAL
marginEnd = 15
width = 30.dp
height = 30.dp
}
setOnClickListener {
val wbNo = viewModel.maWbData.value?.get("wbNo") as? String ?: ""
ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_LOG_DETAIL)
.withString(Constant.Key.KEY, wbNo)
.withString(Constant.Key.AWB_TYPE, "IO")
.navigation()
}
}
toolbar.addView(logIcon)
// 加载详情数据 // 加载详情数据
viewModel.loadDetails() viewModel.loadDetails()
} }
private val Int.dp: Int
get() = (this * resources!!.displayMetrics.density).toInt()
companion object { companion object {
@JvmStatic @JvmStatic
fun start(context: Context, maWbId: Long?) { fun start(context: Context, maWbId: Long?) {

View File

@@ -51,12 +51,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班日期:" /> android:text="航班日期:" />
<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:text="@{bean.fdate}" android:text="@{bean.fdate}"
tools:text="2025-09-05" /> tools:text="2025-09-05" />
@@ -72,12 +74,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班号:" /> android:text="航班号:" />
<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:text='@{bean.fno}' android:text='@{bean.fno}'
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="MU2023" /> tools:text="MU2023" />
@@ -94,12 +98,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航程:" /> android:text="航程:" />
<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:text='@{bean.range ?? (bean.fdep + "-" + bean.fdest)}' android:text='@{bean.range ?? (bean.fdep + "-" + bean.fdest)}'
tools:text="HFE - LAX" /> tools:text="HFE - LAX" />
@@ -123,12 +129,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="组装人:" /> android:text="组装人:" />
<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:text="@{bean.abName ?? ``}" android:text="@{bean.abName ?? ``}"
tools:text="徵远" /> tools:text="徵远" />
@@ -144,12 +152,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="分配人:" /> android:text="分配人:" />
<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:text='@{bean.acName ?? ``}' android:text='@{bean.acName ?? ``}'
tools:text="张三" /> tools:text="张三" />
@@ -165,12 +175,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="分配时间:" /> android:text="分配时间:" />
<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:text="@{bean.acDate ?? ``}" android:text="@{bean.acDate ?? ``}"
tools:text="2024-01-15 14:27:12" /> tools:text="2024-01-15 14:27:12" />

View File

@@ -50,11 +50,13 @@
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:textSize="15sp"
android:text="ULD编号" /> android:text="ULD编号" />
<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:text="@{bean.uld}" android:text="@{bean.uld}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="PMC12345MU" /> tools:text="PMC12345MU" />
@@ -72,11 +74,13 @@
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:textSize="15sp"
android:text="架子车号:" /> android:text="架子车号:" />
<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:text='@{bean.carId}' android:text='@{bean.carId}'
tools:text="527" /> tools:text="527" />
@@ -93,11 +97,13 @@
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:textSize="15sp"
android:text="总重:" /> android:text="总重:" />
<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:text="@{String.valueOf(bean.totalWeight)}" android:text="@{String.valueOf(bean.totalWeight)}"
tools:text="200" /> tools:text="200" />
@@ -114,11 +120,13 @@
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:textSize="15sp"
android:text="装机重量:" /> android:text="装机重量:" />
<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:text='@{String.valueOf(bean.netWeight)}' android:text='@{String.valueOf(bean.netWeight)}'
tools:text="150" /> tools:text="150" />
@@ -135,11 +143,13 @@
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:textSize="15sp"
android:text="货重:" /> android:text="货重:" />
<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:text='@{String.valueOf(bean.cargoWeight)}' android:text='@{String.valueOf(bean.cargoWeight)}'
tools:text="150" /> tools:text="150" />
@@ -164,11 +174,13 @@
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:textSize="15sp"
android:text="航班日期:" /> android:text="航班日期:" />
<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: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" />
@@ -185,11 +197,13 @@
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:textSize="15sp"
android:text="航班号:" /> android:text="航班号:" />
<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:text='@{bean.fno}' android:text='@{bean.fno}'
tools:text="MU2023" /> tools:text="MU2023" />
@@ -206,11 +220,13 @@
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:textSize="15sp"
android:text="目的港:" /> android:text="目的港:" />
<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:text="@{bean.fdest}" android:text="@{bean.fdest}"
tools:text="PEK" /> tools:text="PEK" />
@@ -227,11 +243,13 @@
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:textSize="15sp"
android:text="过磅人:" /> android:text="过磅人:" />
<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:text='@{bean.wtUsername}' android:text='@{bean.wtUsername}'
tools:text="张三" /> tools:text="张三" />
@@ -248,11 +266,13 @@
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:textSize="15sp"
android:text="过磅时间:" /> android:text="过磅时间:" />
<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:text='@{bean.wtDate}' android:text='@{bean.wtDate}'
tools:text="2024-01-15 14:27:12" /> tools:text="2024-01-15 14:27:12" />

View File

@@ -53,12 +53,14 @@
<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"
completeSpace="@{4}" completeSpace="@{4}"
android:text="运单号:" /> android:text="运单号:" />
<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:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="78109081212" /> tools:text="78109081212" />
@@ -75,12 +77,14 @@
<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"
completeSpace="@{4}" completeSpace="@{4}"
android:text="代理人:" /> android:text="代理人:" />
<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:text='@{bean.agentCode}' android:text='@{bean.agentCode}'
tools:text="SF" /> tools:text="SF" />
@@ -96,12 +100,14 @@
<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"
completeSpace="@{4}" completeSpace="@{4}"
android:text="特码:" /> android:text="特码:" />
<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:text="@{bean.spCode}" android:text="@{bean.spCode}"
tools:text="NOR" /> tools:text="NOR" />
@@ -117,12 +123,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="预配件数:" /> android:text="预配件数:" />
<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:text='@{String.valueOf(bean.pc)}' android:text='@{String.valueOf(bean.pc)}'
tools:text="11" /> tools:text="11" />
@@ -138,12 +146,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="预配重量:" /> android:text="预配重量:" />
<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:text='@{String.valueOf(bean.weight)}' android:text='@{String.valueOf(bean.weight)}'
tools:text="12" /> tools:text="12" />
@@ -167,12 +177,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="计划航班:" /> android:text="计划航班:" />
<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:text="@{bean.flight}" android:text="@{bean.flight}"
tools:text="20240216/MU2026" /> tools:text="20240216/MU2026" />
@@ -188,12 +200,14 @@
<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"
completeSpace="@{4}" completeSpace="@{4}"
android:text="航程:" /> android:text="航程:" />
<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:text='@{bean.range}' android:text='@{bean.range}'
tools:text="HFE - PEK" /> tools:text="HFE - PEK" />
@@ -209,12 +223,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="预计起飞:" /> android:text="预计起飞:" />
<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:text="@{bean.scheduledTackOffHM}" android:text="@{bean.scheduledTackOffHM}"
tools:text="09:12" /> tools:text="09:12" />
@@ -239,12 +255,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="业务类型:" /> android:text="业务类型:" />
<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:text='@{bean.businessName}' android:text='@{bean.businessName}'
tools:text="普通货物运输" /> tools:text="普通货物运输" />
@@ -260,6 +278,7 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="审核状态:" /> android:text="审核状态:" />
@@ -267,6 +286,7 @@
android:id="@+id/tv_status" android:id="@+id/tv_status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="已通过" /> tools:text="已通过" />

View File

@@ -1,298 +1,318 @@
<?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/apk/res/android">
<data> <data>
<variable <variable
name="bean" name="bean"
type="com.lukouguoji.module_base.bean.GjcMaWb" /> type="com.lukouguoji.module_base.bean.GjcMaWb" />
</data> </data>
<com.mcxtzhang.swipemenulib.SwipeMenuLayout <com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<!-- 主内容区 --> <!-- 主内容区 -->
<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">
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
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="15dp"
android:layout_marginVertical="5dp" android:layout_marginVertical="5dp"
android:background="@drawable/bg_item" android:background="@drawable/bg_item"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="10dp">
<!-- 左侧图标 --> <!-- 左侧图标 -->
<ImageView <ImageView
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" />
<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="10dp"
android:orientation="vertical"> android:orientation="vertical">
<!-- 第一行数据:运单号、件数、重量、代理人、入库时间 --> <!-- 第一行数据:运单号、件数、重量、代理人、入库时间 -->
<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">
<!-- 运单号 --> <!-- 运单号 -->
<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.1" android:layout_weight="1.1"
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"
completeSpace="@{4}" completeSpace="@{4}"
android:text="运单号:" /> android:text="运单号:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content" <TextView
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:text="@{bean.wbNo}" android:layout_height="wrap_content"
android:textColor="@color/colorPrimary" android:text="@{bean.wbNo}"
tools:text="78109081212" /> android:textColor="@color/colorPrimary"
android:textSize="15sp"
</androidx.appcompat.widget.LinearLayoutCompat> tools:text="78109081212" />
<!-- 件数 --> </androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <!-- 件数 -->
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:layout_weight="0.7" android:layout_width="0dp"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:layout_weight="0.7"
<TextView android:gravity="center_vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content" <TextView
completeSpace="@{4}" android:layout_width="wrap_content"
android:text="件数:" /> android:layout_height="wrap_content"
completeSpace="@{4}"
<TextView android:text="件数:"
android:layout_width="wrap_content" android:textSize="15sp" />
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.pc)}' <TextView
tools:text="10" /> android:layout_width="wrap_content"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp"
<!-- 重量 --> tools:text="10" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_height="wrap_content"
android:layout_weight="0.7" <!-- 重量 -->
android:gravity="center_vertical"> <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_weight="0.7"
android:layout_height="wrap_content" android:gravity="center_vertical">
completeSpace="@{3}"
android:text="重量:" /> <TextView
android:layout_width="wrap_content"
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content" completeSpace="@{3}"
android:layout_height="wrap_content" android:text="重量:"
android:text='@{String.valueOf(bean.weight)}' android:textSize="15sp" />
tools:text="200" />
<TextView
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_width="wrap_content"
android:layout_height="wrap_content"
<!-- 代理人 --> android:text='@{String.valueOf(bean.weight)}'
<androidx.appcompat.widget.LinearLayoutCompat android:textSize="15sp"
android:layout_width="0dp" tools:text="200" />
android:layout_height="wrap_content"
android:layout_weight="1.2" </androidx.appcompat.widget.LinearLayoutCompat>
android:gravity="center_vertical">
<!-- 代理人 -->
<TextView <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" android:layout_weight="1.2"
android:text="代理人:" /> 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='@{bean.agentName ?? bean.agentCode}' completeSpace="@{5}"
tools:text="SF" /> android:text="代理人:"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
<!-- 入库时间 --> android:layout_width="wrap_content"
<androidx.appcompat.widget.LinearLayoutCompat android:layout_height="wrap_content"
android:layout_width="0dp" android:text='@{bean.agentName ?? bean.agentCode}'
android:layout_height="wrap_content" android:textSize="15sp"
android:layout_weight="1.2" tools:text="SF" />
android:gravity="center_vertical">
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:layout_width="wrap_content" <!-- 入库时间 -->
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
completeSpace="@{5}" android:layout_width="0dp"
android:text="入库时间:" /> android:layout_height="wrap_content"
android:layout_weight="1.2"
<TextView android:gravity="center_vertical">
android:layout_width="wrap_content"
android:layout_height="wrap_content" <TextView
android:text='@{bean.opDate ?? ""}' android:layout_width="wrap_content"
tools:text="2024-05-13 17:10:22" /> android:layout_height="wrap_content"
completeSpace="@{5}"
</androidx.appcompat.widget.LinearLayoutCompat> android:text="入库时间:"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
<!-- 第二行数据:航班、目的港、特码、运单类型、离港时间 --> android:layout_width="wrap_content"
<androidx.appcompat.widget.LinearLayoutCompat android:layout_height="wrap_content"
android:layout_width="match_parent" android:text='@{bean.opDate ?? ""}'
android:layout_height="wrap_content" android:textSize="15sp"
android:layout_marginTop="10dp"> tools:text="2024-05-13 17:10:22" />
<!-- 航班 --> </androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_height="wrap_content"
android:layout_weight="1.1" <!-- 第二行数据:航班、目的港、特码、运单类型、离港时间 -->
android:gravity="center_vertical"> <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_marginTop="10dp">
android:layout_height="wrap_content"
completeSpace="@{4}" <!-- 航班 -->
android:text="航班:" /> <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_weight="1.1"
android:layout_height="wrap_content" android:gravity="center_vertical">
android:text="@{bean.flight}"
tools:text="20240513/MU2026" /> <TextView
android:layout_width="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_height="wrap_content"
completeSpace="@{4}"
<!-- 目的港 --> android:text="航班:"
<androidx.appcompat.widget.LinearLayoutCompat android:textSize="15sp" />
android:layout_width="0dp"
android:layout_height="wrap_content" <TextView
android:layout_weight="0.7" android:layout_width="wrap_content"
android:gravity="center_vertical"> android:layout_height="wrap_content"
android:text="@{bean.flight}"
<TextView android:textSize="15sp"
android:layout_width="wrap_content" tools:text="20240513/MU2026" />
android:layout_height="wrap_content"
completeSpace="@{4}" </androidx.appcompat.widget.LinearLayoutCompat>
android:text="目的港:" />
<!-- 目的港 -->
<TextView <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.dest}" android:layout_weight="0.7"
tools:text="PEK" /> android:gravity="center_vertical">
</androidx.appcompat.widget.LinearLayoutCompat> <TextView
android:layout_width="wrap_content"
<!-- 特码 --> android:layout_height="wrap_content"
<androidx.appcompat.widget.LinearLayoutCompat completeSpace="@{4}"
android:layout_width="0dp" android:text="目的港:"
android:layout_height="wrap_content" android:textSize="15sp" />
android:layout_weight="0.7"
android:gravity="center_vertical"> <TextView
android:layout_width="wrap_content"
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content" android:text="@{bean.dest}"
android:layout_height="wrap_content" android:textSize="15sp"
completeSpace="@{3}" tools:text="PEK" />
android:text="特码:" />
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:layout_width="wrap_content" <!-- 特码 -->
android:layout_height="wrap_content" <androidx.appcompat.widget.LinearLayoutCompat
android:text="@{bean.spCode}" android:layout_width="0dp"
tools:text="NOR" /> android:layout_height="wrap_content"
android:layout_weight="0.7"
</androidx.appcompat.widget.LinearLayoutCompat> android:gravity="center_vertical">
<!-- 运单类型 --> <TextView
<androidx.appcompat.widget.LinearLayoutCompat android:layout_width="wrap_content"
android:layout_width="0dp" android:layout_height="wrap_content"
android:layout_height="wrap_content" completeSpace="@{3}"
android:layout_weight="1.2" android:text="特码:"
android:gravity="center_vertical"> 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"
completeSpace="@{5}" android:text="@{bean.spCode}"
android:text="运单类型:" /> android:textSize="15sp"
tools:text="NOR" />
<TextView
android:layout_width="wrap_content" </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_height="wrap_content"
android:text='@{bean.awbName ?? bean.awbType}' <!-- 运单类型 -->
tools:text="国际出港(直航)" /> <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_height="wrap_content"
android:layout_weight="1.2"
<!-- 离港时间 --> android:gravity="center_vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" <TextView
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_weight="1.2" android:layout_height="wrap_content"
android:gravity="center_vertical"> completeSpace="@{5}"
android:text="运单类型:"
<TextView android:textSize="15sp" />
android:layout_width="wrap_content"
android:layout_height="wrap_content" <TextView
completeSpace="@{5}" android:layout_width="wrap_content"
android:text="离港时间:" /> android:layout_height="wrap_content"
android:text='@{bean.awbName ?? bean.awbType}'
<TextView android:textSize="15sp"
android:layout_width="wrap_content" tools:text="国际出港(直航)" />
android:layout_height="wrap_content"
android:text='@{bean.fclose ?? ""}' </androidx.appcompat.widget.LinearLayoutCompat>
tools:text="2024-05-13 17:10:22" />
<!-- 离港时间 -->
</androidx.appcompat.widget.LinearLayoutCompat> <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_height="wrap_content"
android:layout_weight="1.2"
</LinearLayout> android:gravity="center_vertical">
<!-- 右侧箭头 --> <TextView
<ImageView android:layout_width="wrap_content"
android:layout_width="30dp" android:layout_height="wrap_content"
android:layout_height="30dp" completeSpace="@{5}"
android:layout_gravity="center" android:text="离港时间:"
android:src="@drawable/img_pda_right" android:textSize="15sp" />
android:layout_marginLeft="10dp" />
<TextView
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_width="wrap_content"
android:layout_height="wrap_content"
</androidx.appcompat.widget.LinearLayoutCompat> android:text='@{bean.fclose ?? ""}'
android:textSize="15sp"
<!-- 侧滑菜单区 --> tools:text="2024-05-13 17:10:22" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content" </androidx.appcompat.widget.LinearLayoutCompat>
android:layout_height="match_parent">
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:id="@+id/btnEdit" </LinearLayout>
style="@style/tv_item_action"
android:background="@color/colorPrimary" <!-- 右侧箭头 -->
android:text="修改" /> <ImageView
android:layout_width="30dp"
</androidx.appcompat.widget.LinearLayoutCompat> android:layout_height="30dp"
android:layout_gravity="center"
</com.mcxtzhang.swipemenulib.SwipeMenuLayout> android:src="@drawable/img_pda_right"
</layout> android:layout_marginLeft="10dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 侧滑菜单区 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:id="@+id/btnEdit"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="修改" />
</androidx.appcompat.widget.LinearLayoutCompat>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
</layout>

View File

@@ -48,7 +48,7 @@
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="运单号:" android:text="运单号:"
android:textColor="@color/weak_grey" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
@@ -56,6 +56,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.waybillCode}" android:text="@{bean.waybillCode}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -68,12 +69,14 @@
<TextView <TextView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="件数:" /> android:text="件数:"
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:text="@{bean.pc}" /> android:text="@{bean.pc}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -85,12 +88,14 @@
<TextView <TextView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="重量:" /> android:text="重量:"
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:text="@{bean.weight}" /> android:text="@{bean.weight}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -102,12 +107,14 @@
<TextView <TextView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="目的港:" /> android:text="目的港:"
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:text="@{bean.dest}" /> android:text="@{bean.dest}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -119,12 +126,14 @@
<TextView <TextView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="代理:" /> android:text="代理:"
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:text="@{bean.agent}" /> android:text="@{bean.agent}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -144,12 +153,14 @@
<TextView <TextView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="特码:" /> android:text="特码:"
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:text="@{bean.spcode}" /> android:text="@{bean.spcode}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -161,12 +172,14 @@
<TextView <TextView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="业务类型:" /> android:text="业务类型:"
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:text="@{bean.businesstype}" /> android:text="@{bean.businesstype}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -178,12 +191,14 @@
<TextView <TextView
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="品名(中)" /> android:text="品名(中)"
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:text="@{bean.goods}" /> android:text="@{bean.goods}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -57,11 +57,13 @@
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:textSize="15sp"
android:text="运单号:" /> android:text="运单号:" />
<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:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
tools:text="78109081212" /> tools:text="78109081212" />
@@ -79,11 +81,13 @@
completeSpace="@{4}" completeSpace="@{4}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp"
android:text="代理人:" /> android:text="代理人:" />
<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:maxLines="1" android:maxLines="1"
android:lines="1" android:lines="1"
android:ellipsize="end" android:ellipsize="end"
@@ -103,11 +107,13 @@
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:textSize="15sp"
android:text="特码:" /> android:text="特码:" />
<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:text="@{bean.spCode}" android:text="@{bean.spCode}"
tools:text="NOR" /> tools:text="NOR" />
@@ -124,11 +130,13 @@
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:textSize="15sp"
android:text="预配件数:" /> android:text="预配件数:" />
<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:text='@{String.valueOf(bean.pc)}' android:text='@{String.valueOf(bean.pc)}'
tools:text="11" /> tools:text="11" />
@@ -145,11 +153,13 @@
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:textSize="15sp"
android:text="预配重量:" /> android:text="预配重量:" />
<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:text='@{String.valueOf(bean.weight)}' android:text='@{String.valueOf(bean.weight)}'
tools:text="12" /> tools:text="12" />
@@ -174,11 +184,13 @@
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:textSize="15sp"
android:text="计划航班:" /> android:text="计划航班:" />
<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:text="@{bean.flight}" android:text="@{bean.flight}"
tools:text="20240216/MU2026" /> tools:text="20240216/MU2026" />
@@ -195,11 +207,13 @@
completeSpace="@{4}" completeSpace="@{4}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="15sp"
android:text="航程:" /> android:text="航程:" />
<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:text='@{bean.range}' android:text='@{bean.range}'
tools:text="HFE - PEK" /> tools:text="HFE - PEK" />
@@ -216,11 +230,13 @@
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:textSize="15sp"
android:text="预计起飞:" /> android:text="预计起飞:" />
<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:text="@{bean.scheduledTackOffHM}" android:text="@{bean.scheduledTackOffHM}"
tools:text="09:12" /> tools:text="09:12" />
@@ -246,11 +262,13 @@
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:textSize="15sp"
android:text="业务类型:" /> android:text="业务类型:" />
<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:text='@{bean.businessName}' android:text='@{bean.businessName}'
tools:text="普通货物运输" /> tools:text="普通货物运输" />
@@ -267,11 +285,13 @@
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:textSize="15sp"
android:text="品名(中)" /> android:text="品名(中)" />
<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:ellipsize="end" android:ellipsize="end"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"

View File

@@ -51,13 +51,15 @@
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: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:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="15sp"
tools:text="78109081212" /> tools:text="78109081212" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -73,12 +75,14 @@
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: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:text='@{String.valueOf(bean.pc)}' android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp"
tools:text="10" /> tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -94,12 +98,14 @@
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: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:text='@{String.valueOf((int)bean.weight)}' android:text='@{String.valueOf((int)bean.weight)}'
android:textSize="15sp"
tools:text="100" /> tools:text="100" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -115,12 +121,14 @@
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: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:text='@{String.valueOf(bean.checkInPc)}' android:text='@{String.valueOf(bean.checkInPc)}'
android:textSize="15sp"
tools:text="11" /> tools:text="11" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -136,12 +144,14 @@
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: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:text='@{String.valueOf(bean.checkInWeight)}' android:text='@{String.valueOf(bean.checkInWeight)}'
android:textSize="15sp"
tools:text="12" /> tools:text="12" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -165,12 +175,14 @@
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: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:text='@{bean.agentCode}' android:text='@{bean.agentCode}'
android:textSize="15sp"
tools:text="顺丰" /> tools:text="顺丰" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -186,12 +198,14 @@
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: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:text='@{bean.spCode}' android:text='@{bean.spCode}'
android:textSize="15sp"
tools:text="NOR" /> tools:text="NOR" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -207,12 +221,14 @@
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: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:text='@{bean.userName}' android:text='@{bean.userName}'
android:textSize="15sp"
tools:text="张三" /> tools:text="张三" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
@@ -228,12 +244,14 @@
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: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:text='@{bean.opDate}' android:text='@{bean.opDate}'
android:textSize="15sp"
tools:text="2024-02-16 09:12" /> tools:text="2024-02-16 09:12" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -34,7 +34,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp" android:padding="10dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
<!-- 选中图标 (飞机图标,根据选择状态切换图片) --> <!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
@@ -75,14 +75,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="运单号:" android:text="运单号:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
@@ -101,14 +101,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="状态:" android:text="状态:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.declareStatus}" android:text="@{bean.declareStatus}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -126,7 +126,7 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="代理:" android:text="代理:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -136,7 +136,7 @@
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" android:ellipsize="end"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -154,14 +154,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="件数:" android:text="件数:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{String.valueOf(bean.pc)}" android:text="@{String.valueOf(bean.pc)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -179,14 +179,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="重量:" android:text="重量:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{String.valueOf((int)bean.weight)}" android:text="@{String.valueOf((int)bean.weight)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -214,14 +214,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="航程:" android:text="航程:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.range}" android:text="@{bean.range}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -239,14 +239,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="计重状态:" android:text="计重状态:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.checkInText}" android:text="@{bean.checkInText}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -264,14 +264,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="运抵状态:" android:text="运抵状态:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.arriveFlagText}" android:text="@{bean.arriveFlagText}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -289,14 +289,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="运单类型:" android:text="运单类型:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.awbName}" android:text="@{bean.awbName}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -314,14 +314,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="分单数:" android:text="分单数:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{String.valueOf(bean.haWbNumber)}" android:text="@{String.valueOf(bean.haWbNumber)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -335,10 +335,9 @@
<ImageView <ImageView
android:id="@+id/iv_show" android:id="@+id/iv_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="20dp" android:layout_height="18dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:padding="5dp" android:padding="4dp"
android:src="@mipmap/img_down" android:src="@mipmap/img_down"
visible="@{bean.haWbList != null &amp;&amp; !bean.haWbList.empty}" /> visible="@{bean.haWbList != null &amp;&amp; !bean.haWbList.empty}" />

View File

@@ -29,12 +29,11 @@
<!-- 选项 - 圆形checkbox --> <!-- 选项 - 圆形checkbox -->
<ImageView <ImageView
android:id="@+id/iv_checkbox" android:id="@+id/iv_checkbox"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}" loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="0.5" android:layout_weight="0.5"
app:tint="@color/color_66"
android:src="@drawable/radiobtn_unchecked_style" /> android:src="@drawable/radiobtn_unchecked_style" />
<!-- 分单号 (前缀-编号-H编号) --> <!-- 分单号 (前缀-编号-H编号) -->

View File

@@ -41,7 +41,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp"> android:padding="10dp">
<!-- 选中图标 (飞机图标,根据选择状态切换图片) --> <!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
<ImageView <ImageView
@@ -81,14 +81,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="ULD编码" android:text="ULD编码"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.uld}" android:text="@{bean.uld}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -106,14 +106,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="货重:" android:text="货重:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{String.valueOf((int)bean.cargoWeight)}" android:text="@{String.valueOf((int)bean.cargoWeight)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -131,14 +131,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="件数:" android:text="件数:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{String.valueOf(bean.pc)}" android:text="@{String.valueOf(bean.pc)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -156,14 +156,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="复磅状态:" android:text="复磅状态:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}" android:text="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}"
android:textColor="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}" android:textColor="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -181,14 +181,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="回填状态:" android:text="回填状态:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.fillWeightFlagText}" android:text="@{bean.fillWeightFlagText}"
android:textColor="@{bean.isFillWeightGreen ? @color/text_green : @color/text_normal}" android:textColor="@{bean.isFillWeightGreen ? @color/text_green : @color/text_normal}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -216,14 +216,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班日期:" android:text="航班日期:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.fdateFormatted}" android:text="@{bean.fdateFormatted}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -241,14 +241,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="航班号:" android:text="航班号:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.fno}" android:text="@{bean.fno}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -266,14 +266,14 @@
completeSpace="@{4}" completeSpace="@{4}"
android:text="组装人:" android:text="组装人:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.ldId}" android:text="@{bean.ldId}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -291,14 +291,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="组装区:" android:text="组装区:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.loadArea}" android:text="@{bean.loadArea}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -316,14 +316,14 @@
completeSpace="@{5}" completeSpace="@{5}"
android:text="组装时间:" android:text="组装时间:"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.ldDate}" android:text="@{bean.ldDate}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -337,10 +337,9 @@
<ImageView <ImageView
android:id="@+id/iv_show" android:id="@+id/iv_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="20dp" android:layout_height="18dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:padding="5dp" android:padding="4dp"
android:rotation="@{bean.showMore.get() ? 180f : 0f}" android:rotation="@{bean.showMore.get() ? 180f : 0f}"
android:src="@mipmap/img_down" /> android:src="@mipmap/img_down" />

View File

@@ -18,10 +18,11 @@
<LinearLayout <LinearLayout
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_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8" android:background="@drawable/bg_white_radius_8"
android:orientation="vertical" android:orientation="vertical"
android:padding="15dp"> android:padding="10dp">
<!-- 主体部分 --> <!-- 主体部分 -->
<LinearLayout <LinearLayout
@@ -65,14 +66,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{"ULD编号"}' android:text='@{"ULD编号"}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.uld}" android:text="@{bean.uld}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView <TextView
@@ -81,14 +82,14 @@
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text='@{"航班日期:"}' android:text='@{"航班日期:"}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.fdate}" android:text="@{bean.fdate}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -96,14 +97,14 @@
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text='@{"航班号:"}' android:text='@{"航班号:"}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.fno}" android:text="@{bean.fno}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -111,14 +112,14 @@
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text='@{"目的港:"}' android:text='@{"目的港:"}'
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> 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:text="@{bean.fdest}" android:text="@{bean.fdest}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -126,7 +127,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="10dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@@ -134,75 +135,75 @@
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_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:text="@{String.valueOf(bean.totalWeight)}" android:text="@{String.valueOf(bean.totalWeight)}"
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text='@{"货重:"}' android:text='@{"货重:"}'
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:text="@{String.valueOf(bean.cargoWeight)}" android:text="@{String.valueOf(bean.cargoWeight)}"
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text='@{"件数:"}' android:text='@{"件数:"}'
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:text="@{bean.pieces}" android:text="@{bean.pieces}"
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text='@{"组装人:"}' android:text='@{"组装人:"}'
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:text="@{bean.ldUserName}" android:text="@{bean.ldUserName}"
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:text='@{"组装时间:"}' android:text='@{"组装时间:"}'
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> 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:text="@{bean.ldDate}" android:text="@{bean.ldDate}"
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="14sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>

View File

@@ -18,11 +18,12 @@
<LinearLayout <LinearLayout
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_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8" android:background="@drawable/bg_white_radius_8"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp"> android:padding="10dp">
<!-- 选中图标 (飞机图标,根据选择状态切换图片) --> <!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
<ImageView <ImageView
@@ -61,7 +62,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{4}" /> completeSpace="@{4}" />
<TextView <TextView
@@ -69,7 +70,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.getFullWaybillNo()}" android:text="@{bean.getFullWaybillNo()}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
@@ -87,7 +88,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{5}" /> completeSpace="@{5}" />
<TextView <TextView
@@ -95,7 +96,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.loadStatus}" android:text="@{bean.loadStatus}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -112,7 +113,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{4}" /> completeSpace="@{4}" />
<TextView <TextView
@@ -120,7 +121,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.pc)}" android:text="@{String.valueOf(bean.pc)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -137,7 +138,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{5}" /> completeSpace="@{5}" />
<TextView <TextView
@@ -145,7 +146,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.weight)}" android:text="@{String.valueOf(bean.weight)}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -172,7 +173,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{4}" /> completeSpace="@{4}" />
<TextView <TextView
@@ -180,7 +181,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.spCode}" android:text="@{bean.spCode}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -197,7 +198,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{5}" /> completeSpace="@{5}" />
<TextView <TextView
@@ -205,7 +206,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.fdate}" android:text="@{bean.fdate}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -222,7 +223,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{4}" /> completeSpace="@{4}" />
<TextView <TextView
@@ -230,7 +231,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.fno}" android:text="@{bean.fno}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -247,7 +248,7 @@
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="16sp" android:textSize="15sp"
completeSpace="@{5}" /> completeSpace="@{5}" />
<TextView <TextView
@@ -257,7 +258,7 @@
android:maxLines="1" android:maxLines="1"
android:text="@{bean.goods}" android:text="@{bean.goods}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>

View File

@@ -27,7 +27,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8" android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp" android:padding="10dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
<!-- 选中图标 (飞机图标,根据选择状态切换图片) --> <!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
@@ -65,12 +65,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="运单号:" /> android:text="运单号:" />
<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:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" /> android:textColor="@color/colorPrimary" />
@@ -87,12 +89,14 @@
<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"
completeSpace="@{3}" completeSpace="@{3}"
android:text="件数:" /> android:text="件数:" />
<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:text="@{String.valueOf(bean.pc)}" /> android:text="@{String.valueOf(bean.pc)}" />
</LinearLayout> </LinearLayout>
@@ -108,12 +112,14 @@
<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"
completeSpace="@{4}" completeSpace="@{4}"
android:text="重量:" /> android:text="重量:" />
<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:text="@{String.valueOf((int)bean.weight)}" /> android:text="@{String.valueOf((int)bean.weight)}" />
</LinearLayout> </LinearLayout>
@@ -129,12 +135,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="承运人:" /> android:text="承运人:" />
<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:text="@{bean.by1}" /> android:text="@{bean.by1}" />
</LinearLayout> </LinearLayout>
@@ -150,12 +158,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="运单类型:" /> android:text="运单类型:" />
<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:text="@{bean.awbTypeName}" android:text="@{bean.awbTypeName}"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
@@ -184,12 +194,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="出运路径:" /> android:text="出运路径:" />
<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:text='@{bean.range}' android:text='@{bean.range}'
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
@@ -208,12 +220,14 @@
<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"
completeSpace="@{3}" completeSpace="@{3}"
android:text="特码:" /> android:text="特码:" />
<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:text="@{bean.spCode}" /> android:text="@{bean.spCode}" />
</LinearLayout> </LinearLayout>
@@ -229,12 +243,14 @@
<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"
completeSpace="@{4}" completeSpace="@{4}"
android:text="代理人:" /> android:text="代理人:" />
<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:text="@{bean.agentCode}" android:text="@{bean.agentCode}"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
@@ -253,12 +269,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="移交状态:" /> android:text="移交状态:" />
<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:text="@{bean.moveState == 1 ? `已移交` : `未移交`}" /> android:text="@{bean.moveState == 1 ? `已移交` : `未移交`}" />
</LinearLayout> </LinearLayout>
@@ -274,12 +292,14 @@
<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"
completeSpace="@{5}" completeSpace="@{5}"
android:text="品名:" /> android:text="品名:" />
<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: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"

View File

@@ -18,10 +18,11 @@
<LinearLayout <LinearLayout
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_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8" android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp" android:padding="10dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
<!-- 选中图标 (飞机图标,根据选择状态切换图片) --> <!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
@@ -61,13 +62,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="ULD编码" android:text="ULD编码"
android:textSize="16sp" /> 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:text="@{bean.uld}" android:text="@{bean.uld}"
android:textSize="16sp"/> android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
@@ -84,13 +85,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="架子车号:" android:text="架子车号:"
android:textSize="16sp" /> 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:text="@{bean.carId}" android:text="@{bean.carId}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -107,13 +108,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="总重:" android:text="总重:"
android:textSize="16sp" /> 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:text="@{String.valueOf((int)bean.totalWeight)}" android:text="@{String.valueOf((int)bean.totalWeight)}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -130,13 +131,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="货重:" android:text="货重:"
android:textSize="16sp" /> 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:text="@{String.valueOf((int)bean.cargoWeight)}" android:text="@{String.valueOf((int)bean.cargoWeight)}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -153,13 +154,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班信息:" android:text="航班信息:"
android:textSize="16sp" /> 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:text="@{bean.flight}" android:text="@{bean.flight}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -186,13 +187,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="目的港:" android:text="目的港:"
android:textSize="16sp" /> 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:text="@{bean.fdest}" android:text="@{bean.fdest}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -209,13 +210,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="库位号:" android:text="库位号:"
android:textSize="16sp" /> 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:text="@{bean.transArea}" android:text="@{bean.transArea}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -232,14 +233,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="复磅状态:" android:text="复磅状态:"
android:textSize="16sp" /> 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:text="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}" android:text="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}"
android:textColor="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}" android:textColor="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -256,13 +257,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="交接人:" android:text="交接人:"
android:textSize="16sp" /> 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:text="@{bean.hoUserName}" android:text="@{bean.hoUserName}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -279,13 +280,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="交接时间:" android:text="交接时间:"
android:textSize="16sp" /> 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:text="@{bean.hoDate}" android:text="@{bean.hoDate}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>

View File

@@ -73,14 +73,14 @@
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="16sp" /> 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:text="@{bean.wbNo}" android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -96,13 +96,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航班信息:" android:text="航班信息:"
android:textSize="16sp" /> 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:text="@{bean.flightInfo}" android:text="@{bean.flightInfo}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -118,13 +118,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="航程:" android:text="航程:"
android:textSize="16sp" /> 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:text="@{bean.range}" android:text="@{bean.range}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -140,7 +140,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="品名(英)" android:text="品名(英)"
android:textSize="16sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -148,7 +148,7 @@
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:text="@{bean.goods}" android:text="@{bean.goods}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -164,13 +164,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="重量:" android:text="重量:"
android:textSize="16sp" /> 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:text="@{String.valueOf((int)bean.weight)}" android:text="@{String.valueOf((int)bean.weight)}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -195,13 +195,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="代理人:" android:text="代理人:"
android:textSize="16sp" /> 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:text="@{bean.agentCode}" android:text="@{bean.agentCode}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -217,13 +217,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="件数:" android:text="件数:"
android:textSize="16sp" /> 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:text="@{String.valueOf(bean.pc)}" android:text="@{String.valueOf(bean.pc)}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -239,13 +239,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="清仓正常:" android:text="清仓正常:"
android:textSize="16sp" /> 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:text="@{bean.clearNormalText}" android:text="@{bean.clearNormalText}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -261,13 +261,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="入库时间:" android:text="入库时间:"
android:textSize="16sp" /> 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:text="@{bean.opDate}" android:text="@{bean.opDate}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -283,13 +283,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{4}"
android:text="库位数:" android:text="库位数:"
android:textSize="16sp" /> 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:text="@{String.valueOf(bean.storageUseNumber)}" android:text="@{String.valueOf(bean.storageUseNumber)}"
android:textSize="16sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>
@@ -303,10 +303,9 @@
<ImageView <ImageView
android:id="@+id/iv_show" android:id="@+id/iv_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="20dp" android:layout_height="18dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:padding="5dp" android:padding="4dp"
android:src="@mipmap/img_down" android:src="@mipmap/img_down"
visible="@{bean.storageUseList != null &amp;&amp; !bean.storageUseList.empty}" /> visible="@{bean.storageUseList != null &amp;&amp; !bean.storageUseList.empty}" />

View File

@@ -27,7 +27,7 @@
android:layout_height="20dp" android:layout_height="20dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="0.5" android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}" loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:src="@drawable/radiobtn_unchecked_style" /> android:src="@drawable/radiobtn_unchecked_style" />
<!-- 库位号 --> <!-- 库位号 -->

View File

@@ -19,56 +19,56 @@
<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) -->
<LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1.0" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1.0" android:orientation="horizontal">
<TextView completeSpace="@{4}" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="运单号:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView completeSpace="@{4}" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="运单号:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.wbNo}" android:textColor="@color/colorPrimary" android:textSize="16sp" android:textStyle="bold"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.wbNo}" android:textColor="@color/colorPrimary" android:textSize="15sp" android:textStyle="bold"/>
</LinearLayout> </LinearLayout>
<!-- 状态 (weight=1) --> <!-- 状态 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="状态:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="状态:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.declareStatus}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.declareStatus}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<!-- 代理 (weight=1) --> <!-- 代理 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="代理:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="代理:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.agentName}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.agentName}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<!-- 件数 (weight=1) --> <!-- 件数 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" 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"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{5}" android:text="件数:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf(bean.pc)}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf(bean.pc)}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<!-- 重量 (weight=1) --> <!-- 重量 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="重量:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="重量:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf((int)bean.weight)}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf((int)bean.weight)}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<!-- 第二行:特码、始发站、目的站、运单类型、分单数 --> <!-- 第二行:特码、始发站、目的站、运单类型、分单数 -->
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:orientation="horizontal"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:orientation="horizontal">
<!-- 特码 (weight=1.5) --> <!-- 特码 (weight=1.5) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.0" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.0" android:orientation="horizontal">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="特码:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="特码:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.spCode}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.spCode}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<!-- 始发站 (weight=1) --> <!-- 始发站 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="始发站:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="始发站:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.dep}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.dep}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<!-- 目的站 (weight=1) --> <!-- 目的站 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="目的站:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="目的站:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.dest}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.dest}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<!-- 运单类型 (weight=1) --> <!-- 运单类型 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" 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"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{5}" android:text="运单类型:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.awbName}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.awbName}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
<!-- 分单数 (weight=1) --> <!-- 分单数 (weight=1) -->
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="分单数:" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="分单数:" android:textColor="@color/text_normal" android:textSize="15sp"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf(bean.haWbNumber)}" android:textColor="@color/text_normal" android:textSize="16sp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf(bean.haWbNumber)}" android:textColor="@color/text_normal" android:textSize="15sp"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@@ -77,10 +77,9 @@
<ImageView <ImageView
android:id="@+id/iv_show" android:id="@+id/iv_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="20dp" android:layout_height="18dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:padding="5dp" android:padding="4dp"
android:src="@mipmap/img_down" android:src="@mipmap/img_down"
visible="@{bean.haWbList != null &amp;&amp; !bean.haWbList.empty}" /> visible="@{bean.haWbList != null &amp;&amp; !bean.haWbList.empty}" />
</LinearLayout> </LinearLayout>

View File

@@ -29,12 +29,11 @@
<!-- 选项 - 圆形checkbox --> <!-- 选项 - 圆形checkbox -->
<ImageView <ImageView
android:id="@+id/iv_checkbox" android:id="@+id/iv_checkbox"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}" loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="0.5" android:layout_weight="0.5"
app:tint="@color/color_66"
android:src="@drawable/radiobtn_unchecked_style" /> android:src="@drawable/radiobtn_unchecked_style" />
<!-- 分单号 (前缀-编号-H编号) --> <!-- 分单号 (前缀-编号-H编号) -->

View File

@@ -46,12 +46,21 @@ class GjjManifestAddActivity :
* 新增舱单 * 新增舱单
*/ */
@JvmStatic @JvmStatic
fun start(context: Context, fid: String = "", dep: String, dest: String) { fun start(
context: Context,
fid: String = "",
dep: String,
dest: String,
flightDate: String = "",
flightNo: String = ""
) {
val starter = Intent(context, GjjManifestAddActivity::class.java) val starter = Intent(context, GjjManifestAddActivity::class.java)
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name) .putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
.putExtra(Constant.Key.ID, fid) .putExtra(Constant.Key.ID, fid)
.putExtra(Constant.Key.DEPARTURE, dep) .putExtra(Constant.Key.DEPARTURE, dep)
.putExtra(Constant.Key.DESTINATION, dest) .putExtra(Constant.Key.DESTINATION, dest)
.putExtra("flightDate", flightDate)
.putExtra("flightNo", flightNo)
context.startActivity(starter) context.startActivity(starter)
} }

View File

@@ -2,12 +2,14 @@ package com.lukouguoji.gjj.activity
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityGjjManifestDetailsBinding import com.lukouguoji.gjj.databinding.ActivityGjjManifestDetailsBinding
import com.lukouguoji.gjj.holder.GjjManifestPicViewHolder
import com.lukouguoji.gjj.viewModel.GjjManifestDetailsViewModel import com.lukouguoji.gjj.viewModel.GjjManifestDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.ktx.noNull import com.lukouguoji.module_base.ktx.noNull
@@ -21,17 +23,33 @@ class GjjManifestDetailsActivity :
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港舱单详情") setBackArrow("国际进港舱单详情")
viewModel.id = intent.getStringExtra(Constant.Key.ID).noNull() viewModel.id = intent.getStringExtra(Constant.Key.ID).noNull()
viewModel.pic = intent.getStringExtra(Constant.Key.PIC).noNull()
viewModel.originalPic = intent.getStringExtra(Constant.Key.ORIGINAL_PIC).noNull()
binding.viewModel = viewModel binding.viewModel = viewModel
val picAdapter = CommonAdapter(
this,
R.layout.item_gjj_manifest_pic,
GjjManifestPicViewHolder::class.java
)
binding.rvPic.layoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
binding.rvPic.adapter = picAdapter
viewModel.picList.observe(this) { list ->
picAdapter.refresh(list)
}
viewModel.getData() viewModel.getData()
} }
companion object { companion object {
@JvmStatic @JvmStatic
fun start(context: Context, id: String) { fun start(context: Context, id: String, pic: String = "", originalPic: String = "") {
val starter = Intent(context, GjjManifestDetailsActivity::class.java) val starter = Intent(context, GjjManifestDetailsActivity::class.java)
.putExtra(Constant.Key.ID, id) .putExtra(Constant.Key.ID, id)
.putExtra(Constant.Key.PIC, pic)
.putExtra(Constant.Key.ORIGINAL_PIC, originalPic)
context.startActivity(starter) context.startActivity(starter)
} }
} }

View File

@@ -13,6 +13,7 @@ import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.ktx.addOnItemClickListener import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
@Deprecated("旧的实现")
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_MANIFEST) @Route(path = ARouterConstants.ACTIVITY_URL_GJJ_MANIFEST)
class GjjManifestListActivity : class GjjManifestListActivity :
BaseBindingActivity<ActivityGjjManifestBinding, GjjManifestListViewModel>() { BaseBindingActivity<ActivityGjjManifestBinding, GjjManifestListViewModel>() {

View File

@@ -24,6 +24,7 @@ import com.lukouguoji.module_base.BaseActivity
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
@Deprecated("旧版国际进港查询详情,使用 IntImpQueryDetailsActivity 替代")
// @Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO) // 已替换为 IntImpQueryDetailsActivity // @Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO) // 已替换为 IntImpQueryDetailsActivity
class GjjQueryInfoActivity : BaseActivity(), View.OnClickListener { class GjjQueryInfoActivity : BaseActivity(), View.OnClickListener {

View File

@@ -27,6 +27,7 @@ import com.scwang.smart.refresh.layout.api.RefreshLayout
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
@Deprecated("旧版国际进港查询列表,使用 IntImpQueryActivity 替代")
//@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST) //@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST)
class GjjQueryListActivity : BaseActivity(), View.OnClickListener { class GjjQueryListActivity : BaseActivity(), View.OnClickListener {
private val currentTitleName = "国际进港查询" private val currentTitleName = "国际进港查询"

View File

@@ -57,13 +57,21 @@ class IntImpAccidentVisaActivity :
} }
override fun onItemClick(position: Int, type: Int) { override fun onItemClick(position: Int, type: Int) {
val bean = binding.rv.commonAdapter()?.getItem(position) as? IntImpAccidentVisaBean
?: return
when (type) { when (type) {
1000 -> {
// 点击列表项 - 查看详情
IntImpAccidentVisaEditActivity.start(this, bean.id, isDetail = true)
}
2000 -> { 2000 -> {
// 侧滑菜单 - 修改 // 侧滑菜单 - 修改
val bean = binding.rv.commonAdapter()?.getItem(position) as? IntImpAccidentVisaBean
?: return
IntImpAccidentVisaEditActivity.start(this, bean.id) IntImpAccidentVisaEditActivity.start(this, bean.id)
} }
3000 -> {
// 侧滑菜单 - 删除
viewModel.singleDelete(bean)
}
} }
} }
} }

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.gjj.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.text.InputType
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
@@ -10,6 +11,7 @@ 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.addOnItemClickListener
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
/** /**
* 国际进港-事故签证新增/编辑 * 国际进港-事故签证新增/编辑
@@ -23,22 +25,34 @@ class IntImpAccidentVisaEditActivity :
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
binding.viewModel = viewModel binding.viewModel = viewModel
// 航班号:大写字母+数字
binding.fnoInput.et.setUpperCaseAlphanumericFilter()
// 运单号纯数字11位
binding.wbNoInput.et.inputType = InputType.TYPE_CLASS_NUMBER
viewModel.rv = binding.rv viewModel.rv = binding.rv
binding.rv.addOnItemClickListener(viewModel) binding.rv.addOnItemClickListener(viewModel)
viewModel.initOnCreate(intent) viewModel.initOnCreate(intent)
viewModel.pageType.observe(this) { viewModel.pageType.observe(this) {
val title = if (it == DetailsPageType.Add) "国际事故签证新增" else "国际事故签证修改" val title = when (it) {
DetailsPageType.Add -> "国际事故签证新增"
DetailsPageType.Details -> "国际事故签证详情"
else -> "国际事故签证修改"
}
setBackArrow(title) setBackArrow(title)
} }
} }
companion object { companion object {
private const val KEY_IS_DETAIL = "is_detail"
@JvmStatic @JvmStatic
fun start(context: Context, id: Long = 0) { fun start(context: Context, id: Long = 0, isDetail: Boolean = false) {
context.startActivity( context.startActivity(
Intent(context, IntImpAccidentVisaEditActivity::class.java) Intent(context, IntImpAccidentVisaEditActivity::class.java)
.putExtra(Constant.Key.ID, id) .putExtra(Constant.Key.ID, id)
.putExtra(KEY_IS_DETAIL, isDetail)
) )
} }
} }

View File

@@ -108,7 +108,12 @@ class IntImpLoadingListActivity :
return return
} }
IntImpModifyStorageDialogModel { dialog -> // 单选时自动带出该项的库位号,多选不带出
val presetLocation = if (selectedItems.size == 1) selectedItems.first().locationTally ?: "" else ""
IntImpModifyStorageDialogModel(
currentLocationName = presetLocation
) { dialog ->
val locationName = dialog.locationName val locationName = dialog.locationName
val locationId = dialog.locationId val locationId = dialog.locationId
viewModel.performModifyStorage(locationName, locationId, selectedItems) viewModel.performModifyStorage(locationName, locationId, selectedItems)

View File

@@ -3,14 +3,20 @@ package com.lukouguoji.gjj.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 androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpManifestDetailsBinding import com.lukouguoji.gjj.databinding.ActivityIntImpManifestDetailsBinding
import com.lukouguoji.gjj.holder.GjjManifestPicViewHolder
import com.lukouguoji.gjj.viewModel.IntImpManifestDetailsViewModel import com.lukouguoji.gjj.viewModel.IntImpManifestDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.bean.FileBean
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.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.MediaUtil
import com.lukouguoji.module_base.ktx.noNull
/** /**
* 国际进港舱单详情 * 国际进港舱单详情
@@ -26,6 +32,29 @@ class IntImpManifestDetailsActivity :
setBackArrow("进港舱单详情") setBackArrow("进港舱单详情")
binding.viewModel = viewModel binding.viewModel = viewModel
viewModel.initOnCreated(intent) viewModel.initOnCreated(intent)
// 交接图片
val picAdapter = CommonAdapter(
this,
R.layout.item_gjj_manifest_pic,
GjjManifestPicViewHolder::class.java
)
binding.rvPic.layoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
binding.rvPic.adapter = picAdapter
viewModel.dataBean.observe(this) { bean ->
val picList = bean.pic.noNull().split(",").filter { it.isNotEmpty() }
val originalPicList = bean.originalPic.noNull().split(",").filter { it.isNotEmpty() }
val list = picList.mapIndexed { index, picUrl ->
val originalFile = originalPicList.getOrElse(index) { picUrl }
FileBean(
path = MediaUtil.fillUrl(picUrl),
url = picUrl,
originalPic = MediaUtil.fillUrl(originalFile)
)
}
picAdapter.refresh(list)
}
} }
companion object { companion object {

View File

@@ -31,15 +31,28 @@ class IntImpManifestSubEditActivity :
} }
companion object { companion object {
const val KEY_MAIN_PC = "mainPc"
const val KEY_MAIN_WEIGHT = "mainWeight"
const val KEY_OTHER_SUB_PC = "otherSubPc"
const val KEY_OTHER_SUB_WEIGHT = "otherSubWeight"
/** /**
* 新增分单 * 新增分单
*/ */
@JvmStatic @JvmStatic
fun startForAdd(context: Context, manifest: GjjManifest) { fun startForAdd(context: Context, manifest: GjjManifest) {
// 新增模式:其他分单之和 = 所有已有分单之和
val otherSubPc = manifest.haWbList?.sumOf { it.pc } ?: 0L
val otherSubWeight = manifest.haWbList?.sumOf { it.weight } ?: 0.0
context.startActivity( context.startActivity(
Intent(context, IntImpManifestSubEditActivity::class.java) Intent(context, IntImpManifestSubEditActivity::class.java)
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name) .putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
.putExtra(Constant.Key.BEAN, manifest) .putExtra(Constant.Key.BEAN, manifest)
.putExtra(KEY_MAIN_PC, manifest.totalPc)
.putExtra(KEY_MAIN_WEIGHT, manifest.weight)
.putExtra(KEY_OTHER_SUB_PC, otherSubPc)
.putExtra(KEY_OTHER_SUB_WEIGHT, otherSubWeight)
) )
} }
@@ -48,11 +61,19 @@ class IntImpManifestSubEditActivity :
*/ */
@JvmStatic @JvmStatic
fun startForModify(context: Context, manifest: GjjManifest, haWb: GjjHaWb) { fun startForModify(context: Context, manifest: GjjManifest, haWb: GjjHaWb) {
// 修改模式:其他分单之和 = 所有分单之和 - 当前编辑的分单
val otherSubPc = (manifest.haWbList?.sumOf { it.pc } ?: 0L) - haWb.pc
val otherSubWeight = (manifest.haWbList?.sumOf { it.weight } ?: 0.0) - haWb.weight
context.startActivity( context.startActivity(
Intent(context, IntImpManifestSubEditActivity::class.java) Intent(context, IntImpManifestSubEditActivity::class.java)
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name) .putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
.putExtra(Constant.Key.BEAN, manifest) .putExtra(Constant.Key.BEAN, manifest)
.putExtra("haWb", haWb) .putExtra("haWb", haWb)
.putExtra(KEY_MAIN_PC, manifest.totalPc)
.putExtra(KEY_MAIN_WEIGHT, manifest.weight)
.putExtra(KEY_OTHER_SUB_PC, otherSubPc)
.putExtra(KEY_OTHER_SUB_WEIGHT, otherSubWeight)
) )
} }
} }

View File

@@ -16,6 +16,8 @@ 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.getLifecycleOwner import com.lukouguoji.module_base.ktx.getLifecycleOwner
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
import com.lukouguoji.module_base.ktx.setUpperCaseLetterFilter
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
/** /**
@@ -53,6 +55,11 @@ class IntImpQueryActivity :
if (visible) showFilterPanel() else hideFilterPanel() if (visible) showFilterPanel() else hideFilterPanel()
} }
// 航班号:大写字母+数字
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter()
// 始发港:仅大写字母
binding.filterPanel.filterOrigin.et.setUpperCaseLetterFilter()
viewModel.refresh() viewModel.refresh()
} }

View File

@@ -3,12 +3,18 @@ package com.lukouguoji.gjj.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.Gravity
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.appcompat.widget.Toolbar
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpQueryDetailsBinding import com.lukouguoji.gjj.databinding.ActivityIntImpQueryDetailsBinding
import com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel import com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CustomVP2Adapter import com.lukouguoji.module_base.base.CustomVP2Adapter
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
/** /**
@@ -42,10 +48,37 @@ class IntImpQueryDetailsActivity :
binding.vp.setCurrentItem(it, false) binding.vp.setCurrentItem(it, false)
} }
// 标题栏右侧添加日志查询图标
val toolbar = findViewById<Toolbar>(com.lukouguoji.module_base.R.id.toolbar)
val logIcon = ImageView(this).apply {
setImageResource(com.lukouguoji.module_base.R.drawable.img_log)
layoutParams = Toolbar.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
).apply {
gravity = Gravity.END or Gravity.CENTER_VERTICAL
marginEnd = 15
width = 30.dp
height = 30.dp
}
setOnClickListener {
val wbNo = viewModel.maWbData.value?.get("wbNo") as? String ?: ""
ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_LOG_DETAIL)
.withString(Constant.Key.KEY, wbNo)
.withString(Constant.Key.AWB_TYPE, "II")
.navigation()
}
}
toolbar.addView(logIcon)
// 加载详情数据 // 加载详情数据
viewModel.loadDetails() viewModel.loadDetails()
} }
private val Int.dp: Int
get() = (this * resources!!.displayMetrics.density).toInt()
companion object { companion object {
@JvmStatic @JvmStatic
fun start(context: Context, prefix: String?, no: String?) { fun start(context: Context, prefix: String?, no: String?) {

View File

@@ -133,22 +133,12 @@ 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 maWbListForOutStorage = allItems.mapNotNull { maWb -> val selectedStorageList = mutableListOf<com.lukouguoji.module_base.bean.GjcStorageUse>()
if (maWb.isSelected) { allItems.forEach { maWb ->
// 勾选运单号 → 默认全选该运单号下的所有库位 maWb.storageUseList?.filter { it.isSelected }?.let { selectedStorageList.addAll(it) }
maWb.copy(storageUseList = maWb.storageUseList ?: emptyList())
} else {
// 勾选库位号 → 只对选择的库位进行操作
val selectedStorageList = maWb.storageUseList?.filter { it.isSelected } ?: emptyList()
if (selectedStorageList.isNotEmpty()) {
maWb.copy(storageUseList = selectedStorageList)
} else {
null
}
}
} }
if (maWbListForOutStorage.isEmpty()) { if (selectedStorageList.isEmpty()) {
showToast("请选择要出库的库位") showToast("请选择要出库的库位")
return return
} }
@@ -157,7 +147,7 @@ class IntImpStorageUseActivity :
message = "是否确认出库?", message = "是否确认出库?",
title = "出库确认" title = "出库确认"
) { ) {
viewModel.performOutStorage(maWbListForOutStorage) viewModel.performOutStorage(selectedStorageList)
}.show(this) }.show(this)
} }

View File

@@ -16,6 +16,7 @@ import dev.utils.app.info.KeyValue
*/ */
class IntImpModifyStorageDialogModel( class IntImpModifyStorageDialogModel(
private val currentLocationId: String = "", private val currentLocationId: String = "",
private val currentLocationName: String = "",
private val callback: (IntImpModifyStorageDialogModel) -> Unit private val callback: (IntImpModifyStorageDialogModel) -> Unit
) : BaseDialogModel<DialogIntImpModifyStorageBinding>(DIALOG_TYPE_CENTER) { ) : BaseDialogModel<DialogIntImpModifyStorageBinding>(DIALOG_TYPE_CENTER) {
@@ -55,9 +56,14 @@ class IntImpModifyStorageDialogModel(
onSuccess = { result -> onSuccess = { result ->
val list = result.data?.map { it.toKeyValue() } ?: emptyList() val list = result.data?.map { it.toKeyValue() } ?: emptyList()
locationList.value = list locationList.value = list
// 列表加载完成后,预选当前库位 // 列表加载完成后,预选当前库位优先按ID匹配其次按名称匹配
if (currentLocationId.isNotEmpty()) { if (currentLocationId.isNotEmpty()) {
selectedLocationCode.value = currentLocationId selectedLocationCode.value = currentLocationId
} else if (currentLocationName.isNotEmpty()) {
val matched = list.find { it.key == currentLocationName }
if (matched != null) {
selectedLocationCode.value = matched.value
}
} }
} }
onFailed = { _, msg -> onFailed = { _, msg ->

View File

@@ -0,0 +1,42 @@
package com.lukouguoji.gjj.holder
import android.view.View
import com.bumptech.glide.Glide
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.load.model.LazyHeaders
import com.lukouguoji.gjj.databinding.ItemGjjManifestPicBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ui.page.preview.PreviewActivity
class GjjManifestPicViewHolder(view: View) :
BaseViewHolder<FileBean, ItemGjjManifestPicBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item)!!
binding.bean = bean
// 带 Authorization header 加载图片
if (bean.path.isNotEmpty()) {
val glideUrl = GlideUrl(
bean.path,
LazyHeaders.Builder()
.addHeader("Authorization", SharedPreferenceUtil.getString(Constant.Share.token))
.build()
)
Glide.with(itemView.context).load(glideUrl).into(binding.ivThumbnail)
}
binding.ivThumbnail.setOnClickListener {
val items = getRecyclerView()?.commonAdapter()?.items
?.filterIsInstance<FileBean>() ?: listOf(bean)
val originalList = items.map { fb ->
FileBean(path = if (fb.originalPic.isNotEmpty()) fb.originalPic else fb.path)
}
PreviewActivity.start(itemView.context, originalList, position)
}
}
}

View File

@@ -22,10 +22,21 @@ class IntImpAccidentVisaViewHolder(view: View) :
binding.executePendingBindings() binding.executePendingBindings()
} }
// 点击列表项 - 进入详情
binding.ll.setOnClickListener {
clickListener?.onItemClick(position, 1000) // type=1000表示查看详情
}
// 侧滑菜单 - 修改按钮 // 侧滑菜单 - 修改按钮
binding.btnEdit.setOnClickListener { binding.btnEdit.setOnClickListener {
binding.swipeMenu.quickClose() binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, 2000) // type=2000表示修改操作 clickListener?.onItemClick(position, 2000) // type=2000表示修改操作
} }
// 侧滑菜单 - 删除按钮
binding.btnDelete.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, 3000) // type=3000表示删除操作
}
} }
} }

View File

@@ -1,11 +1,9 @@
package com.lukouguoji.gjj.holder package com.lukouguoji.gjj.holder
import android.view.View import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.databinding.ItemIntImpManifestSubBinding import com.lukouguoji.gjj.databinding.ItemIntImpManifestSubBinding
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjjHaWb import com.lukouguoji.module_base.bean.GjjHaWb
import com.lukouguoji.module_base.bean.GjjManifest
/** /**
* 国际进港舱单 - 分单子列表 ViewHolder * 国际进港舱单 - 分单子列表 ViewHolder
@@ -24,13 +22,6 @@ class IntImpManifestSubViewHolder(view: View) :
val newCheckedState = !bean.checked.get() val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState) bean.checked.set(newCheckedState)
binding.executePendingBindings() binding.executePendingBindings()
// 反向联动主列表项(勾选子项时自动勾选父项)
if (newCheckedState) {
val recyclerView = itemView.parent as? RecyclerView ?: return@setOnClickListener
val parentBean = recyclerView.tag as? GjjManifest ?: return@setOnClickListener
parentBean.checked.set(true)
}
} }
} }
} }

View File

@@ -1,5 +1,6 @@
package com.lukouguoji.gjj.holder package com.lukouguoji.gjj.holder
import android.graphics.Color
import android.view.View import android.view.View
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ItemIntImpManifestBinding import com.lukouguoji.gjj.databinding.ItemIntImpManifestBinding
@@ -24,10 +25,7 @@ class IntImpManifestViewHolder(view: View) :
binding.ivIcon.setOnClickListener { binding.ivIcon.setOnClickListener {
val newCheckedState = !bean.checked.get() val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState) bean.checked.set(newCheckedState)
// 联动子列表选中状态
bean.haWbList?.forEach { sub -> sub.checked.set(newCheckedState) }
binding.executePendingBindings() binding.executePendingBindings()
binding.rvSub.adapter?.notifyDataSetChanged()
} }
// 整卡点击 - 跳转详情页 // 整卡点击 - 跳转详情页
@@ -43,6 +41,13 @@ class IntImpManifestViewHolder(view: View) :
clickListener?.onItemClick(position, 102) // 102=删除 clickListener?.onItemClick(position, 102) // 102=删除
} }
// 展开按钮颜色:绿色背景时黑色,否则保持原色
if (bean.ref == "1") {
binding.ivShow.setColorFilter(Color.parseColor("#666666"))
} else {
binding.ivShow.clearColorFilter()
}
// 展开按钮点击事件 - 先加载分单数据,再切换展开状态 // 展开按钮点击事件 - 先加载分单数据,再切换展开状态
binding.ivShow.setOnClickListener { binding.ivShow.setOnClickListener {
if (!bean.showMore.get() && bean.haWbList.isNullOrEmpty()) { if (!bean.showMore.get() && bean.haWbList.isNullOrEmpty()) {

View File

@@ -1,10 +1,8 @@
package com.lukouguoji.gjj.holder package com.lukouguoji.gjj.holder
import android.view.View import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.databinding.ItemIntImpStorageUseSubBinding import com.lukouguoji.gjj.databinding.ItemIntImpStorageUseSubBinding
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.bean.GjcStorageUse import com.lukouguoji.module_base.bean.GjcStorageUse
/** /**
@@ -19,27 +17,10 @@ class IntImpStorageUseSubViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 单选框点击切换选择状态(反向联动主列表) // 单选框点击切换选择状态
binding.ivCheckbox.setOnClickListener { binding.ivCheckbox.setOnClickListener {
// 切换子列表项的选择状态 bean.checked.set(!bean.checked.get())
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
binding.executePendingBindings() binding.executePendingBindings()
// 反向联动主列表项(仅在勾选时联动)
updateParentCheckState(newCheckedState)
}
}
/**
* 更新父列表项的选择状态
*/
private fun updateParentCheckState(newCheckedState: Boolean) {
val recyclerView = itemView.parent as? RecyclerView ?: return
val parentBean = recyclerView.tag as? GjcMaWb ?: return
if (newCheckedState) {
parentBean.checked.set(true)
} }
} }
} }

View File

@@ -20,18 +20,10 @@ class IntImpStorageUseViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 图标点击切换选择状态(联动子列表) // 图标点击切换选择状态
binding.ivIcon.setOnClickListener { binding.ivIcon.setOnClickListener {
val newCheckedState = !bean.checked.get() bean.checked.set(!bean.checked.get())
bean.checked.set(newCheckedState)
// 联动勾选/取消所有子列表项
bean.storageUseList?.forEach { storageUse ->
storageUse.checked.set(newCheckedState)
}
binding.executePendingBindings() binding.executePendingBindings()
binding.rvSub.adapter?.notifyDataSetChanged()
} }
// 展开按钮点击事件 // 展开按钮点击事件

View File

@@ -1,7 +1,6 @@
package com.lukouguoji.gjj.holder package com.lukouguoji.gjj.holder
import android.view.View import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.databinding.ItemIntImpTallySubBinding import com.lukouguoji.gjj.databinding.ItemIntImpTallySubBinding
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjjImportTally import com.lukouguoji.module_base.bean.GjjImportTally
@@ -18,26 +17,10 @@ class IntImpTallySubViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 单选框点击切换选择状态(反向联动主列表 // 单选框点击切换选择状态(独立选择,不联动主
binding.ivCheckbox.setOnClickListener { binding.ivCheckbox.setOnClickListener {
val newCheckedState = !bean.checked.get() bean.checked.set(!bean.checked.get())
bean.checked.set(newCheckedState)
binding.executePendingBindings() binding.executePendingBindings()
// 反向联动主列表项(勾选时联动主项也勾选)
updateParentCheckState(newCheckedState)
}
}
/**
* 更新父列表项的选择状态
*/
private fun updateParentCheckState(newCheckedState: Boolean) {
val recyclerView = itemView.parent as? RecyclerView ?: return
val parentBean = recyclerView.tag as? GjjImportTally ?: return
if (newCheckedState) {
parentBean.checked.set(true)
} }
} }
} }

View File

@@ -25,18 +25,10 @@ class IntImpTallyViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 选中图标点击 - 切换选择状态(联动子列表 // 选中图标点击 - 切换选择状态(独立选择,不联动分单
binding.ivIcon.setOnClickListener { binding.ivIcon.setOnClickListener {
val newCheckedState = !bean.checked.get() bean.checked.set(!bean.checked.get())
bean.checked.set(newCheckedState)
// 联动勾选/取消所有子列表项
bean.haWbList?.forEach { sub ->
sub.checked.set(newCheckedState)
}
binding.executePendingBindings() binding.executePendingBindings()
binding.rvSub.adapter?.notifyDataSetChanged()
} }
// 整个内容区域点击 - 跳转到详情页 // 整个内容区域点击 - 跳转到详情页

View File

@@ -32,6 +32,10 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 舱单ID编辑时使用 // 舱单ID编辑时使用
var mfId: Long = 0 var mfId: Long = 0
// 编号和前缀(编辑时使用)
var no: String = ""
var prefix: String = ""
// 航班ID // 航班ID
var fid: String = "" var fid: String = ""
@@ -153,51 +157,13 @@ class GjjManifestAddViewModel : BaseViewModel() {
val specialCodeList = MutableLiveData<List<KeyValue>>() val specialCodeList = MutableLiveData<List<KeyValue>>()
val specialCode = MutableLiveData("") val specialCode = MutableLiveData("")
// 货物类型 // 货物类型(无下拉列表,仅用于编辑模式回传)
val goodsTypeList = MutableLiveData<List<KeyValue>>()
val goodsType = MutableLiveData("") val goodsType = MutableLiveData("")
// 运单类型 // 运单类型
val waybillTypeList = MutableLiveData<List<KeyValue>>() val waybillTypeList = MutableLiveData<List<KeyValue>>()
val waybillType = MutableLiveData("") val waybillType = MutableLiveData("")
init {
DictUtils.getIntImpAgentList(addAll = false) {
agentList.postValue(listOf(KeyValue("", "")) + it)
}
DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "") {
val list = arrayListOf<KeyValue>()
it.find { b -> b.key.contains("普通货物") }?.let { b ->
list.add(b)
}
list.addAll(it.filter { b -> !b.key.contains("普通货物") })
specialCodeList.postValue(list)
}
DictUtils.getBusinessTypeList(addAll = false) {
businessTypeList.postValue(it)
// 新增模式下默认选中"普通货物运输"
if (pageType.value == DetailsPageType.Add && businessType.value.isNullOrEmpty()) {
it.find { b -> b.key.contains("普通货物运输") }?.let { b ->
businessType.postValue(b.value)
}
}
}
DictUtils.getShouYunPackageTypeList {
packageTypeList.postValue(listOf(KeyValue("", "")) + it)
}
DictUtils.getGjjGoodsTypeList(addAll = false) {
goodsTypeList.postValue(it)
}
DictUtils.getWaybillTypeList(type = "II", addAll = false) {
val list = arrayListOf<KeyValue>()
it.find { b -> b.key.contains("干线") }?.let { b ->
list.add(b)
}
list.addAll(it.filter { b -> !b.key.contains("干线") })
waybillTypeList.postValue(list)
}
}
/** /**
* 初始化从Intent获取参数 * 初始化从Intent获取参数
*/ */
@@ -212,12 +178,22 @@ class GjjManifestAddViewModel : BaseViewModel() {
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()
// 回填航班日期和航班号(从列表页传入)
val passedFlightDate = intent.getStringExtra("flightDate").noNull()
val passedFlightNo = intent.getStringExtra("flightNo").noNull()
if (passedFlightDate.isNotEmpty()) {
flightDate.value = passedFlightDate
}
if (passedFlightNo.isNotEmpty()) {
flightNo.value = passedFlightNo
}
// 如果航班日期和航班号都有值且已从列表页获得航班信息,标记已查询避免重复请求
if (passedFlightDate.isNotEmpty() && passedFlightNo.isNotEmpty() && fid.isNotEmpty()) {
lastQueriedFlight = "$passedFlightDate-$passedFlightNo"
}
// 编辑模式从Bean对象加载数据 // 编辑模式从Bean对象加载数据
if (pageType.value == DetailsPageType.Modify) { if (pageType.value == DetailsPageType.Modify) {
// 回填航班日期和航班号Bean中不包含从列表页传入
flightDate.value = intent.getStringExtra("flightDate").noNull()
flightNo.value = intent.getStringExtra("flightNo").noNull()
val bean = intent.getSerializableExtra(Constant.Key.BEAN) val bean = intent.getSerializableExtra(Constant.Key.BEAN)
if (bean is com.lukouguoji.module_base.bean.GjjManifest) { if (bean is com.lukouguoji.module_base.bean.GjjManifest) {
loadManifestFromBean(bean) loadManifestFromBean(bean)
@@ -225,6 +201,71 @@ class GjjManifestAddViewModel : BaseViewModel() {
loadManifestFromImportBean(bean) loadManifestFromImportBean(bean)
} }
} }
// 加载下拉列表(在编辑数据加载之后,以便使用 checkedValue 将选中项置顶)
loadDictLists()
}
/**
* 加载下拉列表数据
* 编辑模式下传入 checkedValuehandleCallBack 会将匹配项置于列表首位,
* Spinner 默认显示首项即完成回填
*/
private fun loadDictLists() {
val isModify = pageType.value == DetailsPageType.Modify
DictUtils.getIntImpAgentList(
addAll = false,
checkedValue = if (isModify) agent.value else null
) {
agentList.postValue(if (isModify) it else listOf(KeyValue("", "")) + it)
}
DictUtils.getSpecialCodeList(
addAll = false, flag = 1, ieFlag = "",
checkedValue = if (isModify) specialCode.value else null
) {
if (isModify) {
specialCodeList.postValue(it)
} else {
val list = arrayListOf<KeyValue>()
it.find { b -> b.key.contains("普通货物") }?.let { b -> list.add(b) }
list.addAll(it.filter { b -> !b.key.contains("普通货物") })
specialCodeList.postValue(list)
}
}
DictUtils.getBusinessTypeList(
addAll = false,
checkedValue = if (isModify) businessType.value else null
) {
businessTypeList.postValue(it)
if (!isModify && businessType.value.isNullOrEmpty()) {
it.find { b -> b.key.contains("普通货物运输") }?.let { b ->
businessType.postValue(b.value)
}
}
}
DictUtils.getShouYunPackageTypeList(
checkedValue = if (isModify) packageType.value else null
) {
packageTypeList.postValue(if (isModify) it else listOf(KeyValue("", "")) + it)
}
DictUtils.getWaybillTypeList(
type = "II", addAll = false,
checkedValue = if (isModify) waybillType.value else null
) {
if (isModify) {
waybillTypeList.postValue(it)
} else {
val list = arrayListOf<KeyValue>()
it.find { b -> b.key.contains("干线") }?.let { b -> list.add(b) }
list.addAll(it.filter { b -> !b.key.contains("干线") })
waybillTypeList.postValue(list)
}
}
} }
/** /**
@@ -234,9 +275,11 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 保存舱单ID // 保存舱单ID
mfId = manifest.mfId mfId = manifest.mfId
fid = manifest.fid.toString() fid = manifest.fid.toString()
no = manifest.no
prefix = manifest.prefix
// 填充表单字段 // 填充表单字段
waybillNo.value = manifest.wbNo waybillNo.value = manifest.getWaybillNo()
waybillNum.value = manifest.totalPc.toString() waybillNum.value = manifest.totalPc.toString()
actualNum.value = manifest.pc.toString() actualNum.value = manifest.pc.toString()
actualWeight.value = manifest.weight.toString() actualWeight.value = manifest.weight.toString()
@@ -262,9 +305,11 @@ class GjjManifestAddViewModel : BaseViewModel() {
*/ */
private fun loadManifestFromImportBean(manifest: com.lukouguoji.module_base.bean.GjjImportManifest) { private fun loadManifestFromImportBean(manifest: com.lukouguoji.module_base.bean.GjjImportManifest) {
fid = manifest.fid.toString() fid = manifest.fid.toString()
no = manifest.no
prefix = manifest.prefix
// 填充表单字段 // 填充表单字段
waybillNo.value = manifest.wbNo waybillNo.value = "${manifest.prefix}${manifest.no}"
waybillNum.value = manifest.totalPc.toString() waybillNum.value = manifest.totalPc.toString()
actualNum.value = manifest.pc.toString() actualNum.value = manifest.pc.toString()
actualWeight.value = manifest.weight.toString() actualWeight.value = manifest.weight.toString()
@@ -314,39 +359,56 @@ class GjjManifestAddViewModel : BaseViewModel() {
|| verifyWaybillNo(waybillNo.value) || verifyWaybillNo(waybillNo.value)
|| agent.value.verifyNullOrEmpty("请选择代理") || agent.value.verifyNullOrEmpty("请选择代理")
|| waybillNum.value.verifyNullOrEmpty("请输入运单件数") || waybillNum.value.verifyNullOrEmpty("请输入运单件数")
|| actualNum.value.verifyNullOrEmpty("请输入实到数") || actualNum.value.verifyNullOrEmpty("请输入实到")
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量") || actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|| packageType.value.verifyNullOrEmpty("选择包装类型") || billingWeight.value.verifyNullOrEmpty("输入计费重量")
|| goodsNameCn.value.verifyNullOrEmpty("请输入品名(中)")
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|| waybillType.value.verifyNullOrEmpty("请选择运单类型")
|| businessType.value.verifyNullOrEmpty("请选择业务类型")
|| departure.value.verifyNullOrEmpty("请输入始发站")
|| destination.value.verifyNullOrEmpty("请输入目的站")
) )
) { ) {
return return
} }
val params = mapOf( val isModify = pageType.value == DetailsPageType.Modify
"mfId" to if (pageType.value == DetailsPageType.Modify) mfId else null,
val paramsMap = mutableMapOf<String, Any?>(
"fid" to fid, "fid" to fid,
"wbNo" to waybillNo.value, "wbNo" to waybillNo.value,
"agentCode" to agent.value, "agentCode" to agent.value,
"spCode" to specialCode.value, "spCode" to specialCode.value.let { if (it.isNullOrEmpty()) "NOR" else it },
"businessType" to businessType.value, "businessType" to businessType.value,
"totalPc" to waybillNum.value, "totalPc" to waybillNum.value,
"pc" to actualNum.value, "pc" to actualNum.value,
"weight" to actualWeight.value, "weight" to actualWeight.value,
"cashWeight" to billingWeight.value, "cashWeight" to billingWeight.value,
"packageType" to packageType.value,
"origin" to departure.value, "origin" to departure.value,
"dest" to destination.value, "dest" to destination.value,
"goods" to goodsNameEn.value, "goods" to goodsNameEn.value,
"goodsCn" to goodsNameCn.value, "goodsCn" to goodsNameCn.value,
"awbType" to waybillType.value, "awbType" to waybillType.value,
"cargoType" to goodsType.value, )
"unNumber" to unNumber.value,
"remark" to remark.value, // 可选字段:非空时才传
).toRequestBody(removeEmptyOrNull = true) if (!packageType.value.isNullOrEmpty()) paramsMap["packageType"] = packageType.value
if (!goodsType.value.isNullOrEmpty()) paramsMap["cargoType"] = goodsType.value
if (!unNumber.value.isNullOrEmpty()) paramsMap["unNumber"] = unNumber.value
if (!remark.value.isNullOrEmpty()) paramsMap["remark"] = remark.value
// 编辑模式:必须传 mfId、no、prefix不受空字符串过滤影响
if (isModify) {
paramsMap["mfId"] = mfId
paramsMap["no"] = no
paramsMap["prefix"] = prefix
}
val params = paramsMap.toRequestBody()
launchLoadingCollect({ launchLoadingCollect({
if (pageType.value == DetailsPageType.Modify) { if (isModify) {
NetApply.api.gjjManifestUpdate(params) NetApply.api.gjjManifestUpdate(params)
} else { } else {
NetApply.api.gjjManifestInsert(params) NetApply.api.gjjManifestInsert(params)
@@ -354,7 +416,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
}) { }) {
onSuccess = { onSuccess = {
if (it.verifySuccess()) { if (it.verifySuccess()) {
val successMsg = if (pageType.value == DetailsPageType.Modify) "修改成功" else "保存成功" val successMsg = if (isModify) "修改成功" else "保存成功"
showToast(successMsg) showToast(successMsg)
// 发送刷新事件 // 发送刷新事件

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.gjj.viewModel
import android.view.View import android.view.View
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
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.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.interfaces.IGetData import com.lukouguoji.module_base.interfaces.IGetData
import com.lukouguoji.module_base.ktx.finish import com.lukouguoji.module_base.ktx.finish
@@ -13,6 +14,7 @@ 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 dev.utils.app.info.KeyValue import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils import dev.utils.common.DateUtils
@@ -20,6 +22,13 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
var id = "" var id = ""
var fid = "" var fid = ""
var no = ""
var prefix = ""
var pic = ""
var originalPic = ""
// 交接图片列表
val picList = MutableLiveData<List<FileBean>>(emptyList())
// 是否修改状态 // 是否修改状态
var modifyAble = MutableLiveData(false) var modifyAble = MutableLiveData(false)
@@ -88,6 +97,7 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
override fun getData() { override fun getData() {
parsePicList()
showLoading() showLoading()
launchCollect({ launchCollect({
NetApply.api.getGjjManifestDetail(id) NetApply.api.getGjjManifestDetail(id)
@@ -95,6 +105,8 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
onSuccess = { result -> onSuccess = { result ->
result.data?.let { data -> result.data?.let { data ->
fid = data.fid.toString() fid = data.fid.toString()
no = data.no
prefix = data.prefix
waybillNo.value = data.getWaybillCode().noNull() waybillNo.value = data.getWaybillCode().noNull()
waybillNum.value = data.awbpc.toString() waybillNum.value = data.awbpc.toString()
actualNum.value = data.pc.toString() actualNum.value = data.pc.toString()
@@ -107,6 +119,14 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
remark.value = data.remark.noNull() remark.value = data.remark.noNull()
date.value = data.storageTime.noNull() date.value = data.storageTime.noNull()
// 初始化下拉控件的选中值(避免 onSelected 回调时机不确定导致值丢失)
agent = data.agent.noNull()
specialCode = data.spCode.noNull()
businessType = data.businessType.noNull()
packageType = data.packagecode.noNull()
goodsType = data.cargoType.noNull()
waybillType = data.awbType.noNull()
DictUtils.getAgentList(addAll = false, checkedValue = data.agent) { DictUtils.getAgentList(addAll = false, checkedValue = data.agent) {
agentList.postValue(it) agentList.postValue(it)
} }
@@ -207,6 +227,8 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
mapOf( mapOf(
"mfId" to id, "mfId" to id,
"fid" to fid, "fid" to fid,
"no" to no,
"prefix" to prefix,
"wbNo" to waybillNo.value, "wbNo" to waybillNo.value,
"agent" to agent, "agent" to agent,
"spCode" to specialCode, "spCode" to specialCode,
@@ -248,4 +270,21 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
fun onCancelClick(view: View) { fun onCancelClick(view: View) {
modifyAble.value = false modifyAble.value = false
} }
/**
* 解析 pic / originalPic 字符串为 FileBean 列表
*/
fun parsePicList() {
val thumbUrls = pic.split(",").filter { it.isNotEmpty() }
val originalUrls = originalPic.split(",").filter { it.isNotEmpty() }
val list = thumbUrls.mapIndexed { index, thumbFile ->
val originalFile = originalUrls.getOrElse(index) { thumbFile }
FileBean(
path = MediaUtil.fillUrl(thumbFile),
url = thumbFile,
originalPic = MediaUtil.fillUrl(originalFile)
)
}
picList.value = list
}
} }

View File

@@ -243,7 +243,7 @@ class GjjManifestListViewModel : BasePageViewModel(), IOnItemClickListener {
} }
R.id.tv_details -> { R.id.tv_details -> {
GjjManifestDetailsActivity.start(DevUtils.getTopActivity(), bean.mfId) GjjManifestDetailsActivity.start(DevUtils.getTopActivity(), bean.mfId, bean.pic, bean.originalPic)
} }
R.id.tv_delete -> { R.id.tv_delete -> {

View File

@@ -65,6 +65,51 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
} else null } else null
} ?: emptyList() } ?: emptyList()
countryCodeList.value = keyValueList countryCodeList.value = keyValueList
// 全量加载完成后,按始发站过滤查询,若唯一则自动选中
autoMatchCountryCodeByFdep()
}
}
}
/**
* 根据始发站/目的站自动匹配国家代码
* - 始发站(fdep) → 匹配发货人国家代码
* - 目的站(fdest) → 匹配收货人国家代码
*/
private fun autoMatchCountryCodeByFdep() {
val manifest = manifestList.firstOrNull() ?: return
val bean = dataBean.value ?: return
// 始发站 → 发货人国家代码
if (manifest.fdep.isNotEmpty() && bean.consignorCountryCode.isEmpty()) {
launchCollect({ NetApply.api.getCountryCodeListByFdep(manifest.fdep) }) {
onSuccess = { result ->
val filtered = result.data?.mapNotNull { dictBean ->
if (dictBean.code != null && dictBean.name != null) KeyValue(dictBean.name, dictBean.code) else null
} ?: emptyList()
if (filtered.size == 1) {
dataBean.value?.let { current ->
dataBean.value = current.copy(consignorCountryCode = filtered.first().value)
}
}
}
}
}
// 目的站 → 收货人国家代码
if (manifest.fdest.isNotEmpty() && bean.consigneeCountryCode.isEmpty()) {
launchCollect({ NetApply.api.getCountryCodeListByFdep(manifest.fdest) }) {
onSuccess = { result ->
val filtered = result.data?.mapNotNull { dictBean ->
if (dictBean.code != null && dictBean.name != null) KeyValue(dictBean.name, dictBean.code) else null
} ?: emptyList()
if (filtered.size == 1) {
dataBean.value?.let { current ->
dataBean.value = current.copy(consigneeCountryCode = filtered.first().value)
}
}
}
} }
} }
} }
@@ -129,7 +174,7 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
consignorPNum = formBean.consignorPNum, consignorPNum = formBean.consignorPNum,
consignorAddress = formBean.consignorAddress, consignorAddress = formBean.consignorAddress,
// 危险品信息 // 危险品信息
dgrContactMame = formBean.dgrContactMame, dgrContactName = formBean.dgrContactName,
dgrContactNumber = formBean.dgrContactNumber, dgrContactNumber = formBean.dgrContactNumber,
unNumber = formBean.unNumber unNumber = formBean.unNumber
) )

View File

@@ -14,18 +14,22 @@ 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.ImageSelectViewHolder import com.lukouguoji.module_base.impl.ImageSelectNewViewHolder
import com.lukouguoji.module_base.interfaces.IOnItemClickListener import com.lukouguoji.module_base.interfaces.IOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter import com.lukouguoji.module_base.ktx.commonAdapter
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.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 okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody.Companion.toRequestBody
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.MediaUtil import com.lukouguoji.module_base.util.MediaUtil
import com.lukouguoji.module_base.util.UploadUtil 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 kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.asFlow import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.catch
@@ -47,8 +51,8 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
val dataBean = MutableLiveData(GjAccidentVisaEditBean()) val dataBean = MutableLiveData(GjAccidentVisaEditBean())
// 图片列表 // 图片列表
val itemLayoutId = R.layout.item_image_select val itemLayoutId = R.layout.item_image_select_new
val itemViewHolder = ImageSelectViewHolder::class.java val itemViewHolder = ImageSelectNewViewHolder::class.java
var rv: RecyclerView? = null var rv: RecyclerView? = null
// 下拉列表 // 下拉列表
@@ -67,9 +71,28 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
// 初始化 // 初始化
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 是否为详情模式(只读)
val isDetailMode = MutableLiveData(false)
// 详情模式下无图片时显示占位提示
val showNoImage = MutableLiveData(false)
fun initOnCreate(intent: Intent) { fun initOnCreate(intent: Intent) {
id = intent.getLongExtra(Constant.Key.ID, 0) id = intent.getLongExtra(Constant.Key.ID, 0)
pageType.value = if (id == 0L) DetailsPageType.Add else DetailsPageType.Modify val isDetail = intent.getBooleanExtra("is_detail", false)
pageType.value = when {
isDetail && id != 0L -> DetailsPageType.Details
id == 0L -> DetailsPageType.Add
else -> DetailsPageType.Modify
}
isDetailMode.value = pageType.value == DetailsPageType.Details
// 新增模式下默认航班日期为今天
if (pageType.value == DetailsPageType.Add) {
val bean = dataBean.value ?: GjAccidentVisaEditBean()
bean.fdate = DateUtils.getCurrentTime().formatDate()
dataBean.value = bean
}
loadDropdownLists() loadDropdownLists()
@@ -77,8 +100,11 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
loadDetail() loadDetail()
} }
rv?.post { // 详情模式不添加空白占位图片
rv?.commonAdapter()?.addItem(FileBean()) if (!isDetail) {
rv?.post {
rv?.commonAdapter()?.addItem(FileBean())
}
} }
} }
@@ -118,20 +144,24 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
onSuccess = { onSuccess = {
dataBean.value = it.data ?: GjAccidentVisaEditBean() dataBean.value = it.data ?: GjAccidentVisaEditBean()
// 渲染图片 // 渲染图片path 取原图 URL 确保预览清晰url 取缩略图用于提交
val bean = dataBean.value!! val bean = dataBean.value!!
val picList = bean.pic.split(",") val picList = bean.pic.split(",").filter { it.isNotEmpty() }
.filter { url -> url.isNotEmpty() } val originalList = bean.originalPic.split(",").filter { it.isNotEmpty() }
.map { url -> FileBean(MediaUtil.fillUrl(url), url) } val images = picList.mapIndexed { index, picUrl ->
val originalList = bean.originalPic.split(",") val originalUrl = originalList.getOrElse(index) { picUrl }
.filter { url -> url.isNotEmpty() } FileBean(
.map { url -> FileBean(MediaUtil.fillUrl(url)) } path = MediaUtil.fillUrl(originalUrl),
for ((index, fileBean) in picList.withIndex()) { url = picUrl,
if (index < originalList.size) { originalPic = originalUrl
picList[index].originalPic = originalList[index].path )
} }
rv?.commonAdapter()?.loadMore(images)
// 详情模式下无图片时显示占位提示
if (isDetailMode.value == true && picList.isEmpty()) {
showNoImage.value = true
} }
rv?.commonAdapter()?.loadMore(picList)
} }
} }
} }
@@ -142,13 +172,23 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
fun onFlightDateInputComplete() { fun onFlightDateInputComplete() {
lastQueriedFlight = "" lastQueriedFlight = ""
clearFlightInfo()
queryFlightIfReady() queryFlightIfReady()
} }
fun onFlightNoInputComplete() { fun onFlightNoInputComplete() {
lastQueriedFlight = ""
clearFlightInfo()
queryFlightIfReady() queryFlightIfReady()
} }
private fun clearFlightInfo() {
val b = dataBean.value ?: GjAccidentVisaEditBean()
b.dep = ""
b.dest = ""
dataBean.value = b
}
private fun queryFlightIfReady() { private fun queryFlightIfReady() {
val bean = dataBean.value ?: return val bean = dataBean.value ?: return
val fdate = bean.fdate val fdate = bean.fdate
@@ -197,11 +237,39 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
// 保存 // 保存
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/**
* 校验运单号格式
* 规则纯数字固定11位后8位中前7位 mod 7 == 最后一位
* 返回 true 表示校验失败(有错误)
*/
private fun verifyWaybillNo(wbNo: String?): Boolean {
if (wbNo.isNullOrEmpty()) return false
if (wbNo.length != 11) {
showToast("运单号必须为11位数字")
return true
}
if (!wbNo.all { it.isDigit() }) {
showToast("运单号必须为纯数字")
return true
}
val last8 = wbNo.substring(3)
val first7ofLast8 = last8.substring(0, 7).toLong()
val lastDigit = last8.last().toString().toInt()
if (first7ofLast8 % 7 != lastDigit.toLong()) {
showToast("运单号校验位不正确")
return true
}
return false
}
fun onSaveClick() { fun onSaveClick() {
val bean = dataBean.value ?: return val bean = dataBean.value ?: return
if (bean.fdate.verifyNullOrEmpty("请输入航班日期")) return if (bean.fdate.verifyNullOrEmpty("请输入航班日期")) return
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
if (bean.wbNo.verifyNullOrEmpty("请输入运单号")) return if (bean.wbNo.verifyNullOrEmpty("请输入运单号")) return
if (verifyWaybillNo(bean.wbNo)) return
if (bean.dep.verifyNullOrEmpty("请先填写航班信息(始发站不能为空)")) return
if (bean.dest.verifyNullOrEmpty("请先填写航班信息(目的站不能为空)")) return
(rv?.commonAdapter()?.items ?: emptyList()) (rv?.commonAdapter()?.items ?: emptyList())
.asFlow() .asFlow()
@@ -209,8 +277,10 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
.filter { it.path.isNotEmpty() && it.url.isEmpty() } .filter { it.path.isNotEmpty() && it.url.isEmpty() }
.onEach { .onEach {
val data = UploadUtil.upload(it.path).data val data = UploadUtil.upload(it.path).data
it.url = data?.newName ?: "" // UploadUtil 返回newName=原图(较大)zipFileName=缩略图(较小)
it.originalPic = data?.zipFileName ?: "" // FileBean.url 用作缩略图标识FileBean.originalPic 用作原图标识
it.url = data?.zipFileName ?: ""
it.originalPic = data?.newName ?: ""
} }
.flowOn(Dispatchers.IO) .flowOn(Dispatchers.IO)
.onStart { showLoading() } .onStart { showLoading() }
@@ -223,12 +293,15 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
val list = (rv?.commonAdapter()?.items as List<FileBean>) val list = (rv?.commonAdapter()?.items as List<FileBean>)
.filter { it.path.isNotEmpty() } .filter { it.path.isNotEmpty() }
bean.picNumber = list.size.toString() bean.picNumber = list.size.toString()
bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) } bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) }
bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) } bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) }
bean.idFlag = "1" bean.idFlag = "1"
if (pageType.value == DetailsPageType.Add) { if (pageType.value == DetailsPageType.Add) {
NetApply.api.saveGjAccidentVisa(bean.toRequestBody()) val jsonObj = org.json.JSONObject(NetApply.gson.toJson(bean))
jsonObj.remove("id")
val body = jsonObj.toString().toRequestBody("application/json; charset=utf-8".toMediaTypeOrNull())
NetApply.api.saveGjAccidentVisa(body)
} else { } else {
NetApply.api.modifyGjAccidentVisa(bean.toRequestBody()) NetApply.api.modifyGjAccidentVisa(bean.toRequestBody())
} }
@@ -254,6 +327,9 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
override fun onItemClick(position: Int, type: Int) { override fun onItemClick(position: Int, type: Int) {
// 详情模式下不允许长按删除操作
if (isDetailMode.value == true) return
val adapter = rv!!.commonAdapter()!! val adapter = rv!!.commonAdapter()!!
val bean = adapter.getItem(position) as FileBean val bean = adapter.getItem(position) as FileBean
when (type) { when (type) {

View File

@@ -17,6 +17,7 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
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.model.ConfirmDialogModel
import com.lukouguoji.module_base.model.ScanModel import com.lukouguoji.module_base.model.ScanModel
import dev.utils.app.info.KeyValue import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils import dev.utils.common.DateUtils
@@ -36,7 +37,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
val wbNo = MutableLiveData("") // 运单号 val wbNo = MutableLiveData("") // 运单号
// ========== 航班查询 ========== // ========== 航班查询 ==========
private var fid: String = ""
private var lastQueriedFlight = "" private var lastQueriedFlight = ""
// ========== 统计信息 ========== // ========== 统计信息 ==========
@@ -90,7 +90,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
onSuccess = { onSuccess = {
if (it.verifySuccess() && it.data != null) { if (it.verifySuccess() && it.data != null) {
val flight = it.data!! val flight = it.data!!
fid = flight.fid.noNull()
fdest.value = flight.fdest.noNull() fdest.value = flight.fdest.noNull()
val list = mutableListOf( val list = mutableListOf(
@@ -102,7 +101,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
fdepList.value = list fdepList.value = list
fdep.value = flight.fdep.noNull() fdep.value = flight.fdep.noNull()
} else { } else {
fid = ""
fdest.value = "" fdest.value = ""
fdepList.value = emptyList() fdepList.value = emptyList()
fdep.value = "" fdep.value = ""
@@ -111,7 +109,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
} }
onFailed = { _, _ -> onFailed = { _, _ ->
fid = ""
fdest.value = "" fdest.value = ""
fdepList.value = emptyList() fdepList.value = emptyList()
fdep.value = "" fdep.value = ""
@@ -146,7 +143,25 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
showToast("请选择要删除的数据") showToast("请选择要删除的数据")
return return
} }
launchLoadingCollect({ NetApply.api.deleteIntImpAccidentVisa(selected.toRequestBody()) }) { ConfirmDialogModel(
message = "确定要删除选中的 ${selected.size} 条数据吗?",
title = "提示"
) {
doDelete(selected)
}.show()
}
fun singleDelete(bean: IntImpAccidentVisaBean) {
ConfirmDialogModel(
message = "确定要删除运单号 ${bean.wbNo} 的事故签证吗?",
title = "提示"
) {
doDelete(listOf(bean))
}.show()
}
private fun doDelete(list: List<IntImpAccidentVisaBean>) {
launchLoadingCollect({ NetApply.api.deleteIntImpAccidentVisa(list.toRequestBody()) }) {
onSuccess = { onSuccess = {
showToast("删除成功") showToast("删除成功")
viewModelScope.launch { viewModelScope.launch {
@@ -158,17 +173,13 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
} }
override fun getData() { override fun getData() {
val filterParams = mutableMapOf<String, Any?>( val filterParams = mapOf<String, Any?>(
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"fdep" to fdep.value?.ifEmpty { null }, "fdep" to fdep.value?.ifEmpty { null },
"fdest" to fdest.value?.ifEmpty { null }, "fdest" to fdest.value?.ifEmpty { null },
"wbNo" to wbNo.value?.ifEmpty { null } "wbNo" to wbNo.value?.ifEmpty { null }
) )
if (fid.isNotEmpty()) {
filterParams["fid"] = fid
} else {
filterParams["fdate"] = flightDate.value?.ifEmpty { null }
filterParams["fno"] = flightNo.value?.ifEmpty { null }
}
val listParams = (filterParams + mapOf( val listParams = (filterParams + mapOf(
"pageNum" to pageModel.page, "pageNum" to pageModel.page,

View File

@@ -36,7 +36,7 @@ class IntImpLoadingListEditViewModel : BaseViewModel() {
val bean = Gson().fromJson(jsonData, GjjManifest::class.java) val bean = Gson().fromJson(jsonData, GjjManifest::class.java)
dataBean.value = bean dataBean.value = bean
// 初始化可编辑字段 // 初始化可编辑字段
location.value = bean.location location.value = bean.locationTally
totalPcStr.value = bean.totalPc.toString() totalPcStr.value = bean.totalPc.toString()
pcStr.value = bean.pc.toString() pcStr.value = bean.pc.toString()
weightStr.value = bean.weight.toString() weightStr.value = bean.weight.toString()
@@ -58,7 +58,6 @@ class IntImpLoadingListEditViewModel : BaseViewModel() {
val bean = dataBean.value ?: return val bean = dataBean.value ?: return
// 同步可编辑字段回 bean // 同步可编辑字段回 bean
bean.location = location.value ?: ""
bean.totalPc = totalPcStr.value?.toLongOrNull() ?: 0 bean.totalPc = totalPcStr.value?.toLongOrNull() ?: 0
bean.pc = pcStr.value?.toLongOrNull() ?: 0 bean.pc = pcStr.value?.toLongOrNull() ?: 0
bean.weight = weightStr.value?.toDoubleOrNull() ?: 0.0 bean.weight = weightStr.value?.toDoubleOrNull() ?: 0.0

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.gjj.viewModel
import android.content.Intent import android.content.Intent
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjj.activity.IntImpManifestSubEditActivity
import com.lukouguoji.module_base.base.BaseViewModel import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.GjjHaWb import com.lukouguoji.module_base.bean.GjjHaWb
import com.lukouguoji.module_base.bean.GjjManifest import com.lukouguoji.module_base.bean.GjjManifest
@@ -11,7 +12,6 @@ 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.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
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
@@ -44,6 +44,17 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
val weight = MutableLiveData("") // 重量 val weight = MutableLiveData("") // 重量
val goodsCn = MutableLiveData("") // 品名(中) val goodsCn = MutableLiveData("") // 品名(中)
// 主单件数/重量
private var mainPc: Long = 0
private var mainWeight: Double = 0.0
// 其他分单件数/重量之和(不含当前编辑的分单)
private var otherSubPc: Long = 0
private var otherSubWeight: Double = 0.0
// 主分校验是否通过true=绿色允许保存false=红色不允许保存)
val isCheckValid = MutableLiveData(true)
/** /**
* 初始化从Intent获取参数 * 初始化从Intent获取参数
*/ */
@@ -61,6 +72,12 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
waybillNo.value = manifest.getWaybillNo() waybillNo.value = manifest.getWaybillNo()
} }
// 获取主分校验参数
mainPc = intent.getLongExtra(IntImpManifestSubEditActivity.KEY_MAIN_PC, 0)
mainWeight = intent.getDoubleExtra(IntImpManifestSubEditActivity.KEY_MAIN_WEIGHT, 0.0)
otherSubPc = intent.getLongExtra(IntImpManifestSubEditActivity.KEY_OTHER_SUB_PC, 0)
otherSubWeight = intent.getDoubleExtra(IntImpManifestSubEditActivity.KEY_OTHER_SUB_WEIGHT, 0.0)
// 编辑模式:回填分单数据 // 编辑模式:回填分单数据
if (pageType.value == DetailsPageType.Modify) { if (pageType.value == DetailsPageType.Modify) {
val haWb = intent.getSerializableExtra("haWb") as? GjjHaWb val haWb = intent.getSerializableExtra("haWb") as? GjjHaWb
@@ -69,28 +86,54 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
subNo.value = haWb.hno subNo.value = haWb.hno
pc.value = if (haWb.pc > 0) haWb.pc.toString() else "" pc.value = if (haWb.pc > 0) haWb.pc.toString() else ""
weight.value = if (haWb.weight > 0) haWb.weight.toString() else "" weight.value = if (haWb.weight > 0) haWb.weight.toString() else ""
goodsCn.value = haWb.goodsCn goodsCn.value = haWb.goodsCn.ifEmpty { haWb.goods }
} }
} }
// 获取主分校验数据 // 计算主分校验
loadMainSubCheck() updateMainSubCheck()
} }
/** /**
* 获取主单减去分单的件数重量 * 件数输入完成回调
*/ */
private fun loadMainSubCheck() { fun onPcInputComplete() {
if (mfId == 0L) return updateMainSubCheck()
}
val params = mapOf("mfId" to mfId).toRequestBody() /**
launchCollect({ NetApply.api.getMaWbMinusHaWb(params) }) { * 重量输入完成回调
onSuccess = { result -> */
if (result.verifySuccess() && result.data != null) { fun onWeightInputComplete() {
val data = result.data!! updateMainSubCheck()
mainSubCheck.value = "剩余件数:${data.pc} 剩余重量:${data.weight}" }
}
} /**
* 实时计算主分校验
* 格式:分单之和件数/主单件数 分单之和重量/主单重量KG
* 颜色:分单之和 > 主单 → 红色(不允许保存),否则 → 绿色
*/
private fun updateMainSubCheck() {
val currentPc = pc.value?.toLongOrNull() ?: 0
val currentWeight = weight.value?.toDoubleOrNull() ?: 0.0
val totalSubPc = otherSubPc + currentPc
val totalSubWeight = otherSubWeight + currentWeight
mainSubCheck.value = "${totalSubPc}/${mainPc} ${formatWeight(totalSubWeight)}/${formatWeight(mainWeight)}KG"
// 件数或重量任一超过主单则校验不通过
isCheckValid.value = totalSubPc <= mainPc && totalSubWeight <= mainWeight
}
/**
* 格式化重量显示(整数不显示小数位)
*/
private fun formatWeight(value: Double): String {
return if (value % 1.0 == 0.0) {
value.toLong().toString()
} else {
value.toString()
} }
} }
@@ -98,6 +141,12 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
* 保存 * 保存
*/ */
fun onSaveClick() { fun onSaveClick() {
// 主分校验不通过时禁止保存
if (isCheckValid.value == false) {
showToast("分单之和超过主单,不允许保存")
return
}
val params = mutableMapOf<String, Any?>( val params = mutableMapOf<String, Any?>(
"mfId" to mfId, "mfId" to mfId,
"prefix" to prefix, "prefix" to prefix,

View File

@@ -9,6 +9,7 @@ import com.lukouguoji.gjj.activity.GjjManifestAddActivity
import com.lukouguoji.gjj.activity.IntImpManifestSubEditActivity import com.lukouguoji.gjj.activity.IntImpManifestSubEditActivity
import com.lukouguoji.gjj.holder.IntImpManifestViewHolder import com.lukouguoji.gjj.holder.IntImpManifestViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.GjjHaWb
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
@@ -63,30 +64,40 @@ class IntImpManifestViewModel : BasePageViewModel() {
lastQueriedFlight = key lastQueriedFlight = key
launchCollect({ launchCollect({
NetApply.api.getGjFlightBean( NetApply.api.searchFlightList(
mapOf( mapOf(
"fdate" to fdate, "fdate" to fdate,
"fno" to fno, "fno" to fno,
"ieFlag" to "I", "status" to "1",
).toRequestBody() ).toRequestBody()
) )
}) { }) {
onSuccess = { onSuccess = {
if (it.verifySuccess() && it.data != null) { if (it.verifySuccess() && !it.data.isNullOrEmpty()) {
val flight = it.data!! val dataList = it.data!!
fid = flight.fid.noNull() if (dataList.size > 1) {
fdep = flight.fdep.noNull() showToast("存在多个航班记录,请核实")
fdest.value = flight.fdest.noNull() fid = ""
fdep = ""
fdest.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
} else {
val flight = dataList[0]
fid = flight.fid.noNull()
fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
// 构建始发站下拉列表fdep + jtz经停港 // 构建始发站下拉列表fdep + jtz经停港
val list = mutableListOf( val list = mutableListOf(
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()), KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
) )
if (!flight.jtz.isNullOrEmpty()) { if (!flight.jtz.isNullOrEmpty()) {
list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull())) list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull()))
}
sendAddressList.value = list
sendAddress.value = flight.fdep.noNull()
} }
sendAddressList.value = list
sendAddress.value = flight.fdep.noNull()
} else { } else {
fid = "" fid = ""
fdep = "" fdep = ""
@@ -121,18 +132,6 @@ class IntImpManifestViewModel : BasePageViewModel() {
// ========== 分单管理模式 ========== // ========== 分单管理模式 ==========
val isSubManagementMode = MutableLiveData(false) val isSubManagementMode = MutableLiveData(false)
init {
// 监听全选状态,自动更新所有列表项(联动子列表)
isAllChecked.observeForever { checked ->
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return@observeForever
list.forEach {
it.checked.set(checked)
it.haWbList?.forEach { sub -> sub.checked.set(checked) }
}
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
}
// ========== 适配器配置 ========== // ========== 适配器配置 ==========
val itemViewHolder = IntImpManifestViewHolder::class.java val itemViewHolder = IntImpManifestViewHolder::class.java
val itemLayoutId = R.layout.item_int_imp_manifest val itemLayoutId = R.layout.item_int_imp_manifest
@@ -144,6 +143,19 @@ class IntImpManifestViewModel : BasePageViewModel() {
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 (sendAddress.value.isNullOrEmpty() || fdest.value.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()) {
@@ -194,10 +206,6 @@ class IntImpManifestViewModel : BasePageViewModel() {
} else { } else {
refresh() refresh()
} }
} else {
fid = ""
fdep = ""
refresh()
} }
} }
@@ -257,7 +265,9 @@ class IntImpManifestViewModel : BasePageViewModel() {
context = getTopActivity(), context = getTopActivity(),
fid = fid, fid = fid,
dep = sendAddress.value ?: "", dep = sendAddress.value ?: "",
dest = fdest.value ?: "" dest = fdest.value ?: "",
flightDate = flightDate.value ?: "",
flightNo = flightNo.value ?: ""
) )
} }
@@ -301,7 +311,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
message = "确定要删除运单号 ${bean.getWaybillNo()} 的舱单吗?", message = "确定要删除运单号 ${bean.getWaybillNo()} 的舱单吗?",
title = "提示" title = "提示"
) { ) {
doDeleteByIds(listOf(bean.mfId)) doDelete(listOf(bean), emptyList())
}.show() }.show()
} }
@@ -310,37 +320,67 @@ class IntImpManifestViewModel : BasePageViewModel() {
*/ */
fun onDeleteClick() { fun onDeleteClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
val selectedItems = list.filter { it.isSelected }
if (selectedItems.isEmpty()) { val selectedManifests = list.filter { it.isSelected }
val selectedHawbs = list.flatMap { it.haWbList?.filter { hawb -> hawb.isSelected } ?: emptyList() }
if (selectedManifests.isEmpty() && selectedHawbs.isEmpty()) {
showToast("请选择要删除的记录") showToast("请选择要删除的记录")
return return
} }
// 构建确认提示信息
val msgParts = mutableListOf<String>()
if (selectedManifests.isNotEmpty()) {
msgParts.add("${selectedManifests.size} 条主单")
}
if (selectedHawbs.isNotEmpty()) {
msgParts.add("${selectedHawbs.size} 条分单")
}
ConfirmDialogModel( ConfirmDialogModel(
message = "确定要删除选中的 ${selectedItems.size} 条舱单吗?", message = "确定要删除选中的 ${msgParts.joinToString("和")} 吗?",
title = "批量删除确认" title = "批量删除确认"
) { ) {
doDeleteByIds(selectedItems.map { it.mfId }) doDelete(selectedManifests, selectedHawbs)
}.show() }.show()
} }
/** /**
* 执行批量删除(统一接口,请求体为 mfId 数组 * 执行删除:先删分单,再删主单(串行执行
*/ */
private fun doDeleteByIds(mfIds: List<Long>) { private fun doDelete(manifests: List<GjjManifest>, hawbs: List<GjjHaWb>) {
launchLoadingCollect({ NetApply.api.gjjManifestDeleteBatch(mfIds.toRequestBody()) }) { viewModelScope.launch {
onSuccess = { try {
if (it.verifySuccess()) { showLoading()
showToast("删除成功")
isAllChecked.value = false // 第一步:删除分单(如果有选中的分单)
viewModelScope.launch { if (hawbs.isNotEmpty()) {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh") val hawbResult = NetApply.api.intImpManifestDeleteHawb(hawbs.toRequestBody())
if (!hawbResult.verifySuccess()) {
showToast(hawbResult.msg.noNull("分单删除失败"))
refresh()
return@launch
} }
refresh()
} else {
showToast(it.msg.noNull("删除失败"))
} }
// 第二步:删除主单(分单删除成功后才执行)
if (manifests.isNotEmpty()) {
val manifestResult = NetApply.api.intImpManifestDeleteManifest(manifests.toRequestBody())
if (!manifestResult.verifySuccess()) {
showToast(manifestResult.msg.noNull("分单已删除,但主单删除失败"))
refresh()
return@launch
}
}
showToast("删除成功")
isAllChecked.value = false
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
} catch (e: Exception) {
showToast("删除失败:${e.message}")
} finally {
dismissLoading()
} }
} }
} }
@@ -375,7 +415,18 @@ class IntImpManifestViewModel : BasePageViewModel() {
return return
} }
IntImpManifestSubEditActivity.startForAdd(getTopActivity(), selectedItems[0]) val manifest = selectedItems[0]
if (manifest.haWbList == null) {
// 分单列表未加载,先加载再跳转
launchLoadingCollect({ NetApply.api.getIntImpManifestHaWbList(manifest.toRequestBody()) }) {
onSuccess = { result ->
manifest.haWbList = result.data ?: emptyList()
IntImpManifestSubEditActivity.startForAdd(getTopActivity(), manifest)
}
}
} else {
IntImpManifestSubEditActivity.startForAdd(getTopActivity(), manifest)
}
} }
/** /**

View File

@@ -2,6 +2,7 @@ package com.lukouguoji.gjj.viewModel
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.activity.IntImpQueryEditActivity import com.lukouguoji.gjj.activity.IntImpQueryEditActivity
@@ -71,6 +72,20 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
val businessType = MutableLiveData("") val businessType = MutableLiveData("")
val goodsCn = MutableLiveData("") val goodsCn = MutableLiveData("")
// 是否有筛选条件(任意一个非空则为 true
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
val update = { _: Any? ->
value = listOf(spCode, flightNo, origin, awbType, businessType, goodsCn)
.any { !it.value.isNullOrEmpty() }
}
addSource(spCode, update)
addSource(flightNo, update)
addSource(origin, update)
addSource(awbType, update)
addSource(businessType, update)
addSource(goodsCn, update)
}
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 方法区 // 方法区
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View File

@@ -6,6 +6,7 @@ import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.holder.IntImpStorageUseViewHolder import com.lukouguoji.gjj.holder.IntImpStorageUseViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.GjcMaWb import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.bean.GjcStorageUse
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.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
@@ -185,13 +186,13 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
/** /**
* 执行出库操作 * 执行出库操作
*/ */
fun performOutStorage(maWbListForOutStorage: List<GjcMaWb>) { fun performOutStorage(storageUseList: List<GjcStorageUse>) {
if (maWbListForOutStorage.isEmpty()) { if (storageUseList.isEmpty()) {
showToast("请选择要出库的库位") showToast("请选择要出库的库位")
return return
} }
val params = maWbListForOutStorage.toRequestBody() val params = storageUseList.toRequestBody()
launchLoadingCollect({ NetApply.api.outIntImpStorage(params) }) { launchLoadingCollect({ NetApply.api.outIntImpStorage(params) }) {
onSuccess = { onSuccess = {
@@ -229,9 +230,13 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
return return
} }
val body = maWbListForInStorage.toRequestBody() val body = mapOf(
"location" to locationName,
"locationId" to locationId.toLongOrNull(),
"warehouseList" to maWbListForInStorage
).toRequestBody()
launchLoadingCollect({ NetApply.api.inIntImpStorage(locationName, body) }) { launchLoadingCollect({ NetApply.api.inIntImpStorage(body) }) {
onSuccess = { onSuccess = {
showToast("入库成功") showToast("入库成功")
viewModelScope.launch { viewModelScope.launch {

View File

@@ -43,7 +43,7 @@ class IntImpTallyViewModel : BasePageViewModel() {
val isAllChecked = MutableLiveData(false) val isAllChecked = MutableLiveData(false)
init { init {
// 监听全选状态,自动更新所有列表项(联动子列表 // 监听全选状态,自动更新所有列表项(主单和分单独立全选
isAllChecked.observeForever { checked -> isAllChecked.observeForever { checked ->
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjImportTally> ?: return@observeForever val list = pageModel.rv?.commonAdapter()?.items as? List<GjjImportTally> ?: return@observeForever
list.forEach { list.forEach {

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#F44336" />
</shape>

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