feat: 国际出港查询详情
This commit is contained in:
338
CLAUDE.md
338
CLAUDE.md
@@ -811,11 +811,269 @@ grep "custom_text" module_base/src/main/res/values/strings.xml
|
||||
- **颜色**: `white`, `black`, `colorPrimary`, `text_normal`, `text_gray`, `text_red`
|
||||
- **文字**: 优先直接写中文字符串,少用 string 资源
|
||||
|
||||
#### 10. DataBinding中View类未导入
|
||||
|
||||
```xml
|
||||
<!-- ❌ 错误: 使用View.VISIBLE但未导入View -->
|
||||
<data>
|
||||
<variable name="viewModel" type="..." />
|
||||
</data>
|
||||
|
||||
<View android:visibility="@{viewModel.isVisible ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<!-- ✅ 正确: 必须导入View类 -->
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<variable name="viewModel" type="..." />
|
||||
</data>
|
||||
|
||||
<View android:visibility="@{viewModel.isVisible ? View.VISIBLE : View.GONE}" />
|
||||
```
|
||||
|
||||
#### 11. DataBinding中textStyle属性错误
|
||||
|
||||
```xml
|
||||
<!-- ❌ 错误: textStyle不支持DataBinding字符串 -->
|
||||
<TextView
|
||||
android:textStyle="@{viewModel.isBold ? `bold` : `normal`}" />
|
||||
|
||||
<!-- ✅ 正确: 直接使用固定值或删除该属性 -->
|
||||
<TextView
|
||||
android:textStyle="bold" />
|
||||
```
|
||||
|
||||
**原因**: `textStyle`属性只接受整数值(如`Typeface.BOLD`),不接受字符串
|
||||
|
||||
### 常用Import路径速查表
|
||||
|
||||
#### ⚠️ 重要提醒
|
||||
|
||||
在创建新的Activity、ViewModel、Fragment时,以下import路径**最容易出错**。务必使用正确的包名:
|
||||
|
||||
#### 基础类Import (module_base)
|
||||
|
||||
```kotlin
|
||||
// ==================== 基类 ====================
|
||||
import com.lukouguoji.module_base.base.BaseActivity // Activity基类
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity // DataBinding Activity基类
|
||||
import com.lukouguoji.module_base.base.BaseViewModel // ViewModel基类 ⚠️ 不是service.viewModel!
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel // 分页列表ViewModel基类
|
||||
import com.lukouguoji.module_base.base.BaseFragment // Fragment基类
|
||||
import com.lukouguoji.module_base.base.BaseBindingFragment // DataBinding Fragment基类
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder // ViewHolder基类
|
||||
import com.lukouguoji.module_base.base.CustomVP2Adapter // ViewPager2适配器
|
||||
|
||||
// ==================== 常量类 ====================
|
||||
import com.lukouguoji.module_base.common.Constant // 常量类 ⚠️ 不是根包下的Constant!
|
||||
import com.lukouguoji.module_base.common.DetailsPageType // 详情页类型(Add/Modify/Details)
|
||||
import com.lukouguoji.module_base.common.ConstantEvent // 事件常量
|
||||
|
||||
// ==================== 网络相关 ====================
|
||||
import com.lukouguoji.module_base.http.net.NetApply // API调用入口
|
||||
import com.lukouguoji.module_base.http.net.Api // API接口定义
|
||||
import com.lukouguoji.module_base.bean.BaseResultBean // 通用返回结果
|
||||
import com.lukouguoji.module_base.bean.BaseListBean // 列表返回结果
|
||||
import com.lukouguoji.module_base.bean.PageInfo // 分页信息
|
||||
|
||||
// ==================== Kotlin扩展函数 ====================
|
||||
import com.lukouguoji.module_base.ktx.launchCollect // 协程扩展(无Loading)
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect // 协程扩展(带Loading)
|
||||
import com.lukouguoji.module_base.ktx.showToast // Toast扩展
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody // Map转RequestBody ⚠️ 不是ext包!
|
||||
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty // 非空验证
|
||||
import com.lukouguoji.module_base.ktx.noNull // 空值处理
|
||||
import com.lukouguoji.module_base.ktx.formatDate // 日期格式化
|
||||
|
||||
// ==================== 事件总线 ====================
|
||||
import com.lukouguoji.module_base.impl.FlowBus // FlowBus事件总线
|
||||
import com.lukouguoji.module_base.impl.observe // FlowBus观察扩展 ⚠️ 必须单独导入!
|
||||
|
||||
// ==================== 接口 ====================
|
||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener // 列表项点击接口 ⚠️ 不是impl包!
|
||||
|
||||
// ==================== 路由 ====================
|
||||
import com.lukouguoji.module_base.router.ARouterConstants // 路由常量
|
||||
import com.alibaba.android.arouter.facade.annotation.Route // ARouter注解
|
||||
|
||||
// ==================== UI组件 ====================
|
||||
import com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew // 数据展示组件
|
||||
import com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType // 数据组件类型
|
||||
import com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout // 搜索组件
|
||||
import com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType // 搜索组件类型
|
||||
```
|
||||
|
||||
#### Android标准库Import
|
||||
|
||||
```kotlin
|
||||
// ==================== Activity & Fragment ====================
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
|
||||
// ==================== Lifecycle & ViewModel ====================
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
|
||||
// ==================== DataBinding ====================
|
||||
import androidx.databinding.DataBindingUtil
|
||||
|
||||
// ==================== ViewPager2 ====================
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
|
||||
// ==================== Coroutines ====================
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
// ==================== View ====================
|
||||
import android.view.View
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
```
|
||||
|
||||
#### 业务模块Bean Import示例
|
||||
|
||||
```kotlin
|
||||
// 国际出港模块
|
||||
import com.lukouguoji.module_base.bean.GjcMaWb // 国际出港主单
|
||||
import com.lukouguoji.module_base.bean.GjcHaWb // 国际出港分单
|
||||
import com.lukouguoji.module_base.bean.GjcStorageUse // 库位使用
|
||||
|
||||
// 国内出港模块
|
||||
import com.lukouguoji.module_base.bean.GncMaWb // 国内出港主单
|
||||
```
|
||||
|
||||
#### 常见错误对照表
|
||||
|
||||
| ❌ 错误写法 | ✅ 正确写法 | 说明 |
|
||||
|------------|------------|------|
|
||||
| `com.lukouguoji.module_base.Constant` | `com.lukouguoji.module_base.common.Constant` | Constant在common包下 |
|
||||
| `com.lukouguoji.module_base.service.viewModel.BaseViewModel` | `com.lukouguoji.module_base.base.BaseViewModel` | BaseViewModel在base包下 |
|
||||
| `com.lukouguoji.module_base.ext.toRequestBody` | `com.lukouguoji.module_base.ktx.toRequestBody` | 扩展函数在ktx包下 |
|
||||
| `com.lukouguoji.module_base.impl.IOnItemClickListener` | `com.lukouguoji.module_base.interfaces.IOnItemClickListener` | 接口在interfaces包下 |
|
||||
| `com.lukouguoji.module_base.constant.DetailsPageType` | `com.lukouguoji.module_base.common.DetailsPageType` | 枚举在common包下 |
|
||||
|
||||
#### 快速查找正确Import路径
|
||||
|
||||
```bash
|
||||
# 查找类的完整路径
|
||||
find module_base/src/main/java -name "Constant.kt"
|
||||
find module_base/src/main/java -name "BaseViewModel.kt"
|
||||
|
||||
# 查找函数定义位置
|
||||
grep -r "fun.*toRequestBody" module_base/src/main/java --include="*.kt"
|
||||
grep -r "class BaseViewModel" module_base/src/main/java --include="*.kt"
|
||||
|
||||
# 查找接口定义
|
||||
find module_base/src/main/java -name "IOnItemClickListener.kt"
|
||||
```
|
||||
|
||||
#### Activity/ViewModel/Fragment模板
|
||||
|
||||
**ViewModel模板 (带正确import):**
|
||||
|
||||
```kotlin
|
||||
package com.lukouguoji.xxx.viewModel
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.module_base.base.BaseViewModel // ⚠️ 正确路径
|
||||
import com.lukouguoji.module_base.common.Constant // ⚠️ 正确路径
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody // ⚠️ 正确路径
|
||||
|
||||
class XxxViewModel : BaseViewModel() {
|
||||
val data = MutableLiveData<Any>()
|
||||
|
||||
fun loadData() {
|
||||
val params = mapOf("key" to "value").toRequestBody()
|
||||
launchLoadingCollect({ NetApply.api.getXxx(params) }) {
|
||||
onSuccess = { data.value = it.data }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Activity模板 (带正确import):**
|
||||
|
||||
```kotlin
|
||||
package com.lukouguoji.xxx.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.xxx.R
|
||||
import com.lukouguoji.xxx.databinding.ActivityXxxBinding
|
||||
import com.lukouguoji.xxx.viewModel.XxxViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant // ⚠️ 正确路径
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_XXX)
|
||||
class XxxActivity : BaseBindingActivity<ActivityXxxBinding, XxxViewModel>() {
|
||||
override fun layoutId() = R.layout.activity_xxx
|
||||
override fun viewModelClass() = XxxViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("标题")
|
||||
binding.viewModel = viewModel
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Fragment模板 (带正确import):**
|
||||
|
||||
```kotlin
|
||||
package com.lukouguoji.xxx.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.lukouguoji.xxx.R
|
||||
import com.lukouguoji.xxx.databinding.FragmentXxxBinding
|
||||
import com.lukouguoji.xxx.viewModel.XxxViewModel
|
||||
|
||||
class XxxFragment : Fragment() {
|
||||
private lateinit var binding: FragmentXxxBinding
|
||||
private lateinit var viewModel: XxxViewModel
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.fragment_xxx,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
binding.viewModel = viewModel
|
||||
return binding.root
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(vm: XxxViewModel) =
|
||||
XxxFragment().apply { viewModel = vm }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 错误排查流程
|
||||
|
||||
1. **资源引用错误** → 检查drawable/color/string是否存在,主动创建缺失资源
|
||||
2. **DataBinding错误** → 检查import包名、枚举值
|
||||
3. **Unresolved reference** → 检查import语句、常量定义
|
||||
1. **Import错误 (Unresolved reference)** → 参考上方"常用Import路径速查表",使用正确包名
|
||||
2. **资源引用错误** → 检查drawable/color/string是否存在,主动创建缺失资源
|
||||
3. **DataBinding错误** → 检查import包名、枚举值、是否导入View类
|
||||
4. **suspend function错误** → 在`viewModelScope.launch`中调用
|
||||
5. **仍有问题** → `./gradlew clean` 后重新构建
|
||||
|
||||
@@ -832,6 +1090,79 @@ find module_base/src -name "IOnItemClickListener.kt"
|
||||
grep -A 5 "enum class DataLayoutType" module_base/src --include="*.kt"
|
||||
```
|
||||
|
||||
### 标题栏统一规范
|
||||
|
||||
**重要规则**: 所有 Activity 布局必须使用统一的 title_tool_bar 组件,禁止手动编写 Toolbar。
|
||||
|
||||
#### 正确做法
|
||||
|
||||
**布局文件** (`activity_xxx.xml`):
|
||||
```xml
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 其他内容 -->
|
||||
...
|
||||
</LinearLayout>
|
||||
```
|
||||
|
||||
**Activity 文件** (`XxxActivity.kt`):
|
||||
```kotlin
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("页面标题") // 自动设置标题和返回事件
|
||||
binding.viewModel = viewModel
|
||||
// 其他初始化...
|
||||
}
|
||||
```
|
||||
|
||||
#### 错误做法
|
||||
|
||||
❌ **不要手动编写 Toolbar**:
|
||||
```xml
|
||||
<!-- 错误:手动配置 Toolbar -->
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorPrimary">
|
||||
|
||||
<LinearLayout android:id="@+id/tool_back">...</LinearLayout>
|
||||
<TextView android:id="@+id/title_name">...</TextView>
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
```
|
||||
|
||||
❌ **不要手动查找 tool_back 并设置点击事件**:
|
||||
```kotlin
|
||||
// 错误:手动处理返回按钮
|
||||
binding.root.findViewById<LinearLayout>(R.id.tool_back)?.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
```
|
||||
|
||||
#### title_tool_bar 工作原理
|
||||
|
||||
`title_tool_bar.xml` 包含三个关键 ID:
|
||||
- `toolbar` - BaseBindingActivity 自动查找
|
||||
- `tool_back` - 自动绑定 finish() 点击事件
|
||||
- `title_name` - 通过 `setBackArrow()` 设置文字
|
||||
|
||||
**优点**:
|
||||
- 统一视觉风格
|
||||
- 减少重复代码
|
||||
- 自动处理返回逻辑
|
||||
- 维护简单 (修改一处,全局生效)
|
||||
|
||||
#### 参考示例
|
||||
|
||||
- `module_gjc/src/main/res/layout/activity_gjc_inspection.xml` - 第21行
|
||||
- `module_gjc/src/main/res/layout/activity_gjc_box_weighing_details.xml` - 第21行
|
||||
- `module_gjc/src/main/res/layout/activity_gjc_query_details.xml` - 第19行
|
||||
|
||||
### 布局最佳实践参考
|
||||
|
||||
参考以下文件进行布局设计:
|
||||
@@ -843,6 +1174,7 @@ grep -A 5 "enum class DataLayoutType" module_base/src --include="*.kt"
|
||||
### 开发原则
|
||||
|
||||
- ✅ **资源引用必须存在** - 创建/修改布局前,确保drawable/color/string资源真实存在或主动创建
|
||||
- ✅ **标题栏统一使用 title_tool_bar** - 禁止手动编写 Toolbar,必须使用 `<include layout="@layout/title_tool_bar" />`,Activity 中调用 `setBackArrow("标题")`
|
||||
- ✅ **必须设置 lifecycleOwner** - Activity 中 `binding.lifecycleOwner = this`(BaseBindingActivity 已自动设置)
|
||||
- ✅ **新建Activity后必须在AndroidManifest.xml中注册**
|
||||
- ✅ 优先使用项目现有基类和封装
|
||||
|
||||
@@ -116,6 +116,12 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<!-- 国际出港查询详情 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcQueryDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcBoxWeighingActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
|
||||
@@ -440,6 +440,14 @@ interface Api {
|
||||
@POST("IntExpSearch/update")
|
||||
suspend fun updateGjcMaWb(@Body data: RequestBody): BaseResultBean<Any>
|
||||
|
||||
/**
|
||||
* 国际出港查询-详情
|
||||
* 接口路径: /IntExpSearch/detail
|
||||
* 参数: maWbId (Long)
|
||||
*/
|
||||
@POST("IntExpSearch/detail")
|
||||
suspend fun getGjcQueryDetails(@Body data: RequestBody): BaseResultBean<Map<String, Any>>
|
||||
|
||||
/**
|
||||
* 国际出港板箱过磅-分页搜索
|
||||
* 接口路径: /IntExpWeighting/pageQuery
|
||||
|
||||
@@ -129,6 +129,7 @@ object ARouterConstants {
|
||||
|
||||
const val ACTIVITY_URL_GJC_QUERY_LIST = "/gjc/GjcQueryListActivity" //国际出港模块 查询
|
||||
const val ACTIVITY_URL_GJC_QUERY_INFO = "/gjc/GjcQueryInfoActivity" //国际出港模块 详情
|
||||
const val ACTIVITY_URL_GJC_QUERY_DETAILS = "/gjc/GjcQueryDetailsActivity" //国际出港模块 查询详情
|
||||
const val ACTIVITY_URL_GJC_QUERY_EDIT = "/gjc/GjcQueryEditActivity" //国际出港模块 运单修改
|
||||
|
||||
const val ACTIVITY_URL_GJC_YI_KU = "/gjc/GjcYiKuListActivity" //国际出港 移库
|
||||
|
||||
@@ -37,5 +37,6 @@
|
||||
<color name="color_bottom_layout">#5c6890</color>
|
||||
<color name="color_f2">#F2F2F2</color>
|
||||
<color name="line">#EEEEEE</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcQueryDetailsBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.base.CustomVP2Adapter
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港查询详情页面
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_QUERY_DETAILS)
|
||||
class GjcQueryDetailsActivity :
|
||||
BaseBindingActivity<ActivityGjcQueryDetailsBinding, GjcQueryDetailsViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gjc_query_details
|
||||
override fun viewModelClass() = GjcQueryDetailsViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际出港查询详情")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 初始化ViewModel(传入maWbId)
|
||||
viewModel.initOnCreated(intent)
|
||||
|
||||
// 配置ViewPager2
|
||||
binding.vp.adapter = CustomVP2Adapter(
|
||||
viewModel.fragmentList,
|
||||
supportFragmentManager,
|
||||
lifecycle
|
||||
)
|
||||
binding.vp.isUserInputEnabled = false // 禁用滑动
|
||||
binding.vp.offscreenPageLimit = 3 // 预加载3个Fragment
|
||||
|
||||
// 监听Tab索引变化,切换Fragment
|
||||
viewModel.currentTab.observe(this) {
|
||||
binding.vp.setCurrentItem(it, false) // false:无动画
|
||||
}
|
||||
|
||||
// 加载详情数据
|
||||
viewModel.loadDetails()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, maWbId: Long?) {
|
||||
val starter = Intent(context, GjcQueryDetailsActivity::class.java)
|
||||
.putExtra(Constant.Key.ID, maWbId?.toString() ?: "")
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,13 +25,9 @@ class GjcQueryEditActivity :
|
||||
override fun viewModelClass() = GjcQueryEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际出港运单修改")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 处理返回按钮点击
|
||||
binding.root.findViewById<android.widget.LinearLayout>(R.id.tool_back)?.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.lukouguoji.gjc.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.FragmentGjcQueryStorageBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel
|
||||
|
||||
/**
|
||||
* 国际出港查询详情 - 库位信息Fragment (空实现)
|
||||
*/
|
||||
class GjcQueryStorageFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentGjcQueryStorageBinding
|
||||
private lateinit var viewModel: GjcQueryDetailsViewModel
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.fragment_gjc_query_storage,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
return binding.root
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(vm: GjcQueryDetailsViewModel) =
|
||||
GjcQueryStorageFragment().apply {
|
||||
viewModel = vm
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.lukouguoji.gjc.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.FragmentGjcQueryWarehouseBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel
|
||||
|
||||
/**
|
||||
* 国际出港查询详情 - 仓库信息Fragment (空实现)
|
||||
*/
|
||||
class GjcQueryWarehouseFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentGjcQueryWarehouseBinding
|
||||
private lateinit var viewModel: GjcQueryDetailsViewModel
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.fragment_gjc_query_warehouse,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
return binding.root
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(vm: GjcQueryDetailsViewModel) =
|
||||
GjcQueryWarehouseFragment().apply {
|
||||
viewModel = vm
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.lukouguoji.gjc.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.FragmentGjcQueryWaybillBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel
|
||||
|
||||
/**
|
||||
* 国际出港查询详情 - 运单信息Fragment
|
||||
*/
|
||||
class GjcQueryWaybillFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentGjcQueryWaybillBinding
|
||||
private lateinit var viewModel: GjcQueryDetailsViewModel
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.fragment_gjc_query_waybill,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
binding.viewModel = viewModel
|
||||
return binding.root
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(vm: GjcQueryDetailsViewModel) =
|
||||
GjcQueryWaybillFragment().apply {
|
||||
viewModel = vm
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.lukouguoji.gjc.holder
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.activity.GjcQueryDetailsActivity
|
||||
import com.lukouguoji.gjc.activity.GjcQueryEditActivity
|
||||
import com.lukouguoji.gjc.databinding.ItemGjcQueryBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
@@ -21,11 +22,10 @@ class GjcQueryViewHolder(view: View) :
|
||||
// 立即更新UI(避免闪烁)
|
||||
binding.executePendingBindings()
|
||||
|
||||
// 整行点击事件(暂时不跳转详情页)
|
||||
// binding.ll.setOnClickListener {
|
||||
// // 后续可添加详情页跳转
|
||||
// // GjcQueryDetailsActivity.start(it.context, bean.maWbId)
|
||||
// }
|
||||
// 整行点击事件 - 跳转详情页
|
||||
binding.ll.setOnClickListener {
|
||||
GjcQueryDetailsActivity.start(it.context, bean.maWbId)
|
||||
}
|
||||
|
||||
// 修改按钮点击事件
|
||||
binding.root.findViewById<TextView>(R.id.btnEdit)?.setOnClickListener {
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.fragment.GjcQueryStorageFragment
|
||||
import com.lukouguoji.gjc.fragment.GjcQueryWarehouseFragment
|
||||
import com.lukouguoji.gjc.fragment.GjcQueryWaybillFragment
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
|
||||
/**
|
||||
* 国际出港查询详情-ViewModel
|
||||
*/
|
||||
class GjcQueryDetailsViewModel : BaseViewModel() {
|
||||
|
||||
// ==================== 基础数据 ====================
|
||||
var maWbId: String = "" // 运单主键ID
|
||||
|
||||
// ==================== Tab管理 ====================
|
||||
val currentTab = MutableLiveData(0) // 当前Tab索引 (0/1/2)
|
||||
|
||||
// ==================== 详情数据 ====================
|
||||
val detailData = MutableLiveData<Map<String, Any>>(emptyMap())
|
||||
|
||||
// ==================== Fragment列表 ====================
|
||||
val fragmentList by lazy {
|
||||
listOf(
|
||||
GjcQueryWaybillFragment.newInstance(this), // 运单信息
|
||||
GjcQueryWarehouseFragment.newInstance(this), // 仓库信息
|
||||
GjcQueryStorageFragment.newInstance(this) // 库位信息
|
||||
)
|
||||
}
|
||||
|
||||
// ==================== 方法区 ====================
|
||||
|
||||
/**
|
||||
* 初始化(从Intent获取maWbId)
|
||||
*/
|
||||
fun initOnCreated(intent: Intent) {
|
||||
maWbId = intent.getStringExtra(Constant.Key.ID) ?: ""
|
||||
}
|
||||
|
||||
/**
|
||||
* Tab点击事件
|
||||
*/
|
||||
fun onTabClick(index: Int) {
|
||||
currentTab.value = index
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载详情数据
|
||||
*/
|
||||
fun loadDetails() {
|
||||
if (maWbId.isEmpty()) {
|
||||
showToast("运单ID为空")
|
||||
return
|
||||
}
|
||||
|
||||
val params = mapOf("maWbId" to maWbId.toLongOrNull()).toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.getGjcQueryDetails(params) }) {
|
||||
onSuccess = { result ->
|
||||
detailData.value = result.data ?: emptyMap()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
114
module_gjc/src/main/res/layout/activity_gjc_query_details.xml
Normal file
114
module_gjc/src/main/res/layout/activity_gjc_query_details.xml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- Tab栏 (自定义,文字Tab + 底线) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- Tab1: 运单信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onTabClick(0)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="运单信息"
|
||||
android:textColor="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<!-- 选中底线 -->
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="3dp"
|
||||
android:background="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/transparent}"
|
||||
android:visibility="@{viewModel.currentTab == 0 ? View.VISIBLE : View.INVISIBLE}" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Tab2: 仓库信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onTabClick(1)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="仓库信息"
|
||||
android:textColor="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="3dp"
|
||||
android:background="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/transparent}"
|
||||
android:visibility="@{viewModel.currentTab == 1 ? View.VISIBLE : View.INVISIBLE}" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Tab3: 库位信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onTabClick(2)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="库位信息"
|
||||
android:textColor="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="3dp"
|
||||
android:background="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/transparent}"
|
||||
android:visibility="@{viewModel.currentTab == 2 ? View.VISIBLE : View.INVISIBLE}" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ViewPager2 -->
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -16,45 +16,8 @@
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tool_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/left_icon"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tool_tv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:text="返回"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="国际出港运单修改"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
<!-- 标题栏 -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无数据"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无数据"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
318
module_gjc/src/main/res/layout/fragment_gjc_query_waybill.xml
Normal file
318
module_gjc/src/main/res/layout/fragment_gjc_query_waybill.xml
Normal file
@@ -0,0 +1,318 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
<import type="android.view.View" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel" />
|
||||
</data>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 运单信息卡片 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 第1行: 运单号、代理人、特码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("wbNo")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"代理人"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("agentName")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"特码"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("spCode")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第2行: 运单件数、运单重量、体积 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.detailData.get("pc"))}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.detailData.get("weight"))}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"体积"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.detailData.get("volume"))}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行: 包装类型、运单类型、业务类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"包装类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("packageType")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("awbName")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"业务类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("businessName")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行: 品名(英) - 占整行 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
enable="@{false}"
|
||||
title='@{"品名(英)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("goods")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行: 品名(中) - 占整行 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
enable="@{false}"
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("goodsCn")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行: 海关指令、预配舱单、运抵报告 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"海关指令"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("customsCommand")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预配舱单"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("mftStatus")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运抵报告"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("arrivalStatus")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第7行: 装载舱单、理货报告、入库时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"装载舱单"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("loadStatus")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"理货报告"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("tallyStatus")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"入库时间"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("opDate")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第8行: 省直辖市、地级市、行政区 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"省直辖市"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("proName")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"地级市"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("cityName")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"行政区"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("areaName")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第9行: 备注 - 多行输入 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
enable="@{false}"
|
||||
inputHeight="@{80}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.detailData.get("remark")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user