Compare commits

..

70 Commits

Author SHA1 Message Date
6c4e97945b feat: fix form 2026-03-20 15:30:12 +08:00
a663609eeb feat: input required check 2026-03-20 15:18:56 +08:00
74e9f5a827 feat: reset status dialog 2026-03-20 15:09:27 +08:00
d6f72186a3 feat: opt views 2026-03-20 12:46:52 +08:00
b2ea79512c feat: fix issues 2026-03-19 18:31:40 +08:00
8b666364ae feat: opt form 2026-03-18 22:36:05 +08:00
aac2c860c6 feat: opt ui 2026-03-18 20:54:13 +08:00
c2b5e74156 feat: opt uld mgr 2026-03-18 16:18:57 +08:00
093314d601 feat: ii visa add/edit 2026-03-17 11:38:15 +08:00
9b089d51b1 feat: 国际事故签证新增/编辑页面及列表侧滑菜单
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 11:37:26 +08:00
8ced5be7a9 feat: fix issues 2026-03-16 18:29:02 +08:00
da50aa9794 fix: 事故签证列表页新增/删除按钮间距和padding修正
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:53:16 +08:00
47cef6ee59 feat: 国际进港查询运单修改页面及列表侧滑菜单
- 新增运单修改页面(编辑表单:代理人/特码/包装类型/运单类型/锁定状态/备注)
- 查询列表添加侧滑"修改"按钮入口
- 详情和修改页接口传参改用 prefix+no
- 详情页和修改页移除"库位"表单项
- 仓库信息入库时间取值改为 opDate

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 12:18:35 +08:00
baaa9c5615 feat: 国际进港查询详情页面(三Tab:运单/仓库/库位信息)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 11:34:20 +08:00
edb1f576b7 fix: 国际进港查询列表运单号自动查询及字段布局修正
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 10:59:53 +08:00
8b0043d2f5 fix: 国际进港出库列表页面优化及交互完善
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:52:42 +08:00
5ccb971c61 feat: 国际进港提取记录费用修改页面及列表侧滑菜单
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:13:45 +08:00
6278d9738d fix: 提取记录清除提货弹框改用自定义ConfirmDialogModel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:49:30 +08:00
0b25e9c68c fix: 国际进港提取记录接口路径及字段对齐后端优化
- API路径 IntImpPickUpRecord/* 修正为 IntImpPickup/*
- Bean字段名全部对齐后端schema(checkWeight→cashWeight等)
- 请求参数名修正(paymentDateStart→beginDate, pageNum→page等)
- 缴费日期起默认值设为当天
- 详情页改为携带列表数据,不再调用接口
- 运单号搜索框添加autoQuery自动查询
- 列表项布局按规范优化(箭头、列宽、completeSpace对齐)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:43:06 +08:00
a4095d6e72 fix: 国际进港仓库接口路径修复及操作逻辑优化
- API路径从 IntImpStorageUse 修正为 IntImpStorage
- 清仓/入库接口参数改为 Query + Body 分离传递
- 清仓/出库/入库支持勾选运单号全选所有库位
- 出库确认弹框改为自定义 ConfirmDialogModel
- 搜索增加清仓综合结果筛选参数

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:06:07 +08:00
d31e78ff49 feat: 国际进港理货报告四个操作按钮功能实现
实现人工放行、状态重置、删除理货、理货申报四个按钮的完整业务逻辑,
新增删除申报和状态重置弹框组件,对接后端API接口。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:44:19 +08:00
43b1b6f44f feat: opt claude conf 2026-03-13 12:25:22 +08:00
f4d5904003 feat: 国际进港理货报告详情页面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:23:09 +08:00
4b3c31252b feat: 国际进港理货报告展开子单功能及舱单展开优化
- 理货报告列表增加展开分单功能(嵌套子列表、全选联动)
- 运单号搜索框增加自动查询(4位触发)
- 舱单/理货展开查询传递完整主单参数
- 统一空数据展示为"暂无分单数据"UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:08:29 +08:00
f61302a1f6 feat: 国际进港舱单分单新增与编辑页面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:32:10 +08:00
a64b963d03 feat: 国际进港舱单详情页面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:49:42 +08:00
634dd96ac6 feat: 国际进港舱单货物发放改为库位选择弹框
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:19:41 +08:00
93939ed411 feat: 国际进港舱单增删改查接口对齐及交互优化
- 新增/编辑接口切换至新路径,删除统一使用批量删除接口
- 新增模式下航班日期、航班号等字段可编辑,支持航班级联查询自动填充
- 编辑模式下从列表页传入航班日期和航班号进行回显
- 修复编辑模式标题显示错误、航班号大写限制、DATE类型hint不显示等问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:51:18 +08:00
06d0244e24 fix: 国际进港装机单修改库位及入库接口修正
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:06:29 +08:00
f04cf81ff2 feat: 国际进港装机单编辑页面及列表侧滑优化
- 新增装机单编辑页面(Activity/ViewModel/布局)
- 装机单列表项添加侧滑编辑按钮,点击跳转编辑页
- 修复舱单列表项侧滑按钮未覆盖展开按钮的问题
- 修复装机单列表项两行同列completeSpace不一致

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:51:22 +08:00
d31a408ddc feat: dev 2026-03-09 19:40:55 +08:00
ce080f04a7 feat: 国际进港舱单货物发放、装机单查询参数对齐及运单号自动查询
- 实现货物发放功能,对接 /IntImpManifest/putUpCargo 接口
- 装机单列表查询参数改为与父页面一致(fid + fdep)
- 修复装机单列表接口返回类型(PageInfo 无需 BaseResultBean 包装)
- 舱单和装机单页面运单号输入框支持4位以上自动查询

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 19:38:01 +08:00
5a9dd6f97a refactor: 国际进港舱单列表项布局优化及分单按需加载
- 主列表项从4行改为2行5列标准KV布局
- 展开按钮移入白色卡片内,始终显示
- 分单数据改为点击展开时按需加载
- 子列表列宽调整,品名支持goodsCn优先显示
- 子列表所有列加单行省略号

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:47:43 +08:00
8c774ef3a3 refactor: 国际进港舱单列表改为通过FID查询
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 11:48:57 +08:00
af49cf4fb6 refactor: 国际进港原始舱单主子列表改为独立选择
移除主单↔分单勾选联动,改为独立选择模式;
提取公共方法 getSelectedItems() 分别收集选中的主单和分单;
补充信息操作仅校验主单选中状态;详情页品名字段增加中文品名回退逻辑。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 11:33:20 +08:00
76f55597db chore: 删除.playwright-mcp并加入gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:40:25 +08:00
fada4b3231 feat: enable mcp 2026-03-09 10:33:24 +08:00
15e13e8e12 feat: 国际进港原始舱单列表页优化
- 运单号搜索支持输入4位自动查询,带航班日期和航班号额外参数
- 自动查询框架扩展extraParamsProvider,向后兼容旧业务
- 展开按钮移入白色卡片内部,统一为单卡片四圆角
- 子列表品名字段支持goodsCn为空时fallback到goods
- 子列表调整列宽,品名列加大,其余列缩小并支持省略号截断

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:32:46 +08:00
03a6e75d68 feat: 新增日志查询页面及操作日志详情页
废弃旧日志查询页面,新建日志查询列表页和操作日志详情页。
详情页包含运单信息、流转状态进度条和操作详情时间线。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:55:21 +08:00
2729e18043 refactor: 航班详情页升级为PadDataLayoutNew组件并优化布局
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:11:25 +08:00
abac0d28fa feat: 新增航班管理列表页并支持时间格式化与跨日"+1"显示
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:56:05 +08:00
06713190e0 feat: 新增综合管理冷库登记功能页面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:31:35 +08:00
ff8185644b feat: 新增ULD管理功能页面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:11:55 +08:00
330b5bc28a feat: 国际进港新增事故签证功能页面
- 新建事故签证列表页(类型2:多选列表+批量删除)
- 搜索区支持航班日期/航班号级联查询始发站和目的站
- 对接 GjAccidentVisa/search 和 GjAccidentVisa/delete 接口
- 国际进港菜单添加"事故签证"入口

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:39:03 +08:00
1476f1368a feat: 国际进港新增提取出库和进港查询功能页面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:14:14 +08:00
b994f43bc7 feat: command & mcp 2026-03-08 15:24:46 +08:00
be3d633301 feat: opt claude config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:24:10 +08:00
ad6b7d17a5 feat: 国际进港装机单添加航班级联查询和入库/修改库位功能
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:23:23 +08:00
7413a8d159 feat: 国际进港舱单添加分单子列表展开/收起功能
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:05:36 +08:00
a1c53dd9fe feat: opt claude config 2026-03-06 14:18:11 +08:00
a60d59de83 feat: 国际进港原始舱单添加分单子列表展开/收起功能
- 主列表项下方新增可展开的分单子列表(淡绿色背景)
- 子列表展示10列字段:选项/分单号/件数/重量/申报状态/品名/申报次数/申报费率/删除次数/删除费率
- 搜索区域新增全部展开按钮,支持一键展开/收起所有分单
- 全选/取消全选联动子列表checkbox状态
- 主项选中时同步子列表选中,子项勾选时反向联动主项

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 14:17:20 +08:00
d0c7207b5a fix: 国际进港原始舱单补充信息改为批量保存模式
回滚列表项侧滑菜单,改为多选后点底部按钮进入补充信息页;
表单信息批量复制到所有选中单据后调用 complete 接口提交数组。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:35:23 +08:00
9406047a57 feat: new apifox mcp 2026-03-06 12:22:21 +08:00
b81d887b0b fix: 国际进港原始舱单列表项点击跳转详情页
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:21:37 +08:00
97ef9b4679 fix: 修复国际进港原始舱单接口解析及列表项布局规范
- API返回类型从BaseResultBean<PageInfo>改为PageInfo,匹配服务端实际响应
- GjjAirManifest字段maWbList重命名为maWb匹配JSON键名
- 列表项布局weight和completeSpace按国际出港规范对齐
- 移除页面初始自动加载,需用户输入航班号后手动查询
- CLAUDE.md补充列表项布局规范及常用字段weight参考表

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:06:20 +08:00
2efe322fcf fix: 移除国际进港舱单和电报解析页面重复的初始刷新调用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:38:26 +08:00
41fc2f4558 refactor: 电报解析列表整卡点击跳转及调试菜单切换至国际进港
- 电报解析列表项整个卡片可点击跳转详情,勾选框除外
- 开发调试自动跳转目标从国际出港改为国际进港
- 重构调试开关为通用配置,支持一键关闭和切换目标菜单

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:27:47 +08:00
f628ae64a9 fix: 国际出港查询页日期参数修正及仓储列表日期显示兜底
- 统计接口日期参数与列表接口统一为 beginDate/endDate
- 入库/出库时间 substring 前增加长度校验,防止 StringIndexOutOfBoundsException

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:21:44 +08:00
b2cc0059b3 feat: 实现国际进港电报详情页编辑与报文生成功能
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:13:30 +08:00
3f56614df8 feat: 对接国际进港电报解析生成接口
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:39:28 +08:00
e12e0db7be refactor: 优化国际进港电报解析列表项UI对齐设计稿
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:33:36 +08:00
0a9230860b feat: 国际进港电报解析接口对接及仓库/提取记录页面
- 电报解析:航班级联查询(自动填充目的站、始发站下拉)
- 电报解析:修复接口返回格式(PageInfo 非 BaseResultBean)
- 电报解析:报文类型必选校验
- 新增进港仓库、提取记录页面及菜单入口
- 修复 Spinner 空列表时 hint 不显示的问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:15:56 +08:00
e50ce25eb3 refactor: 国际进港4页面标准化及始发站筛选控件优化
- 统一 getData() 使用 handleListBean 替代手动分页处理
- 底部栏背景色统一为 @color/white
- 进港舱单删除弹窗改用 ConfirmDialogModel
- 进港舱单新增始发站 SPINNER 筛选控件
- 电报解析始发站和报文类型改为 SPINNER 下拉选择

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:17:13 +08:00
c0025c949f refactor: 重构 CLAUDE.md,精简内容并新增 6 种典型页面类型指南
- 从 1200+ 行精简到约 730 行,删除冗余代码模板和通用开发建议
- 新增基于 module_gjc 归纳的 6 种页面类型开发指南
- 新增自定义 Dialog 开发模式(BaseDialogModel)
- 压缩 DataBinding 规则、编译错误、Import 路径为精简表格

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:10:21 +08:00
d26f164736 fix: 开始组装 2026-02-05 17:23:56 +08:00
b84dc9a816 feat: fix print 2026-02-05 16:33:38 +08:00
6cf47dc8d8 feat: fix print title 2026-02-05 16:05:17 +08:00
fd20585741 feat: opt printer 2026-02-05 15:15:42 +08:00
120b2eb995 Merge branch 'main' of ssh://git.njcqit.com:2222/eric/aerologic-app 2026-02-05 14:29:18 +08:00
954f55b6c8 chore: add auto-claude entries to .gitignore 2026-01-27 22:51:00 +08:00
222 changed files with 20083 additions and 3796 deletions

14
.claude/commands/run.md Normal file
View File

@@ -0,0 +1,14 @@
清理构建缓存,重新打包 Debug 版本,安装到 Android 设备并启动应用
先检查是否有已连接的设备,然后执行清理、构建、安装并启动应用。
```bash
# 检查设备连接
adb devices -l
# 清理 + 安装
./gradlew clean installDebug
# 启动应用(通过 Launcher Intent
adb shell monkey -p com.lukouguoji.aerologic -c android.intent.category.LAUNCHER 1
```

15
.claude/mcp.json Normal file
View File

@@ -0,0 +1,15 @@
{
"mcpServers": {
"空港集团 - API 文档": {
"command": "/Users/kid/.version-fox/sdks/nodejs/bin/npx",
"args": [
"-y",
"apifox-mcp-server@latest",
"--project-id=7382863"
],
"env": {
"APIFOX_ACCESS_TOKEN": "APS-S2aVVwqasbdByzPLgSqryRC8BB0ZFqhQ"
}
}
}
}

View File

@@ -52,9 +52,61 @@
"Bash(identify:*)", "Bash(identify:*)",
"WebFetch(domain:github.com)", "WebFetch(domain:github.com)",
"Bash(file:*)", "Bash(file:*)",
"Bash(xargs:*)" "Bash(xargs:*)",
"Bash(unzip:*)",
"WebFetch(domain:gainscha.github.io)",
"WebFetch(domain:m.gainscha.com)",
"Bash(git add:*)",
"Bash(git commit:*)",
"WebFetch(domain:support.claude.com)",
"WebFetch(domain:api.apifox.com)",
"Bash(curl:*)",
"Bash(git:*)",
"WebFetch(domain:app.apifox.com)",
"WebFetch(domain:apifox.com)",
"Bash(npx:*)",
"Bash(claude mcp:*)",
"Bash(python3:*)",
"mcp__apifox__read_project_oas_ukz3j4",
"mcp__apifox__read_project_oas_ref_resources_ukz3j4",
"mcp__apifox__refresh_project_oas_ukz3j4",
"mcp__playwright__browser_click",
"mcp__playwright__browser_take_screenshot",
"mcp__playwright__browser_snapshot",
"Bash(/tmp/communicate_type_findings.md:*)",
"Read(//tmp/**)",
"mcp__apifox__read_project_oas_3gn3lx",
"mcp__apifox__read_project_oas_ref_resources_3gn3lx",
"mcp__apifox__refresh_project_oas_3gn3lx",
"Bash(cp \"/var/folders/qz/qk20ny650h1fhmxrx46gdfhr0000gn/T/images/Warp 2026-03-13 09.54.13.tiff\" /tmp/screenshot.png)",
"Read(//private/var/folders/qz/qk20ny650h1fhmxrx46gdfhr0000gn/T/images/**)",
"mcp__apifox__read_project_oas_2s2uhx",
"mcp__apifox__read_project_oas_ref_resources_2s2uhx",
"mcp__apifox__refresh_project_oas_2s2uhx",
"Bash(find /Users/kid/Development/Fusion/Projects/aerologic-app -path \"*/build\" -prune -o -type f \\\\\\( -name \"*manifest*\" -o -name \"*bean*\" \\\\\\) | grep -i \"gjj\\\\|tally\" | grep -E \"\\\\.\\(kt\\)$\" | sort)",
"mcp__apifox__read_project_oas_9otrai",
"mcp__apifox__read_project_oas_ref_resources_9otrai",
"Bash(cd:*)",
"mcp__apifox__read_project_oas_tua249",
"mcp__apifox__read_project_oas_ref_resources_tua249",
"mcp__apifox__read_project_oas_heib77",
"mcp__apifox__read_project_oas_ref_resources_heib77",
"Bash(export JAVA_HOME=\"/Applications/Android Studio.app/Contents/jbr/Contents/Home\")",
"Bash(export PATH=\"$JAVA_HOME/bin:$PATH\")",
"Read(//Library/Java/JavaVirtualMachines/**)",
"Read(//usr/local/**)",
"Read(//opt/homebrew/opt/**)",
"Bash(/Users/kid/.vfox/sdks/java/bin/java -version 2>&1)",
"Bash(export JAVA_HOME=/Users/kid/.vfox/sdks/java)",
"mcp__apifox__read_project_oas_kcl8s7",
"mcp__apifox__refresh_project_oas_kcl8s7",
"mcp__apifox__read_project_oas_ref_resources_kcl8s7"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []
} },
"enabledMcpjsonServers": [
"空港集团 - API 文档",
"apifox"
]
} }

12
.gitignore vendored
View File

@@ -192,3 +192,15 @@ fabric.properties
# End of https://www.toptal.com/developers/gitignore/api/androidstudio,gradle,java,kotlin # End of https://www.toptal.com/developers/gitignore/api/androidstudio,gradle,java,kotlin
.vfox/ .vfox/
# Auto Claude data directory
.auto-claude/
# Auto Claude generated files
.auto-claude-security.json
.auto-claude-status
.claude_settings.json
.worktrees/
.security-key
logs/security/
.playwright-mcp/

15
.mcp.json Normal file
View File

@@ -0,0 +1,15 @@
{
"mcpServers": {
"apifox": {
"command": "npx",
"args": [
"-y",
"apifox-mcp-server@latest",
"--project-id=7382863"
],
"env": {
"APIFOX_ACCESS_TOKEN": "APS-S2aVVwqasbdByzPLgSqryRC8BB0ZFqhQ"
}
}
}
}

View File

@@ -1,2 +1,2 @@
[tools] [tools]
java = "17.0.17+10-amzn" java = "17+35-amzn"

View File

@@ -1 +1 @@
/Users/kid/.version-fox/cache/java/v-17.0.17+10-amzn/java-17.0.17+10-amzn /Users/kid/.vfox/cache/java/v-17+35-amzn/java-17+35-amzn

2681
CLAUDE.md

File diff suppressed because it is too large Load Diff

View File

