Compare commits
11 Commits
5ae63776ac
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c4588e47e | |||
| 084832e4e9 | |||
| 89989ef00a | |||
| 7b2bc00afc | |||
| c3c9a77942 | |||
| 2f875e32c9 | |||
| cc10987a60 | |||
| f69cf8043a | |||
| 00ea0bbb68 | |||
| de0f4a67d5 | |||
| 180d0ac7cb |
@@ -149,7 +149,8 @@
|
|||||||
"Bash(sed -n '82,115p' module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpStorageUseViewModel.kt)",
|
"Bash(sed -n '82,115p' module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpStorageUseViewModel.kt)",
|
||||||
"Bash(sed -n '212,240p' module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpManifestViewModel.kt)",
|
"Bash(sed -n '212,240p' module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpManifestViewModel.kt)",
|
||||||
"mcp__plugin_claude-mem_mcp-search__search",
|
"mcp__plugin_claude-mem_mcp-search__search",
|
||||||
"Read(//Users/kid/.claude/**)"
|
"Read(//Users/kid/.claude/**)",
|
||||||
|
"Bash(bash /Users/kid/Development/Fusion/Projects/aerologic-app/.claude/skills/sync-air-cargo/scripts/sync.sh)"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|||||||
49
.claude/skills/sync-air-cargo/SKILL.md
Normal file
49
.claude/skills/sync-air-cargo/SKILL.md
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
---
|
||||||
|
name: sync-air-cargo
|
||||||
|
description: 将 aerologic-app 项目中未提交的变更(已修改、新增、已删除、包括未跟踪的文件)以文件级 cp/rm 方式同步到同级目录下的 air-cargo 项目——两者是同一份源码的两个独立 git 仓库副本,分别推送到不同的远程地址。只做文件复制/删除,不对内容做任何二次编辑或转换。每当用户提到"同步到 air-cargo"、"同步到另一个仓库/项目"、"推送/复制到 cargo 项目"、"两个项目要保持一致",或者在 aerologic-app 里改完代码后问要不要同步/推送到另一个仓库时,应主动使用此 skill,而不是手动逐个 cp 文件。
|
||||||
|
---
|
||||||
|
|
||||||
|
# 同步变更到 air-cargo
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
`aerologic-app` 和同级目录下的 `air-cargo` 是同一份项目源码的两个独立 git 仓库副本,目录结构完全一致,分别推送到不同的远程仓库地址。日常开发只在 `aerologic-app` 中进行,完成后需要把未提交的变更原样同步一份到 `air-cargo`,再由用户在 `air-cargo` 里自行提交、推送。
|
||||||
|
|
||||||
|
同步的判定完全基于 `git status`:在 `aerologic-app` 里,工作区中存在的文件(无论是修改、新增还是未跟踪)就复制覆盖到 `air-cargo` 对应路径;工作区中已不存在的文件(即被删除的)就在 `air-cargo` 里删除对应路径。这样天然覆盖了修改/新增/删除/未跟踪/重命名(重命名会被当作"删除旧路径 + 新增新路径"处理)等所有情况,不需要逐个状态码去分支判断。
|
||||||
|
|
||||||
|
**只同步工程项目本身的文件**:`CLAUDE.md` 以及 `.claude/` 目录(包括其下的 `skills/`、`commands/`、`settings.local.json`、`mcp.json` 等)属于 Claude Code 的工具配置/记忆,两个仓库各自独立维护,不属于"项目源码",因此始终排除在同步范围之外,不会被复制也不会被删除。脚本会在输出里单独列出"已忽略,不参与同步"的清单,方便核对。
|
||||||
|
|
||||||
|
## 使用方法
|
||||||
|
|
||||||
|
脚本位于 `scripts/sync.sh`,用法:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash scripts/sync.sh [SOURCE_DIR] [TARGET_DIR] [preview|apply]
|
||||||
|
```
|
||||||
|
|
||||||
|
- `SOURCE_DIR` 默认为当前目录(一般就是 aerologic-app 项目根目录)
|
||||||
|
- `TARGET_DIR` 默认为 `SOURCE_DIR` 同级的 `air-cargo` 目录,一般不需要手动指定
|
||||||
|
- 第三个参数默认 `preview`(只打印清单,不做任何改动),传 `apply` 才会真正执行复制/删除
|
||||||
|
|
||||||
|
### 步骤
|
||||||
|
|
||||||
|
1. **先预览**,让用户看到将要发生什么:
|
||||||
|
```bash
|
||||||
|
bash /Users/kid/Development/Fusion/Projects/aerologic-app/.claude/skills/sync-air-cargo/scripts/sync.sh
|
||||||
|
```
|
||||||
|
输出会分别列出"待复制/覆盖"和"待删除"的文件清单。
|
||||||
|
|
||||||
|
2. **用 `AskUserQuestion` 工具向用户确认**,不要只是在文字里问一句让用户打字回复。这是一个会覆盖 `air-cargo` 中已有文件、且删除操作不可逆的操作,必须先把预览清单(待复制、待删除的文件数量和列表)放进问题描述里,让用户能一眼看到影响范围,选项至少包含"确认同步"和"取消"。得到确认后才能继续执行 `apply`(这遵循整体规则:覆盖性/破坏性操作需要用户确认,不要因为 skill 本身能直接跑就跳过确认)。
|
||||||
|
|
||||||
|
3. **用户确认后执行同步**:
|
||||||
|
```bash
|
||||||
|
bash /Users/kid/Development/Fusion/Projects/aerologic-app/.claude/skills/sync-air-cargo/scripts/sync.sh . /Users/kid/Development/Fusion/Projects/air-cargo apply
|
||||||
|
```
|
||||||
|
执行完会输出"复制/更新 N 个文件,删除 M 个文件"的汇总。
|
||||||
|
|
||||||
|
4. **同步之后不要自动 commit/push**。脚本只做文件复制,`air-cargo` 那边的 `git add` / `commit` / `push` 由用户自行决定和操作——两个仓库指向不同的远程地址,提交推送这类会影响远程共享状态的操作应始终由用户主导确认。
|
||||||
|
|
||||||
|
## 注意事项
|
||||||
|
|
||||||
|
- 脚本只识别 git 能感知到的变更(`git status` 看得到的),`.gitignore` 忽略的文件(如构建产物 `build/`、`.gradle/`)不会被同步,这也是符合预期的——不应该把本地构建缓存同步过去。
|
||||||
|
- 如果 `air-cargo` 里对应路径本身也有未提交的本地修改,会被直接覆盖覆盖掉,预览阶段要留意这一点并提醒用户。
|
||||||
98
.claude/skills/sync-air-cargo/scripts/sync.sh
Executable file
98
.claude/skills/sync-air-cargo/scripts/sync.sh
Executable file
@@ -0,0 +1,98 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# 将 SOURCE_DIR 中未提交的变更(修改/新增/删除)以 cp/rm 的方式同步到 TARGET_DIR。
|
||||||
|
# 两个目录是同一份项目源码的独立 git 仓库副本,只做文件级复制/删除,不做任何内容编辑。
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SOURCE_DIR="${1:-$(pwd)}"
|
||||||
|
SOURCE_DIR="$(cd "$SOURCE_DIR" && pwd)"
|
||||||
|
TARGET_DIR="${2:-$(dirname "$SOURCE_DIR")/air-cargo}"
|
||||||
|
MODE="${3:-preview}" # preview | apply
|
||||||
|
|
||||||
|
if [ ! -d "$SOURCE_DIR/.git" ]; then
|
||||||
|
echo "错误:$SOURCE_DIR 不是一个 git 仓库根目录" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -d "$TARGET_DIR" ]; then
|
||||||
|
echo "错误:目标目录不存在:$TARGET_DIR" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 只同步工程项目本身的文件,Claude Code 相关的配置/记忆文件(CLAUDE.md、.claude/ 目录,
|
||||||
|
# 包括其中的 skills/commands 等)两个仓库各自独立维护,不参与同步。
|
||||||
|
is_excluded() {
|
||||||
|
local path="$1"
|
||||||
|
case "$path" in
|
||||||
|
.claude/*|.claude) return 0 ;;
|
||||||
|
CLAUDE.md|*/CLAUDE.md) return 0 ;;
|
||||||
|
esac
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# --no-renames:把 rename 拆成"删除旧路径 + 新增新路径"两条记录,避免解析组合格式
|
||||||
|
# --untracked-files=all:新增的整个目录也会逐个文件列出,而不是折叠成一行目录
|
||||||
|
# -z:以 NUL 分隔,规避文件名转义/含空格的问题
|
||||||
|
copy_list=()
|
||||||
|
delete_list=()
|
||||||
|
excluded_list=()
|
||||||
|
|
||||||
|
while IFS= read -r -d '' entry; do
|
||||||
|
status="${entry:0:2}"
|
||||||
|
path="${entry:3}"
|
||||||
|
[ -z "$path" ] && continue
|
||||||
|
if is_excluded "$path"; then
|
||||||
|
excluded_list+=("$status|$path")
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [ -e "$SOURCE_DIR/$path" ]; then
|
||||||
|
copy_list+=("$status|$path")
|
||||||
|
else
|
||||||
|
delete_list+=("$status|$path")
|
||||||
|
fi
|
||||||
|
done < <(git -C "$SOURCE_DIR" status --porcelain=v1 -z --no-renames --untracked-files=all)
|
||||||
|
|
||||||
|
echo "源目录: $SOURCE_DIR"
|
||||||
|
echo "目标目录: $TARGET_DIR"
|
||||||
|
echo ""
|
||||||
|
echo "=== 待复制/覆盖(${#copy_list[@]})==="
|
||||||
|
for item in "${copy_list[@]+"${copy_list[@]}"}"; do
|
||||||
|
echo " [${item%%|*}] ${item#*|}"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 待删除(${#delete_list[@]})==="
|
||||||
|
for item in "${delete_list[@]+"${delete_list[@]}"}"; do
|
||||||
|
echo " [${item%%|*}] ${item#*|}"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== 已忽略,不参与同步(${#excluded_list[@]})==="
|
||||||
|
for item in "${excluded_list[@]+"${excluded_list[@]}"}"; do
|
||||||
|
echo " [${item%%|*}] ${item#*|}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$MODE" != "apply" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "(预览模式,未执行任何操作。确认无误后加 apply 参数执行同步)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
copied=0
|
||||||
|
deleted=0
|
||||||
|
|
||||||
|
for item in "${copy_list[@]+"${copy_list[@]}"}"; do
|
||||||
|
path="${item#*|}"
|
||||||
|
mkdir -p "$(dirname "$TARGET_DIR/$path")"
|
||||||
|
cp -f "$SOURCE_DIR/$path" "$TARGET_DIR/$path"
|
||||||
|
copied=$((copied+1))
|
||||||
|
done
|
||||||
|
|
||||||
|
for item in "${delete_list[@]+"${delete_list[@]}"}"; do
|
||||||
|
path="${item#*|}"
|
||||||
|
if [ -e "$TARGET_DIR/$path" ]; then
|
||||||
|
rm -f "$TARGET_DIR/$path"
|
||||||
|
deleted=$((deleted+1))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "同步完成:复制/更新 $copied 个文件,删除 $deleted 个文件。"
|
||||||
@@ -719,7 +719,7 @@ XxxDialogModel(onConfirm = { refresh() }).show()
|
|||||||
|------|------|------|------|
|
|------|------|------|------|
|
||||||
| 底部 | `DIALOG_TYPE_BOTTOM` | 操作选项 | 默认类型 |
|
| 底部 | `DIALOG_TYPE_BOTTOM` | 操作选项 | 默认类型 |
|
||||||
| 中间 | `DIALOG_TYPE_CENTER` | 确认框、表单输入 | `ConfirmDialogModel` |
|
| 中间 | `DIALOG_TYPE_CENTER` | 确认框、表单输入 | `ConfirmDialogModel` |
|
||||||
| 抽屉 | `DIALOG_TYPE_DRAWER` | 筛选条件 | `GjcQueryFilterDialogModel` |
|
| 抽屉 | `DIALOG_TYPE_DRAWER` | 通用右侧抽屉 | 见下方模板 |
|
||||||
| 全屏 | `DIALOG_TYPE_FULL` | 列表展示 | `NoticeMessageDialogModel` |
|
| 全屏 | `DIALOG_TYPE_FULL` | 列表展示 | `NoticeMessageDialogModel` |
|
||||||
|
|
||||||
### 抽屉弹窗(筛选场景)
|
### 抽屉弹窗(筛选场景)
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ android {
|
|||||||
applicationId "com.lukouguoji.aerologic"
|
applicationId "com.lukouguoji.aerologic"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 85
|
versionCode 88
|
||||||
versionName "1.8.5"
|
versionName "1.8.8"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -989,7 +989,8 @@ class HomeFragment : Fragment() {
|
|||||||
*/
|
*/
|
||||||
getAuthsObj()?.let { authsObj ->
|
getAuthsObj()?.let { authsObj ->
|
||||||
val authArr = authsObj.getJSONArray(id)
|
val authArr = authsObj.getJSONArray(id)
|
||||||
val authSet = authArr?.map { it.toString() }?.toSet() ?: emptySet()
|
// trim:兜底后端下发的权限串可能带首尾空格(如 "AppDomImpManiFest "),避免精确匹配失败
|
||||||
|
val authSet = authArr?.map { it.toString().trim() }?.toSet() ?: emptySet()
|
||||||
return list.filter { m -> authSet.contains(m.id) }
|
return list.filter { m -> authSet.contains(m.id) }
|
||||||
}
|
}
|
||||||
return list
|
return list
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
hint='@{"请输入备注"}'
|
hint='@{"请输入备注"}'
|
||||||
inputHeight="@{80}"
|
inputHeight="@{80}"
|
||||||
title='@{"备注"}'
|
title='@{"备注"}'
|
||||||
titleLength="@{3}"
|
titleLength="@{7}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@={viewModel.uldBean.remark}' />
|
value='@={viewModel.uldBean.remark}' />
|
||||||
|
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ interface Constant {
|
|||||||
|
|
||||||
const val GjjPacketParseActivity = "AppIntExpPacketParse" //报文解析(旧)
|
const val GjjPacketParseActivity = "AppIntExpPacketParse" //报文解析(旧)
|
||||||
const val IntImpMsgParseActivity = "AppIntImpMsgParse" //电报解析(电报生成)
|
const val IntImpMsgParseActivity = "AppIntImpMsgParse" //电报解析(电报生成)
|
||||||
const val IntArrAirManifest = "AppIntArrAirManifest" //原始舱单
|
const val IntArrAirManifest = "AppIntImpOMFT" //原始舱单
|
||||||
const val IntImpManifest = "AppIntImpManifest" //进港舱单
|
const val IntImpManifest = "AppIntImpManifest" //进港舱单
|
||||||
const val IntImpTally = "AppIntImpTally" //理货报告
|
const val IntImpTally = "AppIntImpTally" //理货报告
|
||||||
const val IntImpPickUpRecord = "AppIntImpPickUpRecord" //提取记录
|
const val IntImpPickUpRecord = "AppIntImpPickUpRecord" //提取记录
|
||||||
@@ -300,7 +300,7 @@ interface Constant {
|
|||||||
const val AccidentVisa = "AppAccidentVisa" //事故签证
|
const val AccidentVisa = "AppAccidentVisa" //事故签证
|
||||||
|
|
||||||
// 事故签证
|
// 事故签证
|
||||||
const val ComprehensiveAccidentVisa = "AppComprehensiveAccidentVisa"
|
const val ComprehensiveAccidentVisa = "AppGNJAccidentVisa"
|
||||||
// 单证交接
|
// 单证交接
|
||||||
const val DocumentHandover = "AppDocHandoverLog"
|
const val DocumentHandover = "AppDocHandoverLog"
|
||||||
|
|
||||||
|
|||||||
@@ -152,6 +152,10 @@ class PadDataLayout : FrameLayout {
|
|||||||
spinner = view.findViewById(R.id.spinner)
|
spinner = view.findViewById(R.id.spinner)
|
||||||
iv = view.findViewById(R.id.iv)
|
iv = view.findViewById(R.id.iv)
|
||||||
|
|
||||||
|
// 默认单行,禁止换行(多行输入框通过 inputHeight 属性恢复为多行)
|
||||||
|
et.isSingleLine = true
|
||||||
|
et.maxLines = 1
|
||||||
|
|
||||||
et.doOnTextChanged { text, _, _, _ ->
|
et.doOnTextChanged { text, _, _, _ ->
|
||||||
value = text.toString()
|
value = text.toString()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,6 +198,10 @@ class PadDataLayoutNew : FrameLayout {
|
|||||||
spinner = view.findViewById(R.id.spinner)
|
spinner = view.findViewById(R.id.spinner)
|
||||||
iv = view.findViewById(R.id.iv)
|
iv = view.findViewById(R.id.iv)
|
||||||
|
|
||||||
|
// 默认单行,禁止换行(多行输入框通过 inputHeight 属性恢复为多行)
|
||||||
|
et.isSingleLine = true
|
||||||
|
et.maxLines = 1
|
||||||
|
|
||||||
et.doOnTextChanged { text, _, _, _ ->
|
et.doOnTextChanged { text, _, _, _ ->
|
||||||
value = text.toString()
|
value = text.toString()
|
||||||
}
|
}
|
||||||
@@ -274,7 +278,8 @@ class PadDataLayoutNew : FrameLayout {
|
|||||||
|
|
||||||
tvSpinner.text = list.find { b -> b.value == value }?.key ?: value
|
tvSpinner.text = list.find { b -> b.value == value }?.key ?: value
|
||||||
|
|
||||||
if (value.isNotEmpty() && list.isNotEmpty()) {
|
// 同步 Spinner 选中项(含 value 为空时重置到对应项,如"全部"),修复重置后 UI 不清空的问题
|
||||||
|
if (list.isNotEmpty()) {
|
||||||
val index = list.indexOfFirst { b -> b.value == value }
|
val index = list.indexOfFirst { b -> b.value == value }
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
spinner.post {
|
spinner.post {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#DBEAFE" />
|
||||||
|
<corners
|
||||||
|
android:topLeftRadius="8dp"
|
||||||
|
android:topRightRadius="8dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="200dp"
|
||||||
|
android:height="200dp"
|
||||||
|
android:viewportWidth="1024"
|
||||||
|
android:viewportHeight="1024">
|
||||||
|
<path
|
||||||
|
android:pathData="M410.9,163.7v111.7c0,0 0,0 0,0.1 0,36.6 29.3,66.4 65.7,67.2 10.8,0.3 263.6,8.3 394.4,174 46.9,59.4 72.8,133.3 77.7,221 -70.3,-102.5 -185.5,-210.7 -358.5,-210.7 -42.6,0 -86.9,6.9 -131.6,20.5 -27.9,8.7 -47.7,34.2 -47.7,64.4 0,0 0,0 0,0v91.2l-321,-270.4 321,-269.1M432.9,75.5c-17.2,0 -32.6,9.3 -32.6,9.3l-356.7,299c-79.3,54.4 -4.6,94.1 -4.6,94.1l352.9,297.3c17.2,12.5 31.2,17.3 42.4,17.3 35,0 43.8,-45.9 43.8,-45.9v-134.6c34.2,-11.1 73.6,-17.6 114.5,-17.6 273.4,0 382,343.1 382,343.1 4.4,8.3 8.4,11 11.8,11 6.9,0 11.2,-11 11.2,-11 138.5,-652.2 -519.5,-661.9 -519.5,-662v-134.6c-3.6,-53 -25.6,-65.3 -45.4,-65.3z"
|
||||||
|
android:fillColor="#1c8cf5"/>
|
||||||
|
</vector>
|
||||||
6
module_base/src/main/res/drawable/tag_status_blue.xml
Normal file
6
module_base/src/main/res/drawable/tag_status_blue.xml
Normal 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="#DBEAFE" />
|
||||||
|
<corners android:radius="999dp" />
|
||||||
|
</shape>
|
||||||
6
module_base/src/main/res/drawable/tag_status_gray.xml
Normal file
6
module_base/src/main/res/drawable/tag_status_gray.xml
Normal 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="#ECEDEF" />
|
||||||
|
<corners android:radius="999dp" />
|
||||||
|
</shape>
|
||||||
6
module_base/src/main/res/drawable/tag_status_green.xml
Normal file
6
module_base/src/main/res/drawable/tag_status_green.xml
Normal 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="#E7F6EA" />
|
||||||
|
<corners android:radius="999dp" />
|
||||||
|
</shape>
|
||||||
6
module_base/src/main/res/drawable/tag_status_orange.xml
Normal file
6
module_base/src/main/res/drawable/tag_status_orange.xml
Normal 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="#FFF1E0" />
|
||||||
|
<corners android:radius="999dp" />
|
||||||
|
</shape>
|
||||||
@@ -1,56 +1,122 @@
|
|||||||
package com.lukouguoji.gjc.activity
|
package com.lukouguoji.gjc.activity
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route
|
import android.view.Gravity
|
||||||
import com.lukouguoji.gjc.R
|
import android.view.View
|
||||||
import com.lukouguoji.gjc.databinding.ActivityGjcQueryBinding
|
import android.widget.FrameLayout
|
||||||
import com.lukouguoji.gjc.viewModel.GjcQueryViewModel
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
import com.lukouguoji.gjc.R
|
||||||
import com.lukouguoji.module_base.common.ConstantEvent
|
import com.lukouguoji.gjc.databinding.ActivityGjcQueryBinding
|
||||||
import com.lukouguoji.module_base.impl.FlowBus
|
import com.lukouguoji.gjc.viewModel.GjcQueryViewModel
|
||||||
import com.lukouguoji.module_base.impl.observe
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
import com.lukouguoji.module_base.router.ARouterConstants
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.impl.observe
|
||||||
/**
|
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||||
* 国际出港查询列表页
|
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
|
||||||
*/
|
import com.lukouguoji.module_base.ktx.setUpperCaseLetterFilter
|
||||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_QUERY_LIST)
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
class GjcQueryActivity :
|
|
||||||
BaseBindingActivity<ActivityGjcQueryBinding, GjcQueryViewModel>() {
|
/**
|
||||||
|
* 国际出港查询列表页
|
||||||
override fun layoutId() = R.layout.activity_gjc_query
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_QUERY_LIST)
|
||||||
override fun viewModelClass() = GjcQueryViewModel::class.java
|
class GjcQueryActivity :
|
||||||
|
BaseBindingActivity<ActivityGjcQueryBinding, GjcQueryViewModel>() {
|
||||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
|
||||||
setBackArrow("国际出港查询")
|
override fun layoutId() = R.layout.activity_gjc_query
|
||||||
|
|
||||||
binding.viewModel = viewModel
|
override fun viewModelClass() = GjcQueryViewModel::class.java
|
||||||
|
|
||||||
// 绑定分页逻辑
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
viewModel.pageModel
|
setBackArrow("国际出港查询")
|
||||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
|
||||||
|
binding.viewModel = viewModel
|
||||||
// 监听刷新事件
|
|
||||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
// 绑定分页逻辑
|
||||||
viewModel.refresh()
|
viewModel.pageModel
|
||||||
}
|
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||||
|
|
||||||
// 初始化代理列表
|
// 监听刷新事件
|
||||||
viewModel.initAgentList()
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||||
|
viewModel.refresh()
|
||||||
// 初始加载
|
}
|
||||||
viewModel.refresh()
|
|
||||||
}
|
// 初始化代理列表 & 筛选下拉列表
|
||||||
|
viewModel.initAgentList()
|
||||||
companion object {
|
viewModel.initFilterLists()
|
||||||
@JvmStatic
|
|
||||||
fun start(context: Context) {
|
// 观察筛选面板显示状态
|
||||||
val starter = Intent(context, GjcQueryActivity::class.java)
|
viewModel.filterVisible.observe(this) { visible ->
|
||||||
context.startActivity(starter)
|
if (visible) showFilterPanel() else hideFilterPanel()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
// 航班号:大写字母+数字
|
||||||
|
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter()
|
||||||
|
// 目的港:仅大写字母
|
||||||
|
binding.filterPanel.filterDest.et.setUpperCaseLetterFilter()
|
||||||
|
|
||||||
|
// 初始加载
|
||||||
|
viewModel.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showFilterPanel() {
|
||||||
|
val panel = binding.filterPanel.root
|
||||||
|
val overlay = binding.filterOverlay
|
||||||
|
val panelWidth = window.decorView.width / 3
|
||||||
|
|
||||||
|
panel.layoutParams = (panel.layoutParams as FrameLayout.LayoutParams).apply {
|
||||||
|
width = panelWidth
|
||||||
|
gravity = Gravity.END
|
||||||
|
}
|
||||||
|
|
||||||
|
// 先 INVISIBLE 完成测量,避免第一次显示时闪烁
|
||||||
|
panel.visibility = View.INVISIBLE
|
||||||
|
panel.translationX = panelWidth.toFloat()
|
||||||
|
overlay.visibility = View.VISIBLE
|
||||||
|
overlay.alpha = 0f
|
||||||
|
|
||||||
|
panel.post {
|
||||||
|
panel.visibility = View.VISIBLE
|
||||||
|
panel.animate().translationX(0f).setDuration(250).start()
|
||||||
|
overlay.animate().alpha(1f).setDuration(250).start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun hideFilterPanel() {
|
||||||
|
val panel = binding.filterPanel.root
|
||||||
|
val overlay = binding.filterOverlay
|
||||||
|
|
||||||
|
if (panel.visibility != View.VISIBLE) return
|
||||||
|
|
||||||
|
panel.animate()
|
||||||
|
.translationX(panel.width.toFloat())
|
||||||
|
.setDuration(250)
|
||||||
|
.withEndAction { panel.visibility = View.GONE }
|
||||||
|
.start()
|
||||||
|
|
||||||
|
overlay.animate()
|
||||||
|
.alpha(0f)
|
||||||
|
.setDuration(250)
|
||||||
|
.withEndAction { overlay.visibility = View.GONE }
|
||||||
|
.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBackPressed() {
|
||||||
|
if (viewModel.filterVisible.value == true) {
|
||||||
|
viewModel.closeFilter()
|
||||||
|
} else {
|
||||||
|
super.onBackPressed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun start(context: Context) {
|
||||||
|
val starter = Intent(context, GjcQueryActivity::class.java)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,101 +0,0 @@
|
|||||||
package com.lukouguoji.gjc.dialog
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.content.res.ColorStateList
|
|
||||||
import android.graphics.Color
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.ImageView
|
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.lifecycle.MutableLiveData
|
|
||||||
import com.lukouguoji.gjc.R
|
|
||||||
import com.lukouguoji.gjc.databinding.DialogGjcQueryFilterBinding
|
|
||||||
import com.lukouguoji.module_base.base.BaseDialogModel
|
|
||||||
import com.lxj.xpopup.XPopup
|
|
||||||
import com.lxj.xpopup.enums.PopupPosition
|
|
||||||
import dev.DevUtils
|
|
||||||
import dev.utils.app.info.KeyValue
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 国际出港查询筛选抽屉
|
|
||||||
*/
|
|
||||||
class GjcQueryFilterDialogModel(
|
|
||||||
val spCode: MutableLiveData<String>, // 特码
|
|
||||||
val flightNo: MutableLiveData<String>, // 航班号
|
|
||||||
val dest: MutableLiveData<String>, // 目的港
|
|
||||||
val awbType: MutableLiveData<String>, // 运单类型
|
|
||||||
val businessType: MutableLiveData<String>, // 业务类型
|
|
||||||
val goodsCn: MutableLiveData<String>, // 品名(中)
|
|
||||||
private val onConfirm: () -> Unit
|
|
||||||
) : BaseDialogModel<DialogGjcQueryFilterBinding>(DIALOG_TYPE_DRAWER) {
|
|
||||||
|
|
||||||
// 运单类型列表
|
|
||||||
val awbTypeList = MutableLiveData(
|
|
||||||
listOf(
|
|
||||||
KeyValue("全部", ""),
|
|
||||||
KeyValue("主单", "1"),
|
|
||||||
KeyValue("分单", "2")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
// 业务类型列表
|
|
||||||
val businessTypeList = MutableLiveData(
|
|
||||||
listOf(
|
|
||||||
KeyValue("全部", ""),
|
|
||||||
KeyValue("普货", "1"),
|
|
||||||
KeyValue("特货", "2")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun layoutId() = R.layout.dialog_gjc_query_filter
|
|
||||||
|
|
||||||
override fun onBuild(builder: XPopup.Builder) {
|
|
||||||
super.onBuild(builder)
|
|
||||||
// 设置从右边弹出
|
|
||||||
builder.popupPosition(PopupPosition.Right)
|
|
||||||
|
|
||||||
// 设置抽屉宽度为 Activity contentView 宽度的1/3(横屏长边)
|
|
||||||
val activity = DevUtils.getTopActivity()
|
|
||||||
val activityWidth = activity.window.decorView.width
|
|
||||||
builder.maxWidth(activityWidth / 3)
|
|
||||||
builder.popupWidth(activityWidth / 3)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDialogCreated(context: Context) {
|
|
||||||
binding.model = this
|
|
||||||
binding.lifecycleOwner = context as? androidx.lifecycle.LifecycleOwner
|
|
||||||
|
|
||||||
val titleColor = Color.parseColor("#666666")
|
|
||||||
|
|
||||||
// 设置标题
|
|
||||||
binding.root.findViewById<TextView>(R.id.title_name)?.text = "筛选条件"
|
|
||||||
binding.root.findViewById<TextView>(R.id.title_name)?.setTextColor(titleColor)
|
|
||||||
binding.root.findViewById<TextView>(R.id.tool_tv_back)?.setTextColor(titleColor)
|
|
||||||
binding.root.findViewById<ImageView>(R.id.tool_iv_back)?.imageTintList = ColorStateList.valueOf(titleColor)
|
|
||||||
binding.root.findViewById<View>(R.id.toolbar)?.setBackgroundColor(Color.WHITE)
|
|
||||||
|
|
||||||
// 返回按钮
|
|
||||||
binding.root.findViewById<View>(R.id.tool_back)?.setOnClickListener {
|
|
||||||
dismiss()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 重置筛选条件
|
|
||||||
*/
|
|
||||||
fun onResetClick() {
|
|
||||||
spCode.value = ""
|
|
||||||
flightNo.value = ""
|
|
||||||
dest.value = ""
|
|
||||||
awbType.value = ""
|
|
||||||
businessType.value = ""
|
|
||||||
goodsCn.value = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 确认筛选
|
|
||||||
*/
|
|
||||||
fun onConfirmClick() {
|
|
||||||
dismiss()
|
|
||||||
onConfirm()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -366,8 +366,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
|||||||
bean.passageway = passagewayList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
|
bean.passageway = passagewayList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
|
||||||
bean.passagewayId = channel.value ?: ""
|
bean.passagewayId = channel.value ?: ""
|
||||||
|
|
||||||
// 验证必填字段
|
// 验证必填字段(架子车号改为非必填)
|
||||||
if (bean.carId.verifyNullOrEmpty("请输入架子车号")) return
|
|
||||||
if (bean.uld.verifyNullOrEmpty("请输入ULD编号")) return
|
if (bean.uld.verifyNullOrEmpty("请输入ULD编号")) return
|
||||||
if (bean.passageway.verifyNullOrEmpty("请选择通道号")) return
|
if (bean.passageway.verifyNullOrEmpty("请选择通道号")) return
|
||||||
|
|
||||||
@@ -436,7 +435,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
|||||||
}) {
|
}) {
|
||||||
onSuccess = { result ->
|
onSuccess = { result ->
|
||||||
if (result.verifySuccess()) {
|
if (result.verifySuccess()) {
|
||||||
showToast("添加成功")
|
showToast("完成复磅")
|
||||||
|
|
||||||
// 如果勾选了打印挂签,则执行打印
|
// 如果勾选了打印挂签,则执行打印
|
||||||
if (printTag.value == true) {
|
if (printTag.value == true) {
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package com.lukouguoji.gjc.viewModel
|
|||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import androidx.lifecycle.MediatorLiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import com.lukouguoji.gjc.R
|
import com.lukouguoji.gjc.R
|
||||||
import com.lukouguoji.gjc.dialog.GjcQueryFilterDialogModel
|
|
||||||
import com.lukouguoji.gjc.holder.GjcQueryViewHolder
|
import com.lukouguoji.gjc.holder.GjcQueryViewHolder
|
||||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||||
import com.lukouguoji.module_base.common.Constant
|
import com.lukouguoji.module_base.common.Constant
|
||||||
@@ -14,6 +14,7 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
|||||||
import com.lukouguoji.module_base.ktx.showToast
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
import com.lukouguoji.module_base.model.ScanModel
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
|
import com.lukouguoji.module_base.util.DictUtils
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
import dev.utils.common.DateUtils
|
import dev.utils.common.DateUtils
|
||||||
import com.lukouguoji.module_base.ktx.formatDate
|
import com.lukouguoji.module_base.ktx.formatDate
|
||||||
@@ -52,7 +53,22 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
val totalPc = MutableLiveData("0") // 总件数
|
val totalPc = MutableLiveData("0") // 总件数
|
||||||
val totalWeight = MutableLiveData("0") // 总重量
|
val totalWeight = MutableLiveData("0") // 总重量
|
||||||
|
|
||||||
// ==================== 筛选条件(预留)====================
|
// ==================== 筛选面板 ====================
|
||||||
|
val filterVisible = MutableLiveData(false)
|
||||||
|
|
||||||
|
// 运单类型列表(字典接口 typeCode/awb,type=IO 国际出港)
|
||||||
|
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
|
||||||
|
// 业务类型列表
|
||||||
|
val businessTypeList = MutableLiveData(
|
||||||
|
listOf(
|
||||||
|
KeyValue("全部", ""),
|
||||||
|
KeyValue("普货", "1"),
|
||||||
|
KeyValue("特货", "2")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
// ==================== 筛选条件 ====================
|
||||||
val spCode = MutableLiveData("") // 特码
|
val spCode = MutableLiveData("") // 特码
|
||||||
val flightNo = MutableLiveData("") // 航班号
|
val flightNo = MutableLiveData("") // 航班号
|
||||||
val dest = MutableLiveData("") // 目的港
|
val dest = MutableLiveData("") // 目的港
|
||||||
@@ -60,6 +76,20 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
val businessType = MutableLiveData("") // 业务类型
|
val businessType = MutableLiveData("") // 业务类型
|
||||||
val goodsCn = MutableLiveData("") // 品名(中)
|
val goodsCn = MutableLiveData("") // 品名(中)
|
||||||
|
|
||||||
|
// 是否有筛选条件(任意一个非空则为 true,用于筛选按钮红点)
|
||||||
|
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
|
||||||
|
val update = { _: Any? ->
|
||||||
|
value = listOf(spCode, flightNo, dest, awbType, businessType, goodsCn)
|
||||||
|
.any { !it.value.isNullOrEmpty() }
|
||||||
|
}
|
||||||
|
addSource(spCode, update)
|
||||||
|
addSource(flightNo, update)
|
||||||
|
addSource(dest, update)
|
||||||
|
addSource(awbType, update)
|
||||||
|
addSource(businessType, update)
|
||||||
|
addSource(goodsCn, update)
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 方法区
|
// 方法区
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
@@ -79,19 +109,50 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 筛选按钮点击
|
* 筛选按钮点击 - 打开筛选面板
|
||||||
*/
|
*/
|
||||||
fun filterClick() {
|
fun filterClick() {
|
||||||
val filterDialog = GjcQueryFilterDialogModel(
|
filterVisible.value = true
|
||||||
spCode = spCode,
|
}
|
||||||
flightNo = flightNo,
|
|
||||||
dest = dest,
|
/**
|
||||||
awbType = awbType,
|
* 关闭筛选面板
|
||||||
businessType = businessType,
|
*/
|
||||||
goodsCn = goodsCn,
|
fun closeFilter() {
|
||||||
onConfirm = { refresh() }
|
filterVisible.value = false
|
||||||
)
|
}
|
||||||
filterDialog.show()
|
|
||||||
|
/**
|
||||||
|
* 重置筛选条件
|
||||||
|
*/
|
||||||
|
fun resetFilter() {
|
||||||
|
spCode.value = ""
|
||||||
|
flightNo.value = ""
|
||||||
|
dest.value = ""
|
||||||
|
awbType.value = ""
|
||||||
|
businessType.value = ""
|
||||||
|
goodsCn.value = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认筛选 - 关闭面板并刷新
|
||||||
|
*/
|
||||||
|
fun confirmFilter() {
|
||||||
|
filterVisible.value = false
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化筛选下拉列表(运单类型从字典接口获取,type=IO 国际出港)
|
||||||
|
*/
|
||||||
|
fun initFilterLists() {
|
||||||
|
DictUtils.getWaybillTypeList(
|
||||||
|
type = Constant.businessType.IO,
|
||||||
|
addAll = true,
|
||||||
|
checkedValue = awbType.value
|
||||||
|
) {
|
||||||
|
awbTypeList.postValue(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,7 +171,7 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||||
// 筛选条件(暂未使用)
|
// 筛选条件(暂未使用)
|
||||||
"spCode" to spCode.value!!.ifEmpty { null },
|
"spCode" to spCode.value!!.ifEmpty { null },
|
||||||
"flightNo" to flightNo.value!!.ifEmpty { null },
|
"fno" to flightNo.value!!.ifEmpty { null },
|
||||||
"dest" to dest.value!!.ifEmpty { null },
|
"dest" to dest.value!!.ifEmpty { null },
|
||||||
"awbType" to awbType.value!!.ifEmpty { null },
|
"awbType" to awbType.value!!.ifEmpty { null },
|
||||||
"businessType" to businessType.value!!.ifEmpty { null },
|
"businessType" to businessType.value!!.ifEmpty { null },
|
||||||
@@ -126,7 +187,7 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||||
// 筛选条件
|
// 筛选条件
|
||||||
"spCode" to spCode.value!!.ifEmpty { null },
|
"spCode" to spCode.value!!.ifEmpty { null },
|
||||||
"flightNo" to flightNo.value!!.ifEmpty { null },
|
"fno" to flightNo.value!!.ifEmpty { null },
|
||||||
"dest" to dest.value!!.ifEmpty { null },
|
"dest" to dest.value!!.ifEmpty { null },
|
||||||
"awbType" to awbType.value!!.ifEmpty { null },
|
"awbType" to awbType.value!!.ifEmpty { null },
|
||||||
"businessType" to businessType.value!!.ifEmpty { null },
|
"businessType" to businessType.value!!.ifEmpty { null },
|
||||||
|
|||||||
@@ -355,7 +355,11 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
||||||
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
||||||
|
|
||||||
// 2. 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
// 2. 校验运抵件数、运抵重量必填
|
||||||
|
if (arrivePc.value.verifyNullOrEmpty("请输入运抵件数")) return
|
||||||
|
if (arriveWeight.value.verifyNullOrEmpty("请输入运抵重量")) return
|
||||||
|
|
||||||
|
// 3. 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
||||||
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
|
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
|
||||||
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
||||||
val preallocatedPc = bean.pc ?: 0L
|
val preallocatedPc = bean.pc ?: 0L
|
||||||
@@ -365,7 +369,17 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 收集当前表单数据,更新到 bean
|
// 4. 校验重量: 运抵重量 + 实时重量 不能超过预配重量的3%
|
||||||
|
val realTimeWeightVal = realTimeWeight.value?.toDoubleOrNull() ?: 0.0
|
||||||
|
val arriveWeightCheckVal = arriveWeight.value?.toDoubleOrNull() ?: 0.0
|
||||||
|
val preallocatedWeight = bean.weight ?: 0.0
|
||||||
|
|
||||||
|
if (arriveWeightCheckVal + realTimeWeightVal > preallocatedWeight * 1.03) {
|
||||||
|
showToast("运抵重量 + 实时重量不能超过预配重量的3%")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. 收集当前表单数据,更新到 bean
|
||||||
bean.apply {
|
bean.apply {
|
||||||
// 更新运抵数据(如果用户已编辑)
|
// 更新运抵数据(如果用户已编辑)
|
||||||
arrivePc = this@GjcWeighingStartViewModel.arrivePc.value?.toLongOrNull() ?: arrivePc
|
arrivePc = this@GjcWeighingStartViewModel.arrivePc.value?.toLongOrNull() ?: arrivePc
|
||||||
@@ -429,6 +443,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
||||||
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
||||||
|
|
||||||
|
// 校验运抵件数、运抵重量必填
|
||||||
|
if (arrivePc.value.verifyNullOrEmpty("请输入运抵件数")) return
|
||||||
|
if (arriveWeight.value.verifyNullOrEmpty("请输入运抵重量")) return
|
||||||
|
|
||||||
// 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
// 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
||||||
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
|
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
|
||||||
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
||||||
@@ -439,6 +457,16 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 校验重量: 运抵重量 + 实时重量 不能超过预配重量的3%
|
||||||
|
val realTimeWeightVal = realTimeWeight.value?.toDoubleOrNull() ?: 0.0
|
||||||
|
val arriveWeightCheckVal = arriveWeight.value?.toDoubleOrNull() ?: 0.0
|
||||||
|
val preallocatedWeight = bean.weight ?: 0.0
|
||||||
|
|
||||||
|
if (arriveWeightCheckVal + realTimeWeightVal > preallocatedWeight * 1.03) {
|
||||||
|
showToast("运抵重量 + 实时重量不能超过预配重量的3%")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 从编辑字段获取数值
|
// 从编辑字段获取数值
|
||||||
val arriveWeightVal = arriveWeight.value?.toDoubleOrNull() ?: bean.arriveWeight
|
val arriveWeightVal = arriveWeight.value?.toDoubleOrNull() ?: bean.arriveWeight
|
||||||
val arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume
|
val arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume
|
||||||
|
|||||||
@@ -448,6 +448,8 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
assembleFlightDate.value = ""
|
assembleFlightDate.value = ""
|
||||||
assembleInfoList.value = mutableListOf()
|
assembleInfoList.value = mutableListOf()
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
showToast("ULD 编号未维护,请先进行维护!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onFailed = { code, message ->
|
onFailed = { code, message ->
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
|||||||
// 初始化清仓综合结果列表(根据实际需求配置)
|
// 初始化清仓综合结果列表(根据实际需求配置)
|
||||||
clearResultList.value = listOf(
|
clearResultList.value = listOf(
|
||||||
KeyValue("全部", ""),
|
KeyValue("全部", ""),
|
||||||
KeyValue("正常", "0"),
|
KeyValue("正常", "1"),
|
||||||
KeyValue("异常", "1")
|
KeyValue("异常", "0")
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -306,7 +306,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
|||||||
"fdate" to flightDate.value?.ifEmpty { null },
|
"fdate" to flightDate.value?.ifEmpty { null },
|
||||||
"fno" to flightNo.value?.ifEmpty { null },
|
"fno" to flightNo.value?.ifEmpty { null },
|
||||||
"wbNo" to wbNo.value?.ifEmpty { null },
|
"wbNo" to wbNo.value?.ifEmpty { null },
|
||||||
"location" to location.value?.ifEmpty { null }
|
"location" to location.value?.ifEmpty { null },
|
||||||
|
"clearNormal" to clearResult.value?.ifEmpty { null }
|
||||||
)
|
)
|
||||||
|
|
||||||
// 列表参数 (含分页)
|
// 列表参数 (含分页)
|
||||||
|
|||||||
5
module_gjc/src/main/res/drawable/bg_red_dot.xml
Normal file
5
module_gjc/src/main/res/drawable/bg_red_dot.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<solid android:color="#F44336" />
|
||||||
|
</shape>
|
||||||
@@ -1,187 +1,237 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
<import type="android.view.View" />
|
||||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
|
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<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/color_f2"
|
android:background="@color/color_f2"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 标题栏 -->
|
<!-- 标题栏(始终在最上层,不被遮挡) -->
|
||||||
<include layout="@layout/title_tool_bar" />
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
<!-- 搜索区域 -->
|
<!-- 内容区域(FrameLayout 包裹,筛选面板和遮罩只在此区域内) -->
|
||||||
<LinearLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:layout_marginHorizontal="10dp"
|
android:layout_weight="1">
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:gravity="center_vertical"
|
<!-- 原有内容 -->
|
||||||
android:orientation="horizontal">
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
<!-- 航班日期起 -->
|
android:layout_height="match_parent"
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
android:orientation="vertical">
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
<!-- 搜索区域 -->
|
||||||
android:layout_weight="1"
|
<LinearLayout
|
||||||
hint='@{"请选择开始日期"}'
|
android:layout_width="match_parent"
|
||||||
icon="@{@drawable/img_date}"
|
android:layout_height="wrap_content"
|
||||||
type="@{SearchLayoutType.DATE}"
|
android:layout_marginHorizontal="10dp"
|
||||||
value="@={viewModel.flightDateStart}" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
<!-- 航班日期止 -->
|
android:orientation="horizontal">
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
|
||||||
android:layout_width="0dp"
|
<!-- 航班日期起 -->
|
||||||
android:layout_height="wrap_content"
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_weight="1"
|
android:layout_width="0dp"
|
||||||
hint='@{"请选择结束日期"}'
|
android:layout_height="wrap_content"
|
||||||
icon="@{@drawable/img_date}"
|
android:layout_weight="1"
|
||||||
type="@{SearchLayoutType.DATE}"
|
hint='@{"请选择开始日期"}'
|
||||||
value="@={viewModel.flightDateEnd}" />
|
icon="@{@drawable/img_date}"
|
||||||
|
type="@{SearchLayoutType.DATE}"
|
||||||
<!-- 代理人 -->
|
value="@={viewModel.flightDateStart}" />
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
|
||||||
android:layout_width="0dp"
|
<!-- 航班日期止 -->
|
||||||
android:layout_height="wrap_content"
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_weight="1"
|
android:layout_width="0dp"
|
||||||
hint='@{"请选择代理"}'
|
android:layout_height="wrap_content"
|
||||||
list="@{viewModel.agentList}"
|
android:layout_weight="1"
|
||||||
type="@{SearchLayoutType.SPINNER}"
|
hint='@{"请选择结束日期"}'
|
||||||
value="@={viewModel.agentId}" />
|
icon="@{@drawable/img_date}"
|
||||||
|
type="@{SearchLayoutType.DATE}"
|
||||||
<!-- 出库状态 -->
|
value="@={viewModel.flightDateEnd}" />
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
|
||||||
android:layout_width="0dp"
|
<!-- 代理人 -->
|
||||||
android:layout_height="wrap_content"
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_weight="1"
|
android:layout_width="0dp"
|
||||||
hint='@{"请选择出库状态"}'
|
android:layout_height="wrap_content"
|
||||||
list="@{viewModel.outStatusList}"
|
android:layout_weight="1"
|
||||||
type="@{SearchLayoutType.SPINNER}"
|
hint='@{"请选择代理"}'
|
||||||
value="@={viewModel.outStatus}" />
|
list="@{viewModel.agentList}"
|
||||||
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
<!-- 运单号 -->
|
value="@={viewModel.agentId}" />
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
|
||||||
android:layout_width="0dp"
|
<!-- 出库状态 -->
|
||||||
android:layout_height="wrap_content"
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_weight="1"
|
android:layout_width="0dp"
|
||||||
hint='@{"请输入运单号"}'
|
android:layout_height="wrap_content"
|
||||||
icon="@{@drawable/img_scan}"
|
android:layout_weight="1"
|
||||||
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
|
hint='@{"请选择出库状态"}'
|
||||||
type="@{SearchLayoutType.INPUT}"
|
list="@{viewModel.outStatusList}"
|
||||||
value="@={viewModel.waybillNo}"
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
autoQueryEnabled="@{true}"
|
value="@={viewModel.outStatus}" />
|
||||||
autoQueryUrl="@{`/IntExpSearch/queryWbNoList`}"
|
|
||||||
autoQueryParamKey="@{`wbNo`}"
|
<!-- 运单号 -->
|
||||||
autoQueryMinLength="@{4}"
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
autoQueryMaxLength="@{8}"
|
android:layout_width="0dp"
|
||||||
autoQueryTitle="@{`选择运单号`}" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
<!-- 搜索和筛选按钮 -->
|
hint='@{"请输入运单号"}'
|
||||||
<LinearLayout
|
icon="@{@drawable/img_scan}"
|
||||||
android:layout_width="0dp"
|
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
|
||||||
android:layout_height="wrap_content"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
android:layout_weight="1"
|
value="@={viewModel.waybillNo}"
|
||||||
android:gravity="center_vertical|start"
|
autoQueryEnabled="@{true}"
|
||||||
android:orientation="horizontal"
|
autoQueryUrl="@{`/IntExpSearch/queryWbNoList`}"
|
||||||
android:paddingHorizontal="24dp">
|
autoQueryParamKey="@{`wbNo`}"
|
||||||
|
autoQueryMinLength="@{4}"
|
||||||
<!-- 搜索按钮 -->
|
autoQueryMaxLength="@{8}"
|
||||||
<ImageView
|
autoQueryTitle="@{`选择运单号`}" />
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
<!-- 搜索和筛选按钮 -->
|
||||||
android:onClick="@{()-> viewModel.searchClick()}"
|
<LinearLayout
|
||||||
android:padding="2dp"
|
android:layout_width="0dp"
|
||||||
android:src="@drawable/img_search" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
<!-- 筛选按钮 -->
|
android:gravity="center_vertical|start"
|
||||||
<ImageView
|
android:orientation="horizontal"
|
||||||
android:layout_width="36dp"
|
android:paddingHorizontal="24dp">
|
||||||
android:layout_height="36dp"
|
|
||||||
android:layout_marginLeft="16dp"
|
<!-- 搜索按钮 -->
|
||||||
android:onClick="@{()-> viewModel.filterClick()}"
|
<ImageView
|
||||||
android:padding="5dp"
|
android:layout_width="36dp"
|
||||||
android:src="@drawable/img_filter" />
|
android:layout_height="36dp"
|
||||||
|
android:onClick="@{()-> viewModel.searchClick()}"
|
||||||
</LinearLayout>
|
android:padding="2dp"
|
||||||
|
android:src="@drawable/img_search" />
|
||||||
</LinearLayout>
|
|
||||||
|
<!-- 筛选按钮(含红点) -->
|
||||||
<!-- 列表区域 -->
|
<FrameLayout
|
||||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
android:layout_width="36dp"
|
||||||
android:id="@+id/srl"
|
android:layout_height="36dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_marginLeft="16dp">
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1">
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/rv"
|
android:onClick="@{()-> viewModel.filterClick()}"
|
||||||
android:layout_width="match_parent"
|
android:padding="5dp"
|
||||||
android:layout_height="match_parent"
|
android:src="@drawable/img_filter" />
|
||||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
|
||||||
viewHolder="@{viewModel.itemViewHolder}"
|
<View
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
android:layout_width="8dp"
|
||||||
tools:listitem="@layout/item_gjc_query" />
|
android:layout_height="8dp"
|
||||||
|
android:layout_gravity="top|end"
|
||||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
android:background="@drawable/bg_red_dot"
|
||||||
|
android:visibility="@{viewModel.hasFilter ? View.VISIBLE : View.GONE}" />
|
||||||
<!-- 底部统计信息 -->
|
|
||||||
<LinearLayout
|
</FrameLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
</LinearLayout>
|
||||||
android:background="@color/white"
|
|
||||||
android:gravity="center_vertical"
|
</LinearLayout>
|
||||||
android:paddingHorizontal="15dp">
|
|
||||||
|
<!-- 列表区域 -->
|
||||||
<!-- 统计信息 -->
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||||
<LinearLayout
|
android:id="@+id/srl"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:gravity="center_vertical"
|
android:layout_weight="1">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
<TextView
|
android:id="@+id/rv"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:text='@{`合计:` + viewModel.totalCount + `票`}'
|
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
viewHolder="@{viewModel.itemViewHolder}"
|
||||||
android:textSize="16sp"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
android:textStyle="bold"
|
tools:listitem="@layout/item_gjc_query" />
|
||||||
tools:text="合计:3票" />
|
|
||||||
|
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
<!-- 底部统计信息 -->
|
||||||
android:layout_height="wrap_content"
|
<LinearLayout
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_width="match_parent"
|
||||||
android:text='@{`总件数:` + viewModel.totalPc}'
|
android:layout_height="50dp"
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
android:background="@color/white"
|
||||||
android:textSize="16sp"
|
android:gravity="center_vertical"
|
||||||
android:textStyle="bold"
|
android:paddingHorizontal="15dp">
|
||||||
tools:text="总件数:100" />
|
|
||||||
|
<!-- 统计信息 -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="20dp"
|
android:gravity="center_vertical"
|
||||||
android:text='@{`总重量:` + viewModel.totalWeight}'
|
android:orientation="horizontal">
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
|
||||||
android:textSize="16sp"
|
<TextView
|
||||||
android:textStyle="bold"
|
android:layout_width="wrap_content"
|
||||||
tools:text="总重量:100" />
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{`合计:` + viewModel.totalCount + `票`}'
|
||||||
</LinearLayout>
|
android:textColor="@color/bottom_tool_tips_text_color"
|
||||||
|
android:textSize="16sp"
|
||||||
</LinearLayout>
|
android:textStyle="bold"
|
||||||
|
tools:text="合计:3票" />
|
||||||
</LinearLayout>
|
|
||||||
</layout>
|
<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="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="总件数:100" />
|
||||||
|
|
||||||
|
<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="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="总重量:100" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 遮罩层(只覆盖内容区域) -->
|
||||||
|
<View
|
||||||
|
android:id="@+id/filter_overlay"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#80000000"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:onClick="@{()-> viewModel.closeFilter()}"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<!-- 筛选面板(从右侧滑入,只在内容区域内) -->
|
||||||
|
<include
|
||||||
|
android:id="@+id/filter_panel"
|
||||||
|
layout="@layout/layout_gjc_query_filter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:viewModel="@{viewModel}" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
|
|||||||
@@ -322,6 +322,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请输入运抵件数"}'
|
hint='@{"请输入运抵件数"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"运抵件数"}'
|
title='@{"运抵件数"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -332,6 +333,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请输入运抵重量"}'
|
hint='@{"请输入运抵重量"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"运抵重量"}'
|
title='@{"运抵重量"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
|||||||
@@ -416,7 +416,7 @@
|
|||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:alpha="@{viewModel.isUnloadEnabled ? 1.0f : 0.5f}"
|
android:alpha="@{viewModel.isUnloadEnabled ? 1.0f : 0.5f}"
|
||||||
android:background="@drawable/bg_blue_radius_4"
|
android:background="@drawable/bg_red_radius_4"
|
||||||
android:enabled="@{viewModel.isUnloadEnabled}"
|
android:enabled="@{viewModel.isUnloadEnabled}"
|
||||||
android:onClick="@{() -> viewModel.onUnloadClick()}"
|
android:onClick="@{() -> viewModel.onUnloadClick()}"
|
||||||
android:text="卸货"
|
android:text="卸货"
|
||||||
@@ -428,7 +428,7 @@
|
|||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:alpha="@{viewModel.isLoadEnabled ? 1.0f : 0.5f}"
|
android:alpha="@{viewModel.isLoadEnabled ? 1.0f : 0.5f}"
|
||||||
android:background="@drawable/bg_red_radius_4"
|
android:background="@drawable/bg_blue_radius_4"
|
||||||
android:enabled="@{viewModel.isLoadEnabled}"
|
android:enabled="@{viewModel.isLoadEnabled}"
|
||||||
android:onClick="@{() -> viewModel.onLoadClick()}"
|
android:onClick="@{() -> viewModel.onLoadClick()}"
|
||||||
android:text="装货"
|
android:text="装货"
|
||||||
|
|||||||
@@ -108,9 +108,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`01`.equals(bean.declareStatus) ? @drawable/tag_status_green : (`W`.equals(bean.declareStatus) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
android:text="@{bean.declareStatus}"
|
android:text="@{bean.declareStatus}"
|
||||||
android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/text_blue : @color/text_normal)}"
|
android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/colorPrimary : @color/text_gray)}"
|
||||||
android:textSize="15sp" />
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{bean.declareStatus != null && !bean.declareStatus.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -246,9 +250,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`1`.equals(bean.checkIn) ? @drawable/tag_status_green : (`2`.equals(bean.checkIn) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
android:text="@{bean.checkInText}"
|
android:text="@{bean.checkInText}"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@{`1`.equals(bean.checkIn) ? @color/text_green : (`2`.equals(bean.checkIn) ? @color/colorPrimary : @color/text_gray)}"
|
||||||
android:textSize="15sp" />
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{bean.checkIn != null && !bean.checkIn.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -271,9 +279,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`0`.equals(bean.arriveFlag) ? @drawable/tag_status_green : (`1`.equals(bean.arriveFlag) ? @drawable/tag_status_orange : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
android:text="@{bean.arriveFlagText}"
|
android:text="@{bean.arriveFlagText}"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@{`0`.equals(bean.arriveFlag) ? @color/text_green : (`1`.equals(bean.arriveFlag) ? @color/text_orange : @color/text_gray)}"
|
||||||
android:textSize="15sp" />
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{bean.arriveFlag != null && !bean.arriveFlag.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -345,13 +357,13 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 子订单列表容器 -->
|
<!-- 子订单列表容器(白色圆角卡片,圆角同主单) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
visible="@{bean.showMore}"
|
visible="@{bean.showMore}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="#e3f6e0"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
@@ -367,14 +379,15 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- 表头 -->
|
<!-- 表头(浅蓝色背景,仅 Title 有背景色,顶部圆角同卡片) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_header"
|
android:id="@+id/ll_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="10dp"
|
android:background="@drawable/bg_arrive_sub_header"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="10dp">
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -482,7 +495,7 @@
|
|||||||
android:id="@+id/divider_header"
|
android:id="@+id/divider_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
|
|
||||||
<!-- 子列表 RecyclerView -->
|
<!-- 子列表 RecyclerView -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.GjcHaWb" />
|
type="com.lukouguoji.module_base.bean.GjcHaWb" />
|
||||||
@@ -67,15 +69,26 @@
|
|||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<!-- 申报状态 -->
|
<!-- 申报状态(Tag 形式,根据语义着色) -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.arrivalStatus ?? ``}"
|
android:orientation="horizontal">
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="14sp" />
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`未申报`.equals(bean.arrivalStatus) ? @drawable/tag_status_gray : @drawable/tag_status_green}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
|
android:text="@{bean.arrivalStatus ?? ``}"
|
||||||
|
android:textColor="@{`未申报`.equals(bean.arrivalStatus) ? @color/text_gray : @color/text_green}"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:visibility="@{bean.arrivalStatus != null && !bean.arrivalStatus.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 品名(中) -->
|
<!-- 品名(中) -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -132,7 +145,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -163,9 +163,12 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{bean.wtDate != null && !bean.wtDate.isEmpty() ? @drawable/tag_status_green : @drawable/tag_status_gray}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
android:text="@{bean.wtDate != null && !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}"
|
android:text="@{bean.wtDate != null && !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}"
|
||||||
android:textColor="@{bean.wtDate != null && !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}"
|
android:textColor="@{bean.wtDate != null && !bean.wtDate.isEmpty() ? @color/text_green : @color/text_gray}"
|
||||||
android:textSize="15sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -188,9 +191,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`2`.equals(bean.fillWeightFlag) ? @drawable/tag_status_green : (`1`.equals(bean.fillWeightFlag) ? @drawable/tag_status_orange : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
android:text="@{bean.fillWeightFlagText}"
|
android:text="@{bean.fillWeightFlagText}"
|
||||||
android:textColor="@{bean.isFillWeightGreen ? @color/text_green : @color/text_normal}"
|
android:textColor="@{`2`.equals(bean.fillWeightFlag) ? @color/text_green : (`1`.equals(bean.fillWeightFlag) ? @color/text_orange : @color/text_gray)}"
|
||||||
android:textSize="15sp" />
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{bean.fillWeightFlagText != null && !bean.fillWeightFlagText.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -377,8 +384,8 @@
|
|||||||
visible="@{bean.showMore}"
|
visible="@{bean.showMore}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="#e3f6e0"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
@@ -416,14 +423,15 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- 表头 (有数据时显示) -->
|
<!-- 表头 (有数据时显示,浅蓝色背景,顶部圆角同卡片) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
visible="@{bean.hasWaybillDetails && !bean.isLoading.get()}"
|
visible="@{bean.hasWaybillDetails && !bean.isLoading.get()}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="10dp"
|
android:background="@drawable/bg_arrive_sub_header"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="10dp"
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="10dp"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -512,7 +520,7 @@
|
|||||||
visible="@{bean.hasWaybillDetails && !bean.isLoading.get()}"
|
visible="@{bean.hasWaybillDetails && !bean.isLoading.get()}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider"
|
app:dividerColor="@color/sub_list_divider"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- 子列表 RecyclerView (有数据时显示) -->
|
<!-- 子列表 RecyclerView (有数据时显示) -->
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
@@ -110,7 +111,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 第一行:ULD编码、架子车号、总重、货重、航班信息 -->
|
<!-- 第一行:ULD编码、架子车号、装机重、版型、航班信息 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 总重 -->
|
<!-- 装机重 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -108,18 +108,18 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:text="总重:"
|
android:text="装机重:"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf((int)bean.totalWeight)}"
|
android:text="@{String.valueOf((int)bean.netWeight)}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 货重 -->
|
<!-- 板型 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -131,13 +131,13 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{4}"
|
completeSpace="@{4}"
|
||||||
android:text="货重:"
|
android:text="板型:"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf((int)bean.cargoWeight)}"
|
android:text="@{bean.boardType}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -246,8 +246,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`1`.equals(bean.clearNormal) ? @drawable/tag_status_green : (`0`.equals(bean.clearNormal) ? @drawable/tag_status_orange : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
android:text="@{bean.clearNormalText}"
|
android:text="@{bean.clearNormalText}"
|
||||||
android:textSize="15sp" />
|
android:textColor="@{`1`.equals(bean.clearNormal) ? @color/text_green : (`0`.equals(bean.clearNormal) ? @color/text_orange : @color/text_gray)}"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{bean.clearNormalText != null && !bean.clearNormalText.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -319,18 +324,19 @@
|
|||||||
visible="@{bean.showMore}"
|
visible="@{bean.showMore}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="#e3f6e0"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
<!-- 表头 -->
|
<!-- 表头(浅蓝色背景,顶部圆角同卡片) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="10dp"
|
android:background="@drawable/bg_arrive_sub_header"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="10dp">
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -397,7 +403,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
|
|
||||||
<!-- 子列表 RecyclerView -->
|
<!-- 子列表 RecyclerView -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:loadImage="http://schemas.android.com/tools">
|
xmlns:loadImage="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
@@ -95,7 +96,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<!-- 状态 (weight=1) -->
|
<!-- 状态 (weight=1) -->
|
||||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
||||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="状态:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="状态:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.declareStatus}" android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/text_blue : @color/text_normal)}" android:textSize="15sp"/>
|
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@{`01`.equals(bean.declareStatus) ? @drawable/tag_status_green : (`W`.equals(bean.declareStatus) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}" android:paddingHorizontal="8dp" android:paddingVertical="2dp" android:text="@{bean.declareStatus}" android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/colorPrimary : @color/text_gray)}" android:textSize="14sp" android:visibility="@{bean.declareStatus != null && !bean.declareStatus.isEmpty() ? View.VISIBLE : View.GONE}"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!-- 代理 (weight=1) -->
|
<!-- 代理 (weight=1) -->
|
||||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
android:src="@mipmap/img_down" />
|
android:src="@mipmap/img_down" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!-- 子订单列表容器(在白色卡片外面) -->
|
<!-- 子订单列表容器(在白色卡片外面) -->
|
||||||
<LinearLayout visible="@{bean.showMore}" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="#e3f6e0" android:orientation="vertical" android:visibility="gone">
|
<LinearLayout visible="@{bean.showMore}" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:background="@drawable/bg_white_radius_8" android:orientation="vertical" android:visibility="gone">
|
||||||
<!-- 暂无数据提示 -->
|
<!-- 暂无数据提示 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_empty"
|
android:id="@+id/tv_empty"
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
<!-- 表头 -->
|
<!-- 表头 -->
|
||||||
<LinearLayout android:id="@+id/ll_header" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginVertical="10dp" android:paddingHorizontal="10dp" android:orientation="horizontal">
|
<LinearLayout android:id="@+id/ll_header" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_arrive_sub_header" android:paddingVertical="10dp" android:paddingHorizontal="10dp" android:orientation="horizontal">
|
||||||
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.5" android:gravity="center" android:text="选项" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.5" android:gravity="center" android:text="选项" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
||||||
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" android:gravity="center" android:text="分单号" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" android:gravity="center" android:text="分单号" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
||||||
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:gravity="center" android:text="件数" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:gravity="center" android:text="件数" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
android:id="@+id/divider_header"
|
android:id="@+id/divider_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider"/>
|
app:dividerColor="@color/sub_list_divider"/>
|
||||||
<!-- 子列表 RecyclerView -->
|
<!-- 子列表 RecyclerView -->
|
||||||
<androidx.recyclerview.widget.RecyclerView android:id="@+id/rv_sub" android:layout_width="match_parent" android:layout_height="wrap_content" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
<androidx.recyclerview.widget.RecyclerView android:id="@+id/rv_sub" android:layout_width="match_parent" android:layout_height="wrap_content" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.GjcHaWb" />
|
type="com.lukouguoji.module_base.bean.GjcHaWb" />
|
||||||
@@ -67,15 +69,26 @@
|
|||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<!-- 申报状态 -->
|
<!-- 申报状态(Tag 形式,根据语义着色) -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.tallyStatus ?? ``}"
|
android:orientation="horizontal">
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="14sp" />
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`未申报`.equals(bean.tallyStatus) ? @drawable/tag_status_gray : @drawable/tag_status_green}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
|
android:text="@{bean.tallyStatus ?? ``}"
|
||||||
|
android:textColor="@{`未申报`.equals(bean.tallyStatus) ? @color/text_gray : @color/text_green}"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:visibility="@{bean.tallyStatus != null && !bean.tallyStatus.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 品名(中) -->
|
<!-- 品名(中) -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -132,7 +145,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,158 +1,171 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
|
||||||
|
<variable
|
||||||
<variable
|
name="viewModel"
|
||||||
name="model"
|
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
|
||||||
type="com.lukouguoji.gjc.dialog.GjcQueryFilterDialogModel" />
|
</data>
|
||||||
</data>
|
|
||||||
|
<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/white"
|
||||||
android:background="@color/white"
|
android:elevation="8dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 状态栏占位 -->
|
<!-- 筛选标题栏 -->
|
||||||
<View
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="25dp"
|
android:layout_height="50dp"
|
||||||
android:background="@color/white" />
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="15dp">
|
||||||
<!-- 标题栏 -->
|
|
||||||
<include layout="@layout/title_tool_bar" />
|
<ImageView
|
||||||
|
android:layout_width="15dp"
|
||||||
<com.google.android.material.divider.MaterialDivider
|
android:layout_height="15dp"
|
||||||
android:layout_width="match_parent"
|
android:onClick="@{()-> viewModel.closeFilter()}"
|
||||||
android:layout_height="1dp"/>
|
android:src="@mipmap/left_icon"
|
||||||
|
android:tint="#666666" />
|
||||||
<!-- 筛选条件区域 -->
|
|
||||||
<ScrollView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_marginLeft="10dp"
|
||||||
android:padding="15dp">
|
android:text="筛选条件"
|
||||||
|
android:textColor="#666666"
|
||||||
<LinearLayout
|
android:textSize="16sp" />
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
</LinearLayout>
|
||||||
android:orientation="vertical">
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
<!-- 特码 -->
|
android:layout_width="match_parent"
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
android:layout_height="1dp" />
|
||||||
hint='@{"请输入特码"}'
|
|
||||||
title='@{"特码"}'
|
<!-- 筛选条件区域 -->
|
||||||
titleLength="@{4}"
|
<ScrollView
|
||||||
type="@{DataLayoutType.INPUT}"
|
android:layout_width="match_parent"
|
||||||
value='@={model.spCode}'
|
android:layout_height="0dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_weight="1"
|
||||||
android:layout_height="wrap_content"
|
android:padding="15dp">
|
||||||
android:layout_marginBottom="10dp" />
|
|
||||||
|
<LinearLayout
|
||||||
<!-- 航班号 -->
|
android:layout_width="match_parent"
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
android:layout_height="wrap_content"
|
||||||
hint='@{"请输入航班号"}'
|
android:orientation="vertical">
|
||||||
title='@{"航班号"}'
|
|
||||||
titleLength="@{4}"
|
<!-- 特码 -->
|
||||||
type="@{DataLayoutType.INPUT}"
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
value='@={model.flightNo}'
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_marginBottom="10dp" />
|
hint='@{"请输入特码"}'
|
||||||
|
title='@{"特码"}'
|
||||||
<!-- 目的港 -->
|
titleLength="@{4}"
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
type="@{DataLayoutType.INPUT}"
|
||||||
hint='@{"请输入目的港"}'
|
value='@={viewModel.spCode}' />
|
||||||
title='@{"目的港"}'
|
|
||||||
titleLength="@{4}"
|
<!-- 航班号 -->
|
||||||
type="@{DataLayoutType.INPUT}"
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
value='@={model.dest}'
|
android:id="@+id/filter_flight_no"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp" />
|
android:layout_marginBottom="10dp"
|
||||||
|
hint='@{"请输入航班号"}'
|
||||||
<!-- 运单类型 -->
|
title='@{"航班号"}'
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
titleLength="@{4}"
|
||||||
hint='@{"请选择运单类型"}'
|
type="@{DataLayoutType.INPUT}"
|
||||||
list="@{model.awbTypeList}"
|
value='@={viewModel.flightNo}' />
|
||||||
title='@{"运单类型"}'
|
|
||||||
titleLength="@{4}"
|
<!-- 目的港 -->
|
||||||
type="@{DataLayoutType.SPINNER}"
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
value='@={model.awbType}'
|
android:id="@+id/filter_dest"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp" />
|
android:layout_marginBottom="10dp"
|
||||||
|
hint='@{"请输入目的港"}'
|
||||||
<!-- 业务类型 -->
|
title='@{"目的港"}'
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
titleLength="@{4}"
|
||||||
hint='@{"请选择业务类型"}'
|
type="@{DataLayoutType.INPUT}"
|
||||||
list="@{model.businessTypeList}"
|
value='@={viewModel.dest}' />
|
||||||
title='@{"业务类型"}'
|
|
||||||
titleLength="@{4}"
|
<!-- 运单类型 -->
|
||||||
type="@{DataLayoutType.SPINNER}"
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
value='@={model.businessType}'
|
android:layout_width="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginBottom="10dp"
|
||||||
android:layout_marginBottom="10dp" />
|
hint='@{"请选择运单类型"}'
|
||||||
|
list="@{viewModel.awbTypeList}"
|
||||||
<!-- 品名(中) -->
|
title='@{"运单类型"}'
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
titleLength="@{4}"
|
||||||
hint='@{"请输入品名"}'
|
type="@{DataLayoutType.SPINNER}"
|
||||||
title='@{"品名(中)"}'
|
value='@={viewModel.awbType}' />
|
||||||
titleLength="@{4}"
|
|
||||||
type="@{DataLayoutType.INPUT}"
|
<!-- 业务类型 -->
|
||||||
value='@={model.goodsCn}'
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp" />
|
android:layout_marginBottom="10dp"
|
||||||
|
hint='@{"请选择业务类型"}'
|
||||||
<!-- 底部按钮区域 -->
|
list="@{viewModel.businessTypeList}"
|
||||||
<LinearLayout
|
title='@{"业务类型"}'
|
||||||
android:layout_width="300dp"
|
titleLength="@{4}"
|
||||||
android:layout_height="50dp"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
android:layout_gravity="center_horizontal"
|
value='@={viewModel.businessType}' />
|
||||||
android:layout_marginTop="32dp"
|
|
||||||
android:background="@color/white"
|
<!-- 品名(中) -->
|
||||||
android:gravity="center"
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:orientation="horizontal"
|
android:layout_width="match_parent"
|
||||||
android:paddingHorizontal="15dp">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
<!-- 重置按钮 -->
|
hint='@{"请输入品名"}'
|
||||||
<TextView
|
title='@{"品名(中)"}'
|
||||||
android:layout_width="0dp"
|
titleLength="@{4}"
|
||||||
android:layout_height="40dp"
|
type="@{DataLayoutType.INPUT}"
|
||||||
android:layout_marginRight="24dp"
|
value='@={viewModel.goodsCn}' />
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/bg_primary_radius_4"
|
<!-- 底部按钮区域 -->
|
||||||
android:gravity="center"
|
<LinearLayout
|
||||||
android:onClick="@{()-> model.onResetClick()}"
|
android:layout_width="300dp"
|
||||||
android:text="重置"
|
android:layout_height="50dp"
|
||||||
android:textColor="@color/white"
|
android:layout_gravity="center_horizontal"
|
||||||
android:textSize="16sp" />
|
android:layout_marginTop="32dp"
|
||||||
|
android:background="@color/white"
|
||||||
<!-- 搜索按钮 -->
|
android:gravity="center"
|
||||||
<TextView
|
android:orientation="horizontal"
|
||||||
android:layout_width="0dp"
|
android:paddingHorizontal="15dp">
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_weight="1"
|
<TextView
|
||||||
android:background="@drawable/bg_primary_radius_4"
|
android:layout_width="0dp"
|
||||||
android:gravity="center"
|
android:layout_height="40dp"
|
||||||
android:onClick="@{()-> model.onConfirmClick()}"
|
android:layout_marginRight="24dp"
|
||||||
android:text="搜索"
|
android:layout_weight="1"
|
||||||
android:textColor="@color/white"
|
android:background="@drawable/bg_primary_radius_4"
|
||||||
android:textSize="16sp" />
|
android:gravity="center"
|
||||||
|
android:onClick="@{()-> viewModel.resetFilter()}"
|
||||||
</LinearLayout>
|
android:text="重置"
|
||||||
|
android:textColor="@color/white"
|
||||||
</LinearLayout>
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
</ScrollView>
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_weight="1"
|
||||||
</LinearLayout>
|
android:background="@drawable/bg_primary_radius_4"
|
||||||
|
android:gravity="center"
|
||||||
</layout>
|
android:onClick="@{()-> viewModel.confirmFilter()}"
|
||||||
|
android:text="搜索"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@@ -368,7 +368,6 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
|||||||
|| actualNum.value.verifyNullOrEmpty("请输入实到件数")
|
|| actualNum.value.verifyNullOrEmpty("请输入实到件数")
|
||||||
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|
||||||
|| billingWeight.value.verifyNullOrEmpty("请输入计费重量")
|
|| billingWeight.value.verifyNullOrEmpty("请输入计费重量")
|
||||||
|| goodsNameCn.value.verifyNullOrEmpty("请输入品名(中)")
|
|
||||||
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|
||||||
|| waybillType.value.verifyNullOrEmpty("请选择运单类型")
|
|| waybillType.value.verifyNullOrEmpty("请选择运单类型")
|
||||||
|| businessType.value.verifyNullOrEmpty("请选择业务类型")
|
|| businessType.value.verifyNullOrEmpty("请选择业务类型")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
val paymentDateEnd = MutableLiveData("") // 缴费日期止
|
val paymentDateEnd = MutableLiveData("") // 缴费日期止
|
||||||
val agentCode = MutableLiveData("") // 代理人
|
val agentCode = MutableLiveData("") // 代理人
|
||||||
val wbNo = MutableLiveData("") // 运单号
|
val wbNo = MutableLiveData("") // 运单号
|
||||||
val pickUpNo = MutableLiveData("") // 提货单号
|
val spCode = MutableLiveData("") // 特码
|
||||||
|
|
||||||
// ========== 下拉列表数据源 ==========
|
// ========== 下拉列表数据源 ==========
|
||||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||||
@@ -90,9 +90,9 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扫码提货单号
|
* 扫码特码
|
||||||
*/
|
*/
|
||||||
fun scanPickUpNo() {
|
fun scanSpCode() {
|
||||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.gnj_chu_ku_list)
|
ScanModel.startScan(getTopActivity(), Constant.RequestCode.gnj_chu_ku_list)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
"endDate" to paymentDateEnd.value?.ifEmpty { null },
|
"endDate" to paymentDateEnd.value?.ifEmpty { null },
|
||||||
"agentCode" to agentCode.value?.ifEmpty { null },
|
"agentCode" to agentCode.value?.ifEmpty { null },
|
||||||
"no" to wbNo.value?.ifEmpty { null },
|
"no" to wbNo.value?.ifEmpty { null },
|
||||||
"pkId" to pickUpNo.value?.ifEmpty { null }
|
"spCode" to spCode.value?.ifEmpty { null }
|
||||||
)
|
)
|
||||||
|
|
||||||
val listParams = (filterParams + mapOf(
|
val listParams = (filterParams + mapOf(
|
||||||
@@ -182,7 +182,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
Constant.RequestCode.gnj_chu_ku_list -> {
|
Constant.RequestCode.gnj_chu_ku_list -> {
|
||||||
pickUpNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
spCode.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
|||||||
init {
|
init {
|
||||||
clearResultList.value = listOf(
|
clearResultList.value = listOf(
|
||||||
KeyValue("全部", ""),
|
KeyValue("全部", ""),
|
||||||
KeyValue("正常", "0"),
|
KeyValue("正常", "1"),
|
||||||
KeyValue("异常", "1")
|
KeyValue("异常", "0")
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,7 +266,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请输入品名(中)"}'
|
hint='@{"请输入品名(中)"}'
|
||||||
required="@{true}"
|
required="@{false}"
|
||||||
title='@{"品名(中)"}'
|
title='@{"品名(中)"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
|||||||
@@ -76,13 +76,13 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<!-- 提货单号 -->
|
<!-- 特码 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请输入提货单号"}'
|
hint='@{"请输入特码"}'
|
||||||
icon="@{@drawable/img_scan}"
|
icon="@{@drawable/img_scan}"
|
||||||
setOnIconClickListener="@{(v)-> viewModel.scanPickUpNo()}"
|
setOnIconClickListener="@{(v)-> viewModel.scanSpCode()}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.pickUpNo}"
|
value="@={viewModel.spCode}"
|
||||||
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" />
|
||||||
|
|||||||
@@ -349,13 +349,13 @@
|
|||||||
|
|
||||||
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||||
|
|
||||||
<!-- 分单子列表容器(淡绿色背景) -->
|
<!-- 分单子列表容器(白色圆角卡片) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
visible="@{bean.showMore}"
|
visible="@{bean.showMore}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="#e3f6e0"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
@@ -371,14 +371,15 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- 表头 -->
|
<!-- 表头(浅蓝色背景,顶部圆角同卡片) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_header"
|
android:id="@+id/ll_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="10dp"
|
android:background="@drawable/bg_arrive_sub_header"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="10dp">
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -458,7 +459,7 @@
|
|||||||
android:id="@+id/divider_header"
|
android:id="@+id/divider_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
|
|
||||||
<!-- 子列表 RecyclerView -->
|
<!-- 子列表 RecyclerView -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:loadImage="http://schemas.android.com/tools">
|
xmlns:loadImage="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.GjjHaWb" />
|
type="com.lukouguoji.module_base.bean.GjjHaWb" />
|
||||||
@@ -87,31 +90,53 @@
|
|||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<!-- 原始舱单 -->
|
<!-- 原始舱单(Tag 形式,根据语义着色) -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1.0"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:orientation="horizontal">
|
||||||
android:ellipsize="end"
|
|
||||||
android:text="@{bean.mftStatus ?? ``}"
|
|
||||||
android:textColor="@color/colorPrimary"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<!-- 理货报告 -->
|
<TextView
|
||||||
<TextView
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`01`.equals(bean.mftStatus) ? @drawable/tag_status_green : (`W`.equals(bean.mftStatus) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
|
android:text="@{bean.mftStatus ?? ``}"
|
||||||
|
android:textColor="@{`01`.equals(bean.mftStatus) ? @color/text_green : (`W`.equals(bean.mftStatus) ? @color/colorPrimary : @color/text_gray)}"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:visibility="@{bean.mftStatus != null && !bean.mftStatus.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 理货报告(Tag 形式,根据语义着色) -->
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="1.0"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:orientation="horizontal">
|
||||||
android:ellipsize="end"
|
|
||||||
android:text="@{bean.tallyStatus ?? ``}"
|
<TextView
|
||||||
android:textColor="@color/colorPrimary"
|
android:layout_width="wrap_content"
|
||||||
android:textSize="14sp" />
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`01`.equals(bean.tallyStatus) ? @drawable/tag_status_green : (`W`.equals(bean.tallyStatus) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
|
android:text="@{bean.tallyStatus ?? ``}"
|
||||||
|
android:textColor="@{`01`.equals(bean.tallyStatus) ? @color/text_green : (`W`.equals(bean.tallyStatus) ? @color/colorPrimary : @color/text_gray)}"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:visibility="@{bean.tallyStatus != null && !bean.tallyStatus.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 品名(中) -->
|
<!-- 品名(中) -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -131,7 +156,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -160,13 +160,13 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 第二行:提货单号、库位、提取时间、品名(中) -->
|
<!-- 第二行:特码、库位、办理时间、品名(中) -->
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<!-- 提货单号 -->
|
<!-- 特码 -->
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -177,13 +177,13 @@
|
|||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="提货单号:"
|
android:text="特码:"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.pkId}"
|
android:text="@{bean.spCode}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 提取时间 -->
|
<!-- 办理时间 -->
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="提取时间:"
|
android:text="办理时间:"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -247,8 +247,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`1`.equals(bean.clearNormal) ? @drawable/tag_status_green : (`0`.equals(bean.clearNormal) ? @drawable/tag_status_orange : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
android:text="@{bean.clearNormalText}"
|
android:text="@{bean.clearNormalText}"
|
||||||
android:textSize="15sp" />
|
android:textColor="@{`1`.equals(bean.clearNormal) ? @color/text_green : (`0`.equals(bean.clearNormal) ? @color/text_orange : @color/text_gray)}"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="@{bean.clearNormalText != null && !bean.clearNormalText.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -319,8 +324,8 @@
|
|||||||
visible="@{bean.showMore}"
|
visible="@{bean.showMore}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="#e3f6e0"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
@@ -336,14 +341,15 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- 表头 -->
|
<!-- 表头(浅蓝色背景,顶部圆角同卡片) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_header"
|
android:id="@+id/ll_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="10dp"
|
android:background="@drawable/bg_arrive_sub_header"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="10dp">
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -411,7 +417,7 @@
|
|||||||
android:id="@+id/divider_header"
|
android:id="@+id/divider_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
|
|
||||||
<!-- 子列表 RecyclerView -->
|
<!-- 子列表 RecyclerView -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:loadImage="http://schemas.android.com/tools">
|
xmlns:loadImage="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
@@ -95,7 +96,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -109,9 +109,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="15sp"
|
android:background="@{`01`.equals(bean.status) ? @drawable/tag_status_green : (`W`.equals(bean.status) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
|
android:textSize="14sp"
|
||||||
android:text="@{bean.status}"
|
android:text="@{bean.status}"
|
||||||
android:textColor="@{`01`.equals(bean.status) ? @color/text_green : (`W`.equals(bean.status) ? @color/text_blue : @color/text_normal)}" />
|
android:textColor="@{`01`.equals(bean.status) ? @color/text_green : (`W`.equals(bean.status) ? @color/colorPrimary : @color/text_gray)}"
|
||||||
|
android:visibility="@{bean.status != null && !bean.status.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -340,8 +344,8 @@
|
|||||||
visible="@{bean.showMore}"
|
visible="@{bean.showMore}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="#e3f6e0"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone">
|
android:visibility="gone">
|
||||||
|
|
||||||
@@ -357,14 +361,15 @@
|
|||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<!-- 表头 -->
|
<!-- 表头(浅蓝色背景,顶部圆角同卡片) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_header"
|
android:id="@+id/ll_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginVertical="10dp"
|
android:background="@drawable/bg_arrive_sub_header"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="10dp">
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -472,7 +477,7 @@
|
|||||||
android:id="@+id/divider_header"
|
android:id="@+id/divider_header"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
|
|
||||||
<!-- 子列表 RecyclerView -->
|
<!-- 子列表 RecyclerView -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:loadImage="http://schemas.android.com/tools">
|
xmlns:loadImage="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.GjjImportTally" />
|
type="com.lukouguoji.module_base.bean.GjjImportTally" />
|
||||||
@@ -68,16 +71,27 @@
|
|||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<!-- 申报状态 -->
|
<!-- 申报状态(Tag 形式,根据语义着色) -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="0.8"
|
android:layout_weight="0.8"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.status}"
|
android:orientation="horizontal">
|
||||||
android:textColor="#4CAF50"
|
|
||||||
android:textSize="14sp" />
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@{`01`.equals(bean.status) ? @drawable/tag_status_green : (`W`.equals(bean.status) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="2dp"
|
||||||
|
android:text="@{bean.status}"
|
||||||
|
android:textColor="@{`01`.equals(bean.status) ? @color/text_green : (`W`.equals(bean.status) ? @color/colorPrimary : @color/text_gray)}"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:visibility="@{bean.status != null && !bean.status.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 品名(中) -->
|
<!-- 品名(中) -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -141,7 +155,7 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/sub_list_divider" />
|
app:dividerColor="@color/sub_list_divider" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
style="@style/iv_search_action"
|
style="@style/iv_search_action"
|
||||||
android:onClick="@{()-> viewModel.onBackClick()}"
|
android:onClick="@{()-> viewModel.onBackClick()}"
|
||||||
android:src="@drawable/img_back_action" />
|
android:src="@drawable/img_back_action_old" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class PdaGuoBangViewModel : BaseViewModel() {
|
|||||||
val channelList = MutableLiveData(emptyList<KeyValue>())
|
val channelList = MutableLiveData(emptyList<KeyValue>())
|
||||||
private var channel = KeyValue("", "")
|
private var channel = KeyValue("", "")
|
||||||
|
|
||||||
// 版型
|
// 板型
|
||||||
val version = MutableLiveData("")
|
val version = MutableLiveData("")
|
||||||
|
|
||||||
// 高度
|
// 高度
|
||||||
|
|||||||
Reference in New Issue
Block a user