Compare commits

...

39 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
118 changed files with 4965 additions and 2573 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

@@ -109,13 +109,42 @@
"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_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": [],
"ask": []
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": [
"空港集团 - 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 导入等)

2
.gitignore vendored
View File

@@ -113,7 +113,7 @@ captures/
*.swp
# Keystore files
*.jks
# *.jks
*.keystore
# Google Services (e.g. APIs or Firebase)

View File

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

241
CLAUDE.md
View File

@@ -402,6 +402,55 @@ fun toggleAllExpand() {
| `radiobtn_unchecked_style` | 未选中 | 透明 + 黑色边框圆 |
| ~~`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`
---
@@ -638,6 +687,8 @@ fun resetClick() {
基于 `BaseDialogModel`XPopup 封装),支持 5 种弹窗类型。
> ⚠️ **强制规则**:所有二次确认弹框**必须**使用 `ConfirmDialogModel``com.lukouguoji.module_base.model.ConfirmDialogModel`**禁止**使用系统 `AlertDialog`。
### 基础模板
```kotlin
@@ -763,6 +814,25 @@ adb logcat | grep "com.lukouguoji.aerologic" # 日志
`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 路径速查
@@ -789,7 +859,20 @@ adb logcat | grep "com.lukouguoji.aerologic" # 日志
### 扩展函数(均在 `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: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
android:name="com.lukouguoji.gjj.activity.IntImpMsgParseActivity"

View File

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

View File

@@ -1,10 +1,11 @@
package com.lukouguoji.aerologic.page.gnj.move.stash.list
import android.view.View
import android.widget.Toast
import com.lukouguoji.aerologic.databinding.ItemGnjMoveStashListBinding
import com.lukouguoji.gnj.page.yiku.handover.GnjYiKuHandoverActivity
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.MoveStashBean
import com.lukouguoji.module_base.bean.SimpleCheckBean
class GnjMoveStashListViewHolder(view: View) :
BaseViewHolder<MoveStashBean, ItemGnjMoveStashListBinding>(view) {
@@ -16,6 +17,20 @@ class GnjMoveStashListViewHolder(view: View) :
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

@@ -44,7 +44,8 @@ class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetai
viewModel.latestStepCode.observe(this) { rebuildSteps() }
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)

View File

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

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.fubang.list.GncFuBangListActivity
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.common.Constant
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
@@ -314,7 +315,8 @@ class HomeFragment : Fragment() {
}
//出库
Constant.AuthName.GnjChuKuList -> {
GnjMoveStashListActivity.start(requireContext())
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNJ_CHU_KU_LIST)
.navigation()
}
//仓库管理
Constant.AuthName.GnjWareHouse -> {
@@ -840,14 +842,14 @@ class HomeFragment : Fragment() {
list.add(
RightMenu(
Constant.AuthName.IntImpTally,
R.mipmap.img_bwjx,
R.drawable.img_gjc_chugang_lihuo,
"理货报告"
)
)
list.add(
RightMenu(
Constant.AuthName.GjjWareHouseActivity,
R.mipmap.gnj_cang_ku_icon,
R.drawable.gjc_cang_ku_icon,
"进港仓库"
)
)
@@ -861,14 +863,14 @@ class HomeFragment : Fragment() {
list.add(
RightMenu(
Constant.AuthName.IntImpPickUpDLV,
R.mipmap.gnj_cang_ku_icon,
R.drawable.img_gjc_chuku_jiaojie,
"提取出库"
)
)
list.add(
RightMenu(
Constant.AuthName.GjjQueryListActivity,
R.mipmap.img_bwjx,
R.drawable.gjc_query_icon,
"进港查询"
)
)

View File

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

View File

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

View File

@@ -46,7 +46,7 @@
android:layout_weight="1"
android:orientation="vertical">
<!-- 第一行 -->
<!-- 第一行ULD编号 | 状态 | 自重 | 所属航司 | 最大装载容积 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -59,16 +59,18 @@
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ULD编号" />
android:text="ULD编号"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.uld}"
android:textColor="@color/colorPrimary" />
android:textColor="@color/colorPrimary"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -80,16 +82,18 @@
android:gravity="center_vertical">
<TextView
completeSpace="@{3}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="状态:" />
android:text="状态:"
android:textSize="15sp"
completeSpace="@{3}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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>
@@ -101,15 +105,17 @@
android:gravity="center_vertical">
<TextView
completeSpace="@{3}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="自重:" />
android:text="自重:"
android:textSize="15sp"
completeSpace="@{3}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.uldWeight}" />
android:text="@{bean.uldWeight}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -121,15 +127,17 @@
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="所属航司:" />
android:text="所属航司:"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.carrier}" />
android:text="@{bean.carrier}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -141,21 +149,23 @@
android:gravity="center_vertical">
<TextView
completeSpace="@{7}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最大装载容积:" />
android:text="最大装载容积:"
android:textSize="15sp"
completeSpace="@{7}" />
<TextView
android:layout_width="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
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -169,15 +179,17 @@
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="最大载重:" />
android:text="最大载重:"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.maxWeight}" />
android:text="@{bean.maxWeight}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -189,15 +201,17 @@
android:gravity="center_vertical">
<TextView
completeSpace="@{3}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="备注:" />
android:text="备注:"
android:textSize="15sp"
completeSpace="@{3}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.remark}" />
android:text="@{bean.remark}"
android:textSize="15sp" />
</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 com.bumptech.glide.Glide
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.GranularRoundedCorners
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions
import com.lukouguoji.module_base.base.BaseViewHolder
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.util.SizeUtils
@@ -111,10 +115,22 @@ fun loadImage(
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)
.setDefaultRequestOptions(requestOptions)
.load(source)
.load(actualSource)
.diskCacheStrategy(diskCacheStrategy)
.encodeFormat(encodeFormat)

View File

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

View File

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

View File

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

View File