@@ -286,6 +286,14 @@
android:name=".page.car.list.CarListActivity" android:name=".page.car.list.CarListActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<activity
android:name=".page.uld.list.UldListActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" />
<activity
android:name=".page.uld.edit.UldEditActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" />
<activity <activity
android:name=".page.car.add.CarDetailsActivity" android:name=".page.car.add.CarDetailsActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
@@ -298,10 +306,22 @@
android:name=".page.log.list.LogListActivity" android:name=".page.log.list.LogListActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<activity
android:name=".page.log.list.LogQueryActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" />
<activity
android:name=".page.log.detail.LogDetailActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" />
<activity <activity
android:name=".page.transportLog.list.TransportLogActivity" android:name=".page.transportLog.list.TransportLogActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<activity
android:name=".page.coldStorage.list.ColdStorageActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" />
<activity <activity
android:name=".page.gnj.manifest.list.GnjManifestListActivity" android:name=".page.gnj.manifest.list.GnjManifestListActivity"
android:configChanges="orientation|keyboardHidden" android:configChanges="orientation|keyboardHidden"
@@ -405,6 +425,20 @@
android:exported="false" android:exported="false"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<!-- 国际进港-进港舱单分单编辑 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpManifestSubEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-进港舱单详情 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpManifestDetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-装机单(分拣理货) --> <!-- 国际进港-装机单(分拣理货) -->
<activity <activity
android:name="com.lukouguoji.gjj.activity.IntImpLoadingListActivity" android:name="com.lukouguoji.gjj.activity.IntImpLoadingListActivity"
@@ -412,6 +446,13 @@
android:exported="false" android:exported="false"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<!-- 国际进港-装机单编辑 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpLoadingListEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-理货报告 --> <!-- 国际进港-理货报告 -->
<activity <activity
android:name="com.lukouguoji.gjj.activity.IntImpTallyActivity" android:name="com.lukouguoji.gjj.activity.IntImpTallyActivity"
@@ -419,6 +460,81 @@
android:exported="false" android:exported="false"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<activity
android:name="com.lukouguoji.gjj.activity.IntImpTallyDetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-仓库 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpStorageUseActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-提取记录 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpPickUpRecordActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-提取详情 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpPickUpRecordDetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-费用修改 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpPickUpChargeEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-提取出库 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpPickUpDLVActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-进港查询 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpQueryActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-查询详情 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpQueryDetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-运单修改 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpQueryEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-事故签证 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpAccidentVisaActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name="com.lukouguoji.gjj.activity.IntImpAccidentVisaEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<service android:name="com.huitao.printer.service.PrinterService" /> <service android:name="com.huitao.printer.service.PrinterService" />
<service android:name="com.lukouguoji.gnc.bluetooth.service.AncillaryService" /> <service android:name="com.lukouguoji.gnc.bluetooth.service.AncillaryService" />
<service android:name="com.lukouguoji.gnc.bluetooth.service.MyService" /> <service android:name="com.lukouguoji.gnc.bluetooth.service.MyService" />

View File

@@ -0,0 +1,62 @@
package com.lukouguoji.aerologic.page.coldStorage.list
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.databinding.ActivityColdStorageBinding
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 冷库登记页面
*/
@Route(path = ARouterConstants.ACTIVITY_URL_COLD_STORAGE)
class ColdStorageActivity :
BaseBindingActivity<ActivityColdStorageBinding, ColdStorageViewModel>() {
override fun layoutId() = R.layout.activity_cold_storage
override fun viewModelClass() = ColdStorageViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("冷库登记")
binding.viewModel = viewModel
// 观察全选状态,更新图标透明度
viewModel.isAllChecked.observe(this) { isAllChecked ->
binding.checkIcon.alpha = if (isAllChecked) 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.refresh()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.searchClick()
}
}
companion object {
@JvmStatic
fun start(context: Context) {
context.startActivity(Intent(context, ColdStorageActivity::class.java))
}
}
}

View File

@@ -0,0 +1,26 @@
package com.lukouguoji.aerologic.page.coldStorage.list
import android.view.View
import com.lukouguoji.aerologic.databinding.ItemColdStorageBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.ColdStorageBean
/**
* 冷库登记 列表项ViewHolder
*/
class ColdStorageViewHolder(view: View) :
BaseViewHolder<ColdStorageBean, ItemColdStorageBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
binding.bean = bean
binding.position = position
binding.executePendingBindings()
// 添加图标点击事件 - 切换选择状态
binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get())
binding.executePendingBindings()
}
}
}

View File

@@ -0,0 +1,175 @@
package com.lukouguoji.aerologic.page.coldStorage.list
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.lukouguoji.aerologic.R
import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.ColdStorageBean
import dev.utils.app.info.KeyValue
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel
import kotlinx.coroutines.launch
/**
* 冷库登记 ViewModel
*/
class ColdStorageViewModel : BasePageViewModel() {
// ========== 搜索条件 ==========
val ieFlag = MutableLiveData("") // 进出港标识
val wbNo = MutableLiveData("") // 运单号
val status = MutableLiveData("") // 货物状态
val outUserName = MutableLiveData("") // 出库人
val inUserName = MutableLiveData("") // 入库人
// ========== 下拉列表数据源 ==========
val ieFlagList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("全部", ""),
KeyValue("进港", "I"),
KeyValue("出港", "E")
)
)
val statusList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("全部", ""),
KeyValue("已入库", "已入库"),
KeyValue("已出库", "已出库")
)
)
// ========== 统计信息 ==========
val totalCount = MutableLiveData("0") // 合计票数
val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0") // 总重量
// ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false)
init {
isAllChecked.observeForever { checked ->
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean>
?: return@observeForever
list.forEach { it.checked.set(checked) }
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
}
// ========== 适配器配置 ==========
val itemViewHolder = ColdStorageViewHolder::class.java
val itemLayoutId = R.layout.item_cold_storage
/**
* 扫码运单号
*/
fun scanWbNo() {
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
}
/**
* 搜索按钮点击
*/
fun searchClick() {
refresh()
}
/**
* 全选按钮点击
*/
fun checkAllClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
val shouldCheckAll = !isAllChecked.value!!
list.forEach { it.checked.set(shouldCheckAll) }
isAllChecked.value = shouldCheckAll
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
/**
* 完成入库
*/
fun completeIn() {
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
val selectedItems = list.filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要入库的数据")
return
}
launchLoadingCollect({ NetApply.api.coldStorageCompleteIn(selectedItems.toRequestBody()) }) {
onSuccess = {
showToast("入库完成")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
}
}
/**
* 完成出库
*/
fun completeOut() {
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
val selectedItems = list.filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要出库的数据")
return
}
launchLoadingCollect({ NetApply.api.coldStorageCompleteOut(selectedItems.toRequestBody()) }) {
onSuccess = {
showToast("出库完成")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
}
}
/**
* 获取数据
*/
override fun getData() {
val filterParams = mapOf(
"ieFlag" to ieFlag.value?.ifEmpty { null },
"wbNo" to wbNo.value?.ifEmpty { null },
"status" to status.value?.ifEmpty { null },
"outUserName" to outUserName.value?.ifEmpty { null },
"inUserName" to inUserName.value?.ifEmpty { null }
)
val listParams = (filterParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit
)).toRequestBody()
val totalParams = filterParams.toRequestBody()
// 获取列表
launchLoadingCollect({ NetApply.api.getColdStorageList(listParams) }) {
onSuccess = { pageModel.handleListBean(it?.toBaseListBean()) }
}
// 获取统计信息
launchCollect({ NetApply.api.getColdStorageTotal(totalParams) }) {
onSuccess = { result ->
val data = result.data
totalCount.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
}
}
}
}

View File

@@ -3,12 +3,15 @@ package com.lukouguoji.aerologic.page.flight.query.details
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.aerologic.R import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.databinding.ActivityFlightQueryDetailsBinding import com.lukouguoji.aerologic.databinding.ActivityFlightQueryDetailsBinding
import com.lukouguoji.aerologic.databinding.ActivityGnjStashDetailsBinding
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
@Route(path = ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)
class FlightQueryDetailsActivity : class FlightQueryDetailsActivity :
BaseBindingActivity<ActivityFlightQueryDetailsBinding, FlightQueryDetailsViewModel>() { BaseBindingActivity<ActivityFlightQueryDetailsBinding, FlightQueryDetailsViewModel>() {

View File

@@ -9,6 +9,7 @@ import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.ktx.addOnItemClickListener import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.getLifecycleOwner import com.lukouguoji.module_base.ktx.getLifecycleOwner
@Deprecated("使用 module_hangban 中的 HbQueryListActivity 替代")
class FlightQueryListActivity : class FlightQueryListActivity :
BaseBindingActivity<ActivityFlightQueryListBinding, FlightQueryListViewModel>() { BaseBindingActivity<ActivityFlightQueryListBinding, FlightQueryListViewModel>() {
override fun layoutId() = R.layout.activity_flight_query_list override fun layoutId() = R.layout.activity_flight_query_list

View File

@@ -0,0 +1,169 @@
package com.lukouguoji.aerologic.page.log.detail
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.util.TypedValue
import android.view.Gravity
import android.view.View
import android.widget.FrameLayout
import android.widget.LinearLayout
import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.databinding.ActivityLogDetailBinding
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.LogBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
@Route(path = ARouterConstants.ACTIVITY_URL_LOG_DETAIL)
class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetailViewModel>() {
private val timelineAdapter = LogDetailTimelineAdapter()
override fun layoutId(): Int {
return R.layout.activity_log_detail
}
override fun viewModelClass(): Class<LogDetailViewModel> {
return LogDetailViewModel::class.java
}
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("操作日志详情")
binding.viewModel = viewModel
// 配置操作详情 RecyclerView垂直时间线
binding.rvTimeline.adapter = timelineAdapter
// 观察流转状态变化,程序化构建步骤进度条
viewModel.currentStepIndex.observe(this) { index ->
buildStepProgressBar(viewModel.allSteps, index)
}
viewModel.statusLogList.observe(this) { list ->
timelineAdapter.setData(list)
}
viewModel.initOnCreated(intent)
}
private fun buildStepProgressBar(steps: List<String>, currentIndex: Int) {
val container = binding.llSteps
container.removeAllViews()
val colorBlue = 0xFF1C8CF5.toInt()
val colorGray = 0xFFCCCCCC.toInt()
val colorGreen = 0xFF4CAF50.toInt()
val dotSize = dp(10)
val lineHeight = dp(2)
for (i in steps.indices) {
val isCompleted = i <= currentIndex
val isCurrent = i == currentIndex
val isFirst = i == 0
val isLast = i == steps.size - 1
// 每个步骤的根容器(等宽)
val stepLayout = LinearLayout(this).apply {
orientation = LinearLayout.VERTICAL
gravity = Gravity.CENTER_HORIZONTAL
layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f)
}
// 步骤名称(所有步骤统一 padding 确保高度一致)
val tvName = TextView(this).apply {
text = steps[i]
setTextSize(TypedValue.COMPLEX_UNIT_SP, 13f)
gravity = Gravity.CENTER
setPadding(dp(6), dp(2), dp(6), dp(2))
if (isCurrent) {
setBackgroundResource(R.drawable.bg_step_current_badge)
setTextColor(0xFFFFFFFF.toInt())
} else {
setTextColor(if (isCompleted) 0xFF333333.toInt() else 0xFF999999.toInt())
}
layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
)
}
stepLayout.addView(tvName)
// 圆点和连线区域FrameLayout 叠加)
val dotLineContainer = FrameLayout(this).apply {
layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, dp(20)
).apply { topMargin = dp(8) }
}
// 左半连线(从左边缘到中心,略超过中心以避免断层)
if (!isFirst) {
val lineLeft = View(this).apply {
setBackgroundColor(if (isCompleted) colorBlue else colorGray)
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
gravity = Gravity.CENTER_VERTICAL or Gravity.START
}
}
dotLineContainer.addView(lineLeft)
dotLineContainer.post {
lineLeft.layoutParams = FrameLayout.LayoutParams(
dotLineContainer.width / 2 + dotSize / 2, lineHeight
).apply { gravity = Gravity.CENTER_VERTICAL or Gravity.START }
}
}
// 右半连线(从中心到右边缘,略超过中心以避免断层)
if (!isLast) {
val rightLineColor = if (isCompleted && !isCurrent) colorBlue else colorGray
val lineRight = View(this).apply {
setBackgroundColor(rightLineColor)
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
gravity = Gravity.CENTER_VERTICAL or Gravity.END
}
}
dotLineContainer.addView(lineRight)
dotLineContainer.post {
lineRight.layoutParams = FrameLayout.LayoutParams(
dotLineContainer.width / 2 + dotSize / 2, lineHeight
).apply { gravity = Gravity.CENTER_VERTICAL or Gravity.END }
}
}
// 圆点(叠加在连线之上)
val dot = View(this).apply {
setBackgroundResource(
when {
isCurrent -> R.drawable.bg_step_dot_green
isCompleted -> R.drawable.bg_step_dot_blue
else -> R.drawable.bg_step_dot_gray
}
)
layoutParams = FrameLayout.LayoutParams(dotSize, dotSize).apply {
gravity = Gravity.CENTER
}
}
dotLineContainer.addView(dot)
stepLayout.addView(dotLineContainer)
container.addView(stepLayout)
}
}
private fun dp(value: Int): Int {
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP, value.toFloat(), resources?.displayMetrics
).toInt()
}
companion object {
@JvmStatic
fun start(context: Context, bean: LogBean) {
val starter = Intent(context, LogDetailActivity::class.java)
starter.putExtra(Constant.Key.DATA, Gson().toJson(bean))
context.startActivity(starter)
}
}
}

View File

@@ -0,0 +1,76 @@
package com.lukouguoji.aerologic.page.log.detail
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.aerologic.R
class LogDetailStepAdapter : RecyclerView.Adapter<LogDetailStepAdapter.StepViewHolder>() {
private var steps: List<String> = emptyList()
private var currentIndex: Int = -1
fun setData(steps: List<String>, currentIndex: Int) {
this.steps = steps
this.currentIndex = currentIndex
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StepViewHolder {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.item_log_step, parent, false)
return StepViewHolder(view)
}
override fun onBindViewHolder(holder: StepViewHolder, position: Int) {
val step = steps[position]
val isCompleted = position <= currentIndex
val isCurrent = position == currentIndex
val isFirst = position == 0
val isLast = position == steps.size - 1
// 步骤名称
if (isCurrent) {
holder.tvStepName.setBackgroundResource(R.drawable.bg_step_current_badge)
holder.tvStepName.setTextColor(0xFFFFFFFF.toInt())
} else {
holder.tvStepName.setBackgroundResource(0)
holder.tvStepName.setTextColor(
if (isCompleted) 0xFF333333.toInt() else 0xFF999999.toInt()
)
}
holder.tvStepName.text = step
// 圆点
holder.dotView.setBackgroundResource(
when {
isCurrent -> R.drawable.bg_step_dot_green
isCompleted -> R.drawable.bg_step_dot_blue
else -> R.drawable.bg_step_dot_gray
}
)
// 左侧连线
holder.lineLeft.visibility = if (isFirst) View.INVISIBLE else View.VISIBLE
holder.lineLeft.setBackgroundColor(
if (isCompleted) 0xFF1C8CF5.toInt() else 0xFFCCCCCC.toInt()
)
// 右侧连线
holder.lineRight.visibility = if (isLast) View.INVISIBLE else View.VISIBLE
holder.lineRight.setBackgroundColor(
if (isCompleted && position < currentIndex) 0xFF1C8CF5.toInt() else 0xFFCCCCCC.toInt()
)
}
override fun getItemCount(): Int = steps.size
class StepViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val tvStepName: TextView = view.findViewById(R.id.tv_step_name)
val dotView: View = view.findViewById(R.id.view_dot)
val lineLeft: View = view.findViewById(R.id.view_line_left)
val lineRight: View = view.findViewById(R.id.view_line_right)
}
}

View File

@@ -0,0 +1,56 @@
package com.lukouguoji.aerologic.page.log.detail
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.aerologic.R
import com.lukouguoji.module_base.bean.StatusLogBean
class LogDetailTimelineAdapter : RecyclerView.Adapter<LogDetailTimelineAdapter.TimelineViewHolder>() {
private var items: List<StatusLogBean> = emptyList()
fun setData(list: List<StatusLogBean>) {
items = list
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TimelineViewHolder {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.item_log_timeline, parent, false)
return TimelineViewHolder(view)
}
override fun onBindViewHolder(holder: TimelineViewHolder, position: Int) {
val item = items[position]
val isFirst = position == 0
val isLast = position == items.size - 1
holder.tvContent.text = item.content
holder.tvTime.text = item.opDate
// 最后一项(当前步骤)用绿色圆点
holder.dotView.setBackgroundResource(
if (isLast) R.drawable.bg_timeline_dot_green
else R.drawable.bg_timeline_dot_gray
)
// 第一项不显示顶部连线
holder.lineTop.visibility = if (isFirst) View.INVISIBLE else View.VISIBLE
// 最后一项不显示底部连线
holder.lineBottom.visibility = if (isLast) View.INVISIBLE else View.VISIBLE
}
override fun getItemCount(): Int = items.size
class TimelineViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val dotView: View = view.findViewById(R.id.view_dot)
val lineTop: View = view.findViewById(R.id.view_line_top)
val lineBottom: View = view.findViewById(R.id.view_line_bottom)
val tvContent: TextView = view.findViewById(R.id.tv_content)
val tvTime: TextView = view.findViewById(R.id.tv_time)
}
}

View File

@@ -0,0 +1,95 @@
package com.lukouguoji.aerologic.page.log.detail
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.google.gson.Gson
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.LogBean
import com.lukouguoji.module_base.bean.StatusLogBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.toRequestBody
class LogDetailViewModel : BaseViewModel() {
val waybillNo = MutableLiveData("")
val waybillType = MutableLiveData("")
val statusLogList = MutableLiveData<List<StatusLogBean>>(emptyList())
// 流转状态步骤定义
val allSteps = listOf(
"预录入", "完成收运", "运抵申报", "海关放行",
"完成组装", "完成复磅", "装载申报", "航班关闭", "理货申报"
)
// 当前完成到哪一步(索引)
val currentStepIndex = MutableLiveData(-1)
fun initOnCreated(intent: Intent) {
val json = intent.getStringExtra(Constant.Key.DATA) ?: ""
if (json.isNotEmpty()) {
val bean = Gson().fromJson(json, LogBean::class.java)
waybillNo.value = bean.key
waybillType.value = getAwbTypeName(bean.logType)
loadStatusList(bean.key, bean.logType)
}
}
private fun loadStatusList(key: String, logType: String) {
if (key.isEmpty()) {
loadMockData()
return
}
launchCollect({
NetApply.api.getLogStatusList(
mapOf(
"key" to key,
"awbType" to logType
).toRequestBody()
)
}) {
onSuccess = {
val list = it.data ?: emptyList()
if (list.isNotEmpty()) {
statusLogList.value = list
val lastStatus = list.last().content
val index = allSteps.indexOfFirst { step ->
lastStatus.contains(step)
}
currentStepIndex.value = if (index >= 0) index else list.size - 1
} else {
loadMockData()
}
}
onFailed = { _, _ ->
loadMockData()
}
}
}
private fun loadMockData() {
// Mock 数据:模拟到"装载申报"步骤
currentStepIndex.value = 6 // "装载申报" 在 allSteps 中的索引
statusLogList.value = listOf(
StatusLogBean(content = "托书录入", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "完成收运", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "完成组装", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "已复磅", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "海关已放行", opDate = "2017-04-01 12:00:00"),
StatusLogBean(content = "装载申报", opDate = "2017-04-01 12:00:00")
)
}
private fun getAwbTypeName(logType: String): String {
return when (logType) {
"CI" -> "国内进港"
"CO" -> "国内出港"
"II" -> "国际进港"
"IO" -> "国际出港"
else -> logType
}
}
}

