feat: 国内进港移库 ui
This commit is contained in:
22
.claude/settings.local.json
Normal file
22
.claude/settings.local.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"mcp__playwright__browser_navigate",
|
||||||
|
"mcp__chrome-devtools__new_page",
|
||||||
|
"mcp__chrome-devtools__wait_for",
|
||||||
|
"mcp__chrome-devtools__take_screenshot",
|
||||||
|
"mcp__chrome-devtools__click",
|
||||||
|
"mcp__chrome-devtools__navigate_page",
|
||||||
|
"mcp__chrome-devtools__take_snapshot",
|
||||||
|
"Bash(./gradlew:*)",
|
||||||
|
"Bash(find:*)",
|
||||||
|
"Bash(cat:*)",
|
||||||
|
"Bash(tree:*)",
|
||||||
|
"Bash(git mv:*)",
|
||||||
|
"Bash(git checkout:*)",
|
||||||
|
"Bash(tee:*)"
|
||||||
|
],
|
||||||
|
"deny": [],
|
||||||
|
"ask": []
|
||||||
|
}
|
||||||
|
}
|
||||||
501
CLAUDE.md
501
CLAUDE.md
@@ -2509,3 +2509,504 @@ PictureSelector.create(this)
|
|||||||
- ✅ 使用DataBinding简化代码
|
- ✅ 使用DataBinding简化代码
|
||||||
- ✅ 利用扩展函数处理通用逻辑
|
- ✅ 利用扩展函数处理通用逻辑
|
||||||
- ✅ 不重复造轮子,保持架构一致性
|
- ✅ 不重复造轮子,保持架构一致性
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 常见编译错误及解决方案
|
||||||
|
|
||||||
|
### 1. DataBinding错误:Cannot resolve type 'DetailsPageType'
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
ERROR: Cannot resolve type 'DetailsPageType' file://app/src/main/res/layout/activity_xxx.xml Line:XX
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
在XML布局文件中import的包名错误。
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```xml
|
||||||
|
<import type="com.lukouguoji.module_base.constant.DetailsPageType" />
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确写法**:
|
||||||
|
```xml
|
||||||
|
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
|
||||||
|
```
|
||||||
|
|
||||||
|
**注意**: `DetailsPageType`位于`common`包,不是`constant`包!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 2. DataBinding错误:Could not find accessor DataLayoutType.INTEGER
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
ERROR: Could not find accessor com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType.INTEGER
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
`DataLayoutType`枚举中不存在`INTEGER`类型。
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```xml
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
type="@{DataLayoutType.INTEGER}"
|
||||||
|
value='@={viewModel.bean.count}' />
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确写法**:
|
||||||
|
```xml
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.bean.count}' />
|
||||||
|
```
|
||||||
|
|
||||||
|
**可用类型**:
|
||||||
|
- `DataLayoutType.INPUT` - 文本输入(可输入数字)
|
||||||
|
- `DataLayoutType.SPINNER` - 下拉选择
|
||||||
|
- `DataLayoutType.DATE` - 日期选择
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3. Kotlin编译错误:Unresolved reference: PAGE_TYPE
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
e: Unresolved reference: PAGE_TYPE
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
`Constant.Key`对象中缺少`PAGE_TYPE`常量。
|
||||||
|
|
||||||
|
**解决方案**:
|
||||||
|
在`module_base/src/main/java/com/lukouguoji/module_base/common/Constant.kt`中添加:
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
object Key {
|
||||||
|
// ... 其他常量
|
||||||
|
|
||||||
|
// ID
|
||||||
|
const val ID = "id"
|
||||||
|
|
||||||
|
// 页面类型
|
||||||
|
const val PAGE_TYPE = "pageType"
|
||||||
|
|
||||||
|
// ... 其他常量
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**使用示例**:
|
||||||
|
```kotlin
|
||||||
|
val starter = Intent(context, XxxActivity::class.java)
|
||||||
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
||||||
|
.putExtra(Constant.Key.ID, id)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4. Kotlin编译错误:Unresolved reference: Edit
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
e: Unresolved reference: Edit
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
`DetailsPageType`枚举中不存在`Edit`值。
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```kotlin
|
||||||
|
when (viewModel.pageType) {
|
||||||
|
DetailsPageType.Add -> setBackArrow("新增")
|
||||||
|
DetailsPageType.Edit -> setBackArrow("编辑") // ❌ 错误
|
||||||
|
DetailsPageType.Details -> setBackArrow("详情")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确写法**:
|
||||||
|
```kotlin
|
||||||
|
when (viewModel.pageType) {
|
||||||
|
DetailsPageType.Add -> setBackArrow("新增")
|
||||||
|
DetailsPageType.Modify -> setBackArrow("编辑") // ✅ 正确
|
||||||
|
DetailsPageType.Details -> setBackArrow("详情")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**DetailsPageType枚举值**:
|
||||||
|
```kotlin
|
||||||
|
enum class DetailsPageType(val title: String) {
|
||||||
|
Add("新增"), // 新增页面
|
||||||
|
Modify("编辑"), // 编辑页面(注意:不是Edit!)
|
||||||
|
Details("详情") // 详情页面
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5. Kotlin编译错误:Unresolved reference: IOnItemClickListener
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
e: Unresolved reference: IOnItemClickListener
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
import的包名错误,`IOnItemClickListener`在`interfaces`包,不是`impl`包。
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```kotlin
|
||||||
|
import com.lukouguoji.module_base.impl.IOnItemClickListener // ❌ 错误
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确写法**:
|
||||||
|
```kotlin
|
||||||
|
import com.lukouguoji.module_base.interfaces.IOnItemClickListener // ✅ 正确
|
||||||
|
```
|
||||||
|
|
||||||
|
**使用场景**:
|
||||||
|
```kotlin
|
||||||
|
class XxxViewModel : BaseViewModel(), IOnItemClickListener {
|
||||||
|
override fun onItemClick(position: Int, type: Int) {
|
||||||
|
// 处理点击事件
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 6. FlowBus使用错误
|
||||||
|
|
||||||
|
#### 错误A:Unresolved reference: observe
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
e: Unresolved reference: observe
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
缺少`observe`扩展函数的import。
|
||||||
|
|
||||||
|
**解决方案**:
|
||||||
|
```kotlin
|
||||||
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.impl.observe // ✅ 添加这一行
|
||||||
|
|
||||||
|
// 在Activity中使用
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH_LIST).observe(this) {
|
||||||
|
viewModel.refresh()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 错误B:Suspend function 'emit' should be called only from a coroutine
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
e: Suspend function 'emit' should be called only from a coroutine or another suspend function
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
`emit()`是suspend函数,需要在协程中调用。
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```kotlin
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH_LIST).emit("refresh") // ❌ 错误
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确写法**:
|
||||||
|
```kotlin
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
// 在ViewModel中
|
||||||
|
viewModelScope.launch {
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH_LIST).emit("refresh") // ✅ 正确
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 7. 图片上传字段错误
|
||||||
|
|
||||||
|
**错误信息**:
|
||||||
|
```
|
||||||
|
e: Unresolved reference: url
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误原因**:
|
||||||
|
`UploadBean`返回的字段名是`newName`,不是`url`。
|
||||||
|
|
||||||
|
**UploadBean结构**:
|
||||||
|
```kotlin
|
||||||
|
class UploadBean {
|
||||||
|
var newName: String = "" // ✅ 正确字段名
|
||||||
|
var zipFileName: String = ""
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```kotlin
|
||||||
|
val result = UploadUtil.upload(filePath)
|
||||||
|
if (result.verifySuccess()) {
|
||||||
|
val imageUrl = result.data?.url ?: "" // ❌ 错误:没有url字段
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确写法**:
|
||||||
|
```kotlin
|
||||||
|
val result = UploadUtil.upload(filePath)
|
||||||
|
if (result.verifySuccess()) {
|
||||||
|
val imageUrl = result.data?.newName ?: "" // ✅ 正确:使用newName
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**完整上传示例**:
|
||||||
|
```kotlin
|
||||||
|
launchLoadingCollect({
|
||||||
|
val uploadedUrls = mutableListOf<String>()
|
||||||
|
imageList.forEach { fileBean ->
|
||||||
|
if (fileBean.path.startsWith("http")) {
|
||||||
|
// 已上传的图片,直接使用URL
|
||||||
|
uploadedUrls.add(fileBean.path)
|
||||||
|
} else {
|
||||||
|
// 本地图片,需要上传
|
||||||
|
val result = UploadUtil.upload(fileBean.path)
|
||||||
|
if (result.verifySuccess()) {
|
||||||
|
uploadedUrls.add(result.data?.newName ?: "") // 使用newName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交时将图片URL列表用逗号拼接
|
||||||
|
val params = mapOf(
|
||||||
|
"images" to uploadedUrls.joinToString(",")
|
||||||
|
).toRequestBody()
|
||||||
|
|
||||||
|
NetApply.api.saveData(params)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
showToast("保存成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 8. RecyclerView DataBinding items属性问题
|
||||||
|
|
||||||
|
**问题现象**:
|
||||||
|
在DataBinding中使用`items`属性绑定数据会导致编译错误。
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```xml
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rvImages"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
items="@{viewModel.imageList}" ❌ 这个属性会导致编译错误
|
||||||
|
itemLayoutId="@{viewModel.imageItemLayoutId}"
|
||||||
|
viewHolder="@{viewModel.imageItemViewHolder}" />
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确做法**:
|
||||||
|
移除`items`属性,在Activity中手动更新adapter。
|
||||||
|
|
||||||
|
**XML布局**:
|
||||||
|
```xml
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rvImages"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
itemLayoutId="@{viewModel.imageItemLayoutId}"
|
||||||
|
viewHolder="@{viewModel.imageItemViewHolder}"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:spanCount="3" />
|
||||||
|
```
|
||||||
|
|
||||||
|
**Activity代码**:
|
||||||
|
```kotlin
|
||||||
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
setBackArrow("页面标题")
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 监听数据变化并手动更新adapter
|
||||||
|
viewModel.imageList.observe(this) { images ->
|
||||||
|
binding.rvImages.commonAdapter()?.refresh(images)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 9. pageType在DataBinding中的正确使用
|
||||||
|
|
||||||
|
**问题**:
|
||||||
|
如果`pageType`声明为普通变量,DataBinding无法正确绑定。
|
||||||
|
|
||||||
|
**错误示例**:
|
||||||
|
```kotlin
|
||||||
|
class XxxViewModel : BaseViewModel() {
|
||||||
|
var pageType: DetailsPageType = DetailsPageType.Add // ❌ 普通变量
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**正确写法**:
|
||||||
|
```kotlin
|
||||||
|
class XxxViewModel : BaseViewModel() {
|
||||||
|
val pageType = MutableLiveData(DetailsPageType.Add) // ✅ 使用LiveData
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**ViewModel中访问**:
|
||||||
|
```kotlin
|
||||||
|
fun initOnCreated(intent: Intent) {
|
||||||
|
pageType.value = DetailsPageType.valueOf(
|
||||||
|
intent.getStringExtra(Constant.Key.PAGE_TYPE) ?: DetailsPageType.Add.name
|
||||||
|
)
|
||||||
|
|
||||||
|
if (pageType.value != DetailsPageType.Add) {
|
||||||
|
loadData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Activity中访问**:
|
||||||
|
```kotlin
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
viewModel.initOnCreated(intent)
|
||||||
|
|
||||||
|
when (viewModel.pageType.value) {
|
||||||
|
DetailsPageType.Add -> setBackArrow("新增")
|
||||||
|
DetailsPageType.Modify -> setBackArrow("编辑")
|
||||||
|
DetailsPageType.Details -> setBackArrow("详情")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**XML中使用**:
|
||||||
|
```xml
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
required="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"运单号:"}'
|
||||||
|
value='@={viewModel.bean.waybillNo}' />
|
||||||
|
```
|
||||||
|
|
||||||
|
**注意**: 在XML的DataBinding表达式中,直接使用`viewModel.pageType`即可,不需要`.value`。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 错误排查流程
|
||||||
|
|
||||||
|
当遇到编译错误时,按以下顺序排查:
|
||||||
|
|
||||||
|
### 第1步:检查DataBinding错误
|
||||||
|
|
||||||
|
如果看到`android.databinding.tool.util.LoggedErrorException`:
|
||||||
|
|
||||||
|
1. **检查import语句的包名**
|
||||||
|
- ✅ `com.lukouguoji.module_base.common.DetailsPageType`
|
||||||
|
- ❌ `com.lukouguoji.module_base.constant.DetailsPageType`
|
||||||
|
|
||||||
|
2. **检查枚举值是否正确**
|
||||||
|
- ✅ `DataLayoutType.INPUT`、`SPINNER`、`DATE`
|
||||||
|
- ❌ `DataLayoutType.INTEGER`(不存在)
|
||||||
|
- ✅ `DetailsPageType.Modify`(编辑)
|
||||||
|
- ❌ `DetailsPageType.Edit`(不存在)
|
||||||
|
|
||||||
|
3. **移除不支持的属性**
|
||||||
|
- 移除RecyclerView的`items`属性
|
||||||
|
- 改为在Activity中手动更新adapter
|
||||||
|
|
||||||
|
### 第2步:检查Kotlin编译错误
|
||||||
|
|
||||||
|
如果看到`Unresolved reference`:
|
||||||
|
|
||||||
|
1. **检查import语句**
|
||||||
|
- `IOnItemClickListener` → `com.lukouguoji.module_base.interfaces.IOnItemClickListener`
|
||||||
|
- `observe` → `com.lukouguoji.module_base.impl.observe`
|
||||||
|
|
||||||
|
2. **检查常量是否存在**
|
||||||
|
- 确认`Constant.Key.PAGE_TYPE`已定义
|
||||||
|
- 确认`Constant.Key.ID`已定义
|
||||||
|
|
||||||
|
3. **检查字段名称**
|
||||||
|
- `UploadBean`使用`newName`,不是`url`
|
||||||
|
|
||||||
|
### 第3步:检查协程相关错误
|
||||||
|
|
||||||
|
如果看到suspend function相关错误:
|
||||||
|
|
||||||
|
1. **添加必要的import**
|
||||||
|
```kotlin
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **在协程中调用emit**
|
||||||
|
```kotlin
|
||||||
|
viewModelScope.launch {
|
||||||
|
FlowBus.with<String>(event).emit(data)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 第4步:清理并重新构建
|
||||||
|
|
||||||
|
如果上述都检查过,仍有问题:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 清理项目
|
||||||
|
./gradlew clean
|
||||||
|
|
||||||
|
# 重新构建
|
||||||
|
./gradlew assembleDebug
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 最佳实践建议
|
||||||
|
|
||||||
|
### 1. 开发前检查清单
|
||||||
|
|
||||||
|
- [ ] 确认`DetailsPageType`在`common`包
|
||||||
|
- [ ] 确认`IOnItemClickListener`在`interfaces`包
|
||||||
|
- [ ] 确认`Constant.Key.PAGE_TYPE`常量已定义
|
||||||
|
- [ ] 熟悉`DataLayoutType`和`DetailsPageType`的枚举值
|
||||||
|
|
||||||
|
### 2. 代码编写规范
|
||||||
|
|
||||||
|
- ✅ 使用`MutableLiveData`声明`pageType`,不用普通变量
|
||||||
|
- ✅ RecyclerView不使用`items`属性,改用手动更新adapter
|
||||||
|
- ✅ FlowBus的`emit()`必须在`viewModelScope.launch`中调用
|
||||||
|
- ✅ `observe`扩展函数需要单独import
|
||||||
|
- ✅ 图片上传使用`UploadBean.newName`字段
|
||||||
|
|
||||||
|
### 3. 参考已有代码
|
||||||
|
|
||||||
|
遇到问题时,优先参考项目中已有的类似实现:
|
||||||
|
|
||||||
|
- 查看`AccidentVisaDetailsViewModel`了解`pageType`的LiveData用法
|
||||||
|
- 查看`GncShouYunListActivity`了解FlowBus的正确使用
|
||||||
|
- 查看现有的编辑页面了解图片上传的完整流程
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 快速修复命令
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 查找DetailsPageType的正确包名
|
||||||
|
grep -r "enum class DetailsPageType" module_base/src --include="*.kt"
|
||||||
|
|
||||||
|
# 查找IOnItemClickListener的正确包名
|
||||||
|
find module_base/src -name "IOnItemClickListener.kt"
|
||||||
|
|
||||||
|
# 查找DataLayoutType的枚举值
|
||||||
|
grep -A 5 "enum class DataLayoutType" module_base/src --include="*.kt"
|
||||||
|
|
||||||
|
# 查找UploadBean的字段定义
|
||||||
|
grep -A 10 "class UploadBean" module_base/src --include="*.kt"
|
||||||
|
```
|
||||||
|
|
||||||
|
通过遵循这些规范和检查清单,可以避免大部分常见的编译错误。
|
||||||
@@ -23,7 +23,6 @@ import com.lukouguoji.aerologic.page.accident.visa.list.AccidentVisaListActivity
|
|||||||
import com.lukouguoji.aerologic.page.car.list.CarListActivity
|
import com.lukouguoji.aerologic.page.car.list.CarListActivity
|
||||||
import com.lukouguoji.aerologic.page.flight.query.list.FlightQueryListActivity
|
import com.lukouguoji.aerologic.page.flight.query.list.FlightQueryListActivity
|
||||||
import com.lukouguoji.aerologic.page.gnj.jiaojie.GnjHandoverListActivity
|
import com.lukouguoji.aerologic.page.gnj.jiaojie.GnjHandoverListActivity
|
||||||
import com.lukouguoji.aerologic.page.gnj.out.stash.list.GnjOutStashListActivity
|
|
||||||
import com.lukouguoji.aerologic.page.gnj.manifest.list.GnjManifestListActivity
|
import com.lukouguoji.aerologic.page.gnj.manifest.list.GnjManifestListActivity
|
||||||
import com.lukouguoji.aerologic.page.gnj.stash.list.GnjStashListActivity
|
import com.lukouguoji.aerologic.page.gnj.stash.list.GnjStashListActivity
|
||||||
import com.lukouguoji.aerologic.page.gnj.move.stash.list.GnjMoveStashListActivity
|
import com.lukouguoji.aerologic.page.gnj.move.stash.list.GnjMoveStashListActivity
|
||||||
@@ -277,7 +276,7 @@ class HomeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
//出库
|
//出库
|
||||||
Constant.AuthName.GnjChuKuList -> {
|
Constant.AuthName.GnjChuKuList -> {
|
||||||
GnjOutStashListActivity.start(requireContext())
|
GnjMoveStashListActivity.start(requireContext())
|
||||||
}
|
}
|
||||||
//仓库管理
|
//仓库管理
|
||||||
Constant.AuthName.GnjWareHouse -> {
|
Constant.AuthName.GnjWareHouse -> {
|
||||||
|
|||||||
@@ -131,6 +131,12 @@ class LoginActivity : BaseActivity(),
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_login)
|
setContentView(R.layout.activity_login)
|
||||||
|
|
||||||
|
// TODO: 临时跳过登录,直接进入移库列表页
|
||||||
|
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GNJ_YIKU_EDIT)
|
||||||
|
.withFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
|
.navigation()
|
||||||
|
return
|
||||||
|
|
||||||
checkAppUpdate()
|
checkAppUpdate()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
import androidx.databinding.ObservableBoolean
|
||||||
|
import com.lukouguoji.module_base.interfaces.ICheck
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库数据Bean
|
||||||
|
*/
|
||||||
|
class GnjYiKuBean : ICheck {
|
||||||
|
var id: String = "" // 主键ID
|
||||||
|
var mawbId: String = "" // 主运单ID
|
||||||
|
var wbNo: String = "" // 运单号
|
||||||
|
var pc: String = "" // 件数
|
||||||
|
var weight: String = "" // 重量(kg)
|
||||||
|
var spCode: String = "" // 特码
|
||||||
|
var agentCode: String = "" // 代理人
|
||||||
|
var goods: String = "" // 品名
|
||||||
|
var flight: String = "" // 进港航班(格式: 20240712/MU2023)
|
||||||
|
var route: String = "" // 航程(格式: LAX-PEK-HFE)
|
||||||
|
var origin: String = "" // 始发港
|
||||||
|
var dest: String = "" // 目的港
|
||||||
|
var awbType: String = "" // 运单类型(转国际进港/转国内出港等)
|
||||||
|
var telegramNo: String = "" // 电报号
|
||||||
|
var remark: String = "" // 备注
|
||||||
|
var handoverStatus: String = "" // 移交状态(未移交/已移交)
|
||||||
|
var images: String = "" // 交接图片(逗号分隔的URL列表)
|
||||||
|
var fdate: String = "" // 航班日期
|
||||||
|
var fno: String = "" // 航班号
|
||||||
|
var businessType: String = "" // 业务类型
|
||||||
|
var opDate: String = "" // 操作日期
|
||||||
|
var carrier: String = "" // 承运人
|
||||||
|
|
||||||
|
// 多选状态绑定
|
||||||
|
val checked = ObservableBoolean(false)
|
||||||
|
|
||||||
|
override fun getCheckObservable(): ObservableBoolean {
|
||||||
|
return checked
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图片列表
|
||||||
|
*/
|
||||||
|
fun getImageList(): List<String> {
|
||||||
|
return if (images.isNotEmpty()) {
|
||||||
|
images.split(",").filter { it.isNotEmpty() }
|
||||||
|
} else {
|
||||||
|
emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -325,6 +325,9 @@ interface Constant {
|
|||||||
// ID
|
// ID
|
||||||
const val ID = "id"
|
const val ID = "id"
|
||||||
|
|
||||||
|
// 页面类型
|
||||||
|
const val PAGE_TYPE = "pageType"
|
||||||
|
|
||||||
// 运单
|
// 运单
|
||||||
const val WAYBILL = "waybill"
|
const val WAYBILL = "waybill"
|
||||||
|
|
||||||
|
|||||||
@@ -31,4 +31,7 @@ object ConstantEvent {
|
|||||||
|
|
||||||
// Socket事件点击
|
// Socket事件点击
|
||||||
const val SOCKET_EVENT_CLICK = "socket_event_click"
|
const val SOCKET_EVENT_CLICK = "socket_event_click"
|
||||||
|
|
||||||
|
// 国内进港移库列表刷新
|
||||||
|
const val EVENT_REFRESH_GNJ_YIKU_LIST = "event_refresh_gnj_yiku_list"
|
||||||
}
|
}
|
||||||
@@ -52,6 +52,7 @@ import com.lukouguoji.module_base.bean.GnjQueryBean
|
|||||||
import com.lukouguoji.module_base.bean.GnjQueryDetailsBean
|
import com.lukouguoji.module_base.bean.GnjQueryDetailsBean
|
||||||
import com.lukouguoji.module_base.bean.GnjStashBean
|
import com.lukouguoji.module_base.bean.GnjStashBean
|
||||||
import com.lukouguoji.module_base.bean.GnjUnloadListBean
|
import com.lukouguoji.module_base.bean.GnjUnloadListBean
|
||||||
|
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||||
import com.lukouguoji.module_base.bean.GoodsTransportBean
|
import com.lukouguoji.module_base.bean.GoodsTransportBean
|
||||||
import com.lukouguoji.module_base.bean.LogBean
|
import com.lukouguoji.module_base.bean.LogBean
|
||||||
import com.lukouguoji.module_base.bean.MessageBean
|
import com.lukouguoji.module_base.bean.MessageBean
|
||||||
@@ -918,6 +919,25 @@ interface Api {
|
|||||||
*/
|
*/
|
||||||
@POST("DomImpMove/searchWbList")
|
@POST("DomImpMove/searchWbList")
|
||||||
suspend fun getGnjMoveStashWbNoList(@Body data: RequestBody): BaseResultBean<List<String>>
|
suspend fun getGnjMoveStashWbNoList(@Body data: RequestBody): BaseResultBean<List<String>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取-国内进港移库-详情
|
||||||
|
*/
|
||||||
|
@POST("DomImpMove/queryById")
|
||||||
|
suspend fun getGnjYiKuDetails(@Query("id") id: String): BaseResultBean<GnjYiKuBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存-国内进港移库
|
||||||
|
*/
|
||||||
|
@POST("DomImpMove/save")
|
||||||
|
suspend fun saveGnjYiKu(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行-国内进港移库操作
|
||||||
|
*/
|
||||||
|
@POST("DomImpMove/move")
|
||||||
|
suspend fun transferGnjYiKu(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取国内出收运同步列表
|
* 获取国内出收运同步列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -97,7 +97,12 @@ object ARouterConstants {
|
|||||||
|
|
||||||
const val ACTIVITY_URL_GNJ_RU_KU = "/gnj/GnjRuKuActivity" //国内进港 入库
|
const val ACTIVITY_URL_GNJ_RU_KU = "/gnj/GnjRuKuActivity" //国内进港 入库
|
||||||
|
|
||||||
const val ACTIVITY_URL_GNJ_YI_KU = "/gnj/GnjYiKuListActivity" //国内进港 移库
|
const val ACTIVITY_URL_GNJ_YI_KU = "/gnj/GnjYiKuListActivity" //国内进港 移库(旧版本)
|
||||||
|
|
||||||
|
// 国内进港移库(新版本)
|
||||||
|
const val ACTIVITY_URL_GNJ_YIKU_LIST = "/gnj/GnjYiKuListActivity" //国内进港 移库列表
|
||||||
|
const val ACTIVITY_URL_GNJ_YIKU_DETAILS = "/gnj/GnjYiKuDetailsActivity" //国内进港 移库详情
|
||||||
|
const val ACTIVITY_URL_GNJ_YIKU_EDIT = "/gnj/GnjYiKuEditActivity" //国内进港 移库编辑
|
||||||
|
|
||||||
///////////////// 国际出港模块
|
///////////////// 国际出港模块
|
||||||
/**
|
/**
|
||||||
|
|||||||
26
module_gnj/src/main/AndroidManifest.xml
Normal file
26
module_gnj/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.lukouguoji.gnj">
|
||||||
|
|
||||||
|
<application>
|
||||||
|
<!-- 国内进港移库 - 新增的三个 Activity -->
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.list.GnjYiKuListActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.details.GnjYiKuDetailsActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.edit.GnjYiKuEditActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@@ -20,6 +20,25 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<!-- 国内进港移库 - 新增的三个 Activity -->
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.list.GnjYiKuListActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.details.GnjYiKuDetailsActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.edit.GnjYiKuEditActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.details
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.gnj.databinding.ActivityGnjYikuDetailsBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库详情页
|
||||||
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_YIKU_DETAILS)
|
||||||
|
class GnjYiKuDetailsActivity :
|
||||||
|
BaseBindingActivity<ActivityGnjYikuDetailsBinding, GnjYiKuDetailsViewModel>() {
|
||||||
|
|
||||||
|
override fun layoutId() = R.layout.activity_gnj_yiku_details
|
||||||
|
|
||||||
|
override fun viewModelClass() = GnjYiKuDetailsViewModel::class.java
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
setBackArrow("国内进港移库记录")
|
||||||
|
|
||||||
|
viewModel.initOnCreated(intent)
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 监听图片列表变化并更新adapter
|
||||||
|
viewModel.imageList.observe(this) { images ->
|
||||||
|
binding.rvImages.commonAdapter()?.refresh(images)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun start(context: Context, id: String) {
|
||||||
|
val starter = Intent(context, GnjYiKuDetailsActivity::class.java)
|
||||||
|
.putExtra(Constant.Key.ID, id)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.details
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewModel
|
||||||
|
import com.lukouguoji.module_base.bean.FileBean
|
||||||
|
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
|
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
|
||||||
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库详情 ViewModel
|
||||||
|
*/
|
||||||
|
class GnjYiKuDetailsViewModel : BaseViewModel() {
|
||||||
|
|
||||||
|
var id = ""
|
||||||
|
|
||||||
|
val dataBean = MutableLiveData<GnjYiKuBean>()
|
||||||
|
|
||||||
|
// 图片列表
|
||||||
|
val imageList = MutableLiveData<MutableList<FileBean>>(mutableListOf())
|
||||||
|
|
||||||
|
// 图片适配器配置
|
||||||
|
val imageItemLayoutId = R.layout.item_image_select
|
||||||
|
val imageItemViewHolder = ImageSelectViewHolder::class.java
|
||||||
|
|
||||||
|
fun initOnCreated(intent: Intent) {
|
||||||
|
id = intent.getStringExtra(Constant.Key.ID) ?: ""
|
||||||
|
getData()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getData() {
|
||||||
|
launchLoadingCollect({
|
||||||
|
NetApply.api.getGnjYiKuDetails(id)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
val bean = it.data ?: GnjYiKuBean()
|
||||||
|
dataBean.value = bean
|
||||||
|
|
||||||
|
// 处理图片列表
|
||||||
|
val images = bean.getImageList().map { url ->
|
||||||
|
FileBean(path = url)
|
||||||
|
}
|
||||||
|
imageList.value = images.toMutableList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.edit
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.gnj.databinding.ActivityGnjYikuEditBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
|
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||||
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库编辑页
|
||||||
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_YIKU_EDIT)
|
||||||
|
class GnjYiKuEditActivity :
|
||||||
|
BaseBindingActivity<ActivityGnjYikuEditBinding, GnjYiKuEditViewModel>() {
|
||||||
|
|
||||||
|
override fun layoutId() = R.layout.activity_gnj_yiku_edit
|
||||||
|
|
||||||
|
override fun viewModelClass() = GnjYiKuEditViewModel::class.java
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
viewModel.initOnCreated(intent)
|
||||||
|
|
||||||
|
// 根据页面类型设置标题
|
||||||
|
when (viewModel.pageType.value) {
|
||||||
|
DetailsPageType.Add -> setBackArrow("国内进港移库新增")
|
||||||
|
DetailsPageType.Modify -> setBackArrow("国内进港移库编辑")
|
||||||
|
DetailsPageType.Details -> setBackArrow("国内进港移库详情")
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 绑定图片列表点击事件
|
||||||
|
binding.rvImages.addOnItemClickListener(viewModel)
|
||||||
|
|
||||||
|
// 监听图片列表变化并更新adapter
|
||||||
|
viewModel.imageList.observe(this) { images ->
|
||||||
|
binding.rvImages.commonAdapter()?.refresh(images)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun startForAdd(context: Context) {
|
||||||
|
val starter = Intent(context, GnjYiKuEditActivity::class.java)
|
||||||
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun startForEdit(context: Context, id: String) {
|
||||||
|
val starter = Intent(context, GnjYiKuEditActivity::class.java)
|
||||||
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
||||||
|
.putExtra(Constant.Key.ID, id)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun startForDetails(context: Context, id: String) {
|
||||||
|
val starter = Intent(context, GnjYiKuEditActivity::class.java)
|
||||||
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Details.name)
|
||||||
|
.putExtra(Constant.Key.ID, id)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.edit
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewModel
|
||||||
|
import com.lukouguoji.module_base.bean.FileBean
|
||||||
|
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
|
||||||
|
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||||
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||||
|
import com.lukouguoji.module_base.util.UploadUtil
|
||||||
|
import dev.utils.app.info.KeyValue
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库编辑 ViewModel
|
||||||
|
*/
|
||||||
|
class GnjYiKuEditViewModel : BaseViewModel(), IOnItemClickListener {
|
||||||
|
|
||||||
|
val pageType = MutableLiveData(DetailsPageType.Add)
|
||||||
|
var id = ""
|
||||||
|
|
||||||
|
val dataBean = MutableLiveData(GnjYiKuBean())
|
||||||
|
|
||||||
|
// 运单类型下拉列表
|
||||||
|
val waybillTypeList = MutableLiveData(
|
||||||
|
listOf(
|
||||||
|
KeyValue("转国际进港", "CIII"),
|
||||||
|
KeyValue("转国内出港", "CICO"),
|
||||||
|
KeyValue("转国际出港", "CIIO"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
// 图片列表(初始添加一个空的FileBean用于显示"添加图片"按钮)
|
||||||
|
val imageList = MutableLiveData<MutableList<FileBean>>(
|
||||||
|
mutableListOf(FileBean())
|
||||||
|
)
|
||||||
|
|
||||||
|
// 图片适配器配置
|
||||||
|
val imageItemLayoutId = R.layout.item_image_select
|
||||||
|
val imageItemViewHolder = ImageSelectViewHolder::class.java
|
||||||
|
|
||||||
|
fun initOnCreated(intent: Intent) {
|
||||||
|
// 获取页面类型
|
||||||
|
pageType.value = DetailsPageType.valueOf(
|
||||||
|
intent.getStringExtra(Constant.Key.PAGE_TYPE) ?: DetailsPageType.Add.name
|
||||||
|
)
|
||||||
|
|
||||||
|
// 如果是编辑或详情,加载数据
|
||||||
|
if (pageType.value != DetailsPageType.Add) {
|
||||||
|
id = intent.getStringExtra(Constant.Key.ID) ?: ""
|
||||||
|
loadData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun loadData() {
|
||||||
|
launchLoadingCollect({
|
||||||
|
NetApply.api.getGnjYiKuDetails(id)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
val bean = it.data ?: GnjYiKuBean()
|
||||||
|
dataBean.value = bean
|
||||||
|
|
||||||
|
// 处理图片列表
|
||||||
|
val images = bean.getImageList().map { url ->
|
||||||
|
FileBean(path = url)
|
||||||
|
}.toMutableList()
|
||||||
|
|
||||||
|
// 如果是编辑模式,添加一个空的FileBean用于添加新图片
|
||||||
|
if (pageType.value == DetailsPageType.Modify) {
|
||||||
|
images.add(FileBean())
|
||||||
|
}
|
||||||
|
|
||||||
|
imageList.value = images
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交保存
|
||||||
|
*/
|
||||||
|
fun submit() {
|
||||||
|
val bean = dataBean.value ?: return
|
||||||
|
|
||||||
|
// 验证必填项
|
||||||
|
if (bean.wbNo.verifyNullOrEmpty("请输入运单号")) return
|
||||||
|
if (bean.pc.verifyNullOrEmpty("请输入件数")) return
|
||||||
|
if (bean.weight.verifyNullOrEmpty("请输入重量")) return
|
||||||
|
|
||||||
|
// 获取所有非空图片
|
||||||
|
val images = imageList.value!!.filter { it.path.isNotEmpty() }
|
||||||
|
|
||||||
|
// 检查图片数量限制(最多7张)
|
||||||
|
if (images.size > 7) {
|
||||||
|
showToast("最多上传7张图片")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
launchLoadingCollect({
|
||||||
|
// 1. 上传图片
|
||||||
|
val uploadedUrls = mutableListOf<String>()
|
||||||
|
images.forEach { fileBean ->
|
||||||
|
// 判断是否为已上传的图片(在线URL)
|
||||||
|
if (fileBean.path.startsWith("http")) {
|
||||||
|
uploadedUrls.add(fileBean.path)
|
||||||
|
} else {
|
||||||
|
// 本地图片需要上传
|
||||||
|
val result = UploadUtil.upload(fileBean.path)
|
||||||
|
if (result.verifySuccess()) {
|
||||||
|
uploadedUrls.add(result.data?.newName ?: "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 提交表单数据
|
||||||
|
val params = mapOf(
|
||||||
|
"id" to id,
|
||||||
|
"wbNo" to bean.wbNo,
|
||||||
|
"pc" to bean.pc,
|
||||||
|
"weight" to bean.weight,
|
||||||
|
"spCode" to bean.spCode,
|
||||||
|
"agentCode" to bean.agentCode,
|
||||||
|
"goods" to bean.goods,
|
||||||
|
"flight" to bean.flight,
|
||||||
|
"route" to bean.route,
|
||||||
|
"awbType" to bean.awbType,
|
||||||
|
"telegramNo" to bean.telegramNo,
|
||||||
|
"remark" to bean.remark,
|
||||||
|
"images" to uploadedUrls.joinToString(","),
|
||||||
|
).toRequestBody(removeEmptyOrNull = true)
|
||||||
|
|
||||||
|
NetApply.api.saveGnjYiKu(params)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
showToast(if (pageType.value == DetailsPageType.Add) "新增成功" else "保存成功")
|
||||||
|
|
||||||
|
// 发送刷新事件
|
||||||
|
viewModelScope.launch {
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH_GNJ_YIKU_LIST).emit("refresh")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭页面
|
||||||
|
getTopActivity().finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理图片删除点击事件
|
||||||
|
*/
|
||||||
|
override fun onItemClick(position: Int, type: Int) {
|
||||||
|
val list = imageList.value!!
|
||||||
|
if (type == R.id.iv_delete && position < list.size) {
|
||||||
|
list.removeAt(position)
|
||||||
|
imageList.value = list
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.list
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.gnj.databinding.ActivityGnjYikuListBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.impl.observe
|
||||||
|
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||||
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库列表页
|
||||||
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_GNJ_YIKU_LIST)
|
||||||
|
class GnjYiKuListActivity :
|
||||||
|
BaseBindingActivity<ActivityGnjYikuListBinding, GnjYiKuListViewModel>() {
|
||||||
|
|
||||||
|
override fun layoutId() = R.layout.activity_gnj_yiku_list
|
||||||
|
|
||||||
|
override fun viewModelClass() = GnjYiKuListViewModel::class.java
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
setBackArrow("国内进港移库")
|
||||||
|
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 绑定分页逻辑
|
||||||
|
viewModel.pageModel
|
||||||
|
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||||
|
|
||||||
|
// 监听刷新事件
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH_GNJ_YIKU_LIST)
|
||||||
|
.observe(this) {
|
||||||
|
viewModel.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始加载
|
||||||
|
viewModel.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun start(context: Context) {
|
||||||
|
val starter = Intent(context, GnjYiKuListActivity::class.java)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.list
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import com.lukouguoji.gnj.databinding.ItemGnjYikuListBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库列表 ViewHolder
|
||||||
|
*/
|
||||||
|
class GnjYiKuListViewHolder(view: View) :
|
||||||
|
BaseViewHolder<GnjYiKuBean, ItemGnjYikuListBinding>(view) {
|
||||||
|
|
||||||
|
override fun onBind(item: Any?, position: Int) {
|
||||||
|
val bean = getItemBean(item)!!
|
||||||
|
binding.bean = bean
|
||||||
|
|
||||||
|
// 点击checkbox切换选中状态
|
||||||
|
binding.ivIcon.setOnClickListener {
|
||||||
|
bean.checked.set(!bean.checked.get())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
package com.lukouguoji.gnj.page.yiku.list
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.alibaba.fastjson.JSONArray
|
||||||
|
import com.lukouguoji.gnj.R
|
||||||
|
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||||
|
import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
import com.lukouguoji.module_base.ktx.launchCollect
|
||||||
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
|
import com.lukouguoji.module_base.ktx.noNull
|
||||||
|
import com.lukouguoji.module_base.ktx.showConfirmDialog
|
||||||
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
|
import com.lukouguoji.module_base.ktx.toJson
|
||||||
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
|
import com.lukouguoji.module_base.util.CheckUtil
|
||||||
|
import com.lukouguoji.module_base.util.Common
|
||||||
|
import dev.DevUtils
|
||||||
|
import dev.utils.app.info.KeyValue
|
||||||
|
import okhttp3.RequestBody
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国内进港移库列表 ViewModel
|
||||||
|
*/
|
||||||
|
class GnjYiKuListViewModel : BasePageViewModel() {
|
||||||
|
|
||||||
|
// 搜索条件
|
||||||
|
val waybillType = MutableLiveData("") // 运单类型
|
||||||
|
val carrier = MutableLiveData("") // 承运人
|
||||||
|
val waybillNo = MutableLiveData("") // 运单号
|
||||||
|
val handoverStatus = MutableLiveData("") // 移交状态
|
||||||
|
|
||||||
|
// 运单号列表(用于多条结果选择)
|
||||||
|
val wbNoList = MutableLiveData<List<String>>()
|
||||||
|
|
||||||
|
// 运单类型下拉列表
|
||||||
|
val waybillTypeList = MutableLiveData(
|
||||||
|
listOf(
|
||||||
|
KeyValue("全部", ""),
|
||||||
|
KeyValue("转国际进港", "CIII"),
|
||||||
|
KeyValue("转国内出港", "CICO"),
|
||||||
|
KeyValue("转国际出港", "CIIO"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
// 移交状态下拉列表
|
||||||
|
val handoverStatusList = MutableLiveData(
|
||||||
|
listOf(
|
||||||
|
KeyValue("全部", ""),
|
||||||
|
KeyValue("未移交", "0"),
|
||||||
|
KeyValue("已移交", "1"),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
// 适配器配置
|
||||||
|
val itemViewHolder = GnjYiKuListViewHolder::class.java
|
||||||
|
val itemLayoutId = R.layout.item_gnj_yiku_list
|
||||||
|
|
||||||
|
// 统计数据
|
||||||
|
val count = MutableLiveData(0) // 总票数
|
||||||
|
val totalPc = MutableLiveData("0") // 总件数
|
||||||
|
val totalWeight = MutableLiveData("0") // 总重量
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// 方法区
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫码输入运单号
|
||||||
|
*/
|
||||||
|
fun waybillScanClick() {
|
||||||
|
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运单号列表(用于扫码或输入后模糊查询)
|
||||||
|
*/
|
||||||
|
fun getWayBillList() {
|
||||||
|
val requestBody = mapOf(
|
||||||
|
"page" to pageModel.page,
|
||||||
|
"limit" to pageModel.limit,
|
||||||
|
"awbType" to waybillType.value!!.ifEmpty { null },
|
||||||
|
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||||
|
"carrier" to carrier.value!!.ifEmpty { null },
|
||||||
|
"handoverStatus" to handoverStatus.value!!.ifEmpty { null },
|
||||||
|
).toRequestBody()
|
||||||
|
|
||||||
|
launchCollect({
|
||||||
|
NetApply.api.getGnjMoveStashWbNoList(requestBody)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
val results = it.data!!
|
||||||
|
when {
|
||||||
|
results.size == 1 -> {
|
||||||
|
waybillNo.value = results[0]
|
||||||
|
wbNoList.value = emptyList()
|
||||||
|
}
|
||||||
|
results.size > 1 -> {
|
||||||
|
wbNoList.value = results
|
||||||
|
showWbNoListSelect()
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
wbNoList.value = emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onFailed = { i: Int, s: String ->
|
||||||
|
wbNoList.value = emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取列表数据
|
||||||
|
*/
|
||||||
|
override fun getData() {
|
||||||
|
val body = mapOf(
|
||||||
|
"page" to pageModel.page,
|
||||||
|
"limit" to pageModel.limit,
|
||||||
|
"awbType" to waybillType.value!!.ifEmpty { null },
|
||||||
|
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||||
|
"carrier" to carrier.value!!.ifEmpty { null },
|
||||||
|
"handoverStatus" to handoverStatus.value!!.ifEmpty { null },
|
||||||
|
).toRequestBody()
|
||||||
|
|
||||||
|
launchLoadingCollect({
|
||||||
|
NetApply.api.getGnjMoveStashList(body)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
pageModel.handleListBean(it)
|
||||||
|
count.value = it.total
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getCountData(body)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取统计数据
|
||||||
|
*/
|
||||||
|
private fun getCountData(body: RequestBody) {
|
||||||
|
launchCollect({
|
||||||
|
NetApply.api.simplePost("DomImpMove/searchTotal", body)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
totalPc.value = it.data?.totalPc.noNull("0")
|
||||||
|
totalWeight.value = it.data?.totalWeight.noNull("0")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理扫码结果
|
||||||
|
*/
|
||||||
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||||
|
when (requestCode) {
|
||||||
|
Constant.RequestCode.WAYBILL -> {
|
||||||
|
waybillNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量移库操作
|
||||||
|
*/
|
||||||
|
fun moveStashClick() {
|
||||||
|
val list = pageModel.rv!!.commonAdapter()!!.items as List<GnjYiKuBean>
|
||||||
|
val filter = list.filter { it.checked.get() }
|
||||||
|
if (filter.isEmpty()) {
|
||||||
|
showToast("请选择数据")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
getTopActivity().showConfirmDialog("确定要移库选中的 ${filter.size} 条数据吗?") {
|
||||||
|
launchLoadingCollect({
|
||||||
|
NetApply.api.transferGnjYiKu(
|
||||||
|
mapOf(
|
||||||
|
"fid" to "0",
|
||||||
|
"ids" to filter.map { it.mawbId },
|
||||||
|
).toRequestBody()
|
||||||
|
)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
showToast(it.msg.noNull("移库成功"))
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全选/全不选
|
||||||
|
*/
|
||||||
|
fun checkAllClick() {
|
||||||
|
val list = pageModel.rv!!.commonAdapter()!!.items as List<GnjYiKuBean>
|
||||||
|
CheckUtil.handleAllCheck(list)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运单号选择弹窗
|
||||||
|
*/
|
||||||
|
private fun showWbNoListSelect() {
|
||||||
|
Common.singleSelect(
|
||||||
|
DevUtils.getTopActivity(),
|
||||||
|
"选择运单号",
|
||||||
|
JSONArray.parseArray(wbNoList.value!!.map {
|
||||||
|
mapOf(
|
||||||
|
"name" to it,
|
||||||
|
"code" to it,
|
||||||
|
)
|
||||||
|
}.toList().toJson(false)),
|
||||||
|
null
|
||||||
|
) { position, _ ->
|
||||||
|
waybillNo.value = wbNoList.value!![position]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -62,6 +62,25 @@
|
|||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
android:screenOrientation="userLandscape"
|
android:screenOrientation="userLandscape"
|
||||||
android:exported="true" />
|
android:exported="true" />
|
||||||
|
|
||||||
|
<!-- 国内进港移库 - 新增的三个 Activity -->
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.list.GnjYiKuListActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.details.GnjYiKuDetailsActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".page.yiku.edit.GnjYiKuEditActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
338
module_gnj/src/main/res/layout/activity_gnj_yiku_details.xml
Normal file
338
module_gnj/src/main/res/layout/activity_gnj_yiku_details.xml
Normal file
@@ -0,0 +1,338 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="com.lukouguoji.gnj.page.yiku.details.GnjYiKuDetailsViewModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/backgroud_gray"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<!-- 基本信息标题 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="基本信息"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
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:padding="15dp">
|
||||||
|
|
||||||
|
<!-- 第一行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="运单号:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.wbNo}"
|
||||||
|
tools:text="78109081212" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 件数 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="件数:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.pc}"
|
||||||
|
tools:text="11" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 重量 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="重量:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text='@{viewModel.dataBean.weight + "kg"}'
|
||||||
|
tools:text="200kg" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/list_bg" />
|
||||||
|
|
||||||
|
<!-- 第二行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 特码 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="特码:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.spCode}"
|
||||||
|
tools:text="PEK" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 代理 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="代理:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.agentCode}"
|
||||||
|
tools:text="SF" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 品名 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="品名:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.goods}"
|
||||||
|
tools:text="苹果" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/list_bg" />
|
||||||
|
|
||||||
|
<!-- 第三行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 进港航班 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="进港航班:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.flight}"
|
||||||
|
tools:text="20240712/MU2023" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 航程 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="航程:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.route}"
|
||||||
|
tools:text="LAX-PEK-HFE" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 运单类型 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="运单类型:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.awbType}"
|
||||||
|
tools:text="转国际进港" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/list_bg" />
|
||||||
|
|
||||||
|
<!-- 第四行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 电报号 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="电报号:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.telegramNo}"
|
||||||
|
tools:text="TG20240712001" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 移交状态 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="移交状态:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_value"
|
||||||
|
android:text="@{viewModel.dataBean.handoverStatus}"
|
||||||
|
tools:text="未移交" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/list_bg" />
|
||||||
|
|
||||||
|
<!-- 备注 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_manifest_details_label"
|
||||||
|
android:text="备注:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="40dp"
|
||||||
|
android:text="@{viewModel.dataBean.remark}"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="这是备注信息" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 交接图片标题 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:text="交接图片"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 图片展示区域 -->
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_images"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
itemLayoutId="@{viewModel.imageItemLayoutId}"
|
||||||
|
viewHolder="@{viewModel.imageItemViewHolder}"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:spanCount="3" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
277
module_gnj/src/main/res/layout/activity_gnj_yiku_edit.xml
Normal file
277
module_gnj/src/main/res/layout/activity_gnj_yiku_edit.xml
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||||
|
|
||||||
|
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="com.lukouguoji.gnj.page.yiku.edit.GnjYiKuEditViewModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/backgroud_gray"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<!-- 第一行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
required="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"运单号:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.wbNo}' />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- 件数 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
required="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"件数:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.pc}' />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- 重量 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
required="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"重量(kg):"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.weight}' />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第二行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 特码 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"特码:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.spCode}' />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- 代理 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"代理:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.agentCode}' />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- 品名 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"品名:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.goods}' />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第三行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 进港航班 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"进港航班:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.flight}' />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- 航程 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"航程:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.route}' />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- 运单类型 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
list="@{viewModel.waybillTypeList}"
|
||||||
|
title='@{"运单类型:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.SPINNER}"
|
||||||
|
value='@={viewModel.dataBean.awbType}' />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第四行 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 电报号 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
title='@{"电报号:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.telegramNo}' />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<!-- 备注 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
enable="@{viewModel.pageType != DetailsPageType.Details}"
|
||||||
|
hint='@{"请输入备注"}'
|
||||||
|
inputHeight="@{100}"
|
||||||
|
title='@{"备注:"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@={viewModel.dataBean.remark}' />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 交接图片标题 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:text="交接图片(最多7张)"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 图片上传区域 -->
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_images"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
itemLayoutId="@{viewModel.imageItemLayoutId}"
|
||||||
|
viewHolder="@{viewModel.imageItemViewHolder}"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:spanCount="3" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<!-- 底部按钮(详情页不显示) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
visible="@{viewModel.pageType != DetailsPageType.Details}">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:background="@drawable/bg_gray_radius_4"
|
||||||
|
android:gravity="center"
|
||||||
|
android:onClick="@{()-> viewModel.getTopActivity().finish()}"
|
||||||
|
android:text="取消"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn_lg"
|
||||||
|
android:onClick="@{()-> viewModel.submit()}"
|
||||||
|
android:text="@{viewModel.pageType == DetailsPageType.Add ? `提交` : `保存`}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="com.lukouguoji.aerologic.page.gnj.out.stash.list.GnjOutStashListViewModel" />
|
type="com.lukouguoji.gnj.page.yiku.list.GnjYiKuListViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
<include layout="@layout/title_tool_bar" />
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
|
<!-- 搜索区域 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -27,39 +28,30 @@
|
|||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<!-- 运单类型 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请选择提货日期"}'
|
|
||||||
icon="@{@drawable/img_date}"
|
|
||||||
type="@{SearchLayoutType.DATE}"
|
|
||||||
value="@={viewModel.date}"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1"
|
||||||
|
hint='@{"请选择运单类型"}'
|
||||||
<View
|
list="@{viewModel.waybillTypeList}"
|
||||||
android:layout_width="10dp"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/gray" />
|
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
|
||||||
hint='@{"请选择提货日期"}'
|
|
||||||
icon="@{@drawable/img_date}"
|
|
||||||
type="@{SearchLayoutType.DATE}"
|
|
||||||
value="@={viewModel.dateEnd}"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
|
||||||
hint='@{"请选择代理人"}'
|
|
||||||
list="@{viewModel.agentList}"
|
|
||||||
type="@{SearchLayoutType.SPINNER}"
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
value="@={viewModel.agent}"
|
value="@={viewModel.waybillType}" />
|
||||||
|
|
||||||
|
<!-- 承运人 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1"
|
||||||
|
hint='@{"请输入承运人"}'
|
||||||
|
type="@{SearchLayoutType.INPUT}"
|
||||||
|
value="@={viewModel.carrier}" />
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
hint='@{"请输入运单号"}'
|
hint='@{"请输入运单号"}'
|
||||||
icon="@{@drawable/img_scan}"
|
icon="@{@drawable/img_scan}"
|
||||||
setInputWaybill="@{true}"
|
setInputWaybill="@{true}"
|
||||||
@@ -67,21 +59,19 @@
|
|||||||
setRefreshCallBack="@{viewModel::refresh}"
|
setRefreshCallBack="@{viewModel::refresh}"
|
||||||
setSearchListRefresh="@{viewModel::getWayBillList}"
|
setSearchListRefresh="@{viewModel::getWayBillList}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.waybill}"
|
value="@={viewModel.waybillNo}" />
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
|
<!-- 移交状态 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请输入提货单号"}'
|
|
||||||
icon="@{@drawable/img_scan}"
|
|
||||||
setOnIconClickListener="@{()-> viewModel.orderScanClick()}"
|
|
||||||
type="@{SearchLayoutType.INPUT}"
|
|
||||||
value="@={viewModel.order}"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1"
|
||||||
|
hint='@{"请选择移交状态"}'
|
||||||
|
list="@{viewModel.handoverStatusList}"
|
||||||
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
|
value="@={viewModel.handoverStatus}" />
|
||||||
|
|
||||||
|
<!-- 搜索按钮 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -94,8 +84,14 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 全选按钮 -->
|
||||||
<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"
|
||||||
@@ -119,24 +115,25 @@
|
|||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||||
android:id="@+id/srl"
|
android:id="@+id/srl"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv"
|
android:id="@+id/rv"
|
||||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
|
||||||
viewHolder="@{viewModel.itemViewHolder}"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||||
|
viewHolder="@{viewModel.itemViewHolder}"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
tools:listitem="@layout/item_gnj_out_stash_list" />
|
tools:listitem="@layout/item_gnj_yiku_list" />
|
||||||
|
|
||||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||||
|
|
||||||
|
<!-- 底部统计和移库按钮 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
@@ -148,16 +145,16 @@
|
|||||||
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:text='@{"合计:"+viewModel.count+"条,总件数:"+viewModel.number+",总重量:"+viewModel.weight+"KG"}'
|
android:text='@{"合计票数:"+viewModel.count+",总件数:"+viewModel.totalPc+",总重量:"+viewModel.totalWeight+"KG"}'
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="合计:3条,总件数:212,总重量:342KG" />
|
tools:text="合计票数:1,总件数:100,总重量:200KG" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/tv_bottom_btn"
|
style="@style/tv_bottom_btn"
|
||||||
android:onClick="@{()-> viewModel.confirmClick()}"
|
android:onClick="@{()-> viewModel.moveStashClick()}"
|
||||||
android:text="确认出库" />
|
android:text="移库" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.GnjOutStashBean" />
|
type="com.lukouguoji.module_base.bean.GnjYiKuBean" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
@@ -20,64 +20,49 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="10dp">
|
android:padding="10dp">
|
||||||
|
|
||||||
|
<!-- 选中图标 -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_icon"
|
android:id="@+id/iv_icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||||
tools:src="@drawable/img_plane" />
|
android:src="@drawable/img_plane" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- 第一行数据 -->
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1.1"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
|
||||||
completeSpace="@{5}"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="提货单号:" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.pkId}"
|
|
||||||
android:textColor="@color/colorPrimary"
|
|
||||||
tools:text="789165431" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
completeSpace="@{4}"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="运单号:" />
|
android:text="运单号:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{bean.wbNo}' />
|
android:text="@{bean.wbNo}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
tools:text="78109081212" />
|
||||||
|
|
||||||
</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"
|
||||||
@@ -85,139 +70,91 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{4}"
|
completeSpace="@{4}"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="特码:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.spCode}" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
completeSpace="@{3}"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="件数:" />
|
android:text="件数:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{bean.pc}' />
|
android:text='@{bean.pc}'
|
||||||
|
tools:text="11" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 航班 -->
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.1"
|
android:layout_weight="1.2"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{5}"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="重量:" />
|
completeSpace="@{4}"
|
||||||
|
android:text="航班:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{bean.weight}' />
|
android:text="@{bean.flight}"
|
||||||
|
tools:text="20240712/MU2023" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 航程 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="航程:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.route}"
|
||||||
|
tools:text="LAX-PEK-HFE" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 移交状态 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="移交状态:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{bean.handoverStatus}'
|
||||||
|
tools:text="未移交" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 第二行数据 -->
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<!-- 运单类型 -->
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
completeSpace="@{5}"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="航班日期:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.fdate}" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="航班号:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.fno}" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
completeSpace="@{4}"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="代理人:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.agentCode}" />
|
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
completeSpace="@{3}"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="品名:" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.goods}" />
|
|
||||||
|
|
||||||
</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"
|
||||||
@@ -225,21 +162,105 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{5}"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="提货时间:" />
|
completeSpace="@{5}"
|
||||||
|
android:text="运单类型:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.chargeTime}" />
|
android:text="@{bean.awbType}"
|
||||||
|
tools:text="转国际进港" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 品名 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="品名:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.goods}"
|
||||||
|
tools:text="苹果" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 代理人 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="代理人:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{bean.agentCode}'
|
||||||
|
tools:text="SF" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 特码 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="特码:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.spCode}"
|
||||||
|
tools:text="PEK" />
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
<!-- 重量 -->
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="重量:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.weight}"
|
||||||
|
tools:text="200" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
Reference in New Issue
Block a user