@@ -28,6 +28,7 @@ data class GjjManifest(
var awbType: String = "", // 运单类型
var awbTypeName: String = "", // 运单类型(中)
var businessType: String = "", // 业务类型
var businessName: String = "", // 业务类型名称
var cargoType: String = "", // 货物类型
var spCode: String = "", // 特码
var packageType: String = "", // 包装类型
@@ -54,7 +55,11 @@ data class GjjManifest(
var splitFlag: String = "", // 分批标志
var subCode: 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 {
// 分单列表
var haWbList: List<GjjHaWb>? = null

View File

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

View File

@@ -16,19 +16,25 @@ class GnjYiKuBean : ICheck {
var agentCode: String = "" // 代理人
var goods: String = "" // 品名
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 dest: String = "" // 目的港
var awbType: String = "" // 运单类型(转国际进港/转国内出港等)
var telegramNo: String = "" // 电报号
var telegramNo: String = "" // 电报号(旧接口字段)
var telegramId: String = "" // 电报号GnjMawb 接口字段)
var remark: String = "" // 备注
var handoverStatus: String = "" // 移交状态(未移交/已移交)
var images: String = "" // 交接图片(逗号分隔的URL列表)
var originalPic: String = "" // 交接图片原图地址
var pic: String = "" // 交接图片缩略图
var picNumber: String = "" // 交接图片数量
var fdate: String = "" // 航班日期
var fno: String = "" // 航班号
var businessType: String = "" // 业务类型
var opDate: String = "" // 操作日期
var carrier: String = "" // 承运人
var pickFlag: String = "" // 出库标志1=已出库)
// 多选状态绑定
val checked = ObservableBoolean(false)
@@ -41,10 +47,17 @@ class GnjYiKuBean : ICheck {
* 获取图片列表
*/
fun getImageList(): List<String> {
return if (images.isNotEmpty()) {
images.split(",").filter { it.isNotEmpty() }
val source = originalPic.ifEmpty { images }
return if (source.isNotEmpty()) {
source.split(",").filter { it.isNotEmpty() }
} else {
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 fdate: String = "" // 航班日期
var fno: String = "" // 航班号
var fdep: String = "" // 始发站
var fdest: String = "" // 目的站
var dep: String = "" // 始发站
var dest: String = "" // 目的站
var wbNo: String = "" // 运单号
var totalPc: Int = 0 // 运单总件数
var totalWeight: Double = 0.0 // 运单总重量
var abnPc: Int = 0 // 不正常件数
var opName: String = "" // 经办人
var opDate: String = "" // 经办时间
var pc: Int = 0 // 运单总件数
var weight: Double = 0.0 // 运单总重量
var dpc: Int = 0 // 不正常件数
var opId: String = "" // 经办人
var opdate: String = "" // 经办时间
val checked: ObservableBoolean = ObservableBoolean(false)

View File

@@ -401,5 +401,8 @@ interface Constant {
// 运单类型
const val AWB_TYPE = "awbType"
const val PIC = "pic"
const val ORIGINAL_PIC = "originalPic"
}
}

View File

@@ -308,6 +308,12 @@ interface Api {
@POST("typeCode/countryCode")
suspend fun getCountryCodeList(): DictListBean
/**
* 获取国家代码(带始发站筛选)
*/
@POST("typeCode/countryCode")
suspend fun getCountryCodeListByFdep(@Query("fDep") fDep: String): DictListBean
/**
* 获取通讯方式类型
*/
@@ -957,7 +963,7 @@ interface Api {
* 接口路径: /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")
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")
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")
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,17 +1,19 @@
package com.lukouguoji.module_base.impl
import android.view.View
import com.luck.picture.lib.adapter.holder.PreviewImageHolder
import com.luck.picture.lib.basic.PictureSelector
import com.lukouguoji.module_base.adapter.loadImage
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.bean.FileBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.databinding.ItemImageSelectBinding
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
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
import java.io.File
class ImageSelectViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSelectBinding>(view) {
@@ -19,6 +21,21 @@ class ImageSelectViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSele
val bean = getItemBean(item)!!
binding.bean = bean
// 加载缩略图
if (bean.path.isNotEmpty()) {
if (bean.isOnlineResource()) {
val glideUrl = GlideUrl(
bean.path,
LazyHeaders.Builder()
.addHeader("Authorization", SharedPreferenceUtil.getString(Constant.Share.token))
.build()
)
Glide.with(itemView.context).load(glideUrl).into(binding.iv)
} else {
Glide.with(itemView.context).load(File(bean.path)).into(binding.iv)
}
}
binding.rl.setOnClickListener {
if (bean.path.isEmpty()) {
MediaUtil.pickImage(itemView.context, maxNum = 10) {
@@ -28,7 +45,15 @@ class ImageSelectViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSele
}
}
} else {
PreviewActivity.start(itemView.context, listOf(bean))
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)
}
}
@@ -39,13 +64,6 @@ class ImageSelectViewHolder(view: View) : BaseViewHolder<FileBean, ItemImageSele
}
notifyItemClick(position, binding.ivDelete)
if (bean.isOnlineResource()) {
loge("开始下载 : ${bean.path}")
bean.download {
loadImage(binding.iv, it)
}
}
}
}

View File

@@ -57,3 +57,42 @@ class UpperCaseAlphanumericInputFilter : InputFilter {
fun EditText.setUpperCaseAlphanumericFilter() {
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_DETAILS = "/gnj/GnjYiKuDetailsActivity" //国内进港 移库详情
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
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.bean.FileBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.databinding.ItemPreviewImageBinding
import com.lukouguoji.module_base.db.perference.SharedPreferenceUtil
/**
* @author孟凡华
@@ -14,8 +19,26 @@ class PreviewImageViewHolder(view: View) :
BaseViewHolder<FileBean, ItemPreviewImageBinding>(view) {
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

@@ -97,7 +97,7 @@ class PadDataLayoutNew : FrameLayout {
et.hint = value
tv.hint = value
bindAdapter(spinner, list, hint)
updateSpinnerSilently { bindAdapter(spinner, list, hint) }
}
var required = false
@@ -106,11 +106,29 @@ class PadDataLayoutNew : FrameLayout {
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>()
set(value) {
field = value
bindAdapter(spinner, value, hint)
onValueSet()
updateSpinnerSilently { bindAdapter(spinner, value, hint) }
}
var icon: Any? = null
@@ -183,12 +201,7 @@ class PadDataLayoutNew : FrameLayout {
et.doOnTextChanged { text, _, _, _ ->
value = text.toString()
}
bindOnSelected(spinner, object : IOnSpinnerSelected {
override fun onSelected(position: Int) {
value = list.getOrNull(position)?.value ?: ""
refreshCallBack?.invoke()
}
})
bindOnSelected(spinner, spinnerCallback)
// 监听输入框焦点变化
com.lukouguoji.module_base.adapter.setOnFocusChangeListener(
et, object : IOnFocusChangeListener {

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

@@ -24,7 +24,6 @@
<ImageView
android:id="@+id/iv"
loadImage="@{bean.path}"
visible="@{bean.path}"
android:layout_width="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">
<com.luck.picture.lib.photoview.PhotoView
loadImage="@{bean.path}"
android:id="@+id/photo_view"
android:layout_width="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.util.*
@Deprecated("旧版板箱过磅,使用 GjcBoxWeighingActivity 替代")
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_FU_BANG)
class GjcFuBangActivity : BaseActivity(), View.OnClickListener {
private lateinit var viewModel: GjcFuBangViewModel

View File

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

View File

@@ -50,11 +50,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="ULD编号" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.uld}"
android:textColor="@color/colorPrimary"
tools:text="PMC12345MU" />
@@ -72,11 +74,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="架子车号:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.carId}'
tools:text="527" />
@@ -93,11 +97,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="总重:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{String.valueOf(bean.totalWeight)}"
tools:text="200" />
@@ -114,11 +120,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="装机重量:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(bean.netWeight)}'
tools:text="150" />
@@ -135,11 +143,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="货重:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(bean.cargoWeight)}'
tools:text="150" />
@@ -164,11 +174,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="航班日期:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.fdate != null &amp;&amp; bean.fdate.length() >= 10 ? bean.fdate.substring(0, 10) : (bean.fdate ?? ``)}'
tools:text="2025-09-05" />
@@ -185,11 +197,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="航班号:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.fno}'
tools:text="MU2023" />
@@ -206,11 +220,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="目的港:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.fdest}"
tools:text="PEK" />
@@ -227,11 +243,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="过磅人:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.wtUsername}'
tools:text="张三" />
@@ -248,11 +266,13 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="过磅时间:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.wtDate}'
tools:text="2024-01-15 14:27:12" />

View File

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

View File

@@ -57,13 +57,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="运单号:" />
android:text="运单号:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
tools:text="78109081212" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -79,12 +81,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="件数:" />
android:text="件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp"
tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -100,12 +104,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{3}"
android:text="重量:" />
android:text="重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.weight)}'
android:textSize="15sp"
tools:text="200" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -121,12 +127,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="代理人:" />
android:text="代理人:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.agentName ?? bean.agentCode}'
android:textSize="15sp"
tools:text="SF" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -142,12 +150,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="入库时间:" />
android:text="入库时间:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.opDate ?? ""}'
android:textSize="15sp"
tools:text="2024-05-13 17:10:22" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -171,12 +181,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="航班:" />
android:text="航班:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.flight}"
android:textSize="15sp"
tools:text="20240513/MU2026" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -192,12 +204,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="目的港:" />
android:text="目的港:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.dest}"
android:textSize="15sp"
tools:text="PEK" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -213,12 +227,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{3}"
android:text="特码:" />
android:text="特码:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.spCode}"
android:textSize="15sp"
tools:text="NOR" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -234,12 +250,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="运单类型:" />
android:text="运单类型:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.awbName ?? bean.awbType}'
android:textSize="15sp"
tools:text="国际出港(直航)" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -255,12 +273,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="离港时间:" />
android:text="离港时间:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.fclose ?? ""}'
android:textSize="15sp"
tools:text="2024-05-13 17:10:22" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

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

View File

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

View File

@@ -51,13 +51,15 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:" />
android:text="运单号:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
tools:text="78109081212" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -73,12 +75,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配件数:" />
android:text="预配件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp"
tools:text="10" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -94,12 +98,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配重量:" />
android:text="预配重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf((int)bean.weight)}'
android:textSize="15sp"
tools:text="100" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -115,12 +121,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库件数:" />
android:text="入库件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInPc)}'
android:textSize="15sp"
tools:text="11" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -136,12 +144,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库重量:" />
android:text="入库重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInWeight)}'
android:textSize="15sp"
tools:text="12" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -165,12 +175,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="代理人:" />
android:text="代理人:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.agentCode}'
android:textSize="15sp"
tools:text="顺丰" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -186,12 +198,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="特码:" />
android:text="特码:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.spCode}'
android:textSize="15sp"
tools:text="NOR" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -207,12 +221,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收运人:" />
android:text="收运人:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.userName}'
android:textSize="15sp"
tools:text="张三" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -228,12 +244,14 @@
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库时间:" />
android:text="入库时间:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.opDate}'
android:textSize="15sp"
tools:text="2024-02-16 09:12" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

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

View File

@@ -29,12 +29,11 @@
<!-- 选项 - 圆形checkbox -->
<ImageView
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_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
app:tint="@color/color_66"
android:src="@drawable/radiobtn_unchecked_style" />
<!-- 分单号 (前缀-编号-H编号) -->

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,7 +27,7 @@
android:layout_height="20dp"
android:layout_gravity="center_vertical"
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" />
<!-- 库位号 -->

View File

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

View File

@@ -29,12 +29,11 @@
<!-- 选项 - 圆形checkbox -->
<ImageView
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_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
app:tint="@color/color_66"
android:src="@drawable/radiobtn_unchecked_style" />
<!-- 分单号 (前缀-编号-H编号) -->

View File

@@ -2,12 +2,14 @@ package com.lukouguoji.gjj.activity
import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityGjjManifestDetailsBinding
import com.lukouguoji.gjj.holder.GjjManifestPicViewHolder
import com.lukouguoji.gjj.viewModel.GjjManifestDetailsViewModel
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.ktx.noNull
@@ -21,17 +23,33 @@ class GjjManifestDetailsActivity :
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港舱单详情")
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
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()
}
companion object {
@JvmStatic
fun start(context: Context, id: String) {
fun start(context: Context, id: String, pic: String = "", originalPic: String = "") {
val starter = Intent(context, GjjManifestDetailsActivity::class.java)
.putExtra(Constant.Key.ID, id)
.putExtra(Constant.Key.PIC, pic)
.putExtra(Constant.Key.ORIGINAL_PIC, originalPic)
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.router.ARouterConstants
@Deprecated("旧的实现")
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_MANIFEST)
class GjjManifestListActivity :
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.router.ARouterConstants
@Deprecated("旧版国际进港查询详情,使用 IntImpQueryDetailsActivity 替代")
// @Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO) // 已替换为 IntImpQueryDetailsActivity
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.util.*
@Deprecated("旧版国际进港查询列表,使用 IntImpQueryActivity 替代")
//@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST)
class GjjQueryListActivity : BaseActivity(), View.OnClickListener {
private val currentTitleName = "国际进港查询"

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.gjj.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.text.InputType
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
@@ -26,8 +27,8 @@ class IntImpAccidentVisaEditActivity :
// 航班号:大写字母+数字
binding.fnoInput.et.setUpperCaseAlphanumericFilter()
// 运单号:大写字母+数字
binding.wbNoInput.et.setUpperCaseAlphanumericFilter()
// 运单号:纯数字11位
binding.wbNoInput.et.inputType = InputType.TYPE_CLASS_NUMBER
viewModel.rv = binding.rv
binding.rv.addOnItemClickListener(viewModel)

View File

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

View File

@@ -3,14 +3,20 @@ package com.lukouguoji.gjj.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpManifestDetailsBinding
import com.lukouguoji.gjj.holder.GjjManifestPicViewHolder
import com.lukouguoji.gjj.viewModel.IntImpManifestDetailsViewModel
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.common.Constant
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("进港舱单详情")
binding.viewModel = viewModel
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 {

View File

@@ -49,7 +49,7 @@ class IntImpManifestSubEditActivity :
Intent(context, IntImpManifestSubEditActivity::class.java)
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
.putExtra(Constant.Key.BEAN, manifest)
.putExtra(KEY_MAIN_PC, manifest.pc)
.putExtra(KEY_MAIN_PC, manifest.totalPc)
.putExtra(KEY_MAIN_WEIGHT, manifest.weight)
.putExtra(KEY_OTHER_SUB_PC, otherSubPc)
.putExtra(KEY_OTHER_SUB_WEIGHT, otherSubWeight)
@@ -70,7 +70,7 @@ class IntImpManifestSubEditActivity :
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
.putExtra(Constant.Key.BEAN, manifest)
.putExtra("haWb", haWb)
.putExtra(KEY_MAIN_PC, manifest.pc)
.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.ktx.addOnItemClickListener
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
/**
@@ -53,6 +55,11 @@ class IntImpQueryActivity :
if (visible) showFilterPanel() else hideFilterPanel()
}
// 航班号:大写字母+数字
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter()
// 始发港:仅大写字母
binding.filterPanel.filterOrigin.et.setUpperCaseLetterFilter()
viewModel.refresh()
}

View File

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

View File

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

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

View File

@@ -1,10 +1,8 @@
package com.lukouguoji.gjj.holder
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.databinding.ItemIntImpStorageUseSubBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.bean.GjcStorageUse
/**
@@ -19,27 +17,10 @@ class IntImpStorageUseSubViewHolder(view: View) :
binding.position = position
binding.executePendingBindings()
// 单选框点击切换选择状态(反向联动主列表)
// 单选框点击切换选择状态
binding.ivCheckbox.setOnClickListener {
// 切换子列表项的选择状态
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
bean.checked.set(!bean.checked.get())
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.executePendingBindings()
// 图标点击切换选择状态(联动子列表)
// 图标点击切换选择状态
binding.ivIcon.setOnClickListener {
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
// 联动勾选/取消所有子列表项
bean.storageUseList?.forEach { storageUse ->
storageUse.checked.set(newCheckedState)
}
bean.checked.set(!bean.checked.get())
binding.executePendingBindings()
binding.rvSub.adapter?.notifyDataSetChanged()
}
// 展开按钮点击事件

View File

@@ -1,7 +1,6 @@
package com.lukouguoji.gjj.holder
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.databinding.ItemIntImpTallySubBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjjImportTally
@@ -18,26 +17,10 @@ class IntImpTallySubViewHolder(view: View) :
binding.position = position
binding.executePendingBindings()
// 单选框点击切换选择状态(反向联动主列表
// 单选框点击切换选择状态(独立选择,不联动主
binding.ivCheckbox.setOnClickListener {
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
bean.checked.set(!bean.checked.get())
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.executePendingBindings()
// 选中图标点击 - 切换选择状态(联动子列表
// 选中图标点击 - 切换选择状态(独立选择,不联动分单
binding.ivIcon.setOnClickListener {
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
// 联动勾选/取消所有子列表项
bean.haWbList?.forEach { sub ->
sub.checked.set(newCheckedState)
}
bean.checked.set(!bean.checked.get())
binding.executePendingBindings()
binding.rvSub.adapter?.notifyDataSetChanged()
}
// 整个内容区域点击 - 跳转到详情页

View File

@@ -32,6 +32,10 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 舱单ID编辑时使用
var mfId: Long = 0
// 编号和前缀(编辑时使用)
var no: String = ""
var prefix: String = ""
// 航班ID
var fid: String = ""
@@ -153,51 +157,13 @@ class GjjManifestAddViewModel : BaseViewModel() {
val specialCodeList = MutableLiveData<List<KeyValue>>()
val specialCode = MutableLiveData("")
// 货物类型
val goodsTypeList = MutableLiveData<List<KeyValue>>()
// 货物类型(无下拉列表,仅用于编辑模式回传)
val goodsType = MutableLiveData("")
// 运单类型
val waybillTypeList = MutableLiveData<List<KeyValue>>()
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获取参数
*/
@@ -235,6 +201,71 @@ class GjjManifestAddViewModel : BaseViewModel() {
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)
}
}
}
/**
@@ -244,9 +275,11 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 保存舱单ID
mfId = manifest.mfId
fid = manifest.fid.toString()
no = manifest.no
prefix = manifest.prefix
// 填充表单字段
waybillNo.value = manifest.wbNo
waybillNo.value = manifest.getWaybillNo()
waybillNum.value = manifest.totalPc.toString()
actualNum.value = manifest.pc.toString()
actualWeight.value = manifest.weight.toString()
@@ -272,9 +305,11 @@ class GjjManifestAddViewModel : BaseViewModel() {
*/
private fun loadManifestFromImportBean(manifest: com.lukouguoji.module_base.bean.GjjImportManifest) {
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()
actualNum.value = manifest.pc.toString()
actualWeight.value = manifest.weight.toString()
@@ -324,7 +359,10 @@ class GjjManifestAddViewModel : BaseViewModel() {
|| verifyWaybillNo(waybillNo.value)
|| agent.value.verifyNullOrEmpty("请选择代理")
|| waybillNum.value.verifyNullOrEmpty("请输入运单件数")
|| actualNum.value.verifyNullOrEmpty("请输入实到件数")
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|| billingWeight.value.verifyNullOrEmpty("请输入计费重量")
|| goodsNameCn.value.verifyNullOrEmpty("请输入品名(中)")
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|| waybillType.value.verifyNullOrEmpty("请选择运单类型")
|| businessType.value.verifyNullOrEmpty("请选择业务类型")
@@ -335,8 +373,9 @@ class GjjManifestAddViewModel : BaseViewModel() {
return
}
val params = mapOf(
"mfId" to if (pageType.value == DetailsPageType.Modify) mfId else null,
val isModify = pageType.value == DetailsPageType.Modify
val paramsMap = mutableMapOf<String, Any?>(
"fid" to fid,
"wbNo" to waybillNo.value,
"agentCode" to agent.value,
@@ -346,19 +385,30 @@ class GjjManifestAddViewModel : BaseViewModel() {
"pc" to actualNum.value,
"weight" to actualWeight.value,
"cashWeight" to billingWeight.value,
"packageType" to packageType.value,
"origin" to departure.value,
"dest" to destination.value,
"goods" to goodsNameEn.value,
"goodsCn" to goodsNameCn.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({
if (pageType.value == DetailsPageType.Modify) {
if (isModify) {
NetApply.api.gjjManifestUpdate(params)
} else {
NetApply.api.gjjManifestInsert(params)
@@ -366,7 +416,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
}) {
onSuccess = {
if (it.verifySuccess()) {
val successMsg = if (pageType.value == DetailsPageType.Modify) "修改成功" else "保存成功"
val successMsg = if (isModify) "修改成功" else "保存成功"
showToast(successMsg)
// 发送刷新事件

View File

@@ -3,6 +3,7 @@ package com.lukouguoji.gjj.viewModel
import android.view.View
import androidx.lifecycle.MutableLiveData
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.interfaces.IGetData
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.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DictUtils
import com.lukouguoji.module_base.util.MediaUtil
import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils
@@ -20,6 +22,13 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
var id = ""
var fid = ""
var no = ""
var prefix = ""
var pic = ""
var originalPic = ""
// 交接图片列表
val picList = MutableLiveData<List<FileBean>>(emptyList())
// 是否修改状态
var modifyAble = MutableLiveData(false)
@@ -88,6 +97,7 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
///////////////////////////////////////////////////////////////////////////
override fun getData() {
parsePicList()
showLoading()
launchCollect({
NetApply.api.getGjjManifestDetail(id)
@@ -95,6 +105,8 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
onSuccess = { result ->
result.data?.let { data ->
fid = data.fid.toString()
no = data.no
prefix = data.prefix
waybillNo.value = data.getWaybillCode().noNull()
waybillNum.value = data.awbpc.toString()
actualNum.value = data.pc.toString()
@@ -107,6 +119,14 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
remark.value = data.remark.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) {
agentList.postValue(it)
}
@@ -207,6 +227,8 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
mapOf(
"mfId" to id,
"fid" to fid,
"no" to no,
"prefix" to prefix,
"wbNo" to waybillNo.value,
"agent" to agent,
"spCode" to specialCode,
@@ -248,4 +270,21 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
fun onCancelClick(view: View) {
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 -> {
GjjManifestDetailsActivity.start(DevUtils.getTopActivity(), bean.mfId)
GjjManifestDetailsActivity.start(DevUtils.getTopActivity(), bean.mfId, bean.pic, bean.originalPic)
}
R.id.tv_delete -> {

View File

@@ -65,6 +65,51 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
} else null
} ?: emptyList()
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,
consignorAddress = formBean.consignorAddress,
// 危险品信息
dgrContactMame = formBean.dgrContactMame,
dgrContactName = formBean.dgrContactName,
dgrContactNumber = formBean.dgrContactNumber,
unNumber = formBean.unNumber
)

View File

@@ -14,7 +14,7 @@ import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
import com.lukouguoji.module_base.impl.ImageSelectNewViewHolder
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.formatDate
@@ -23,6 +23,8 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast
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.util.MediaUtil
import com.lukouguoji.module_base.util.UploadUtil
@@ -49,8 +51,8 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
val dataBean = MutableLiveData(GjAccidentVisaEditBean())
// 图片列表
val itemLayoutId = R.layout.item_image_select
val itemViewHolder = ImageSelectViewHolder::class.java
val itemLayoutId = R.layout.item_image_select_new
val itemViewHolder = ImageSelectNewViewHolder::class.java
var rv: RecyclerView? = null
// 下拉列表
@@ -71,6 +73,8 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
// 是否为详情模式(只读)
val isDetailMode = MutableLiveData(false)
// 详情模式下无图片时显示占位提示
val showNoImage = MutableLiveData(false)
fun initOnCreate(intent: Intent) {
id = intent.getLongExtra(Constant.Key.ID, 0)
@@ -140,20 +144,24 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
onSuccess = {
dataBean.value = it.data ?: GjAccidentVisaEditBean()
// 渲染图片
// 渲染图片path 取原图 URL 确保预览清晰url 取缩略图用于提交
val bean = dataBean.value!!
val picList = bean.pic.split(",")
.filter { url -> url.isNotEmpty() }
.map { url -> FileBean(MediaUtil.fillUrl(url), url) }
val originalList = bean.originalPic.split(",")
.filter { url -> url.isNotEmpty() }
.map { url -> FileBean(MediaUtil.fillUrl(url)) }
for ((index, fileBean) in picList.withIndex()) {
if (index < originalList.size) {
picList[index].originalPic = originalList[index].path
}
val picList = bean.pic.split(",").filter { it.isNotEmpty() }
val originalList = bean.originalPic.split(",").filter { it.isNotEmpty() }
val images = picList.mapIndexed { index, picUrl ->
val originalUrl = originalList.getOrElse(index) { picUrl }
FileBean(
path = MediaUtil.fillUrl(originalUrl),
url = picUrl,
originalPic = originalUrl
)
}
rv?.commonAdapter()?.loadMore(images)
// 详情模式下无图片时显示占位提示
if (isDetailMode.value == true && picList.isEmpty()) {
showNoImage.value = true
}
rv?.commonAdapter()?.loadMore(picList)
}
}
}
@@ -164,13 +172,23 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
fun onFlightDateInputComplete() {
lastQueriedFlight = ""
clearFlightInfo()
queryFlightIfReady()
}
fun onFlightNoInputComplete() {
lastQueriedFlight = ""
clearFlightInfo()
queryFlightIfReady()
}
private fun clearFlightInfo() {
val b = dataBean.value ?: GjAccidentVisaEditBean()
b.dep = ""
b.dest = ""
dataBean.value = b
}
private fun queryFlightIfReady() {
val bean = dataBean.value ?: return
val fdate = bean.fdate
@@ -219,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() {
val bean = dataBean.value ?: return
if (bean.fdate.verifyNullOrEmpty("请输入航班日期")) return
if (bean.fno.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())
.asFlow()
@@ -231,8 +277,10 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
.filter { it.path.isNotEmpty() && it.url.isEmpty() }
.onEach {
val data = UploadUtil.upload(it.path).data
it.url = data?.newName ?: ""
it.originalPic = data?.zipFileName ?: ""
// UploadUtil 返回newName=原图(较大)zipFileName=缩略图(较小)
// FileBean.url 用作缩略图标识FileBean.originalPic 用作原图标识
it.url = data?.zipFileName ?: ""
it.originalPic = data?.newName ?: ""
}
.flowOn(Dispatchers.IO)
.onStart { showLoading() }
@@ -245,12 +293,15 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
val list = (rv?.commonAdapter()?.items as List<FileBean>)
.filter { it.path.isNotEmpty() }
bean.picNumber = list.size.toString()
bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) }
bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) }
bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) }
bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) }
bean.idFlag = "1"
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 {
NetApply.api.modifyGjAccidentVisa(bean.toRequestBody())
}

View File

@@ -37,7 +37,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
val wbNo = MutableLiveData("") // 运单号
// ========== 航班查询 ==========
private var fid: String = ""
private var lastQueriedFlight = ""
// ========== 统计信息 ==========
@@ -91,7 +90,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
onSuccess = {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
fid = flight.fid.noNull()
fdest.value = flight.fdest.noNull()
val list = mutableListOf(
@@ -103,7 +101,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
fdepList.value = list
fdep.value = flight.fdep.noNull()
} else {
fid = ""
fdest.value = ""
fdepList.value = emptyList()
fdep.value = ""
@@ -112,7 +109,6 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
}
onFailed = { _, _ ->
fid = ""
fdest.value = ""
fdepList.value = emptyList()
fdep.value = ""
@@ -177,17 +173,13 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
}
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 },
"fdest" to fdest.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(
"pageNum" to pageModel.page,

View File

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

View File

@@ -120,7 +120,7 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
val totalSubPc = otherSubPc + currentPc
val totalSubWeight = otherSubWeight + currentWeight
mainSubCheck.value = "${totalSubPc}/${mainPc} ${formatWeight(totalSubWeight)}/${formatWeight(mainWeight)}KG"
mainSubCheck.value = "${totalSubPc}/${mainPc} ${formatWeight(totalSubWeight)}/${formatWeight(mainWeight)}KG"
// 件数或重量任一超过主单则校验不通过
isCheckValid.value = totalSubPc <= mainPc && totalSubWeight <= mainWeight

View File

@@ -9,6 +9,7 @@ import com.lukouguoji.gjj.activity.GjjManifestAddActivity
import com.lukouguoji.gjj.activity.IntImpManifestSubEditActivity
import com.lukouguoji.gjj.holder.IntImpManifestViewHolder
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.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
@@ -63,30 +64,40 @@ class IntImpManifestViewModel : BasePageViewModel() {
lastQueriedFlight = key
launchCollect({
NetApply.api.getGjFlightBean(
NetApply.api.searchFlightList(
mapOf(
"fdate" to fdate,
"fno" to fno,
"ieFlag" to "I",
"status" to "1",
).toRequestBody()
)
}) {
onSuccess = {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
fid = flight.fid.noNull()
fdep = flight.fdep.noNull()
fdest.value = flight.fdest.noNull()
if (it.verifySuccess() && !it.data.isNullOrEmpty()) {
val dataList = it.data!!
if (dataList.size > 1) {
showToast("存在多个航班记录,请核实")
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经停港
val list = mutableListOf(
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
)
if (!flight.jtz.isNullOrEmpty()) {
list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull()))
// 构建始发站下拉列表fdep + jtz经停港
val list = mutableListOf(
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
)
if (!flight.jtz.isNullOrEmpty()) {
list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull()))
}
sendAddressList.value = list
sendAddress.value = flight.fdep.noNull()
}
sendAddressList.value = list
sendAddress.value = flight.fdep.noNull()
} else {
fid = ""
fdep = ""
@@ -121,18 +132,6 @@ class IntImpManifestViewModel : BasePageViewModel() {
// ========== 分单管理模式 ==========
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 itemLayoutId = R.layout.item_int_imp_manifest
@@ -144,6 +143,19 @@ class IntImpManifestViewModel : BasePageViewModel() {
fun searchClick() {
val fdate = flightDate.value
val fno = flightNo.value
// 校验航班号必填
if (fno.isNullOrEmpty()) {
showToast("请输入航班号")
return
}
// 校验始发站、目的站是否已查询到
if (sendAddress.value.isNullOrEmpty() || fdest.value.isNullOrEmpty()) {
showToast("请先查询航班信息,获取始发站和目的站")
return
}
if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) {
val key = "$fdate-$fno"
if (key != lastQueriedFlight || fid.isEmpty()) {
@@ -194,10 +206,6 @@ class IntImpManifestViewModel : BasePageViewModel() {
} else {
refresh()
}
} else {
fid = ""
fdep = ""
refresh()
}
}
@@ -303,7 +311,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
message = "确定要删除运单号 ${bean.getWaybillNo()} 的舱单吗?",
title = "提示"
) {
doDeleteByIds(listOf(bean.mfId))
doDelete(listOf(bean), emptyList())
}.show()
}
@@ -312,37 +320,67 @@ class IntImpManifestViewModel : BasePageViewModel() {
*/
fun onDeleteClick() {
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("请选择要删除的记录")
return
}
// 构建确认提示信息
val msgParts = mutableListOf<String>()
if (selectedManifests.isNotEmpty()) {
msgParts.add("${selectedManifests.size} 条主单")
}
if (selectedHawbs.isNotEmpty()) {
msgParts.add("${selectedHawbs.size} 条分单")
}
ConfirmDialogModel(
message = "确定要删除选中的 ${selectedItems.size} 条舱单吗?",
message = "确定要删除选中的 ${msgParts.joinToString("和")} 吗?",
title = "批量删除确认"
) {
doDeleteByIds(selectedItems.map { it.mfId })
doDelete(selectedManifests, selectedHawbs)
}.show()
}
/**
* 执行批量删除(统一接口,请求体为 mfId 数组
* 执行删除:先删分单,再删主单(串行执行
*/
private fun doDeleteByIds(mfIds: List<Long>) {
launchLoadingCollect({ NetApply.api.gjjManifestDeleteBatch(mfIds.toRequestBody()) }) {
onSuccess = {
if (it.verifySuccess()) {
showToast("删除成功")
isAllChecked.value = false
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
private fun doDelete(manifests: List<GjjManifest>, hawbs: List<GjjHaWb>) {
viewModelScope.launch {
try {
showLoading()
// 第一步:删除分单(如果有选中的分单)
if (hawbs.isNotEmpty()) {
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()
}
}
}

View File

@@ -2,6 +2,7 @@ package com.lukouguoji.gjj.viewModel
import android.app.Activity
import android.content.Intent
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.activity.IntImpQueryEditActivity
@@ -71,6 +72,20 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
val businessType = 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.module_base.base.BasePageViewModel
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.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply
@@ -185,13 +186,13 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
/**
* 执行出库操作
*/
fun performOutStorage(maWbListForOutStorage: List<GjcMaWb>) {
if (maWbListForOutStorage.isEmpty()) {
fun performOutStorage(storageUseList: List<GjcStorageUse>) {
if (storageUseList.isEmpty()) {
showToast("请选择要出库的库位")
return
}
val params = maWbListForOutStorage.toRequestBody()
val params = storageUseList.toRequestBody()
launchLoadingCollect({ NetApply.api.outIntImpStorage(params) }) {
onSuccess = {
@@ -229,9 +230,13 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
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 = {
showToast("入库成功")
viewModelScope.launch {

View File

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

View File

@@ -207,7 +207,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/actualNumInput"
hint='@{"请输入实到件数"}'
required="@{false}"
required="@{true}"
title='@{"实到件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
@@ -242,7 +242,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/billingWeightInput"
hint='@{"请输入计费重量"}'
required="@{false}"
required="@{true}"
title='@{"计费重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
@@ -253,7 +253,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入品名(中)"}'
required="@{false}"
required="@{true}"
title='@{"品名(中)"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"

View File

@@ -432,6 +432,25 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginRight="15dp"
android:gravity="center_vertical">
<TextView
style="@style/tv_manifest_details_label_no_mi"
android:text="交接图片:" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_pic"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</androidx.appcompat.widget.LinearLayoutCompat>
<View
android:layout_width="0dp"
android:layout_height="0dp"

View File

@@ -260,7 +260,7 @@
title='@{"名称"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.dgrContactMame}' />
value='@={viewModel.dataBean.dgrContactName}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"

View File

@@ -185,7 +185,7 @@
title='@{"复称重量"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.reweight}' />
value='@={viewModel.dataBean.reWeight}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
@@ -262,7 +262,7 @@
title='@{"不正常类型"}'
titleLength="@{6}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.problem}' />
value='@={viewModel.dataBean.kdamage}' />
</LinearLayout>
@@ -318,30 +318,51 @@
</LinearLayout>
<!-- 图片区域label 在左,图片在右 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginStart="4dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_image_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text='@{viewModel.isDetailMode ? "图片" : "上传图像"}'
android:textColor="@color/text_gray"
completeSpace="@{6}" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="10dp"
android:overScrollMode="never"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="9"
tools:listitem="@layout/item_image_select_new" />
</LinearLayout>
<!-- 详情模式下无图片时的占位提示 -->
<TextView
android:id="@+id/tv_no_image"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="暂无图片"
android:textColor="@color/text_gray"
android:textSize="14sp"
android:visibility="@{viewModel.showNoImage ? View.VISIBLE : View.GONE}" />
</LinearLayout>
<!-- 图像区域标题(详情模式无图片时隐藏) -->
<TextView
android:id="@+id/tv_image_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text='@{viewModel.isDetailMode ? "图片" : "上传图像"}'
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="4"
tools:listitem="@layout/item_image_select" />
<!-- 底部按钮(详情模式隐藏) -->
<LinearLayout
android:layout_width="match_parent"

View File

@@ -211,7 +211,7 @@
title='@{"业务类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.businessType}'
value='@{viewModel.dataBean.businessName}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
@@ -263,25 +263,14 @@
android:textColor="@color/text_gray"
android:textSize="14sp" />
<LinearLayout
android:id="@+id/ll_images"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_pic"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="14dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:minHeight="80dp"
android:orientation="horizontal">
<!-- 交接图片区域预留,后续对接图片数据 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂无图片"
android:textColor="@color/text_gray"
android:textSize="12sp" />
</LinearLayout>
android:orientation="horizontal" />
</LinearLayout>

View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
@@ -114,13 +115,26 @@
android:padding="2dp"
android:src="@drawable/img_search" />
<ImageView
<FrameLayout
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.filterClick()}"
android:padding="5dp"
android:src="@drawable/img_filter" />
android:layout_marginLeft="16dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:onClick="@{()-> viewModel.filterClick()}"
android:padding="5dp"
android:src="@drawable/img_filter" />
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_gravity="top|end"
android:background="@drawable/bg_red_dot"
android:visibility="@{viewModel.hasFilter ? View.VISIBLE : View.GONE}" />
</FrameLayout>
</LinearLayout>

View File

@@ -148,20 +148,10 @@
title='@{"品名(中)"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.goodsCn}'
value='@{viewModel.dataBean.goods}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"品名(英)"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.goodsEn}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="2" />
</LinearLayout>

View File

@@ -83,7 +83,7 @@
title='@{"运单件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.maWbData.get("pc") != null ? String.valueOf((int)Math.round(((Double)viewModel.maWbData.get("pc")))) : ``}' />
value='@{viewModel.maWbData.get("awbPc") != null ? String.valueOf((int)Math.round(((Double)viewModel.maWbData.get("awbPc")))) : ``}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
@@ -93,7 +93,7 @@
title='@{"运单重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.maWbData.get("weight") != null ? String.valueOf(viewModel.maWbData.get("weight")) : ``}' />
value='@{viewModel.maWbData.get("awbWeight") != null ? String.valueOf(viewModel.maWbData.get("awbWeight")) : ``}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"

View File

@@ -64,7 +64,7 @@
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="运单号:"
android:textColor="@color/weak_grey"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
@@ -72,6 +72,7 @@
android:layout_height="wrap_content"
android:text="@{bean.waybillCode}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -84,12 +85,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="始发站:" />
android:text="始发站:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.origin}" />
android:text="@{bean.origin}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -101,12 +104,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="目的港:" />
android:text="目的港:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.dest}" />
android:text="@{bean.dest}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -118,12 +123,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="代理:" />
android:text="代理:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.agent}" />
android:text="@{bean.agent}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -135,12 +142,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="运单件数:" />
android:text="运单件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.awbpc + ""}' />
android:text='@{bean.awbpc + ""}'
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -160,12 +169,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="实到件数:" />
android:text="实到件数:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.pc + ""}' />
android:text='@{bean.pc + ""}'
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -177,12 +188,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="实到重量:" />
android:text="实到重量:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.weight + ""}' />
android:text='@{bean.weight + ""}'
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -194,12 +207,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="特码:" />
android:text="特码:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.spCode}" />
android:text="@{bean.spCode}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -211,12 +226,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="业务类型:" />
android:text="业务类型:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.businessType}" />
android:text="@{bean.businessType}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -228,12 +245,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="品名:" />
android:text="品名:"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.goods}" />
android:text="@{bean.goods}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -246,9 +265,9 @@
<ImageView
android:id="@+id/iv_show"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_marginTop="10dp"
android:padding="5dp"
android:layout_height="18dp"
android:layout_marginBottom="5dp"
android:padding="4dp"
android:src="@mipmap/img_down" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -0,0 +1,19 @@
<?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>
<ImageView
android:id="@+id/iv_thumbnail"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginEnd="8dp"
android:scaleType="centerCrop" />
</layout>

View File

@@ -52,13 +52,14 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="运单号:"
android:textColor="@color/weak_grey"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.waybillNo}"
android:textColor="@color/colorPrimary"
android:textStyle="bold" />
@@ -73,11 +74,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="件数:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.pc}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -90,11 +93,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="重量:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.weight}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -107,11 +112,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="代理:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.agent}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -124,10 +131,12 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="理货状态:" />
<TextView
android:layout_width="wrap_content"
android:textSize="15sp"
android:textColor="@color/green"
android:layout_height="wrap_content"
android:text="@{bean.tallyStatus}" />
@@ -150,11 +159,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="航班:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.dateFlightNo}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -167,11 +178,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="始发站:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.origin}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -184,11 +197,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="特码:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.spCode}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -201,11 +216,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="业务类型:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.businessType}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -218,11 +235,13 @@
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="品名(中)" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.goods}" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -74,12 +74,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="运单号:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{manifest.wbNo}"
android:textColor="@color/colorPrimary"
android:textStyle="bold" />
@@ -90,18 +92,20 @@
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:layout_weight="0.6"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="状态:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{manifest.mftStatus ?? ``}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -110,18 +114,20 @@
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:layout_weight="0.6"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="代理:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{manifest.agentCode ?? ``}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -136,12 +142,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="件数:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{String.valueOf((int)manifest.pc)}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -156,12 +164,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="重量:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{String.valueOf((int)manifest.weight)}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -184,12 +194,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="航班信息:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{manifest.getFlightSplit()}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -198,18 +210,20 @@
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:layout_weight="0.6"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="始发站:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{manifest.fdep ?? ``}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -218,18 +232,20 @@
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:layout_weight="0.6"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="目的站:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{manifest.fdest ?? ``}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -244,12 +260,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="运单类型:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{manifest.awbTypeName ?? ``}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -264,12 +282,14 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="分单数:" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{String.valueOf(manifest.haWbNum)}" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -292,8 +312,9 @@
<ImageView
android:id="@+id/iv_show"
android:layout_width="match_parent"
android:layout_height="20dp"
android:padding="5dp"
android:layout_height="18dp"
android:layout_marginBottom="5dp"
android:padding="4dp"
android:src="@mipmap/img_down"
visible="@{bean.haWbList != null &amp;&amp; !bean.haWbList.empty}" />

View File

@@ -70,58 +70,58 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="航班日期:"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.fdate}"
android:textSize="16sp" />
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 始发站 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="始发站:"
android:textSize="15sp"
completeSpace="@{4}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.dep}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 运单总件数 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="始发站:"
android:textSize="16sp"
completeSpace="@{4}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.fdep}"
android:textSize="16sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 运单总件数 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单总件数:"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{6}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.totalPc)}"
android:textSize="16sp" />
android:text="@{String.valueOf(bean.pc)}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -136,14 +136,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="不正常件数:"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{6}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.abnPc)}"
android:textSize="16sp" />
android:text="@{String.valueOf(bean.dpc)}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -158,8 +158,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textColor="@color/colorPrimary"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
@@ -167,7 +166,7 @@
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="16sp" />
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -191,58 +190,58 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="航班号:"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.fno}"
android:textSize="16sp" />
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 目的站 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="目的站:"
android:textSize="15sp"
completeSpace="@{4}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.dest}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 运单总重量 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="目的站:"
android:textSize="16sp"
completeSpace="@{4}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.fdest}"
android:textSize="16sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 运单总重量 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单总重量:"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{6}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.totalWeight)}"
android:textSize="16sp" />
android:text="@{String.valueOf(bean.weight)}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -257,14 +256,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="经办人:"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{6}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.opName}"
android:textSize="16sp" />
android:text="@{bean.opId}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
@@ -279,14 +278,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="经办时间:"
android:textSize="16sp"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.opDate}"
android:textSize="16sp" />
android:text="@{bean.opdate}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -19,7 +19,8 @@
android:id="@+id/swipe_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp">
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp">
<!-- 主内容区域 -->
<LinearLayout
@@ -27,7 +28,7 @@
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal"
android:padding="15dp"
android:padding="10dp"
android:gravity="center_vertical">
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
@@ -67,15 +68,14 @@
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="运单号:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.getWaybillNo()}"
android:textColor="@color/colorPrimary"
android:textSize="18sp"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
@@ -93,15 +93,13 @@
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="始发站:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.origin}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
</LinearLayout>
@@ -118,15 +116,13 @@
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="ULD编号"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.locationMft}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
</LinearLayout>
@@ -143,15 +139,13 @@
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="总件数:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.totalPc)}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
</LinearLayout>
@@ -168,15 +162,13 @@
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="件数:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
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" />
android:textSize="15sp" />
</LinearLayout>
@@ -203,15 +195,13 @@
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="品名:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.goodsCn}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
</LinearLayout>
@@ -228,15 +218,13 @@
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="代理:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.agentCode}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
</LinearLayout>
@@ -253,15 +241,13 @@
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="库位号:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.location}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:text="@{bean.locationTally}"
android:textSize="15sp" />
</LinearLayout>
@@ -278,15 +264,13 @@
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="重量:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
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" />
android:textSize="15sp" />
</LinearLayout>
@@ -303,15 +287,13 @@
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="计费重量:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.cashWeight)}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
android:textSize="15sp" />
</LinearLayout>

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