View File

@@ -0,0 +1,43 @@
package com.lukouguoji.aerologic.page.log.list
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.databinding.ActivityLogQueryBinding
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.ktx.getLifecycleOwner
import com.lukouguoji.module_base.router.ARouterConstants
@Route(path = ARouterConstants.ACTIVITY_URL_LOG_QUERY)
class LogQueryActivity : BaseBindingActivity<ActivityLogQueryBinding, LogQueryViewModel>() {
override fun layoutId(): Int {
return R.layout.activity_log_query
}
override fun viewModelClass(): Class<LogQueryViewModel> {
return LogQueryViewModel::class.java
}
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("日志查询")
binding.viewModel = viewModel
viewModel.pageModel.bindSmartRefreshLayout(
binding.srl,
binding.rv,
viewModel,
getLifecycleOwner()
)
viewModel.refresh()
}
companion object {
@JvmStatic
fun start(context: Context) {
val starter = Intent(context, LogQueryActivity::class.java)
context.startActivity(starter)
}
}
}

View File

@@ -0,0 +1,18 @@
package com.lukouguoji.aerologic.page.log.list
import android.view.View
import com.lukouguoji.aerologic.databinding.ItemLogQueryBinding
import com.lukouguoji.aerologic.page.log.detail.LogDetailActivity
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.LogBean
class LogQueryViewHolder(view: View) : BaseViewHolder<LogBean, ItemLogQueryBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item)
binding.bean = bean
itemView.setOnClickListener {
bean?.let { LogDetailActivity.start(itemView.context, it) }
}
}
}

View File

@@ -0,0 +1,49 @@
package com.lukouguoji.aerologic.page.log.list
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.aerologic.R
import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.LogBean
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.toRequestBody
import dev.utils.common.DateUtils
class LogQueryViewModel : BasePageViewModel() {
val startDate = MutableLiveData(DateUtils.getCurrentTime().formatDate())
val endDate = MutableLiveData("")
val keyWord = MutableLiveData("")
val operatorId = MutableLiveData("")
val count = MutableLiveData(0)
val itemLayoutId = R.layout.item_log_query
val itemViewHolder = LogQueryViewHolder::class.java
fun searchClick() {
refresh()
}
override fun getData() {
launchLoadingCollect({
NetApply.api.getLogList(
mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit,
"startTime" to startDate.value,
"endTime" to endDate.value,
"key" to keyWord.value,
"opId" to operatorId.value,
).toRequestBody()
)
}) {
onSuccess = {
pageModel.handleListBean(it)
count.value = it.total
}
}
}
}

View File

@@ -0,0 +1,32 @@
package com.lukouguoji.aerologic.page.uld.edit
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.databinding.ActivityUldEditBinding
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
class UldEditActivity : BaseBindingActivity<ActivityUldEditBinding, UldEditViewModel>() {
override fun layoutId() = R.layout.activity_uld_edit
override fun viewModelClass() = UldEditViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
viewModel.initOnCreate(intent)
setBackArrow("ULD${viewModel.pageType.value!!.title}")
binding.viewModel = viewModel
}
companion object {
@JvmStatic
fun start(context: Context, id: String = "", modify: Boolean = id.isEmpty()) {
val starter = Intent(context, UldEditActivity::class.java)
.putExtra(Constant.Key.ID, id)
.putExtra(Constant.Key.DATA, modify)
context.startActivity(starter)
}
}
}

View File

@@ -0,0 +1,84 @@
package com.lukouguoji.aerologic.page.uld.edit
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.ULDBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.http.net.NetApply
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 dev.DevUtils
import dev.utils.app.info.KeyValue
class UldEditViewModel : BaseViewModel() {
var id = ""
val pageType = MutableLiveData(DetailsPageType.Add)
val uldBean = MutableLiveData(ULDBean())
val statusList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("正常", "0"),
KeyValue("故障", "1"),
)
)
// 所属航司下拉列表mock后续替换为接口
val carrierList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("MU - 东方航空", "MU"),
KeyValue("CA - 国航", "CA"),
KeyValue("CZ - 南方航空", "CZ"),
KeyValue("HO - 吉祥航空", "HO"),
KeyValue("FM - 上海航空", "FM"),
)
)
fun initOnCreate(intent: Intent) {
id = intent.getStringExtra(Constant.Key.ID) ?: ""
val modify = intent.getBooleanExtra(Constant.Key.DATA, false)
pageType.value = if (id.isEmpty()) DetailsPageType.Add
else if (modify) DetailsPageType.Modify else DetailsPageType.Details
getData()
}
private fun getData() {
if (id.isEmpty()) return
launchLoadingCollect({
NetApply.api.queryUldByCode(id)
}) {
onSuccess = {
uldBean.value = it.data ?: ULDBean()
}
}
}
fun onSaveClick() {
val bean = uldBean.value ?: return
if (bean.uld.isBlank()) {
showToast("ULD编号不能为空")
return
}
val isAdd = pageType.value == DetailsPageType.Add
launchLoadingCollect({
if (isAdd) NetApply.api.saveUld(bean.toRequestBody())
else NetApply.api.updateUld(bean.toRequestBody())
}) {
onSuccess = {
showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功"))
if (isAdd) uldBean.value = ULDBean() else getData()
}
}
}
fun onCancelClick() {
DevUtils.getTopActivity().finish()
}
}

View File

@@ -0,0 +1,45 @@
package com.lukouguoji.aerologic.page.uld.list
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.databinding.ActivityUldListBinding
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.getLifecycleOwner
class UldListActivity : BaseBindingActivity<ActivityUldListBinding, UldListViewModel>() {
override fun layoutId(): Int {
return R.layout.activity_uld_list
}
override fun viewModelClass(): Class<UldListViewModel> {
return UldListViewModel::class.java
}
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("ULD管理")
binding.viewModel = viewModel
viewModel.pageModel.bindSmartRefreshLayout(
binding.srl,
binding.rv,
viewModel,
getLifecycleOwner()
)
binding.rv.addOnItemClickListener(viewModel)
}
override fun onResume() {
super.onResume()
viewModel.refresh()
}
companion object {
@JvmStatic
fun start(context: Context) {
context.startActivity(Intent(context, UldListActivity::class.java))
}
}
}

View File

@@ -0,0 +1,16 @@
package com.lukouguoji.aerologic.page.uld.list
import android.view.View
import com.lukouguoji.aerologic.databinding.ItemUldListBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.ULDBean
class UldListViewHolder(view: View) : BaseViewHolder<ULDBean, ItemUldListBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val itemBean = getItemBean(item)!!
binding.bean = itemBean
notifyItemClick(position, binding.llContent)
notifyItemClick(position, binding.tvModify)
notifyItemClick(position, binding.tvDelete)
}
}

View File

@@ -0,0 +1,116 @@
package com.lukouguoji.aerologic.page.uld.list
import android.app.Activity
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.aerologic.R
import com.lukouguoji.aerologic.page.uld.edit.UldEditActivity
import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.ULDBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.commonAdapter
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.model.ConfirmDialogModel
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel
import dev.DevUtils
import dev.utils.app.info.KeyValue
class UldListViewModel : BasePageViewModel() {
// 搜索条件
val status = MutableLiveData("")
val uldSuffix = MutableLiveData("")
val uldNo = MutableLiveData("")
// 状态下拉列表
val statusList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("全部", ""),
KeyValue("正常", "0"),
KeyValue("故障", "1"),
)
)
// 所属航司下拉列表mock后续替换为接口
val carrierList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("全部", ""),
KeyValue("MU - 东方航空", "MU"),
KeyValue("CA - 国航", "CA"),
KeyValue("CZ - 南方航空", "CZ"),
KeyValue("HO - 吉祥航空", "HO"),
KeyValue("FM - 上海航空", "FM"),
)
)
// 合计数量
val count = MutableLiveData(0L)
val itemLayoutId = R.layout.item_uld_list
val itemViewHolder = UldListViewHolder::class.java
override fun getData() {
launchLoadingCollect({
NetApply.api.getUldList(
mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit,
"status" to status.value?.ifEmpty { null },
"uldSuffix" to uldSuffix.value?.ifEmpty { null },
"uld" to uldNo.value?.ifEmpty { null },
).toRequestBody()
)
}) {
onSuccess = {
pageModel.handleListBean(it.toBaseListBean())
count.value = it.total
}
}
}
fun onUldScanClick() {
ScanModel.startScan(DevUtils.getTopActivity(), Constant.RequestCode.ULD)
}
fun onAddClick() {
UldEditActivity.start(DevUtils.getTopActivity())
}
override fun onItemClick(position: Int, type: Int) {
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? ULDBean ?: return
when (type) {
R.id.ll_content -> UldEditActivity.start(DevUtils.getTopActivity(), bean.uld)
R.id.tv_modify -> UldEditActivity.start(DevUtils.getTopActivity(), bean.uld, true)
R.id.tv_delete -> deleteUld(bean.uld)
else -> {}
}
}
private fun deleteUld(uld: String) {
ConfirmDialogModel("是否确定删除该ULD记录") {
launchLoadingCollect({
NetApply.api.deleteUld(uld)
}) {
onSuccess = {
showToast("删除成功")
refresh()
}
}
}.show()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (resultCode == Activity.RESULT_OK && data != null) {
when (requestCode) {
Constant.RequestCode.ULD -> {
uldNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT).noNull()
}
else -> {}
}
}
}
}

View File

@@ -25,11 +25,14 @@ import com.lukouguoji.aerologic.page.gnj.query.list.GnjQueryListActivity
import com.lukouguoji.aerologic.page.gnj.stash.list.GnjStashListActivity import com.lukouguoji.aerologic.page.gnj.stash.list.GnjStashListActivity
import com.lukouguoji.aerologic.page.gnj.unload.list.GnjUnloadListActivity import com.lukouguoji.aerologic.page.gnj.unload.list.GnjUnloadListActivity
import com.lukouguoji.aerologic.page.log.list.LogListActivity import com.lukouguoji.aerologic.page.log.list.LogListActivity
import com.lukouguoji.aerologic.page.log.list.LogQueryActivity
import com.lukouguoji.aerologic.page.message.list.MessageListActivity import com.lukouguoji.aerologic.page.message.list.MessageListActivity
import com.lukouguoji.aerologic.page.telegram.list.TelegramListActivity import com.lukouguoji.aerologic.page.telegram.list.TelegramListActivity
import com.lukouguoji.aerologic.page.test.PrintActivity import com.lukouguoji.aerologic.page.test.PrintActivity
import com.lukouguoji.aerologic.page.transport.GoodsTransportActivity import com.lukouguoji.aerologic.page.transport.GoodsTransportActivity
import com.lukouguoji.aerologic.page.transportLog.list.TransportLogActivity import com.lukouguoji.aerologic.page.transportLog.list.TransportLogActivity
import com.lukouguoji.aerologic.page.coldStorage.list.ColdStorageActivity
import com.lukouguoji.aerologic.page.uld.list.UldListActivity
import com.lukouguoji.gnc.page.deposit.list.GncDepositListActivity import com.lukouguoji.gnc.page.deposit.list.GncDepositListActivity
import com.lukouguoji.gnc.page.distribution.home.GncDistributionHomeActivity import com.lukouguoji.gnc.page.distribution.home.GncDistributionHomeActivity
import com.lukouguoji.gnc.page.fubang.list.GncFuBangListActivity import com.lukouguoji.gnc.page.fubang.list.GncFuBangListActivity
@@ -50,7 +53,8 @@ class HomeFragment : Fragment() {
* TODO: 正式发布前务必设置为 false * TODO: 正式发布前务必设置为 false
*/ */
companion object { companion object {
private const val DEV_AUTO_SELECT_INT_EXP = true // 自动选择国际出港开关 private const val DEV_AUTO_SELECT_MENU = true // 开发调试:自动选择菜单开关,正式发布前设为 false
private const val DEV_AUTO_SELECT_MENU_ID = Constant.AuthName.IntImp // 自动选择的目标菜单
} }
private var rvLeft: RecyclerView by Delegates.notNull() private var rvLeft: RecyclerView by Delegates.notNull()
@@ -73,9 +77,8 @@ class HomeFragment : Fragment() {
rvLeft.adapter = HomeLeftAdapt(leftMenuList) rvLeft.adapter = HomeLeftAdapt(leftMenuList)
rvRight.adapter = HomeRightAdapt(getRightMenu4Id(leftMenuList.first().id)) rvRight.adapter = HomeRightAdapt(getRightMenu4Id(leftMenuList.first().id))
// ========== 开发调试:自动选择"国际出港"菜单 ========== // ========== 开发调试:自动选择指定菜单 ==========
// TODO: 正式发布前删除此行 autoSelectMenuForDev()
autoSelectIntExpForDev()
} }
/////////// 左边的list循环 /////////// 左边的list循环
@@ -104,7 +107,9 @@ class HomeFragment : Fragment() {
if (Constant.AuthName.Flight == leftMenuTemp.id) { if (Constant.AuthName.Flight == leftMenuTemp.id) {
// ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY) // ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY)
// .navigation(activity, Constant.RequestCode.home_left_hang_ban_query) // .navigation(activity, Constant.RequestCode.home_left_hang_ban_query)
FlightQueryListActivity.start(requireContext()) // FlightQueryListActivity.start(requireContext()) // 已废弃
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HB_QUERY_LIST)
.navigation()
mPosition = oldPosition mPosition = oldPosition
} }
//货物查询 //货物查询
@@ -451,6 +456,37 @@ class HomeFragment : Fragment() {
.navigation() .navigation()
} }
// 进港仓库
Constant.AuthName.GjjWareHouseActivity -> {
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
.navigation()
}
// 提取记录
Constant.AuthName.IntImpPickUpRecord -> {
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_RECORD)
.navigation()
}
// 提取出库
Constant.AuthName.IntImpPickUpDLV -> {
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_DLV)
.navigation()
}
// 进港查询
Constant.AuthName.GjjQueryListActivity -> {
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJJ_QUERY_LIST)
.navigation()
}
// 事故签证
Constant.AuthName.IntImpAccidentVisa -> {
ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_INT_IMP_ACCIDENT_VISA)
.navigation()
}
/** /**
* 航班查询 * 航班查询
*/ */
@@ -515,7 +551,15 @@ class HomeFragment : Fragment() {
} }
// 日志查询 // 日志查询
Constant.AuthName.ComprehensiveLog -> { Constant.AuthName.ComprehensiveLog -> {
LogListActivity.start(requireContext()) LogQueryActivity.start(requireContext())
}
// ULD管理
Constant.AuthName.ComprehensiveUld -> {
UldListActivity.start(requireContext())
}
// 冷库登记
Constant.AuthName.ComprehensiveColdStorage -> {
ColdStorageActivity.start(requireContext())
} }
else -> { else -> {
@@ -800,6 +844,41 @@ class HomeFragment : Fragment() {
"理货报告" "理货报告"
) )
) )
list.add(
RightMenu(
Constant.AuthName.GjjWareHouseActivity,
R.mipmap.gnj_cang_ku_icon,
"进港仓库"
)
)
list.add(
RightMenu(
Constant.AuthName.IntImpPickUpRecord,
R.mipmap.gnj_cang_ku_icon,
"提取记录"
)
)
list.add(
RightMenu(
Constant.AuthName.IntImpPickUpDLV,
R.mipmap.gnj_cang_ku_icon,
"提取出库"
)
)
list.add(
RightMenu(
Constant.AuthName.GjjQueryListActivity,
R.mipmap.img_bwjx,
"进港查询"
)
)
list.add(
RightMenu(
Constant.AuthName.IntImpAccidentVisa,
R.mipmap.img_bwjx,
"事故签证"
)
)
} }
Constant.AuthName.Flight -> { Constant.AuthName.Flight -> {
@@ -884,6 +963,20 @@ class HomeFragment : Fragment() {
"转运记录" "转运记录"
) )
) )
list.add(
RightMenu(
Constant.AuthName.ComprehensiveUld,
R.mipmap.cargo,
"ULD管理"
)
)
list.add(
RightMenu(
Constant.AuthName.ComprehensiveColdStorage,
com.lukouguoji.module_base.R.mipmap.gnc_cangku,
"冷库登记"
)
)
} }
else -> { else -> {
@@ -907,24 +1000,20 @@ class HomeFragment : Fragment() {
} }
/** /**
* 开发调试:自动选择"国际出港"菜单 * 开发调试:自动选择指定菜单
* TODO: 正式发布前删除此方法或将 DEV_AUTO_SELECT_INT_EXP 设置为 false * 正式发布前将 DEV_AUTO_SELECT_MENU 设置为 false 即可关闭
*/ */
private fun autoSelectIntExpForDev() { private fun autoSelectMenuForDev() {
if (!DEV_AUTO_SELECT_INT_EXP) return if (!DEV_AUTO_SELECT_MENU) return
// 延迟执行,确保适配器已初始化
rvLeft.postDelayed({ rvLeft.postDelayed({
val leftAdapter = rvLeft.adapter as? HomeLeftAdapt ?: return@postDelayed val leftAdapter = rvLeft.adapter as? HomeLeftAdapt ?: return@postDelayed
// 查找"国际出港"在左侧菜单的位置
val leftMenuList = initLeftMenuData() val leftMenuList = initLeftMenuData()
val intExpIndex = leftMenuList.indexOfFirst { it.id == Constant.AuthName.IntExp } val targetIndex = leftMenuList.indexOfFirst { it.id == DEV_AUTO_SELECT_MENU_ID }
if (intExpIndex >= 0) { if (targetIndex >= 0) {
// 模拟点击左侧"国际出港"菜单项 leftAdapter.simulateClick(targetIndex)
leftAdapter.simulateClick(intExpIndex)
} }
}, 300) // 延迟300ms确保适配器已绑定数据 }, 300)
} }
} }

View File

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

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="#FF1C8CF5" />
</shape>

View File

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

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="#4CAF50" />
</shape>

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="#CCCCCC" />
</shape>

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="#4CAF50" />
</shape>

View File

@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.aerologic.page.coldStorage.list.ColdStorageViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- 搜索区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 选择进港或出港 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"选择进港或出港"}'
type="@{SearchLayoutType.SPINNER}"
list="@{viewModel.ieFlagList}"
value="@={viewModel.ieFlag}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.wbNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 货物状态 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择货物状态"}'
type="@{SearchLayoutType.SPINNER}"
list="@{viewModel.statusList}"
value="@={viewModel.status}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 出库人 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入出库人"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.outUserName}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 入库人 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入入库人"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.inUserName}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="12dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_cold_storage" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 全选按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.checkAllClick()}"
android:orientation="horizontal">
<ImageView
android:id="@+id/checkIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/color_66"
android:textSize="18sp" />
</LinearLayout>
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 完成出库按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.completeOut()}"
android:text="完成出库" />
<!-- 完成入库按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.completeIn()}"
android:text="完成入库" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -13,265 +13,268 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/backgroud_gray" android:background="@color/color_f2"
android:orientation="vertical"> android:orientation="vertical">
<include layout="@layout/title_tool_bar" /> <include layout="@layout/title_tool_bar" />
<androidx.core.widget.NestedScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="0dp"> android:fillViewport="true">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:layout_height="match_parent"> android:padding="15dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp"> android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout android:padding="15dp">
enable="@{false}"
title='@{"航班日期:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.fdate}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}"
hint='@{" "}'
title='@{"航班号:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.fno}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}"
hint='@{" "}'
title='@{"航程:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.range}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<!-- 第1行航班日期、航班号、航程 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp"> android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"地区类型:"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@{viewModel.dataBean.countryType}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
title='@{"服务类型:"}' title='@{"航班日期"}'
titleLength="@{5}" titleLength="@{4}"
type="@{DataLayoutType.SPINNER}"
value='@{viewModel.dataBean.serviceType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}"
title='@{"经停站:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.jtz}' value='@{viewModel.dataBean.fdate}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
enable="@{false}"
title='@{"航班号"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.fno}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"航程"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.range}' />
</LinearLayout> </LinearLayout>
<!-- 第2行地区类型、服务类型、经停站 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp"> android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{" "}'
title='@{"计划起飞:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.scheduledTackOff}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
hint='@{" "}' title='@{"地区类型"}'
title='@{"预计起飞:"}' titleLength="@{4}"
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.estimatedTakeOff}' value='@{viewModel.dataBean.countryType}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
hint='@{" "}' title='@{"服务类型"}'
title='@{"实际起飞:"}' titleLength="@{4}"
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.actualTakeOff}' value='@{viewModel.dataBean.serviceType}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
enable="@{false}"
title='@{"经停站"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.jtz}' />
</LinearLayout> </LinearLayout>
<!-- 第3行计划起飞、预计起飞、实际起飞 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp"> android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"计划降落:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.scheduledArrival}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
hint='@{" "}' title='@{"计划起飞"}'
title='@{"预计降落:"}' titleLength="@{4}"
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.estimatedArrival}' value='@{viewModel.dataBean.scheduledTackOff}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
hint='@{" "}' title='@{"预计起飞"}'
title='@{"实际降落:"}' titleLength="@{4}"
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.actualArrival}' value='@{viewModel.dataBean.estimatedTakeOff}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
enable="@{false}"
title='@{"实际起飞"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.actualTakeOff}' />
</LinearLayout> </LinearLayout>
<!-- 第4行计划降落、预计降落、实际降落 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp"> android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"飞行状态:"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@{viewModel.dataBean.portCode}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
hint='@{" "}' title='@{"计划降落"}'
title='@{"航班状态:"}' titleLength="@{4}"
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@{viewModel.dataBean.flightStatus}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}"
hint='@{" "}'
title='@{"延误原因:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.delayFreeText}' value='@{viewModel.dataBean.scheduledArrival}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
enable="@{false}"
title='@{"预计降落"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.estimatedArrival}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"实际降落"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.actualArrival}' />
</LinearLayout> </LinearLayout>
<!-- 第5行飞行状态、航班状态、延误原因 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp"> android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"机号:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.registration}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
hint='@{" "}' title='@{"飞行状态"}'
title='@{"机型:"}' titleLength="@{4}"
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.aircraftCode}' value='@{viewModel.dataBean.portCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
enable="@{false}" enable="@{false}"
hint='@{" "}' title='@{"航班状态"}'
title='@{"机位:"}' titleLength="@{4}"
titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.standId}' value='@{viewModel.dataBean.flightStatus}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1"
enable="@{false}"
title='@{"延误原因"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.delayFreeText}' />
</LinearLayout> </LinearLayout>
</LinearLayout> <!-- 第6行机号、机型、机位 -->
</androidx.core.widget.NestedScrollView>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="wrap_content"
android:background="#5c6890" android:layout_marginTop="8dp"
android:gravity="center_vertical|end" android:orientation="horizontal">
android:paddingHorizontal="15dp">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"机号"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.registration}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"机型"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.aircraftCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"机位"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.standId}' />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout> </layout>

View File

@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="viewModel"
type="com.lukouguoji.aerologic.page.log.detail.LogDetailViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<!-- 运单信息 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单信息"
android:textColor="#333333"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号: "
android:textColor="#666666"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.waybillNo}"
android:textColor="#333333"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单类型: "
android:textColor="#666666"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.waybillType}"
android:textColor="#333333"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 流转状态 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="流转状态"
android:textColor="#333333"
android:textSize="16sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/ll_steps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal" />
</LinearLayout>
<!-- 操作详情 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="操作详情"
android:textColor="#333333"
android:textSize="16sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_timeline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.aerologic.page.log.list.LogQueryViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical">
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择航班日期起"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.startDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择航班日期止"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.endDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入关键字"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.keyWord}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入操作员ID"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.operatorId}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_log_query" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:" + viewModel.count + "条"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计:1条" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
<variable
name="viewModel"
type="com.lukouguoji.aerologic.page.uld.edit.UldEditViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="15dp">
<!-- Row 1: ULD编号 / 状态 / 自重 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType == DetailsPageType.Add}"
hint='@{"请输入ULD编号"}'
title='@{"ULD编号"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.uldBean.uld}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请选择状态"}'
list="@{viewModel.statusList}"
title='@{"状态"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.uldBean.status}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入自重"}'
title='@{"自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.uldBean.uldWeight}' />
</LinearLayout>
<!-- Row 2: 最大装载容积 / 最大载重 / 所属航司 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入最大装载容积"}'
title='@{"最大装载容积"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.uldBean.maxVolume}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入最大载重"}'
title='@{"最大载重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.uldBean.maxWeight}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请选择所属航司"}'
list="@{viewModel.carrierList}"
title='@{"所属航司"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.uldBean.carrier}' />
</LinearLayout>
<!-- 备注(全行,多行输入) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入备注"}'
inputHeight="@{80}"
title='@{"备注"}'
titleLength="@{3}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.uldBean.remark}' />
</LinearLayout>
<!-- 底部操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginTop="24dp"
android:gravity="center"
visible="@{viewModel.pageType != DetailsPageType.Details}">
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:layout_marginEnd="20dp"
android:onClick="@{()-> viewModel.onCancelClick()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.onSaveClick()}"
android:text="保存" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.aerologic.page.uld.list.UldListViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical">
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"选择状态"}'
list="@{viewModel.statusList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.status}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.33" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"选择所属航司"}'
list="@{viewModel.carrierList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.uldSuffix}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.33" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入ULD编号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{()-> viewModel.onUldScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.uldNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.33" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.refresh()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.onAddClick()}"
android:src="@drawable/img_add" />
</LinearLayout>
</LinearLayout>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_uld_list" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text='@{"合计:" + viewModel.count + "条"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,283 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<variable
name="bean"
type="com.lukouguoji.module_base.bean.ColdStorageBean" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_white_radius_8"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="15dp">
<!-- 选中图标 -->
<ImageView
android:id="@+id/iv_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane" />
<!-- 信息区域 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 第一行:运单号 | 件数 | 入库人 | 入库时间 | 在库状态 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 运单号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="运单号:"
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" />
</LinearLayout>
<!-- 件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="件数:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.pc)}"
android:textSize="16sp" />
</LinearLayout>
<!-- 入库人 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="入库人:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.inUserName}"
android:textSize="16sp" />
</LinearLayout>
<!-- 入库时间 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="入库时间:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.inDate}"
android:textSize="16sp" />
</LinearLayout>
<!-- 在库状态 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="在库状态:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.status}"
android:textColor='@{bean.status.equals("已出库") ? @color/text_red : bean.status.equals("已入库") ? @color/text_green : @color/text_normal}'
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<!-- 第二行:在库时长 | 重量 | 出库人 | 出库时间 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 在库时长 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="在库时长:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.storageDuration}"
android:textSize="16sp" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="重量:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.wt)}"
android:textSize="16sp" />
</LinearLayout>
<!-- 出库人 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="出库人:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.outUserName}"
android:textSize="16sp" />
</LinearLayout>
<!-- 出库时间 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="出库时间:"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.outDate}"
android:textSize="16sp" />
</LinearLayout>
<!-- 占位,与第一行在库状态对齐 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:orientation="horizontal" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,123 @@
<?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.LogBean" />
</data>
<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="vertical"
android:padding="10dp">
<!-- 第一行:关键字 | 日志类型 | 操作员 | 操作时间 -->
<LinearLayout
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.0"
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.key}" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
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.logType}" />
</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="@{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.opId}" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.3"
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.opTime}" />
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 第二行:操作内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<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.content}" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingHorizontal="4dp">
<!-- 步骤名称 -->
<TextView
android:id="@+id/tv_step_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="13sp" />
<!-- 圆点和连线区域 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_marginTop="6dp">
<!-- 左侧连线 -->
<View
android:id="@+id/view_line_left"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/view_dot"
android:layout_alignParentLeft="true"
android:background="#FF1C8CF5" />
<!-- 圆点 -->
<View
android:id="@+id/view_dot"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_centerInParent="true"
android:background="@drawable/bg_step_dot_blue" />
<!-- 右侧连线 -->
<View
android:id="@+id/view_line_right"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/view_dot"
android:layout_alignParentRight="true"
android:background="#FF1C8CF5" />
</RelativeLayout>
</LinearLayout>

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingHorizontal="15dp">
<!-- 左侧:圆点 + 连线 -->
<RelativeLayout
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_marginRight="12dp">
<!-- 顶部连线 -->
<View
android:id="@+id/view_line_top"
android:layout_width="1.5dp"
android:layout_height="8dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="#E0E0E0" />
<!-- 圆点 -->
<View
android:id="@+id/view_dot"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_below="@+id/view_line_top"
android:layout_centerHorizontal="true"
android:background="@drawable/bg_timeline_dot_gray" />
<!-- 底部连线 -->
<View
android:id="@+id/view_line_bottom"
android:layout_width="1.5dp"
android:layout_height="match_parent"
android:layout_below="@+id/view_dot"
android:layout_centerHorizontal="true"
android:background="#E0E0E0" />
</RelativeLayout>
<!-- 右侧:内容 + 时间 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="20dp">
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#333333"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textColor="#999999"
android:textSize="13sp" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,240 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.ULDBean" />
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll_content"
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">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:src="@drawable/img_plane"
tools:src="@drawable/img_plane" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 第一行 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- ULD编号 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ULD编号" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.uld}"
android:textColor="@color/colorPrimary" />
</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="@{3}"
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.statusName()}"
android:textColor='@{bean.status.equals("0") ? @color/text_normal : @color/red}' />
</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="@{3}"
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.uldWeight}" />
</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="@{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.carrier}" />
</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
completeSpace="@{7}"
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.maxVolume}" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<!-- 最大载重 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
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.maxWeight}" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 备注 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3.6"
android:gravity="center_vertical">
<TextView
completeSpace="@{3}"
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.remark}" />
</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>
</FrameLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_modify"
style="@style/tv_item_action"
android:background="#8313ef"
android:text="修改" />
<TextView
android:id="@+id/tv_delete"
style="@style/tv_item_action"
android:background="@color/red"
android:text="删除" />
</androidx.appcompat.widget.LinearLayoutCompat>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -6,7 +6,17 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html # http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
kapt.use.worker.api=false kapt.use.worker.api=false
kapt.include.compile.classpath=false kapt.include.compile.classpath=false
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.

View File

@@ -152,11 +152,10 @@ dependencies {
api 'me.jessyan:autosize:1.2.+' api 'me.jessyan:autosize:1.2.+'
// 佳博打印SDK // 佳博打印SDK
// api('com.gainscha:sdk2:2.0.3@aar') {
// exclude group: 'com.jcraft'
// }
// api(name: 'sdk2-2.1.6-20250901.051214-1', ext: 'aar') {
api(name: 'sdk2-2.0.4', ext: 'aar') { api(name: 'sdk2-2.0.4', ext: 'aar') {
exclude group: 'com.jcraft' exclude group: 'com.jcraft'
} }
api(name: 'fimage-1.0.0', ext: 'aar') {
exclude group: 'com.jcraft'
}
} }

Binary file not shown.

View File

@@ -41,7 +41,7 @@ import me.jessyan.autosize.internal.CustomAdapt
* ========== 开发调试开关 ========== * ========== 开发调试开关 ==========
* TODO: 正式发布前务必设置为 false * TODO: 正式发布前务必设置为 false
*/ */
private const val DEV_AUTO_LOGIN = false // 自动登录开关 private const val DEV_AUTO_LOGIN = true // 自动登录开关
@Route(path = ARouterConstants.ACTIVITY_URL_LOGIN) @Route(path = ARouterConstants.ACTIVITY_URL_LOGIN)
class LoginActivity : BaseActivity(), class LoginActivity : BaseActivity(),

View File

@@ -49,6 +49,26 @@ fun bindAdapter(
if (hint.isNullOrEmpty()) { if (hint.isNullOrEmpty()) {
val adapter = ArrayAdapter(spinner.context, layoutId, list) val adapter = ArrayAdapter(spinner.context, layoutId, list)
spinner.adapter = adapter spinner.adapter = adapter
} else if (list.isEmpty()) {
// 列表为空时:控件上显示 hint 占位文字(灰色),下拉列表隐藏
// 不能用 SpinnerHintAdapter其 getCount()=0 会导致 Spinner 不渲染
val adapter = object : ArrayAdapter<String>(spinner.context, layoutId, listOf(hint)) {
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
val view = super.getView(position, convertView, parent)
(view as TextView).setTextColor(context.resources.getColor(R.color.text_gray_l))
return view
}
override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View {
// 下拉列表中隐藏 hint 项
val view = super.getDropDownView(position, convertView, parent)
view.visibility = View.GONE
view.layoutParams = ViewGroup.LayoutParams(0, 0)
return view
}
}
spinner.adapter = adapter
spinner.setSelection(0)
} else { } else {
val containHintList = list + hint val containHintList = list + hint
val adapter = SpinnerHintAdapter(spinner.context, layoutId, containHintList) val adapter = SpinnerHintAdapter(spinner.context, layoutId, containHintList)

View File

@@ -4,6 +4,7 @@ package com.lukouguoji.module_base.bean
* 组装位置Bean * 组装位置Bean
*/ */
class AssemblePositionBean { class AssemblePositionBean {
var positionCode: String = "" // 位置编码/ID
var positionName: String = "" // 位置名称 var positionName: String = "" // 位置名称
var isSelected: Boolean = false // 是否选中 var isSelected: Boolean = false // 是否选中
} }

View File

@@ -0,0 +1,26 @@
package com.lukouguoji.module_base.bean
import androidx.databinding.ObservableBoolean
/**
* 冷库登记 Bean
*/
class ColdStorageBean {
var id: Long = 0
var wbNo: String = "" // 运单号
var pc: Int = 0 // 件数
var wt: Double = 0.0 // 重量
var inUserName: String = "" // 入库人
var inDate: String = "" // 入库时间
var outUserName: String = "" // 出库人
var outDate: String = "" // 出库时间
var storageDuration: String = "" // 在库时长
var status: String = "" // 在库状态
var ieFlag: String = "" // 进出港标识
// 多选状态
val checked: ObservableBoolean = ObservableBoolean(false)
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
}

View File

@@ -151,6 +151,46 @@ class FlightBean : ICheck {
).noNull(scheduledTackOff) ).noNull(scheduledTackOff)
} }
// 预计起飞时间-时分
val estimatedTakeOffHM: String
get() {
return DateUtils.parseString(
estimatedTakeOff,
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
"HH:mm"
).noNull(estimatedTakeOff)
}
// 计划降落时间-时分
val scheduledArrivalHM: String
get() {
return DateUtils.parseString(
scheduledArrival,
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
"HH:mm"
).noNull(scheduledArrival)
}
// 预计降落时间-时分
val estimatedArrivalHM: String
get() {
return DateUtils.parseString(
estimatedArrival,
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
"HH:mm"
).noNull(estimatedArrival)
}
// 实际降落时间-时分
val actualArrivalHM: String
get() {
return DateUtils.parseString(
actualArrival,
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
"HH:mm"
).noNull(actualArrival)
}
// 航班服务种类(0:客机;1:货机;2:卡车) // 航班服务种类(0:客机;1:货机;2:卡车)
var serviceType: String = "" var serviceType: String = ""
@@ -219,6 +259,50 @@ class FlightBean : ICheck {
return calendar.get(Calendar.DAY_OF_YEAR) > current.get(Calendar.DAY_OF_YEAR) return calendar.get(Calendar.DAY_OF_YEAR) > current.get(Calendar.DAY_OF_YEAR)
} }
// 预计起飞 vs 计划起飞 是否跨日
fun isEstimatedTakeOffNextDay(): Boolean {
if (scheduledTackOff.isEmpty() || estimatedTakeOff.isEmpty()) return false
return try {
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedTakeOff))
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
} catch (e: Exception) { false }
}
// 实际起飞 vs 计划起飞 是否跨日
fun isActualTakeOffNextDay(): Boolean {
if (scheduledTackOff.isEmpty() || actualTakeOff.isEmpty()) return false
return try {
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualTakeOff))
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
} catch (e: Exception) { false }
}
// 预计降落 vs 计划降落 是否跨日
fun isEstimatedArrivalNextDay(): Boolean {
if (scheduledArrival.isEmpty() || estimatedArrival.isEmpty()) return false
return try {
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedArrival))
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
} catch (e: Exception) { false }
}
// 实际降落 vs 计划降落 是否跨日
fun isActualArrivalNextDay(): Boolean {
if (scheduledArrival.isEmpty() || actualArrival.isEmpty()) return false
return try {
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualArrival))
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
} catch (e: Exception) { false }
}
fun getCargoTypeName(): String { fun getCargoTypeName(): String {
return when (cargoType) { return when (cargoType) {
"0" -> "国际货" "0" -> "国际货"

View File

@@ -0,0 +1,26 @@
package com.lukouguoji.module_base.bean
class GjAccidentVisaEditBean {
var id: Long = 0
var fdate: String = "" // 航班日期
var fno: String = "" // 航班号
var dep: String = "" // 始发站
var dest: String = "" // 目的站
var wbNo: String = "" // 运单号
var dpc: String = "" // 不正常件数
var pc: String = "" // 运单总件数
var weight: String = "" // 运单总重量
var reweight: String = "" // 复称重量
var goods: String = "" // 品名
var opacking: String = "" // 外包装
var damage: String = "" // 包装破损情况
var condition: String = "" // 内容物情况
var problem: String = "" // 不正常类型
var seachDate: String = "" // 发现时间
var photo: String = "" // 图片是否留底
var remarks: String = "" // 备注
var pic: String = "" // 缩略图
var originalPic: String = "" // 原图
var picNumber: String = "" // 图片数量
var idFlag: String = "1" // 国际标志固定为1=国际)
}

View File

@@ -7,7 +7,7 @@ import androidx.databinding.ObservableBoolean
*/ */
data class GjjAirManifest( data class GjjAirManifest(
// 主单原始舱单 // 主单原始舱单
var maWbList: GjjImportManifest? = null, var maWb: GjjImportManifest? = null,
// 分单原始舱单列表 // 分单原始舱单列表
var haWbList: List<GjjImportManifest>? = null var haWbList: List<GjjImportManifest>? = null
) { ) {
@@ -15,6 +15,10 @@ data class GjjAirManifest(
// 选中状态(用于列表多选) // 选中状态(用于列表多选)
val checked: ObservableBoolean = ObservableBoolean(false) val checked: ObservableBoolean = ObservableBoolean(false)
// 展开/收起状态(用于子列表显示控制)
@Transient
val showMore: ObservableBoolean = ObservableBoolean(false)
// 兼容现有API的isSelected属性 // 兼容现有API的isSelected属性
var isSelected: Boolean var isSelected: Boolean
get() = checked.get() get() = checked.get()
@@ -24,6 +28,6 @@ data class GjjAirManifest(
* 获取主单用于显示 * 获取主单用于显示
*/ */
fun getMainManifest(): GjjImportManifest { fun getMainManifest(): GjjImportManifest {
return maWbList ?: GjjImportManifest() return maWb ?: GjjImportManifest()
} }
} }

View File

@@ -50,7 +50,11 @@ class GjjWarehouse(
var volume: String? = "", var volume: String? = "",
var wbNo: String? = "", var wbNo: String? = "",
var weight: String? = "", var weight: String? = "",
var whid: String? = "" var whid: String? = "",
var splitFlag: String? = "",
var inDate: String? = "",
var clearNormal: String? = "",
var range: String? = ""
) { ) {
fun getWaybillCode() = "${prefix}${no}" fun getWaybillCode() = "${prefix}${no}"

View File

@@ -0,0 +1,40 @@
package com.lukouguoji.module_base.bean
import androidx.databinding.ObservableBoolean
import java.io.Serializable
/**
* 国际进港舱单-分单Bean
*/
data class GjjHaWb(
var hawbId: Long = 0,
var hno: String = "",
var no: String = "",
var prefix: String = "",
var pc: Long = 0,
var weight: Double = 0.0,
var volume: Double = 0.0,
var cashWeight: Double = 0.0,
var goods: String = "",
var goodsCn: String = "",
var spCode: String = "",
var mftStatus: String = "",
var lastMftStatus: String = "",
var mftMsgId: String = "",
var lastMftMsgId: String = "",
var declareCount: Int = 0,
var checkInType: String = "",
var activeId: Long = 0,
var opId: String = "",
var opDate: String = "",
var billsNo: String = "",
var remark: String = "",
var response: String = ""
) : Serializable {
@Transient
val checked: ObservableBoolean = ObservableBoolean(false)
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
}

View File

@@ -47,10 +47,14 @@ data class GjjImportManifest(
var dgrContactMame: String = "", var dgrContactMame: String = "",
// 危险品收货人通讯方式 // 危险品收货人通讯方式
var dgrContactNumber: String = "", var dgrContactNumber: String = "",
// 航班日期
var fdate: String = "",
// 航班起始站 // 航班起始站
var fdep: String = "", var fdep: String = "",
// 航班目的站 // 航班目的站
var fdest: String = "", var fdest: String = "",
// 航班号
var fno: String = "",
// 航班id // 航班id
var fid: Long = 0, var fid: Long = 0,
// 运费支付方式 // 运费支付方式
@@ -114,6 +118,15 @@ data class GjjImportManifest(
// 重量 // 重量
var weight: Double = 0.0 var weight: Double = 0.0
) : Serializable { ) : Serializable {
// 获取航班信息(日期去横杠/航班号)
fun getFlightSplit(): String {
if (fdate != "" && fno != "") {
val (year, mon, day) = fdate.split("-")
return "${year}${mon}${day}/${fno}"
}
return ""
}
// ========== UI扩展字段 ========== // ========== UI扩展字段 ==========
// 选中状态 // 选中状态
@Transient @Transient

View File

@@ -74,7 +74,27 @@ data class GjjImportTally(
// 体积(m³) // 体积(m³)
var volume: Double = 0.0, var volume: Double = 0.0,
// 重量(kg) // 重量(kg)
var weight: Double = 0.0 var weight: Double = 0.0,
// 品名(中文)
var goodsCn: String = "",
// 品名(英文)
var goodsEn: String = "",
// 放行模式(代码)
var relMode: String = "",
// 放行模式(名称)
var releaseMode: String = "",
// 放行时间(perDate)
var perDate: String = "",
// 放行时间
var releaseTime: String = "",
// 指令类型(comType)
var comType: String = "",
// 指令类型
var instructionType: String = "",
// 放行备注
var relRemark: String = "",
// 备注
var remark: String = ""
) : Serializable { ) : Serializable {
// 选中状态(用于多选功能)- 不参与序列化 // 选中状态(用于多选功能)- 不参与序列化
@Transient @Transient
@@ -85,7 +105,24 @@ data class GjjImportTally(
get() = checked.get() get() = checked.get()
set(value) = checked.set(value) set(value) = checked.set(value)
// 展开/折叠状态 - 不参与序列化
@Transient
val showMore: ObservableBoolean = ObservableBoolean(false)
// 已加载的分单数据 - 不参与序列化
@Transient
var haWbList: MutableList<GjjImportTally>? = null
// 获取完整运单号 // 获取完整运单号
fun getWaybillNo() = "$prefix$no" fun getWaybillNo() = "$prefix$no"
// 获取航班信息(日期去横杠/航班号)
fun getFlightSplit(): String {
if (fdate != "" && fno != "") {
val (year, mon, day) = fdate.split("-")
return "${year}${mon}${day}/${fno}"
}
return ""
}
} }

View File

@@ -56,6 +56,13 @@ data class GjjManifest(
var unNumber: String = "", // 危险品编号 var unNumber: String = "", // 危险品编号
var activeId: Long = 0 // 活动ID var activeId: Long = 0 // 活动ID
) : Serializable { ) : Serializable {
// 分单列表
var haWbList: List<GjjHaWb>? = null
// 展开/收起状态
@Transient
val showMore: ObservableBoolean = ObservableBoolean(false)
// 选中状态(用于多选功能)- 不参与序列化 // 选中状态(用于多选功能)- 不参与序列化
@Transient @Transient
val checked: ObservableBoolean = ObservableBoolean(false) val checked: ObservableBoolean = ObservableBoolean(false)

View File

@@ -0,0 +1,23 @@
package com.lukouguoji.module_base.bean
import java.io.Serializable
/**
* 国际进港-库位使用记录Bean
* 对应接口: /IntImpSearch/detail 返回的 storageUseList 项
*/
data class GjjStorageUse(
var id: Long? = null, // 主键
var maWbId: Long? = null, // 运单id
var prefix: String? = null, // 运单前缀
var no: String? = null, // 运单号
var location: String? = null, // 库位号
var locationId: Long? = null, // 库位id
var inDate: String? = null, // 入库时间
var inOpId: String? = null, // 入库人ID
var inOpName: String? = null, // 入库人姓名
var outDate: String? = null, // 出库时间
var outOpId: String? = null, // 出库人ID
var outOpName: String? = null, // 出库人姓名
var cargoStatus: String? = null // 货物状态
) : Serializable

View File

@@ -0,0 +1,23 @@
package com.lukouguoji.module_base.bean
import androidx.databinding.ObservableBoolean
class IntImpAccidentVisaBean {
var id: Long = 0
var fdate: String = "" // 航班日期
var fno: String = "" // 航班号
var fdep: String = "" // 始发站
var fdest: String = "" // 目的站
var wbNo: String = "" // 运单号
var totalPc: Int = 0 // 运单总件数
var totalWeight: Double = 0.0 // 运单总重量
var abnPc: Int = 0 // 不正常件数
var opName: String = "" // 经办人
var opDate: String = "" // 经办时间
val checked: ObservableBoolean = ObservableBoolean(false)
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
}

View File

@@ -0,0 +1,76 @@
package com.lukouguoji.module_base.bean
import androidx.databinding.ObservableBoolean
import java.io.Serializable
/**
* 国际进港提取出库-列表数据Bean
* 对应API: IntImpPickUpDlv/pageQuery
*/
class IntImpPickUpDLVBean : Serializable {
var id: Long = 0 // 主键ID
var wbNo: String = "" // 运单号
var no: String = "" // 主单号
var prefix: String = "" // 主单前缀
var hno: String = "" // 分单号
var agentCode: String = "" // 代理人代码
var agentName: String = "" // 代理人名称
var flight: String = "" // 航班信息
var fno: String = "" // 航班号
var fdate: String = "" // 航班日期
var pc: Long = 0 // 件数
var weight: Double = 0.0 // 重量
var cashWeight: Double = 0.0 // 计费重量
var pkId: String = "" // 提货编号(提货单号)
var location: String = "" // 库位
var chargeTime: String = "" // 缴费时间(提取时间)
var dlvTime: String = "" // 出库时间
var goods: String = "" // 品名
var spCode: String = "" // 特码
var pickFlag: String = "" // 提取出库标识
var chargeFlag: String = "" // 提取标识
var serialNo: Long = 0 // 收费记录项目序号
var amount: Double = 0.0 // 总金额
var optCharge: Double = 0.0 // 服务费
var whsCharge: Double = 0.0 // 仓储费
var tranCharge: Double = 0.0 // 信息费
var drawBillCharge: Double = 0.0 // 抽单费
var efrCharge: Double = 0.0 // 冷藏费
var svlCharge: Double = 0.0 // 铲车费
var tallyCharge: Double = 0.0 // 理货费
var pipFee: Double = 0.0 // 精密仪器处理费
var lapFee: Double = 0.0 // 活体动物处理费
var chargeId: String = "" // 收费员
var chargeName: String = "" // 收费员名称
var dlvId: String = ""
var dlvIdType: String = ""
var dlvName: String = ""
var dlvPhone: String = ""
var locFlag: String = ""
var origin: String = ""
var refId: String = ""
var receiptNo: String = ""
var chgMode: String = ""
var billReviewStatus: String = ""
var billAgentRemark: String = ""
var awbPc: Long = 0
// ========== UI扩展字段 ==========
/**
* 航班信息展示:优先使用 flight 字段,否则用 fdate(去杠)/fno 拼接
* 格式示例20240204/MU2023
*/
val flightInfo: String
get() {
if (!flight.isNullOrEmpty()) return flight
val dateStr = fdate?.replace("-", "")?.take(8) ?: ""
val noStr = fno ?: ""
return if (dateStr.isNotEmpty() || noStr.isNotEmpty()) "$dateStr/$noStr" else ""
}
val checked: ObservableBoolean = ObservableBoolean(false)
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
}

View File

@@ -0,0 +1,44 @@
package com.lukouguoji.module_base.bean
import androidx.databinding.ObservableBoolean
import java.io.Serializable
/**
* 国际进港提取记录-列表数据Bean
* 对应API: IntImpPickup/pageQuery
*/
class IntImpPickUpRecordBean : Serializable {
var id: Long = 0 // 主键ID
var wbNo: String = "" // 运单号
var no: String = "" // 主单号
var prefix: String = "" // 前缀
var hno: String = "" // 分单号
var serialNo: String = "" // 序号
var pc: Int = 0 // 件数
var weight: Double = 0.0 // 重量
var cashWeight: Double = 0.0 // 计费重量
var agentCode: String = "" // 代理人
var spCode: String = "" // 特码
var optCharge: Double = 0.0 // 服务费
var whsCharge: Double = 0.0 // 仓储费
var amount: Double = 0.0 // 总金额
var chargeTime: String = "" // 缴费时间/提取时间
var pkId: String = "" // 提货编号
var tranCharge: Double = 0.0 // 信息费
var drawBillCharge: Double = 0.0 // 抽单费
var efrCharge: Double = 0.0 // 冷藏费
var svlCharge: Double = 0.0 // 铲车费
var tallyCharge: Double = 0.0 // 理货费
var pipFee: Double = 0.0 // 精密仪器处理费
var lapFee: Double = 0.0 // 活体动物处理费
var chargeName: String = "" // 办理人名称
var chargeId: String = "" // 收费员ID
var dlvTime: String = "" // 出库时间
// ========== UI扩展字段 ==========
val checked: ObservableBoolean = ObservableBoolean(false)
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
}

View File

@@ -0,0 +1,57 @@
package com.lukouguoji.module_base.bean
/**
* 国际进港查询-主运单数据模型
* 对应接口:/IntImpSearch/pageQuery 返回的列表项 (GjjSearchMaWb)
*/
data class IntImpQueryBean(
var maWbId: Long? = null, // 主单主键ID
var wbNo: String? = null, // 运单号
var prefix: String? = null, // 运单号前缀
var no: String? = null, // 运单号主体
// ==================== 货物信息 ====================
var awbPc: Long? = null, // 运单件数
var awbWeight: Double? = null, // 运单重量
var inPc: Long? = null, // 入库件数
var inWeight: Double? = null, // 入库重量
var cashWeight: Double? = null, // 计费重量
var goods: String? = null, // 品名(英)
var goodsCn: String? = null, // 品名(中)
var packageType: String? = null, // 包装类型
var unNumber: String? = null, // UN编号
// ==================== 航班信息 ====================
var flight: String? = null, // 航班: 日期/航班号
var fno: String? = null, // 航班号
var fdate: String? = null, // 航班日期
var range: String? = null, // 航程 (如 LAX-HFE)
var dest: String? = null, // 目的地
var origin: String? = null, // 货源地
var by1: String? = null, // 承运人
// ==================== 代理与运单类型 ====================
var agentCode: String? = null, // 代理人code
var agentName: String? = null, // 代理人名称
var awbType: String? = null, // 运单类型code
var awbName: String? = null, // 运单类型名称
var businessType: String? = null, // 业务类型code
var businessName: String? = null, // 业务类型名称
// ==================== 特码 ====================
var spCode: String? = null, // 特码
// ==================== 时间信息 ====================
var inDate: String? = null, // 入库时间
var dlvTime: String? = null, // 出库时间
// ==================== 状态信息 ====================
var mftStatus: String? = null, // 原始舱单状态
var tallyStatus: String? = null, // 理货申报状态
var lockState: Int? = null, // 锁定状态0:未锁, 1:锁定)
var command: String? = null, // 海关放行
// ==================== 其他 ====================
var remark: String? = null, // 备注
var activeId: Long? = null // 有效值
)

View File

@@ -0,0 +1,53 @@
package com.lukouguoji.module_base.bean
/**
* 国际进港运单修改-数据模型
* 对应接口:/IntImpSearch/modifyMaWb 的请求体 (GjjMaWb)
* 详情数据来源:/IntImpSearch/detail 返回的 maWb + maWbM + warehouseList
*/
data class IntImpQueryEditBean(
// ==================== 主键 ====================
var maWbId: Long? = null, // 主单主键ID
var activeId: Long? = null, // 有效值
// ==================== 运单号(禁用) ====================
var wbNo: String? = null, // 运单号(组合: prefix + no
var prefix: String? = null, // 运单号前缀
var no: String? = null, // 运单号主体
// ==================== 可编辑字段 ====================
var agentCode: String? = null, // 代理人code提交用
var agentName: String? = null, // 代理人名称(显示用)
var spCode: String? = null, // 特码
var packageType: String? = null, // 包装类型
var awbType: String? = null, // 运单类型code
var lockState: String? = null, // 锁定状态("0":未锁, "1":锁定)
var remark: String? = null, // 备注
// ==================== 禁用字段(仅显示) ====================
var awbPc: Long? = null, // 运单件数对应API: pc
var awbWeight: Double? = null, // 运单重量对应API: weight
var businessType: String? = null, // 业务类型code
var businessName: String? = null, // 业务类型名称
var inPc: Long? = null, // 入库件数
var inWeight: Double? = null, // 入库重量
var cashWeight: Double? = null, // 计费重量
var by1: String? = null, // 承运人
var range: String? = null, // 航程
var goodsCn: String? = null, // 品名(中)
var goods: String? = null, // 品名(英)
var unNumber: String? = null, // UN编号
// ==================== 提交时需要的额外字段 ====================
var fno: String? = null, // 航班号
var fdate: String? = null, // 航班日期
var flight: String? = null, // 航班
var pc: Long? = null, // 件数API用
var weight: Double? = null, // 重量API用
var volume: Double? = null, // 体积
var origin: String? = null, // 货源地
var dest: String? = null, // 目的地
var cargoType: String? = null, // 货物类型
var subCode: String? = null, // 子码
var carId: String? = null // 车牌号
)

View File

@@ -23,7 +23,8 @@ class MsgReceivePool(
var interfaceType: String = "" // 接口类型 var interfaceType: String = "" // 接口类型
) : BaseObservable(), ICheck { ) : BaseObservable(), ICheck {
// 选中状态 // 选中状态UI状态不参与序列化
@Transient
val checked = ObservableBoolean(false) val checked = ObservableBoolean(false)
override fun getCheckObservable() = checked override fun getCheckObservable() = checked

View File

@@ -0,0 +1,11 @@
package com.lukouguoji.module_base.bean
data class StatusLogBean(
var id: Long = 0,
var key: String = "", // 关键字(运单号)
var awbType: String = "", // 运单类型CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港)
var content: String = "", // 操作内容
var opDate: String = "", // 操作时间
var opId: String = "", // 操作人
var status: String = "" // 操作环节(运单状态)
)

View File

@@ -15,6 +15,16 @@ data class ULDBean(
var uld: String = "", var uld: String = "",
var uldFlag: String = "", var uldFlag: String = "",
var uldType: String = "", var uldType: String = "",
// 状态 0:正常 1:故障
var status: String = "",
// 备注
var remark: String = "",
){ ){
val checked = ObservableBoolean(false) val checked = ObservableBoolean(false)
fun statusName(): String = when (status) {
"0" -> "正常"
"1" -> "故障"
else -> status
}
} }

View File

@@ -270,6 +270,9 @@ interface Constant {
const val IntArrAirManifest = "AppIntArrAirManifest" //原始舱单 const val IntArrAirManifest = "AppIntArrAirManifest" //原始舱单
const val IntImpManifest = "AppIntImpManifest" //进港舱单 const val IntImpManifest = "AppIntImpManifest" //进港舱单
const val IntImpTally = "AppIntImpTally" //理货报告 const val IntImpTally = "AppIntImpTally" //理货报告
const val IntImpPickUpRecord = "AppIntImpPickUpRecord" //提取记录
const val IntImpPickUpDLV = "AppIntImpPickUpDLV" //提取出库
const val IntImpAccidentVisa = "AppIntImpAccidentVisa" //事故签证
const val GjjManifestListActivity = "AppIntExpManifest" //舱单 const val GjjManifestListActivity = "AppIntExpManifest" //舱单
const val GjjTallyListActivity = "AppIntExpTally" //理货 const val GjjTallyListActivity = "AppIntExpTally" //理货
const val GjjGoodsListActivity = "AppIntExpGjjGoods" //货物交接 const val GjjGoodsListActivity = "AppIntExpGjjGoods" //货物交接
@@ -325,6 +328,12 @@ interface Constant {
// 日志查询 // 日志查询
const val ComprehensiveLog = "AppComprehensiveLog" const val ComprehensiveLog = "AppComprehensiveLog"
// ULD管理
const val ComprehensiveUld = "AppComprehensiveUld"
// 冷库登记
const val ComprehensiveColdStorage = "AppComprehensiveColdStorage"
} }
} }

View File

@@ -11,6 +11,7 @@ import com.lukouguoji.module_base.bean.BaseResultBean
import com.lukouguoji.module_base.bean.BoxDetailsForCarIdBean import com.lukouguoji.module_base.bean.BoxDetailsForCarIdBean
import com.lukouguoji.module_base.bean.CarBarBean import com.lukouguoji.module_base.bean.CarBarBean
import com.lukouguoji.module_base.bean.CarOrUldBean import com.lukouguoji.module_base.bean.CarOrUldBean
import com.lukouguoji.module_base.bean.ColdStorageBean
import com.lukouguoji.module_base.bean.DiBangChannelBean import com.lukouguoji.module_base.bean.DiBangChannelBean
import com.lukouguoji.module_base.bean.DictBean import com.lukouguoji.module_base.bean.DictBean
import com.lukouguoji.module_base.bean.DictIdValueBean import com.lukouguoji.module_base.bean.DictIdValueBean
@@ -44,11 +45,17 @@ import com.lukouguoji.module_base.bean.GjcWeighingBean
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.bean.GjcWeighingStatisticsBean import com.lukouguoji.module_base.bean.GjcWeighingStatisticsBean
import com.lukouguoji.module_base.bean.GjjAirManifest import com.lukouguoji.module_base.bean.GjjAirManifest
import com.lukouguoji.module_base.bean.GjjHaWb
import com.lukouguoji.module_base.bean.GjjGoodsBean import com.lukouguoji.module_base.bean.GjjGoodsBean
import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
import com.lukouguoji.module_base.bean.GjjHandoverRecordBean import com.lukouguoji.module_base.bean.GjjHandoverRecordBean
import com.lukouguoji.module_base.bean.GjjImportTally import com.lukouguoji.module_base.bean.GjjImportTally
import com.lukouguoji.module_base.bean.GjAccidentVisaEditBean
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
import com.lukouguoji.module_base.bean.IntImpPickUpDLVBean
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
import com.lukouguoji.module_base.bean.IntImpQueryBean
import com.lukouguoji.module_base.bean.GjjManifest import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.bean.GjjManifestBean import com.lukouguoji.module_base.bean.GjjManifestBean
import com.lukouguoji.module_base.bean.GjjPackTypeBean import com.lukouguoji.module_base.bean.GjjPackTypeBean
@@ -74,6 +81,7 @@ import com.lukouguoji.module_base.bean.GnjYiKuBean
import com.lukouguoji.module_base.bean.GoodsTransportBean import com.lukouguoji.module_base.bean.GoodsTransportBean
import com.lukouguoji.module_base.bean.JianDataBean import com.lukouguoji.module_base.bean.JianDataBean
import com.lukouguoji.module_base.bean.LogBean import com.lukouguoji.module_base.bean.LogBean
import com.lukouguoji.module_base.bean.StatusLogBean
import com.lukouguoji.module_base.bean.ManifestTotalDto import com.lukouguoji.module_base.bean.ManifestTotalDto
import com.lukouguoji.module_base.bean.MessageBean import com.lukouguoji.module_base.bean.MessageBean
import com.lukouguoji.module_base.bean.MoveStashBean import com.lukouguoji.module_base.bean.MoveStashBean
@@ -227,6 +235,12 @@ interface Api {
@POST("typeCode/intExp/agentCode") @POST("typeCode/intExp/agentCode")
suspend fun getIntExpAgentList(): DictListBean suspend fun getIntExpAgentList(): DictListBean
/**
* 获取代理人-国际进港-下拉框
*/
@POST("typeCode/intImp/agentCode")
suspend fun getIntImpAgentList(): DictListBean
/** /**
* 获取业务类型---CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港 下拉框 * 获取业务类型---CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港 下拉框
*/ */
@@ -288,6 +302,18 @@ interface Api {
@POST("typeCode/countryType") @POST("typeCode/countryType")
suspend fun getAreaTypeList(): DictListBean suspend fun getAreaTypeList(): DictListBean
/**
* 获取国家代码
*/
@POST("typeCode/countryCode")
suspend fun getCountryCodeList(): DictListBean
/**
* 获取通讯方式类型
*/
@POST("typeCode/communicateType")
suspend fun getCommunicateTypeList(): DictListBean
/** /**
* 查询平板车信息 * 查询平板车信息
*/ */
@@ -891,6 +917,125 @@ interface Api {
@GET("typeCode/locationByFlag") @GET("typeCode/locationByFlag")
suspend fun getLocationList(@Query("flag") flag: Int): BaseResultBean<List<DictLocationBean>> suspend fun getLocationList(@Query("flag") flag: Int): BaseResultBean<List<DictLocationBean>>
/**
* 国际进港仓库-分页查询
* 接口路径: /IntImpStorage/pageQuery
*/
@POST("IntImpStorage/pageQuery")
suspend fun getIntImpStorageUseList(@Body data: RequestBody): PageInfo<GjcMaWb>
/**
* 国际进港仓库-分页合计
* 接口路径: /IntImpStorage/pageQueryTotal
*/
@POST("IntImpStorage/pageQueryTotal")
suspend fun getIntImpStorageUseTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港库位操作-清仓
* 接口路径: /IntImpStorage/updateClear
*/
@POST("IntImpStorage/updateClear")
suspend fun clearIntImpStorage(@Query("clearNormal") clearNormal: String, @Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港库位操作-修改库位
* 接口路径: /IntImpStorage/modifyStorage
*/
@POST("IntImpStorage/modifyStorage")
suspend fun modifyIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港库位操作-出库
* 接口路径: /IntImpStorage/outStorage
*/
@POST("IntImpStorage/outStorage")
suspend fun outIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港库位操作-入库
* 接口路径: /IntImpStorage/inStorage
*/
@POST("IntImpStorage/inStorage")
suspend fun inIntImpStorage(@Query("location") location: String, @Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港提取记录-分页查询
* 接口路径: /IntImpPickup/pageQuery
*/
@POST("IntImpPickup/pageQuery")
suspend fun getIntImpPickUpRecordList(@Body data: RequestBody): PageInfo<IntImpPickUpRecordBean>
/**
* 国际进港提取记录-分页合计
* 接口路径: /IntImpPickup/pageQueryTotal
*/
@POST("IntImpPickup/pageQueryTotal")
suspend fun getIntImpPickUpRecordTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港提取记录-清除提货
* 接口路径: /IntImpPickup/clearPickup
*/
@POST("IntImpPickup/clearPickup")
suspend fun clearIntImpPickUp(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际进港提取记录-修改费用
* 接口路径: /IntImpPickup/modifyCharge
*/
@POST("IntImpPickup/modifyCharge")
suspend fun modifyIntImpPickUpCharge(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际进港提取出库-分页查询
* 接口路径: /IntImpPickUpDlv/pageQuery
*/
@POST("IntImpPickUpDlv/pageQuery")
suspend fun getIntImpPickUpDLVList(@Body data: RequestBody): PageInfo<IntImpPickUpDLVBean>
/**
* 国际进港提取出库-分页合计
* 接口路径: /IntImpPickUpDlv/pageQueryTotal
*/
@POST("IntImpPickUpDlv/pageQueryTotal")
suspend fun getIntImpPickUpDLVTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港提取出库-确认出库
* 接口路径: /IntImpPickUpDlv/pickUpOut
*/
@POST("IntImpPickUpDlv/pickUpOut")
suspend fun confirmIntImpPickUpDLV(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际进港查询-分页
* 接口路径: /IntImpSearch/pageQuery
*/
@POST("IntImpSearch/pageQuery")
suspend fun getIntImpQueryList(@Body data: RequestBody): PageInfo<IntImpQueryBean>
/**
* 国际进港查询-分页合计
* 接口路径: /IntImpSearch/pageQueryTotal
*/
@POST("IntImpSearch/pageQueryTotal")
suspend fun getIntImpQueryTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港查询-详情
* 接口路径: /IntImpSearch/detail
*/
@POST("IntImpSearch/detail")
suspend fun getIntImpQueryDetails(@Body data: RequestBody): BaseResultBean<Map<String, Any>>
/**
* 国际进港查询-修改运单
* 接口路径: /IntImpSearch/modifyMaWb
*/
@POST("IntImpSearch/modifyMaWb")
suspend fun modifyIntImpMaWb(@Body data: RequestBody): BaseResultBean<String>
/** /**
* 国际出港待计重-分页搜索 * 国际出港待计重-分页搜索
* 接口路径: /IntExpCheckIn/pageQuery * 接口路径: /IntExpCheckIn/pageQuery
@@ -1130,21 +1275,21 @@ interface Api {
suspend fun getGjjManifestDetail(@Query("id") id: String): BaseResultBean<GjjManifestBean> suspend fun getGjjManifestDetail(@Query("id") id: String): BaseResultBean<GjjManifestBean>
/** /**
* 删除-国际进-舱单-列表 * 批量删除-国际进舱单(请求体为 mfId 数组,如 [1,2,3]
*/ */
@POST("IntImpManiFest/deleteFestList") @POST("IntImpManiFest/deleteFestList")
suspend fun gjjManifestDelete(@Body data: RequestBody): BaseResultBean<Any> suspend fun gjjManifestDeleteBatch(@Body data: RequestBody): BaseResultBean<Any>
/** /**
* 新增-国际进-舱单 * 新增-国际进舱单
*/ */
@POST("IntImpManiFest/saveFest") @POST("IntImpManifest/addManifest")
suspend fun gjjManifestInsert(@Body data: RequestBody): BaseResultBean<Any> suspend fun gjjManifestInsert(@Body data: RequestBody): BaseResultBean<Any>
/** /**
* 更新-国际进-舱单 * 修改-国际进舱单
*/ */
@POST("IntImpManiFest/updateFest") @POST("IntImpManifest/modifyManifest")
suspend fun gjjManifestUpdate(@Body data: RequestBody): BaseResultBean<Any> suspend fun gjjManifestUpdate(@Body data: RequestBody): BaseResultBean<Any>
/** /**
@@ -1349,6 +1494,12 @@ interface Api {
@POST("log/pageQuery") @POST("log/pageQuery")
suspend fun getLogList(@Body data: RequestBody): BaseListBean<LogBean> suspend fun getLogList(@Body data: RequestBody): BaseListBean<LogBean>
/**
* 获取-运单状态列表(关键词-运单号、运单类型必填)
*/
@POST("log/listStatus")
suspend fun getLogStatusList(@Body data: RequestBody): BaseResultBean<List<StatusLogBean>>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 国内进港-舱单 // 国内进港-舱单
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@@ -1634,13 +1785,13 @@ interface Api {
* 分页查询国际进港电报 * 分页查询国际进港电报
*/ */
@POST("IntImpMsg/pageQuery") @POST("IntImpMsg/pageQuery")
suspend fun getIntImpMsgList(@Body data: RequestBody): BaseResultBean<PageInfo<MsgReceivePool>> suspend fun getIntImpMsgList(@Body data: RequestBody): PageInfo<MsgReceivePool>
/** /**
* 批量生成电报 * 解析电报(电报生成)
*/ */
@POST("IntImpMsg/batchGenerate") @POST("IntImpMsg/analyseMsg")
suspend fun batchGenerateMsg(@Body data: RequestBody): BaseResultBean<SimpleResultBean> suspend fun analyseMsg(@Body data: RequestBody): BaseResultBean<Boolean>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 国际进港-原始舱单 // 国际进港-原始舱单
@@ -1650,7 +1801,7 @@ interface Api {
* 国际进港原始舱单-分页查询 * 国际进港原始舱单-分页查询
*/ */
@POST("IntImpAirManifest/pageQuery") @POST("IntImpAirManifest/pageQuery")
suspend fun getIntArrAirManifestList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjAirManifest>> suspend fun getIntArrAirManifestList(@Body data: RequestBody): PageInfo<GjjAirManifest>
/** /**
* 国际进港原始舱单-分页合计 * 国际进港原始舱单-分页合计
@@ -1676,6 +1827,12 @@ interface Api {
@POST("IntImpAirManifest/deleteDeclare") @POST("IntImpAirManifest/deleteDeclare")
suspend fun deleteIntArrManifestDeclare(@Body data: RequestBody): BaseResultBean<Boolean> suspend fun deleteIntArrManifestDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港原始舱单-补充收发货人信息
*/
@POST("IntImpAirManifest/complete")
suspend fun completeIntArrManifest(@Body data: RequestBody): BaseResultBean<Any>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 国际进港-进港舱单 // 国际进港-进港舱单
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@@ -1684,7 +1841,7 @@ interface Api {
* 国际进港舱单-分页查询 * 国际进港舱单-分页查询
*/ */
@POST("IntImpManifest/pageQuery") @POST("IntImpManifest/pageQuery")
suspend fun getIntImpManifestList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjManifest>> suspend fun getIntImpManifestList(@Body data: RequestBody): PageInfo<GjjManifest>
/** /**
* 国际进港舱单-分页合计 * 国际进港舱单-分页合计
@@ -1692,11 +1849,35 @@ interface Api {
@POST("IntImpManifest/pageQueryTotal") @POST("IntImpManifest/pageQueryTotal")
suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto> suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港舱单-获取主单下分单
*/
@POST("IntImpManifest/listHaWbByManifest")
suspend fun getIntImpManifestHaWbList(@Body data: RequestBody): BaseResultBean<List<GjjHaWb>>
/**
* 国际进港舱单-新增分单
*/
@POST("IntImpManifest/addHaWb")
suspend fun intImpManifestAddHaWb(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际进港舱单-修改分单
*/
@POST("IntImpManifest/modifyHaWb")
suspend fun intImpManifestModifyHaWb(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际进港舱单-获取主单减去分单的件数重量
*/
@POST("IntImpManifest/getMaWbMinusHaWb")
suspend fun getMaWbMinusHaWb(@Body data: RequestBody): BaseResultBean<GjjHaWb>
/** /**
* 国际进港舱单-分拣理货(装机单)-分页查询 * 国际进港舱单-分拣理货(装机单)-分页查询
*/ */
@POST("IntImpManifest/pageQueryAir") @POST("IntImpManifest/pageQueryAir")
suspend fun getIntImpLoadingList(@Body data: RequestBody): BaseResultBean<PageInfo<GjjManifest>> suspend fun getIntImpLoadingList(@Body data: RequestBody): PageInfo<GjjManifest>
/** /**
* 国际进港舱单-分拣理货(装机单)-分页合计 * 国际进港舱单-分拣理货(装机单)-分页合计
@@ -1704,6 +1885,26 @@ interface Api {
@POST("IntImpManifest/pageQueryAirTotal") @POST("IntImpManifest/pageQueryAirTotal")
suspend fun getIntImpLoadingTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto> suspend fun getIntImpLoadingTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港舱单-分拣理货(装机单)-修改装机单
*/
@POST("IntImpManifest/modifyManifestAir")
suspend fun modifyIntImpLoadingList(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际进港舱单-分拣理货(装机单)-修改库位
* 接口路径: /IntImpManifest/modifyStorage
*/
@POST("IntImpManifest/modifyStorage")
suspend fun modifyIntImpLoadingStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港舱单-分拣理货(装机单)-入库
* 接口路径: /IntImpManifest/inStorage
*/
@POST("IntImpManifest/inStorage")
suspend fun inIntImpLoadingStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/** /**
* 国际进港理货报告-分页查询 * 国际进港理货报告-分页查询
*/ */
@@ -1715,4 +1916,148 @@ interface Api {
*/ */
@POST("IntImpTally/pageQueryTotal") @POST("IntImpTally/pageQueryTotal")
suspend fun getIntImpTallyTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto> suspend fun getIntImpTallyTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港理货报告-查询分单列表
*/
@POST("IntImpTally/listHaWb")
suspend fun getIntImpTallySubList(@Body data: RequestBody): BaseResultBean<List<GjjImportTally>>
/**
* 国际进港理货-人工放行
*/
@POST("IntImpTally/customCommand")
suspend fun intImpTallyCustomCommand(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港理货-状态重置
*/
@POST("IntImpTally/resetDeclare")
suspend fun intImpTallyResetDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港理货-删除申报
*/
@POST("IntImpTally/deleteDeclare")
suspend fun intImpTallyDeleteDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港理货-理货申报
*/
@POST("IntImpTally/declare")
suspend fun intImpTallyDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港舱单-货物发放
*/
@POST("IntImpManifest/putUpCargo")
suspend fun intImpManifestPutUpCargo(@Body data: RequestBody): BaseResultBean<String>
///////////////////////////////////////////////////////////////////////////
// 国际进港-事故签证
///////////////////////////////////////////////////////////////////////////
/**
* 国际事故签证-分页搜索
*/
@POST("GjAccidentVisa/search")
suspend fun getIntImpAccidentVisaList(@Body data: RequestBody): PageInfo<IntImpAccidentVisaBean>
/**
* 国际事故签证-删除(传选中的 Bean 列表)
*/
@POST("GjAccidentVisa/delete")
suspend fun deleteIntImpAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际事故签证-新增
*/
@POST("GjAccidentVisa/saveVisa")
suspend fun saveGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际事故签证-修改
*/
@POST("GjAccidentVisa/modifyVisa")
suspend fun modifyGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际事故签证-详情
*/
@POST("GjAccidentVisa/detail")
suspend fun getGjAccidentVisaDetail(@Query("id") id: Long): BaseResultBean<GjAccidentVisaEditBean>
/**
* 字典-破损情况
*/
@POST("typeCode/damageType")
suspend fun getDamageTypeList(): DictListBean
/**
* 字典-内容物情况
*/
@POST("typeCode/contentType")
suspend fun getContentTypeList(): DictListBean
/**
* 字典-不正常类型
*/
@POST("typeCode/unusualType")
suspend fun getUnusualTypeList(): DictListBean
///////////////////////////////////////////////////////////////////////////
// ULD管理
///////////////////////////////////////////////////////////////////////////
/**
* 获取-ULD-列表(分页)
*/
@POST("eqm/uld/pageQuery")
suspend fun getUldList(@Body data: RequestBody): PageInfo<ULDBean>
/**
* 新增-ULD-信息
*/
@POST("eqm/uld/saveUld")
suspend fun saveUld(@Body data: RequestBody): BaseResultBean<Any>
/**
* 更新-ULD-信息
*/
@POST("eqm/uld/updateUld")
suspend fun updateUld(@Body data: RequestBody): BaseResultBean<Any>
/**
* 删除-ULD-信息
*/
@POST("eqm/uld/deleteUld")
suspend fun deleteUld(@Query("uld") uld: String): BaseResultBean<Any>
///////////////////////////////////////////////////////////////////////////
// 冷库登记
///////////////////////////////////////////////////////////////////////////
/**
* 冷库登记-分页查询
*/
@POST("ColdStorage/pageQuery")
suspend fun getColdStorageList(@Body data: RequestBody): PageInfo<ColdStorageBean>
/**
* 冷库登记-分页合计
*/
@POST("ColdStorage/pageQueryTotal")
suspend fun getColdStorageTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 冷库登记-完成入库
*/
@POST("ColdStorage/completeIn")
suspend fun coldStorageCompleteIn(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 冷库登记-完成出库
*/
@POST("ColdStorage/completeOut")
suspend fun coldStorageCompleteOut(@Body data: RequestBody): BaseResultBean<Boolean>
} }

View File

@@ -160,6 +160,7 @@ object ARouterConstants {
const val ACTIVITY_URL_GJJ_WARE_HOUSE_INFO = "/gjj/GjjWareHouseInfoActivity" //国际进港模块 仓库详情 const val ACTIVITY_URL_GJJ_WARE_HOUSE_INFO = "/gjj/GjjWareHouseInfoActivity" //国际进港模块 仓库详情
const val ACTIVITY_URL_GJJ_CHU_KU_LIST = "/gjj/GjjChuKuListActivity" //国际进港 出库 const val ACTIVITY_URL_GJJ_CHU_KU_LIST = "/gjj/GjjChuKuListActivity" //国际进港 出库
const val ACTIVITY_URL_INT_IMP_PICK_UP_RECORD = "/gjj/IntImpPickUpRecordActivity" //国际进港 提取记录
const val ACTIVITY_URL_GJJ_QUERY_LIST = "/gjj/GjjQueryListActivity" //国际进港 查询 列表 const val ACTIVITY_URL_GJJ_QUERY_LIST = "/gjj/GjjQueryListActivity" //国际进港 查询 列表
const val ACTIVITY_URL_GJJ_QUERY_INFO = "/gjj/GnjQueryInfoActivity" //国际进港 查询 详情 const val ACTIVITY_URL_GJJ_QUERY_INFO = "/gjj/GnjQueryInfoActivity" //国际进港 查询 详情
@@ -174,15 +175,20 @@ object ARouterConstants {
const val ACTIVITY_URL_INT_ARR_AIR_MANIFEST_DETAILS = "/gjj/IntArrAirManifestDetailsActivity" //国际进港 原始舱单详情 const val ACTIVITY_URL_INT_ARR_AIR_MANIFEST_DETAILS = "/gjj/IntArrAirManifestDetailsActivity" //国际进港 原始舱单详情
const val ACTIVITY_URL_INT_ARR_SUPPLEMENT_INFO = "/gjj/IntArrSupplementInfoActivity" //国际进港 补充信息 const val ACTIVITY_URL_INT_ARR_SUPPLEMENT_INFO = "/gjj/IntArrSupplementInfoActivity" //国际进港 补充信息
const val ACTIVITY_URL_INT_IMP_MANIFEST = "/gjj/IntImpManifestActivity" //国际进港 进港舱单 const val ACTIVITY_URL_INT_IMP_MANIFEST = "/gjj/IntImpManifestActivity" //国际进港 进港舱单
const val ACTIVITY_URL_INT_IMP_MANIFEST_DETAILS = "/gjj/IntImpManifestDetailsActivity" //国际进港 进港舱单详情
const val ACTIVITY_URL_INT_IMP_LOADING_LIST = "/gjj/IntImpLoadingListActivity" //国际进港 装机单(分拣理货) const val ACTIVITY_URL_INT_IMP_LOADING_LIST = "/gjj/IntImpLoadingListActivity" //国际进港 装机单(分拣理货)
const val ACTIVITY_URL_INT_IMP_TALLY = "/gjj/IntImpTallyActivity" //国际进港 理货报告 const val ACTIVITY_URL_INT_IMP_TALLY = "/gjj/IntImpTallyActivity" //国际进港 理货报告
const val ACTIVITY_URL_INT_IMP_PICK_UP_DLV = "/gjj/IntImpPickUpDLVActivity" //国际进港 提取出库
const val ACTIVITY_URL_INT_IMP_ACCIDENT_VISA = "/gjj/IntImpAccidentVisaActivity" //国际进港 事故签证
///////////////// 航班查询模块 ///////////////// 航班查询模块
/** /**
* 航班查询模块 * 航班查询模块
*/ */
const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块 const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块(旧版)
const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块 const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块(旧版)
const val ACTIVITY_URL_HB_QUERY_LIST = "/hb/HbQueryListActivity" //航班管理 列表(新版)
const val ACTIVITY_URL_FLIGHT_QUERY_DETAILS = "/app/FlightQueryDetailsActivity" //航班详情
///////////////// 货物追踪模块 ///////////////// 货物追踪模块
/** /**
@@ -210,4 +216,9 @@ object ARouterConstants {
const val ACTIVITY_URL_PDA_ENTER = "/pda/PDAEnterActivity" //PDA入口 const val ACTIVITY_URL_PDA_ENTER = "/pda/PDAEnterActivity" //PDA入口
///////////////// 综合管理
const val ACTIVITY_URL_COLD_STORAGE = "/app/ColdStorageActivity" //冷库登记
const val ACTIVITY_URL_LOG_QUERY = "/app/LogQueryActivity" //日志查询
const val ACTIVITY_URL_LOG_DETAIL = "/app/LogDetailActivity" //操作日志详情
} }

View File

@@ -36,7 +36,11 @@ data class AutoQueryConfig(
var title: String = "请选择", var title: String = "请选择",
/** 防抖延迟(毫秒,默认 300ms */ /** 防抖延迟(毫秒,默认 300ms */
var debounceMillis: Long = 300L var debounceMillis: Long = 300L,
/** 额外参数提供者(查询时动态获取额外参数,如航班日期、航班号等) */
@Transient
var extraParamsProvider: (() -> Map<String, String?>)? = null
) { ) {
/** /**
* 验证配置是否有效 * 验证配置是否有效

View File

@@ -113,8 +113,12 @@ class AutoQueryManager(
} }
lastQueriedValue = value lastQueriedValue = value
// 构建查询参数 // 构建查询参数(合并额外参数)
val params = mapOf(config.paramKey to value).toRequestBody() val baseParams = mutableMapOf<String, Any?>(config.paramKey to value)
config.extraParamsProvider?.invoke()?.forEach { (key, v) ->
if (!v.isNullOrEmpty()) baseParams[key] = v
}
val params = baseParams.toRequestBody()
// 发起网络请求 // 发起网络请求
scope?.launchCollect({ NetApply.api.getWbNoList(config.url, params) }) { scope?.launchCollect({ NetApply.api.getWbNoList(config.url, params) }) {

View File

@@ -96,6 +96,7 @@ class PadDataLayoutNew : FrameLayout {
field = value field = value
et.hint = value et.hint = value
tv.hint = value
bindAdapter(spinner, list, hint) bindAdapter(spinner, list, hint)
} }

View File

@@ -119,8 +119,12 @@ class SearchAutoQueryManager(
} }
lastQueriedValue = value lastQueriedValue = value
// 构建查询参数 // 构建查询参数(合并额外参数)
val params = mapOf(config.paramKey to value).toRequestBody() val baseParams = mutableMapOf<String, Any?>(config.paramKey to value)
config.extraParamsProvider?.invoke()?.forEach { (key, v) ->
if (!v.isNullOrEmpty()) baseParams[key] = v
}
val params = baseParams.toRequestBody()
// 发起网络请求 // 发起网络请求
scope?.launchCollect({ NetApply.api.getWbNoList(config.url, params) }) { scope?.launchCollect({ NetApply.api.getWbNoList(config.url, params) }) {

View File

@@ -102,6 +102,24 @@ object DictUtils {
} }
} }
/**
* 获取国际进港代理列表
*/
fun getIntImpAgentList(
addAll: Boolean = true,
checkedValue: String? = null,
callBack: (List<KeyValue>) -> Unit
) {
launchCollect({
NetApply.api
.getIntImpAgentList()
}) {
onSuccess = {
handleCallBack(it, checkedValue, addAll, callBack)
}
}
}
/** /**
* 获取仓管列表 * 获取仓管列表
*/ */

View File

@@ -334,9 +334,9 @@ object PrinterUtils {
merged = CellData("集装器编号:", "ULD NO.:", bean.uld) merged = CellData("集装器编号:", "ULD NO.:", bean.uld)
)) ))
// 第4行件数 | 重量 // 第4行件数 | 重量件数value暂不打印
rows.add(GridRow( rows.add(GridRow(
left = CellData("件数:", "PIECES:", bean.pieces.ifEmpty { "0" }), left = CellData("件数:", "PIECES:", ""),
right = CellData("重量:", "GROSS WEIGHT:", bean.totalWeight.toInt().toString()) right = CellData("重量:", "GROSS WEIGHT:", bean.totalWeight.toInt().toString())
)) ))
@@ -360,7 +360,12 @@ object PrinterUtils {
addSize(100, 100) addSize(100, 100)
addGap(3) addGap(3)
addCls() addCls()
addTextByBitmap(150, 80, 0, 110, "合肥新桥国际机场", Typeface.DEFAULT) // 标题居中8个字 * 120像素/字 = 960像素宽字体size=5
// val titleX = gridStartX + (gridWidth - 960) / 2
// addText(titleX, 80, Tspl.FONT_TSS24, 0, 5, 5, "合肥新桥国际机场")
addTextByBitmap(80, 80, 0, 130, "合肥新桥国际机场", Typeface.DEFAULT)
// 表格横线 // 表格横线
for (i in 0 until 5) { for (i in 0 until 5) {
addBar(gridStartX, gridStartY + (i * gridItemHeight), gridWidth, 2) addBar(gridStartX, gridStartY + (i * gridItemHeight), gridWidth, 2)
@@ -403,6 +408,9 @@ object PrinterUtils {
addSize(100, 100) addSize(100, 100)
addGap(3) addGap(3)
addCls() addCls()
// 标题居中8个字 * 120像素/字 = 960像素宽字体size=5
// val titleX = gridStartX + (gridWidth - 960) / 2
// addText(titleX, 80, Tspl.FONT_TSS24, 0, 5, 5, "合肥新桥国际机场")
addTextByBitmap(80, 80, 0, 130, "合肥新桥国际机场", Typeface.DEFAULT) addTextByBitmap(80, 80, 0, 130, "合肥新桥国际机场", Typeface.DEFAULT)
// 表格横线 // 表格横线
for (i in 0 until 9) { for (i in 0 until 9) {
@@ -449,17 +457,22 @@ object PrinterUtils {
*/ */
private fun printMergedGrid(rows: ArrayList<GridRow>) { private fun printMergedGrid(rows: ArrayList<GridRow>) {
val gridStartX = 30 val gridStartX = 30
val gridStartY = 250 val titleTopMargin = 50 // 标题顶部间距
val titleFontSize = 130 // 标题字体大小
val titleTableGap = 40 // 标题与表格之间的间距
val gridStartY = titleTopMargin + titleFontSize + titleTableGap // 计算表格起始Y坐标
val columnWidth = 570 val columnWidth = 570
val rowHeight = 240 val rowHeight = 180 // 减小行高,适应较小字体
val gridWidth = columnWidth * 2 val gridWidth = columnWidth * 2
val gridHeight = rowHeight * rows.size
val bytes = Tspl().apply { val bytes = Tspl().apply {
addSize(100, 100) addSize(100, 100)
addGap(3) addGap(3)
addCls() addCls()
addTextByBitmap(80, 80, 0, 130, "合肥新桥国际机场", Typeface.DEFAULT) // 标题居中8个字 * 120像素/字 = 960像素宽字体size=5
// val titleX = gridStartX + (gridWidth - 960) / 2
// addText(titleX, 60, Tspl.FONT_TSS24, 0, 5, 5, "合肥新桥国际机场")
addTextByBitmap(80, titleTopMargin, 0, titleFontSize, "合肥新桥国际机场", Typeface.DEFAULT)
// 绘制表格横线 // 绘制表格横线
for (i in 0..rows.size) { for (i in 0..rows.size) {
@@ -479,10 +492,8 @@ object PrinterUtils {
} }
// 右边线(总是绘制) // 右边线(总是绘制)
if (rowIndex == rows.size - 1) {
addBar(gridStartX + gridWidth, yTop, 2, rowHeight) addBar(gridStartX + gridWidth, yTop, 2, rowHeight)
} }
}
// 填充单元格内容 // 填充单元格内容
rows.forEachIndexed { rowIndex, row -> rows.forEachIndexed { rowIndex, row ->
@@ -492,17 +503,18 @@ object PrinterUtils {
// 合并单元格 // 合并单元格
renderCell( renderCell(
cell = row.merged, cell = row.merged,
x = gridStartX + 30, x = gridStartX + 20,
y = yBase, y = yBase,
cellWidth = gridWidth, cellWidth = gridWidth,
cellHeight = rowHeight cellHeight = rowHeight,
isMerged = true
) )
} else { } else {
// 左列单元格 // 左列单元格
row.left?.let { cell -> row.left?.let { cell ->
renderCell( renderCell(
cell = cell, cell = cell,
x = gridStartX + 30, x = gridStartX + 20,
y = yBase, y = yBase,
cellWidth = columnWidth, cellWidth = columnWidth,
cellHeight = rowHeight cellHeight = rowHeight
@@ -512,7 +524,7 @@ object PrinterUtils {
row.right?.let { cell -> row.right?.let { cell ->
renderCell( renderCell(
cell = cell, cell = cell,
x = gridStartX + columnWidth + 30, x = gridStartX + columnWidth + 20,
y = yBase, y = yBase,
cellWidth = columnWidth, cellWidth = columnWidth,
cellHeight = rowHeight cellHeight = rowHeight
@@ -532,37 +544,43 @@ object PrinterUtils {
* @param cell 单元格数据 * @param cell 单元格数据
* @param x 起始X坐标 * @param x 起始X坐标
* @param y 起始Y坐标 * @param y 起始Y坐标
* @param cellWidth 单元格宽度(用于计算右侧对齐) * @param cellWidth 单元格宽度
* @param cellHeight 单元格高度(用于计算垂直居中) * @param cellHeight 单元格高度
* @param isMerged 是否为合并单元格
*/ */
private fun Tspl.renderCell( private fun Tspl.renderCell(
cell: CellData, cell: CellData,
x: Int, x: Int,
y: Int, y: Int,
cellWidth: Int, cellWidth: Int,
cellHeight: Int cellHeight: Int,
isMerged: Boolean = false
) { ) {
// 左上角:中文标签和英文标签 // 字体大小配置
val titleY = y + 30 // 中文标签Y位置 val titleSize = 2 // 中文标签字体倍数
val subtitleY = y + 80 // 英文标签Y位置中文下方 val subtitleSize = 1 // 英文标签字体倍数
val valueSize = 2 // 值字体倍数
// 中文标签(大字,左上 // Y坐标配置基于24点阵字体size=2约48像素高size=1约24像素高
addText(x, titleY, Tspl.FONT_TSS24, 0, 3, 3, cell.title) val titleY = y + 15 // 中文标签Y位置
val subtitleY = titleY + 70 // 英文标签Y位置中文下方间距加大
val valueY = y + (cellHeight / 2) - 24 // 值垂直居中
// 文标签(小字,左上) // 文标签
addText(x, subtitleY, Tspl.FONT_TSS24, 0, 2, 2, cell.subtitle) addText(x, titleY, Tspl.FONT_TSS24, 0, titleSize, titleSize, cell.title)
// 右侧:值(大字,垂直居中) // 英文标签
// 计算垂直居中的Y坐标y + (cellHeight / 2) - (文字高度 / 2) addText(x, subtitleY, Tspl.FONT_TSS24, 0, subtitleSize, subtitleSize, cell.subtitle)
// 假设size=3的文字高度约为80像素
val valueY = y + (cellHeight / 2) - 40 // 垂直居中
// 计算右侧X坐标中文标签宽度 + 间距 // 计算value的X坐标根据英文标签长度动态调整
// 假设"目的站:"宽度约为180像素"DESTINATION:"宽度约为240像素 // 合并单元格(如集装器编号)使用更大的间距
val valueX = x + 280 // 右侧偏移量 val extraGap = if (isMerged) 80 else 50
val minOffset = if (isMerged) 280 else 220
val labelWidth = cell.subtitle.length * 12 + extraGap
val valueX = x + maxOf(labelWidth, minOffset)
// 值(大字,垂直居中,右侧 // 值(垂直居中)
addText(valueX, valueY, Tspl.FONT_TSS24, 0, 3, 3, cell.value) addText(valueX, valueY, Tspl.FONT_TSS24, 0, valueSize, valueSize, cell.value)
} }
fun printTest() { fun printTest() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 B

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="200dp"
android:height="24dp" android:height="200dp"
android:viewportWidth="24" android:viewportWidth="24"
android:viewportHeight="24"> android:viewportHeight="24">
<path <path

View File

@@ -36,7 +36,7 @@
android:background="@null" android:background="@null"
android:paddingStart="10dp" android:paddingStart="10dp"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textColorHint="@color/text_gray" android:textColorHint="@color/text_gray_l"
android:textSize="14sp" /> android:textSize="14sp" />
<Spinner <Spinner

View File

@@ -1,6 +1,7 @@
package com.lukouguoji.gjc.holder package com.lukouguoji.gjc.holder
import android.view.View import android.view.View
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.activity.GjcBoxWeighingDetailsActivity import com.lukouguoji.gjc.activity.GjcBoxWeighingDetailsActivity
import com.lukouguoji.gjc.databinding.ItemGjcBoxWeighingBinding import com.lukouguoji.gjc.databinding.ItemGjcBoxWeighingBinding
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
@@ -16,9 +17,24 @@ class GjcBoxWeighingViewHolder(view: View) :
val bean = getItemBean(item)!! val bean = getItemBean(item)!!
binding.bean = bean binding.bean = bean
// 更新图标状态
updateIcon(bean)
// 图标点击切换选中状态
binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get())
updateIcon(bean)
}
// 整行点击跳转到详情页 // 整行点击跳转到详情页
binding.ll.setOnClickListener { binding.ll.setOnClickListener {
GjcBoxWeighingDetailsActivity.start(it.context, bean.useId) GjcBoxWeighingDetailsActivity.start(it.context, bean.useId)
} }
} }
private fun updateIcon(bean: GjcUldUseBean) {
binding.ivIcon.setImageResource(
if (bean.checked.get()) R.drawable.img_plane_s else R.drawable.img_plane
)
}
} }

View File

@@ -6,12 +6,17 @@ import androidx.lifecycle.MutableLiveData
import com.lukouguoji.gjc.R import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.holder.GjcBoxWeighingViewHolder import com.lukouguoji.gjc.holder.GjcBoxWeighingViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.GjcUldUseBean
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.launchCollect import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.BluetoothDialogModel
import com.lukouguoji.module_base.model.ScanModel import com.lukouguoji.module_base.model.ScanModel
import com.lukouguoji.module_base.util.PrinterUtils
import dev.utils.common.DateUtils import dev.utils.common.DateUtils
import com.lukouguoji.module_base.ktx.formatDate import com.lukouguoji.module_base.ktx.formatDate
@@ -73,7 +78,27 @@ class GjcBoxWeighingViewModel : BasePageViewModel() {
* 挂签打印按钮点击 * 挂签打印按钮点击
*/ */
fun printClick() { fun printClick() {
// TODO: 实现挂签打印功能 // 获取列表中选中的记录
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcUldUseBean> ?: return
val selectedItems = list.filter { it.isSelected }
// 校验未选择
if (selectedItems.isEmpty()) {
showToast("请选择要打印的数据")
return
}
// 校验多选
if (selectedItems.size > 1) {
showToast("只能选择一条记录进行打印")
return
}
// 执行打印
val bean = selectedItems.first()
BluetoothDialogModel().showCallBack {
PrinterUtils.printGjcBoxWeighing(bean)
}
} }
/** /**

View File

@@ -119,8 +119,8 @@ class GjcQueryViewModel : BasePageViewModel() {
// 构建查询参数(统计接口 - 使用相同的搜索条件) // 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf( val totalParams = mapOf(
"fdateStart" to flightDateStart.value!!.ifEmpty { null }, "beginDate" to flightDateStart.value!!.ifEmpty { null },
"fdateEnd" to flightDateEnd.value!!.ifEmpty { null }, "endDate" to flightDateEnd.value!!.ifEmpty { null },
"agentCode" to agentId.value!!.ifEmpty { null }, "agentCode" to agentId.value!!.ifEmpty { null },
"outState" to outStatus.value!!.ifEmpty { null }, "outState" to outStatus.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null }, "wbNo" to waybillNo.value!!.ifEmpty { null },

View File

@@ -145,6 +145,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
onSuccess = { result -> onSuccess = { result ->
val list = result.data?.mapIndexed { index, dictBean -> val list = result.data?.mapIndexed { index, dictBean ->
AssemblePositionBean().apply { AssemblePositionBean().apply {
positionCode = dictBean.code // 保存位置编码/ID
positionName = dictBean.name positionName = dictBean.name
isSelected = (index == 0) // 默认选中第一项 isSelected = (index == 0) // 默认选中第一项
} }
@@ -569,6 +570,8 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
return return
} }
val loadAreaId = selectedPosition.value?.positionCode?.trim() ?: ""
// 2. 构建useInfoULD信息 // 2. 构建useInfoULD信息
val useInfo = mapOf( val useInfo = mapOf(
"uld" to uldNo, "uld" to uldNo,
@@ -579,6 +582,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
else -> "" else -> ""
}, },
"loadArea" to loadArea, "loadArea" to loadArea,
"loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID
"useId" to if (uldInfo.value?.useId == 0L) null else uldInfo.value?.useId // 添加useId来自getUld接口 "useId" to if (uldInfo.value?.useId == 0L) null else uldInfo.value?.useId // 添加useId来自getUld接口
) )
@@ -644,6 +648,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
"consumeWeight" to materialWeight.toDoubleOrNull(), "consumeWeight" to materialWeight.toDoubleOrNull(),
"ldId" to operatorValue, "ldId" to operatorValue,
"loadArea" to loadArea, "loadArea" to loadArea,
"loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID
"useInfo" to useInfo, "useInfo" to useInfo,
"wbInfo" to wbInfo, "wbInfo" to wbInfo,
"userId" to SharedPreferenceUtil.getString(Constant.Share.account) "userId" to SharedPreferenceUtil.getString(Constant.Share.account)

View File

@@ -100,11 +100,10 @@
<!-- 添加按钮 --> <!-- 添加按钮 -->
<ImageView <ImageView
android:layout_width="36dp" android:layout_width="40dp"
android:layout_height="36dp" android:layout_height="40dp"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}" android:onClick="@{()-> viewModel.addClick()}"
android:padding="4dp"
android:src="@drawable/img_add" /> android:src="@drawable/img_add" />
</LinearLayout> </LinearLayout>

View File

@@ -104,11 +104,10 @@
<!-- 添加按钮 --> <!-- 添加按钮 -->
<ImageView <ImageView
android:layout_width="36dp" android:layout_width="40dp"
android:layout_height="36dp" android:layout_height="40dp"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}" android:onClick="@{()-> viewModel.addClick()}"
android:padding="4dp"
android:src="@drawable/img_add" /> android:src="@drawable/img_add" />
</LinearLayout> </LinearLayout>

View File

@@ -97,11 +97,10 @@
<!--<><E696B0><EFBFBD>按钮 --> <!--<><E696B0><EFBFBD>按钮 -->
<ImageView <ImageView
android:layout_width="36dp" android:layout_width="40dp"
android:layout_height="36dp" android:layout_height="40dp"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.onAddClick()}" android:onClick="@{()-> viewModel.onAddClick()}"
android:padding="4dp"
android:src="@drawable/img_add" /> android:src="@drawable/img_add" />
<!-- 删除按钮 --> <!-- 删除按钮 -->

View File

@@ -58,7 +58,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.5"
android:gravity="center" android:gravity="center"
android:text="@{bean.inDate != null ? String.valueOf(bean.inDate).substring(0, 16) : `--`}" android:text="@{bean.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() >= 16 ? String.valueOf(bean.inDate).substring(0, 16) : (bean.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() > 0 ? String.valueOf(bean.inDate) : `--`)}"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -78,7 +78,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.5"
android:gravity="center" android:gravity="center"
android:text="@{bean.outDate != null ? String.valueOf(bean.outDate).substring(0, 16) : `--`}" android:text="@{bean.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() >= 16 ? String.valueOf(bean.outDate).substring(0, 16) : (bean.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() > 0 ? String.valueOf(bean.outDate) : `--`)}"
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:textSize="14sp" /> android:textSize="14sp" />

View File

@@ -170,7 +170,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text='@{bean.agentName}' android:text='@{bean.agentCode}'
tools:text="顺丰" /> tools:text="顺丰" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -11,6 +11,7 @@ import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.DetailsPageType import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.ktx.noNull import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
class GjjManifestAddActivity : class GjjManifestAddActivity :
BaseBindingActivity<ActivityGjjManifestAddBinding, GjjManifestAddViewModel>() { BaseBindingActivity<ActivityGjjManifestAddBinding, GjjManifestAddViewModel>() {
@@ -20,15 +21,16 @@ class GjjManifestAddActivity :
override fun viewModelClass() = GjjManifestAddViewModel::class.java override fun viewModelClass() = GjjManifestAddViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
// 动态设置标题 binding.viewModel = viewModel
val title = when { binding.flightNoInput.et.setUpperCaseAlphanumericFilter()
viewModel.pageType.value == DetailsPageType.Modify -> "国际进港舱单编辑" viewModel.initOnCreated(intent)
// 动态设置标题(必须在 initOnCreated 之后pageType 已从 Intent 解析)
val title = when (viewModel.pageType.value) {
DetailsPageType.Modify -> "国际进港舱单编辑"
else -> "国际进港舱单新增" else -> "国际进港舱单新增"
} }
setBackArrow(title) setBackArrow(title)
binding.viewModel = viewModel
viewModel.initOnCreated(intent)
} }
companion object { companion object {
@@ -49,7 +51,25 @@ class GjjManifestAddActivity :
* 编辑舱单通过Bean对象 * 编辑舱单通过Bean对象
*/ */
@JvmStatic @JvmStatic
fun startForEdit(context: Context, bean: com.lukouguoji.module_base.bean.GjjManifest) { fun startForEdit(
context: Context,
bean: com.lukouguoji.module_base.bean.GjjManifest,
flightDate: String = "",
flightNo: String = ""
) {
val starter = Intent(context, GjjManifestAddActivity::class.java)
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
.putExtra(Constant.Key.BEAN, bean)
.putExtra("flightDate", flightDate)
.putExtra("flightNo", flightNo)
context.startActivity(starter)
}
/**
* 编辑舱单通过GjjImportManifest对象
*/
@JvmStatic
fun startForEdit(context: Context, bean: com.lukouguoji.module_base.bean.GjjImportManifest) {
val starter = Intent(context, GjjManifestAddActivity::class.java) val starter = Intent(context, GjjManifestAddActivity::class.java)
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name) .putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
.putExtra(Constant.Key.BEAN, bean) .putExtra(Constant.Key.BEAN, bean)

View File

@@ -24,7 +24,7 @@ import com.lukouguoji.module_base.BaseActivity
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO) // @Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO) // 已替换为 IntImpQueryDetailsActivity
class GjjQueryInfoActivity : BaseActivity(), View.OnClickListener { class GjjQueryInfoActivity : BaseActivity(), View.OnClickListener {
private lateinit var viewModel: GjjQueryInfoViewModel private lateinit var viewModel: GjjQueryInfoViewModel

View File

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

View File

@@ -29,7 +29,7 @@ import com.scwang.smart.refresh.layout.api.RefreshLayout
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE) //@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
class GjjWareHouseActivity : BaseActivity(), View.OnClickListener { class GjjWareHouseActivity : BaseActivity(), View.OnClickListener {
private lateinit var viewModel: GjjWareHouseListViewModel private lateinit var viewModel: GjjWareHouseListViewModel
private val currentTitleName = "国际进港仓库管理" private val currentTitleName = "国际进港仓库管理"

View File

@@ -45,8 +45,13 @@ class IntArrAirManifestActivity :
viewModel.refresh() viewModel.refresh()
} }
// 初始加载数据 // 设置运单号自动查询的额外参数(航班日期、航班号)
viewModel.refresh() binding.pslWaybillNo.autoQueryConfig.extraParamsProvider = {
mapOf(
"fdate" to viewModel.flightDate.value,
"fno" to viewModel.flightNo.value
)
}
} }
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {

View File

@@ -32,9 +32,9 @@ class IntArrSupplementInfoActivity :
companion object { companion object {
@JvmStatic @JvmStatic
fun start(context: Context, manifest: GjjImportManifest) { fun start(context: Context, manifestList: ArrayList<GjjImportManifest>) {
val starter = Intent(context, IntArrSupplementInfoActivity::class.java) val starter = Intent(context, IntArrSupplementInfoActivity::class.java)
.putExtra(Constant.Key.DATA, manifest) .putExtra(Constant.Key.DATA, manifestList)
context.startActivity(starter) context.startActivity(starter)
} }
} }

View File

@@ -4,10 +4,12 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntArrTelegramDetailsBinding import com.lukouguoji.gjj.databinding.ActivityIntArrTelegramDetailsBinding
import com.lukouguoji.gjj.viewModel.IntArrTelegramDetailsViewModel import com.lukouguoji.gjj.viewModel.IntArrTelegramDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.MsgReceivePool
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
@@ -23,8 +25,6 @@ class IntArrTelegramDetailsActivity : BaseBindingActivity<ActivityIntArrTelegram
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港电报详情") setBackArrow("国际进港电报详情")
binding.viewModel = viewModel binding.viewModel = viewModel
// 初始化数据
viewModel.initOnCreated(intent) viewModel.initOnCreated(intent)
} }
@@ -32,14 +32,14 @@ class IntArrTelegramDetailsActivity : BaseBindingActivity<ActivityIntArrTelegram
/** /**
* 启动电报详情页面 * 启动电报详情页面
* @param context 上下文 * @param context 上下文
* @param id 电报ID * @param bean 电报Bean
* @param flow 流向(接收0、发送1) * @param fid 航班ID
*/ */
@JvmStatic @JvmStatic
fun start(context: Context, id: String, flow: String) { fun start(context: Context, bean: MsgReceivePool, fid: String) {
val starter = Intent(context, IntArrTelegramDetailsActivity::class.java) val starter = Intent(context, IntArrTelegramDetailsActivity::class.java)
.putExtra(Constant.Key.ID, id) .putExtra(Constant.Key.DATA, Gson().toJson(bean))
.putExtra(Constant.Key.FLOW, flow) .putExtra("fid", fid)
context.startActivity(starter) context.startActivity(starter)
} }
} }

View File

@@ -0,0 +1,69 @@
package com.lukouguoji.gjj.activity
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaBinding
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际进港-事故签证
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_ACCIDENT_VISA)
class IntImpAccidentVisaActivity :
BaseBindingActivity<ActivityIntImpAccidentVisaBinding, IntImpAccidentVisaViewModel>(),
IOnItemClickListener {
override fun layoutId() = R.layout.activity_int_imp_accident_visa
override fun viewModelClass() = IntImpAccidentVisaViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际事故签证")
binding.viewModel = viewModel
viewModel.isAllChecked.observe(this) { isAllChecked ->
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
}
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
binding.rv.addOnItemClickListener(this)
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
viewModel.refresh()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.searchClick()
}
}
override fun onItemClick(position: Int, type: Int) {
when (type) {
2000 -> {
// 侧滑菜单 - 修改
val bean = binding.rv.commonAdapter()?.getItem(position) as? IntImpAccidentVisaBean
?: return
IntImpAccidentVisaEditActivity.start(this, bean.id)
}
}
}
}

View File

@@ -0,0 +1,45 @@
package com.lukouguoji.gjj.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.ktx.addOnItemClickListener
/**
* 国际进港-事故签证新增/编辑
*/
class IntImpAccidentVisaEditActivity :
BaseBindingActivity<ActivityIntImpAccidentVisaEditBinding, IntImpAccidentVisaEditViewModel>() {
override fun layoutId() = R.layout.activity_int_imp_accident_visa_edit
override fun viewModelClass() = IntImpAccidentVisaEditViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
binding.viewModel = viewModel
viewModel.rv = binding.rv
binding.rv.addOnItemClickListener(viewModel)
viewModel.initOnCreate(intent)
viewModel.pageType.observe(this) {
val title = if (it == DetailsPageType.Add) "国际事故签证新增" else "国际事故签证修改"
setBackArrow(title)
}
}
companion object {
@JvmStatic
fun start(context: Context, id: Long = 0) {
context.startActivity(
Intent(context, IntImpAccidentVisaEditActivity::class.java)
.putExtra(Constant.Key.ID, id)
)
}
}
}

View File

@@ -6,13 +6,18 @@ import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpLoadingListBinding import com.lukouguoji.gjj.databinding.ActivityIntImpLoadingListBinding
import com.lukouguoji.gjj.dialog.IntImpInStorageDialogModel
import com.lukouguoji.gjj.dialog.IntImpModifyStorageDialogModel
import com.lukouguoji.gjj.viewModel.IntImpLoadingListViewModel import com.lukouguoji.gjj.viewModel.IntImpLoadingListViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.observe import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.ktx.addOnItemClickListener import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
/** /**
@@ -28,6 +33,7 @@ class IntImpLoadingListActivity :
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港装机单") setBackArrow("国际进港装机单")
binding.viewModel = viewModel binding.viewModel = viewModel
binding.activity = this
// 观察全选状态,更新图标透明度 // 观察全选状态,更新图标透明度
viewModel.isAllChecked.observe(this) { isAllChecked -> viewModel.isAllChecked.observe(this) { isAllChecked ->
@@ -45,10 +51,70 @@ class IntImpLoadingListActivity :
viewModel.refresh() viewModel.refresh()
} }
// 设置运单号自动查询的额外参数FID、FDGP
binding.pslWaybillNo.autoQueryConfig.extraParamsProvider = {
mapOf(
"fid" to viewModel.fid,
"fdep" to viewModel.fdep
)
}
// 接收从进港舱单传递的参数FID和FDGP用于查询fdate/fno/fdest用于界面显示
intent.getStringExtra("fid")?.let { if (it.isNotEmpty()) viewModel.fid = it }
intent.getStringExtra("fdep")?.let { if (it.isNotEmpty()) viewModel.fdep = it }
intent.getStringExtra("fdate")?.let { if (it.isNotEmpty()) viewModel.flightDate.value = it }
intent.getStringExtra("fno")?.let { if (it.isNotEmpty()) viewModel.flightNo.value = it }
intent.getStringExtra("fdest")?.let { if (it.isNotEmpty()) viewModel.fdest.value = it }
// 如果收到了航班号和日期参数,触发航班查询来构建始发站下拉列表
val fdate = intent.getStringExtra("fdate")
val fno = intent.getStringExtra("fno")
if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) {
viewModel.onFlightNoInputComplete()
}
// 初始加载数据 // 初始加载数据
viewModel.refresh() viewModel.refresh()
} }
/**
* 显示入库操作对话框
*/
fun showInStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要入库的记录")
return
}
IntImpInStorageDialogModel { dialog ->
val locationName = dialog.locationName
val locationId = dialog.locationId
viewModel.performInStorage(locationName, locationId, selectedItems)
}.show(this)
}
/**
* 显示修改库位对话框
*/
fun showModifyStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val selectedItems = list.filterIsInstance<GjjManifest>().filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要修改库位的记录")
return
}
IntImpModifyStorageDialogModel { dialog ->
val locationName = dialog.locationName
val locationId = dialog.locationId
viewModel.performModifyStorage(locationName, locationId, selectedItems)
}.show(this)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data) super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) { if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {

View File

@@ -0,0 +1,37 @@
package com.lukouguoji.gjj.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.google.gson.Gson
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpLoadingListEditBinding
import com.lukouguoji.gjj.viewModel.IntImpLoadingListEditViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.common.Constant
/**
* 国际进港-装机单编辑页面
*/
class IntImpLoadingListEditActivity :
BaseBindingActivity<ActivityIntImpLoadingListEditBinding, IntImpLoadingListEditViewModel>() {
override fun layoutId() = R.layout.activity_int_imp_loading_list_edit
override fun viewModelClass() = IntImpLoadingListEditViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("装机单编辑")
binding.viewModel = viewModel
viewModel.initOnCreated(intent)
}
companion object {
@JvmStatic
fun start(context: Context, bean: GjjManifest) {
val starter = Intent(context, IntImpLoadingListEditActivity::class.java)
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
context.startActivity(starter)
}
}
}

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