Compare commits
30 Commits
e193e93c74
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d937ecef77 | |||
| 0f118391b5 | |||
| faf7698829 | |||
| f53a15abb5 | |||
| eba9b44699 | |||
| 128b7c3e4e | |||
| 3fedef27a7 | |||
| 608f1af1f4 | |||
| 0a0827f516 | |||
| 9f7b2dc27c | |||
| aa8920ec55 | |||
| b91b54acbe | |||
| 7d5b3b2438 | |||
| 30532386fb | |||
| 721b8c7128 | |||
| 8d70d6aaee | |||
| 9ff3bbbefc | |||
| c826db8718 | |||
| 0427020bc1 | |||
| 8c689d9d65 | |||
| c77c6a817b | |||
| 64721a6efe | |||
| 07f50fdfc7 | |||
| e2bda80e33 | |||
| a1bd9b330a | |||
| 2949f59800 | |||
| 338cffc633 | |||
| 02773b3f90 | |||
| 7c4d1cebe3 | |||
| 753e88b2c7 |
@@ -135,7 +135,21 @@
|
||||
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港收运,已由 Gnc 前缀新版页面替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutCollectionActivity.kt)",
|
||||
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港复磅,使用 GncFuBangListActivity 替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutFuBangActivity.kt)",
|
||||
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港复磅(组合),使用 GncFuBangListActivity 替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutFuBangCotActivity.kt)",
|
||||
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港收运开始,使用 GncShouYunUnListActivity 替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutStartCotActivity.kt)"
|
||||
"Bash(sed -i '' '/@Deprecated\\(\"旧版国内出港收运开始,使用 GncShouYunUnListActivity 替代\"\\)/d' /Users/kid/Development/Fusion/Projects/aerologic-app/module_gnc/src/main/java/com/lukouguoji/gnc/activity/GoutStartCotActivity.kt)",
|
||||
"Bash(cp \"/Users/kid/Downloads/Desktop/进港舱单.png\" /Users/kid/Development/Fusion/Projects/aerologic-app/module_gjj/src/main/res/mipmap-mdpi/gjj_jin_gang_cang_dan_icon.png)",
|
||||
"Bash(cp \"/Users/kid/Downloads/Desktop/原始舱单.png\" /Users/kid/Development/Fusion/Projects/aerologic-app/module_gjj/src/main/res/mipmap-mdpi/gjj_yuan_shi_cang_dan_icon.png)",
|
||||
"Bash(cp \"/Users/kid/Downloads/Desktop/提取记录.png\" /Users/kid/Development/Fusion/Projects/aerologic-app/module_gjj/src/main/res/mipmap-mdpi/gjj_ti_qu_ji_lu_icon.png)",
|
||||
"mcp__api-doc__get_project_overview",
|
||||
"mcp__plugin_claude-mem_mcp-search__get_observations",
|
||||
"Bash(awk *)",
|
||||
"Bash(sed -n '65,90p' module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpLoadViewModel.kt)",
|
||||
"Bash(sed -n '73,95p' module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpArriveViewModel.kt)",
|
||||
"Bash(sed -n '60,75p' module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpOutHandoverViewModel.kt)",
|
||||
"Bash(sed -n '73,100p' module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpArriveViewModel.kt)",
|
||||
"Bash(sed -n '82,115p' module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpStorageUseViewModel.kt)",
|
||||
"Bash(sed -n '212,240p' module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpManifestViewModel.kt)",
|
||||
"mcp__plugin_claude-mem_mcp-search__search",
|
||||
"Read(//Users/kid/.claude/**)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
12
CLAUDE.md
@@ -411,7 +411,7 @@ fun toggleAllExpand() {
|
||||
| 外层容器 | marginHorizontal / marginTop | 10dp / 10dp |
|
||||
| 卡片背景 | background | `@drawable/bg_white_radius_8` |
|
||||
| 内容区 | padding | **10dp** |
|
||||
| 选中图标 | 尺寸 / marginEnd | 40×40dp / 10dp |
|
||||
| 选中图标 | 尺寸 / marginEnd / marginTop | 40×40dp / 10dp / **0.5px**(像素级对齐)|
|
||||
| 选中图标 | 切换资源 | `img_plane_s`(选中)/ `img_plane`(未选中)|
|
||||
| KV 文字 | textSize | **15sp**(Key 和 Value 均需显式设置)|
|
||||
| 首要字段值(运单号)| textColor | `@color/colorPrimary` |
|
||||
@@ -422,11 +422,15 @@ fun toggleAllExpand() {
|
||||
|
||||
| 属性 | 标准值 |
|
||||
|------|--------|
|
||||
| layout_height | **18dp** |
|
||||
| padding | **4dp** |
|
||||
| layout_marginBottom | 5dp(**不设 marginTop**)|
|
||||
| layout_width | `match_parent` |
|
||||
| layout_height | **10dp** |
|
||||
| layout_marginTop | **-10dp**(向上收紧,紧贴卡片底边)|
|
||||
| scaleType | **centerInside**(保证箭头不被压扁/截断)|
|
||||
| src | `@mipmap/img_down` |
|
||||
| 显示控制 | `visible="@{bean.subList != null && !bean.subList.empty}"` |
|
||||
| 不设 padding,不设 layout_marginBottom | — |
|
||||
|
||||
> 旧版本(18dp + padding=4dp + marginBottom=5dp)已统一替换为上述新标准,参考 `item_int_exp_arrive.xml`。组装类列表若需展开后翻转箭头,附加 `android:rotation="@{bean.showMore.get() ? 180f : 0f}"`(参考 `item_int_exp_assemble.xml`)。
|
||||
|
||||
**子列表区域**:
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetai
|
||||
val dotSize = dp(10)
|
||||
val lineHeight = dp(2)
|
||||
val labelHPadding = dp(6)
|
||||
val alignBase = dp(15)
|
||||
val alignBase = dp(27)
|
||||
|
||||
// 按"四个汉字 label"估算节点 label 宽度(含左右各 6dp padding)
|
||||
val labelTextSizePx = TypedValue.applyDimension(
|
||||
|
||||
@@ -828,14 +828,14 @@ class HomeFragment : Fragment() {
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.IntImpManifest,
|
||||
R.mipmap.img_bwjx,
|
||||
R.mipmap.gjj_jin_gang_cang_dan_icon,
|
||||
"进港舱单"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.IntArrAirManifest,
|
||||
R.mipmap.img_bwjx,
|
||||
R.mipmap.gjj_yuan_shi_cang_dan_icon,
|
||||
"原始舱单"
|
||||
)
|
||||
)
|
||||
@@ -856,7 +856,7 @@ class HomeFragment : Fragment() {
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.IntImpPickUpRecord,
|
||||
R.mipmap.gnj_cang_ku_icon,
|
||||
R.mipmap.gjj_ti_qu_ji_lu_icon,
|
||||
"提取记录"
|
||||
)
|
||||
)
|
||||
@@ -877,7 +877,7 @@ class HomeFragment : Fragment() {
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.IntImpAccidentVisa,
|
||||
R.mipmap.img_bwjx,
|
||||
R.drawable.gjj_jgqz,
|
||||
"事故签证"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -162,7 +163,8 @@
|
||||
android:id="@+id/ll_steps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginStart="23dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
@@ -213,6 +215,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:paddingStart="8dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.lukouguoji.module_base
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import android.widget.Spinner
|
||||
@@ -274,4 +272,4 @@ class LoginActivity : BaseActivity(),
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ data class GjcCheckInPage(
|
||||
var fno: String? = null, // 航班号
|
||||
var wbNo: String? = null, // 运单号
|
||||
var hno: String? = null, // 分单号
|
||||
var dep: String? = null, // 始发站
|
||||
var dest: String? = null, // 目的站
|
||||
var pageNum: Int = 1, // 页码
|
||||
var pageSize: Int = 10 // 每页条数
|
||||
)
|
||||
|
||||
@@ -10,6 +10,8 @@ class GjcExportLoad {
|
||||
var activeId: String = "" // 运单活跃号
|
||||
var by1: String = "" // 第一承运人
|
||||
var dep: String = "" // 始发港
|
||||
var dest: String = "" // 目的港
|
||||
var range: String = "" // 航程
|
||||
var fdate: String = "" // 申报航班日期
|
||||
var fid: String = "" // 航班主键id
|
||||
var fno: String = "" // 申报航班号
|
||||
@@ -47,4 +49,14 @@ class GjcExportLoad {
|
||||
fun getFullWaybillNo(): String {
|
||||
return if (prefix.isNotEmpty()) "$prefix$no" else no
|
||||
}
|
||||
|
||||
/**
|
||||
* 航程
|
||||
* 优先取 range;为空时用 始发港-目的港 拼接
|
||||
*/
|
||||
val rangeText: String
|
||||
get() {
|
||||
if (range.isNotBlank()) return range
|
||||
return if (dep.isNotEmpty() && dest.isNotEmpty()) "$dep-$dest" else dep + dest
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,6 +167,25 @@ data class GjcMaWb(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 航程
|
||||
* 优先取 range;为空时用 始发站-目的站 拼接
|
||||
*/
|
||||
val rangeText: String
|
||||
get() {
|
||||
if (!range.isNullOrBlank()) return range!!
|
||||
val d1 = dep?.takeIf { it.isNotBlank() } ?: ""
|
||||
val d2 = dest?.takeIf { it.isNotBlank() } ?: ""
|
||||
return if (d1.isNotEmpty() && d2.isNotEmpty()) "$d1-$d2" else d1 + d2
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班日期(格式化)
|
||||
* 格式: yyyy-MM-dd
|
||||
*/
|
||||
val flightDateText: String
|
||||
get() = fdate?.let { SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(it) } ?: ""
|
||||
|
||||
/**
|
||||
* 清仓正常状态中文
|
||||
* 0-否,1-是
|
||||
|
||||
@@ -9,4 +9,11 @@ fun setIVCheckImage(imageView: ImageView, isChecked: Boolean) {
|
||||
imageView.setImageResource(
|
||||
if (isChecked) R.drawable.img_p_check_s else R.drawable.img_p_check_n
|
||||
)
|
||||
}
|
||||
|
||||
@BindingAdapter("setIVCheckAllImage")
|
||||
fun setIVCheckAllImage(imageView: ImageView, isChecked: Boolean) {
|
||||
imageView.setImageResource(
|
||||
if (isChecked) R.drawable.img_check_all_checked else R.drawable.img_check_all_unchecked
|
||||
)
|
||||
}
|
||||
@@ -117,9 +117,11 @@ class PageModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理列表数据
|
||||
* 处理列表数据。
|
||||
* onDataApplied 在 adapter.items 真正更新后回调(refresh/loadMore 都用 post 异步派发到 adapter,
|
||||
* 这里再嵌套一层 post 确保排在内部 post 之后)。
|
||||
*/
|
||||
fun handleDataList(list: List<Any>?) {
|
||||
fun handleDataList(list: List<Any>?, onDataApplied: (() -> Unit)? = null) {
|
||||
rv?.let {
|
||||
it.post {
|
||||
if (isRefresh()) {
|
||||
@@ -127,6 +129,9 @@ class PageModel {
|
||||
} else {
|
||||
it.loadMore(list)
|
||||
}
|
||||
if (onDataApplied != null) {
|
||||
it.post { onDataApplied() }
|
||||
}
|
||||
}
|
||||
}
|
||||
// 关闭加载状态
|
||||
@@ -136,9 +141,9 @@ class PageModel {
|
||||
/**
|
||||
* 处理listBean数据
|
||||
*/
|
||||
fun handleListBean(listBean: BaseListBean<*>?) {
|
||||
fun handleListBean(listBean: BaseListBean<*>?, onDataApplied: (() -> Unit)? = null) {
|
||||
loge("rv:${rv}")
|
||||
handleDataList(listBean?.list)
|
||||
handleDataList(listBean?.list, onDataApplied)
|
||||
haveMore.postValue((listBean?.pages ?: 1) > page)
|
||||
}
|
||||
|
||||
|
||||
@@ -81,13 +81,15 @@ class PadSearchLayout : LinearLayout {
|
||||
|
||||
et.hint = value
|
||||
tv.hint = value
|
||||
bindAdapter(spinner, list, hint)
|
||||
// 下拉占位/选项字体与搜索输入框 hint(13sp) 保持一致
|
||||
bindAdapter(spinner, list, hint, R.layout.item_spinner_list_13sp)
|
||||
}
|
||||
|
||||
var list = emptyList<KeyValue>()
|
||||
set(value) {
|
||||
field = value
|
||||
bindAdapter(spinner, value, hint)
|
||||
// 下拉占位/选项字体与搜索输入框 hint(13sp) 保持一致
|
||||
bindAdapter(spinner, value, hint, R.layout.item_spinner_list_13sp)
|
||||
onValueSet()
|
||||
}
|
||||
|
||||
|
||||
10
module_base/src/main/res/drawable/img_check_all_checked.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#1C8CF5"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M512,962c-250.71428584,0 -450,-199.28571416 -450,-450s199.28571416,-450 450,-450 450,199.28571416 450,450 -199.28571416,450 -450,450zM762.71428584,306.28571416h-64.28571416c-12.85714248,0 -25.71428584,6.42857168 -32.14285752,19.28571416L454.14285752,614.85714248l-96.42857168,-128.57142832c-6.42857168,-12.85714248 -19.28571416,-19.28571416 -32.14285752,-19.28571416h-64.28571416c-6.42857168,0 -12.85714248,6.42857168 -6.42857168,12.85714248l167.14285752,231.42857168c19.28571416,25.71428584 51.42857168,25.71428584 70.71428584,0L769.14285752,319.14285752c6.42857168,-6.42857168 0,-12.85714248 -6.42857168,-12.85714336z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#707070"
|
||||
android:pathData="M853.333333,530.962963a322.37037,322.37037 0,1 0,-322.37037 322.37037V910.222222C321.498074,910.222222 151.703704,740.427852 151.703704,530.962963S321.498074,151.703704 530.962963,151.703704s379.259259,169.79437 379.259259,379.259259 -169.79437,379.259259 -379.259259,379.259259v-56.888889a322.37037,322.37037 0,0 0,322.37037 -322.37037z"/>
|
||||
</vector>
|
||||
25
module_base/src/main/res/layout/item_spinner_list_13sp.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2006 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||
android:textSize="13sp" />
|
||||
@@ -37,6 +37,7 @@
|
||||
<color name="color_bottom_layout">#5c6890</color>
|
||||
<color name="color_f2">#F2F2F2</color>
|
||||
<color name="line">#EEEEEE</color>
|
||||
<color name="sub_list_divider">#DDDDDD</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
|
||||
<color name="bottom_tool_tips_text_color">#797979</color>
|
||||
|
||||
@@ -26,7 +26,7 @@ class GjcAssembleAllocateActivity :
|
||||
override fun viewModelClass() = GjcAssembleAllocateViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("组装分配")
|
||||
setBackArrow("国际出港组装分配")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
@@ -46,12 +46,6 @@ class GjcAssembleAllocateActivity :
|
||||
viewModel.onItemCheckChanged()
|
||||
}
|
||||
|
||||
// 监听全选状态变化,更新图标
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
// 通过alpha值表示全选状态:全选时alpha=1.0,未全选时alpha=0.5
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 初始化:获取分配人列表
|
||||
viewModel.getAssembleCompanyList()
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class GjcAssembleWeightEditActivity :
|
||||
override fun viewModelClass() = GjcAssembleWeightEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("修改组装重量")
|
||||
setBackArrow("国际出港修改组装重量")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class GjcBoxWeighingActivity :
|
||||
override fun viewModelClass() = GjcBoxWeighingViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("板箱过磅")
|
||||
setBackArrow("国际出港板箱过磅")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcBoxWeighingAddBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcBoxWeighingAddViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
|
||||
|
||||
/**
|
||||
@@ -20,9 +22,9 @@ class GjcBoxWeighingAddActivity :
|
||||
override fun viewModelClass() = GjcBoxWeighingAddViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("板箱过磅")
|
||||
setBackArrow("国际出港板箱过磅")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(this)
|
||||
viewModel.initOnCreated(this, intent)
|
||||
|
||||
// 为架子车号、ULD编码、IMP代码、航班号添加大写字母和数字的输入限制
|
||||
binding.carIdInput.et.setUpperCaseAlphanumericFilter()
|
||||
@@ -37,5 +39,12 @@ class GjcBoxWeighingAddActivity :
|
||||
val starter = Intent(context, GjcBoxWeighingAddActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun startForEdit(context: Context, bean: GjcUldUseBean) {
|
||||
val starter = Intent(context, GjcBoxWeighingAddActivity::class.java)
|
||||
.putExtra(Constant.Key.BEAN, bean)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class GjcBoxWeighingDetailsActivity :
|
||||
override fun viewModelClass() = GjcBoxWeighingDetailsViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("板箱过磅详情")
|
||||
setBackArrow("国际出港板箱过磅详情")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ class GjcFuBangActivity : BaseActivity(), View.OnClickListener {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gjc_fu_bang)
|
||||
setBackArrow("板箱过磅")
|
||||
setBackArrow("国际出港板箱过磅")
|
||||
viewModel = ViewModelProvider(this).get(GjcFuBangViewModel::class.java)
|
||||
initView()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class GjcHandoverActivity :
|
||||
override fun viewModelClass() = GjcHandoverViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("货物交接单")
|
||||
setBackArrow("国际出港货物交接单")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -46,12 +46,6 @@ class GjcInspectionActivity :
|
||||
viewModel.onItemCheckChanged()
|
||||
}
|
||||
|
||||
// 监听全选状态变化,更新图标
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
// 通过alpha值表示全选状态:全选时alpha=1.0,未全选时alpha=0.5
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 初始化代理列表
|
||||
viewModel.initAgentList()
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class GjcStartReceiveActivity : BaseActivity(), View.OnClickListener {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gjc_start_receive)
|
||||
setBackArrow("开始收运")
|
||||
setBackArrow("国际出港开始收运")
|
||||
initView()
|
||||
viewModel = ViewModelProvider(this).get(GjcStartReceiveViewModel::class.java)
|
||||
val dgrObj = JSONObject()
|
||||
|
||||
@@ -46,7 +46,7 @@ class GjcWareHouseInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_gjc_ware_house_info)
|
||||
setBackArrow("仓库管理详情")
|
||||
setBackArrow("国际出港仓库管理详情")
|
||||
initView()
|
||||
|
||||
viewModel.queryInfoByIdWareHouse(id)
|
||||
|
||||
@@ -26,15 +26,10 @@ class GjcWeighingListActivity :
|
||||
override fun viewModelClass() = GjcWeighingViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港待计重")
|
||||
setBackArrow("国际出港待计重")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 初始化代理人列表(从API获取)
|
||||
viewModel.initAgentList()
|
||||
|
||||
@@ -46,6 +41,8 @@ class GjcWeighingListActivity :
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH)
|
||||
.observe(this) {
|
||||
viewModel.refresh()
|
||||
|
||||
@@ -33,7 +33,7 @@ class GjcWeighingRecordDetailsActivity :
|
||||
override fun viewModelClass() = GjcWeighingRecordDetailsViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("计重明细")
|
||||
setBackArrow("国际出港计重明细")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class GjcWeighingRecordListActivity :
|
||||
override fun viewModelClass() = GjcWeighingRecordViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("计重记录")
|
||||
setBackArrow("国际出港计重记录")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class GjcWeighingStartActivity :
|
||||
override fun viewModelClass() = GjcWeighingStartViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("开始计重")
|
||||
setBackArrow("国际出港开始计重")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(this, intent)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class IntExpArriveActivity :
|
||||
// 注入 ARouter 参数
|
||||
ARouter.getInstance().inject(this)
|
||||
|
||||
setBackArrow("出港运抵")
|
||||
setBackArrow("国际出港运抵")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 如果有传入运单号,自动填充并触发搜索
|
||||
@@ -44,11 +44,6 @@ class IntExpArriveActivity :
|
||||
viewModel.searchClick()
|
||||
}
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
@@ -56,6 +51,8 @@ class IntExpArriveActivity :
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
@@ -26,14 +26,9 @@ class IntExpLoadActivity :
|
||||
override fun viewModelClass() = IntExpLoadViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港装载")
|
||||
setBackArrow("国际出港装载")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
@@ -41,6 +36,8 @@ class IntExpLoadActivity :
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
@@ -26,14 +26,9 @@ class IntExpOutHandoverActivity :
|
||||
override fun viewModelClass() = IntExpOutHandoverViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出库交接")
|
||||
setBackArrow("国际出港出库交接")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
@@ -41,6 +36,8 @@ class IntExpOutHandoverActivity :
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
@@ -35,15 +35,12 @@ class IntExpStorageUseActivity :
|
||||
binding.viewModel = viewModel
|
||||
binding.activity = this
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
@@ -26,14 +26,9 @@ class IntExpTallyActivity :
|
||||
override fun viewModelClass() = IntExpTallyViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港理货")
|
||||
setBackArrow("国际出港理货")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 观察全选状态,动态调整图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
@@ -41,6 +36,8 @@ class IntExpTallyActivity :
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.lukouguoji.gjc.dialog
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.DialogIntExpLoadResetBinding
|
||||
import com.lukouguoji.module_base.base.BaseDialogModel
|
||||
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||
import dev.utils.app.info.KeyValue
|
||||
|
||||
/**
|
||||
* 国际出港装载 - 状态重置对话框
|
||||
*/
|
||||
class IntExpLoadResetDialogModel(
|
||||
private val callback: (IntExpLoadResetDialogModel) -> Unit
|
||||
) : BaseDialogModel<DialogIntExpLoadResetBinding>(DIALOG_TYPE_CENTER) {
|
||||
|
||||
val resetStatusList = MutableLiveData<List<KeyValue>>()
|
||||
val selectedResetStatus = MutableLiveData("")
|
||||
var resetStatusCode: String? = null
|
||||
|
||||
override fun layoutId(): Int = R.layout.dialog_int_exp_load_reset
|
||||
|
||||
override fun onDialogCreated(context: Context) {
|
||||
binding.model = this
|
||||
initResetStatusList()
|
||||
selectedResetStatus.observeForever { value ->
|
||||
resetStatusCode = when (value) {
|
||||
"01" -> "01"
|
||||
"02" -> null
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initResetStatusList() {
|
||||
resetStatusList.value = listOf(
|
||||
KeyValue("正常", "01"),
|
||||
KeyValue("未申报", "02")
|
||||
)
|
||||
}
|
||||
|
||||
fun onSaveClick() {
|
||||
if (selectedResetStatus.value.verifyNullOrEmpty("请选择重置状态")) return
|
||||
dismiss()
|
||||
callback(this)
|
||||
}
|
||||
}
|
||||
@@ -358,9 +358,9 @@ class GjcYiKuFragment : Fragment(), View.OnClickListener {
|
||||
scanCode(Constant.RequestCode.gjc_yiku_wb_no_scan)
|
||||
}
|
||||
R.id.checkIcon -> {
|
||||
//重置 isAllCheck
|
||||
isAllCheck = !isAllCheck
|
||||
resetSelCount(isAllCheck, totalCount)
|
||||
checkIcon.setImageResource(if (isAllCheck) R.drawable.img_check_all_checked else R.drawable.img_check_all_unchecked)
|
||||
}
|
||||
R.id.send -> {
|
||||
val ids = collectList.filter { c -> c.isCheck }.map { c -> c.id }
|
||||
|
||||
@@ -2,10 +2,15 @@ package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.activity.GjcBoxWeighingAddActivity
|
||||
import com.lukouguoji.gjc.activity.GjcBoxWeighingDetailsActivity
|
||||
import com.lukouguoji.gjc.databinding.ItemGjcBoxWeighingBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
|
||||
/**
|
||||
* 国际出港板箱过磅列表 ViewHolder
|
||||
@@ -26,8 +31,31 @@ class GjcBoxWeighingViewHolder(view: View) :
|
||||
updateIcon(bean)
|
||||
}
|
||||
|
||||
// 整行点击跳转到详情页
|
||||
// 整行点击跳转到表单页(带数据回填)
|
||||
binding.ll.setOnClickListener {
|
||||
if (bean.wtDate.isEmpty()) {
|
||||
GjcBoxWeighingAddActivity.startForEdit(it.context, bean)
|
||||
} else {
|
||||
val params = mapOf(
|
||||
"fdate" to bean.fdate,
|
||||
"fno" to bean.fno,
|
||||
"countryType" to "1"
|
||||
).toRequestBody()
|
||||
launchCollect({ NetApply.api.queryFlightByDateAndNo(params) }) {
|
||||
onSuccess = { result ->
|
||||
if (!result.data?.fclose.isNullOrEmpty()) {
|
||||
showToast("该 ULD 已过磅且航班已离港,不允许重新过磅")
|
||||
} else {
|
||||
GjcBoxWeighingAddActivity.startForEdit(it.context, bean)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 侧滑“详情”按钮点击跳转到只读详情页
|
||||
binding.btnDetail.setOnClickListener {
|
||||
binding.swipeMenu.quickClose()
|
||||
GjcBoxWeighingDetailsActivity.start(it.context, bean.useId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import android.view.View
|
||||
import com.lukouguoji.gjc.activity.GjcWeighingStartActivity
|
||||
import com.lukouguoji.gjc.databinding.ItemGjcWeighingBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||
|
||||
/**
|
||||
@@ -22,6 +24,7 @@ class GjcWeighingViewHolder(view: View) :
|
||||
binding.ivIcon.setOnClickListener {
|
||||
// 反转checked状态
|
||||
bean.checked.set(!bean.checked.get())
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
|
||||
// 立即更新UI (图片自动切换)
|
||||
binding.executePendingBindings()
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ItemIntExpArriveBinding
|
||||
import com.lukouguoji.module_base.adapter.setCommonAdapter
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
||||
import com.lukouguoji.module_base.ktx.refresh
|
||||
|
||||
@@ -22,19 +24,17 @@ class IntExpArriveViewHolder(view: View) :
|
||||
|
||||
// 添加图标点击事件 - 切换选择状态
|
||||
binding.ivIcon.setOnClickListener {
|
||||
// 反转checked状态
|
||||
bean.checked.set(!bean.checked.get())
|
||||
|
||||
// 立即更新UI(图片自动切换)
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
|
||||
// ========== 展开按钮点击事件 ==========
|
||||
// 展开按钮点击事件
|
||||
binding.ivShow.setOnClickListener {
|
||||
bean.showMore.set(!bean.showMore.get())
|
||||
}
|
||||
|
||||
// ========== 初始化子列表 RecyclerView ==========
|
||||
// 初始化子列表 RecyclerView
|
||||
setCommonAdapter(
|
||||
binding.rvSub,
|
||||
IntExpArriveSubViewHolder::class.java,
|
||||
@@ -42,6 +42,22 @@ class IntExpArriveViewHolder(view: View) :
|
||||
)
|
||||
|
||||
// 刷新子列表数据
|
||||
binding.rvSub.refresh(bean.haWbList ?: emptyList())
|
||||
val subList = bean.haWbList ?: emptyList()
|
||||
binding.rvSub.refresh(subList)
|
||||
updateSubListVisibility(subList.isNotEmpty())
|
||||
}
|
||||
|
||||
private fun updateSubListVisibility(hasData: Boolean) {
|
||||
if (hasData) {
|
||||
binding.llHeader.visibility = View.VISIBLE
|
||||
binding.dividerHeader.visibility = View.VISIBLE
|
||||
binding.rvSub.visibility = View.VISIBLE
|
||||
binding.tvEmpty.visibility = View.GONE
|
||||
} else {
|
||||
binding.llHeader.visibility = View.GONE
|
||||
binding.dividerHeader.visibility = View.GONE
|
||||
binding.rvSub.visibility = View.GONE
|
||||
binding.tvEmpty.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.lukouguoji.gjc.holder
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemIntExpLoadBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.bean.GjcExportLoad
|
||||
|
||||
/**
|
||||
@@ -21,6 +23,7 @@ class IntExpLoadViewHolder(view: View) :
|
||||
binding.ivIcon.setOnClickListener {
|
||||
// 反转checked状态
|
||||
bean.checked.set(!bean.checked.get())
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
|
||||
// 立即更新UI (图片自动切换)
|
||||
binding.executePendingBindings()
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.lukouguoji.gjc.holder
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemIntExpOutHandoverBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||
|
||||
/**
|
||||
@@ -21,6 +23,7 @@ class IntExpOutHandoverViewHolder(view: View) :
|
||||
binding.ivIcon.setOnClickListener {
|
||||
// 反转checked状态
|
||||
bean.checked.set(!bean.checked.get())
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
|
||||
// 立即更新UI(图片自动切换)
|
||||
binding.executePendingBindings()
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ItemIntExpStorageUseBinding
|
||||
import com.lukouguoji.module_base.adapter.setCommonAdapter
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
||||
import com.lukouguoji.module_base.ktx.refresh
|
||||
|
||||
@@ -25,10 +27,12 @@ class IntExpStorageUseViewHolder(view: View) :
|
||||
// 切换主列表项的选择状态
|
||||
val newCheckedState = !bean.checked.get()
|
||||
bean.checked.set(newCheckedState)
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
|
||||
// 联动勾选/取消所有子列表项
|
||||
bean.storageUseList?.forEach { storageUse ->
|
||||
storageUse.checked.set(newCheckedState)
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
}
|
||||
|
||||
// 刷新UI
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ItemIntExpTallyBinding
|
||||
import com.lukouguoji.module_base.adapter.setCommonAdapter
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
||||
import com.lukouguoji.module_base.ktx.refresh
|
||||
|
||||
@@ -22,19 +24,17 @@ class IntExpTallyViewHolder(view: View) :
|
||||
|
||||
// 图标点击切换选择状态(主单和分单独立,互不干扰)
|
||||
binding.ivIcon.setOnClickListener {
|
||||
// 只切换主单自己的选择状态,不同步到分单
|
||||
bean.checked.set(!bean.checked.get())
|
||||
|
||||
// 刷新UI
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
|
||||
// ========== 新增:展开按钮点击事件 ==========
|
||||
// 展开按钮点击事件
|
||||
binding.ivShow.setOnClickListener {
|
||||
bean.showMore.set(!bean.showMore.get())
|
||||
}
|
||||
|
||||
// ========== 新增:初始化子列表 RecyclerView ==========
|
||||
// 初始化子列表 RecyclerView
|
||||
setCommonAdapter(
|
||||
binding.rvSub,
|
||||
IntExpTallySubViewHolder::class.java,
|
||||
@@ -42,6 +42,22 @@ class IntExpTallyViewHolder(view: View) :
|
||||
)
|
||||
|
||||
// 刷新子列表数据
|
||||
binding.rvSub.refresh(bean.haWbList ?: emptyList())
|
||||
val subList = bean.haWbList ?: emptyList()
|
||||
binding.rvSub.refresh(subList)
|
||||
updateSubListVisibility(subList.isNotEmpty())
|
||||
}
|
||||
|
||||
private fun updateSubListVisibility(hasData: Boolean) {
|
||||
if (hasData) {
|
||||
binding.llHeader.visibility = View.VISIBLE
|
||||
binding.dividerHeader.visibility = View.VISIBLE
|
||||
binding.rvSub.visibility = View.VISIBLE
|
||||
binding.tvEmpty.visibility = View.GONE
|
||||
} else {
|
||||
binding.llHeader.visibility = View.GONE
|
||||
binding.dividerHeader.visibility = View.GONE
|
||||
binding.rvSub.visibility = View.GONE
|
||||
binding.tvEmpty.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class IntExpAssembleActivity :
|
||||
override fun viewModelClass() = IntExpAssembleViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港组装")
|
||||
setBackArrow("国际出港组装")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 初始化组装人下拉列表
|
||||
|
||||
@@ -63,7 +63,7 @@ class IntExpAssembleStartActivity :
|
||||
override fun viewModelClass() = IntExpAssembleStartViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("开始组装")
|
||||
setBackArrow("国际出港开始组装")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 为ULD编号添加大写字母和数字的输入限制
|
||||
|
||||
@@ -29,7 +29,7 @@ class IntExpMoveActivity : BaseBindingActivity<ActivityIntExpMoveBinding, IntExp
|
||||
override fun viewModelClass() = IntExpMoveViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港移库")
|
||||
setBackArrow("国际出港移库")
|
||||
binding.viewModel = viewModel
|
||||
binding.activity = this
|
||||
|
||||
@@ -65,11 +65,6 @@ class IntExpMoveActivity : BaseBindingActivity<ActivityIntExpMoveBinding, IntExp
|
||||
* 观察数据变化
|
||||
*/
|
||||
private fun observeData() {
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 监听item选择变化事件,更新全选状态
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) {
|
||||
viewModel.onItemCheckChanged()
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.util.CheckUtil
|
||||
import dev.utils.app.info.KeyValue
|
||||
import dev.utils.common.DateUtils
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
@@ -91,8 +91,7 @@ class GjcAssembleAllocateViewModel : BasePageViewModel() {
|
||||
NetApply.api.getGjcAssembleAllocateList(listParams)
|
||||
}) {
|
||||
onSuccess = { pageInfo ->
|
||||
// 直接转换为 BaseListBean
|
||||
pageModel.handleListBean(pageInfo.toBaseListBean())
|
||||
pageModel.handleListBean(pageInfo.toBaseListBean()) { updateCheckAllStatus() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
fun initOnCreated(activity: Activity) {
|
||||
fun initOnCreated(activity: Activity, intent: Intent? = null) {
|
||||
// 监听地磅重量变化 - 暂时注释
|
||||
// diBangModel.weight.observe(activity as LifecycleOwner) { weight ->
|
||||
// val w = weight?.toDoubleOrNull() ?: 0.0
|
||||
@@ -104,14 +104,52 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
calculateWeights()
|
||||
}
|
||||
|
||||
// 加载下拉列表数据
|
||||
loadPassagewayList()
|
||||
loadPlCloseList()
|
||||
|
||||
// 初始化航班日期为今天
|
||||
val today = Date().formatDate()
|
||||
flightDate.value = today
|
||||
dataBean.value?.fdate = today
|
||||
|
||||
// 编辑模式:从 Intent 中解析列表项 Bean 并回填
|
||||
val editBean = intent?.getSerializableExtra(Constant.Key.BEAN) as? GjcUldUseBean
|
||||
if (editBean != null) {
|
||||
prefillFromBean(editBean)
|
||||
loadPassagewayList(editBean.passagewayId)
|
||||
loadPlCloseList(editBean.plClose)
|
||||
} else {
|
||||
loadPassagewayList(null)
|
||||
loadPlCloseList(null)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑模式:用列表项数据回填表单
|
||||
*/
|
||||
private fun prefillFromBean(bean: GjcUldUseBean) {
|
||||
// 整体绑定(板型/高度/IMP/探板尺寸/目的港/备注/架子车自重/ULD自重等通过 dataBean.* 自动回填)
|
||||
dataBean.value = bean
|
||||
|
||||
// 独立字段
|
||||
carId.value = bean.carId
|
||||
uldNo.value = bean.uld
|
||||
flightNo.value = bean.fno
|
||||
flightDate.value = bean.fdate
|
||||
|
||||
// 计算字段
|
||||
totalWeight.value = bean.totalWeight.toString()
|
||||
netWeight.value = bean.netWeight.toString()
|
||||
cargoWeight.value = bean.cargoWeight.toString()
|
||||
diBangWeight.value = bean.totalWeight.toString()
|
||||
|
||||
// 通道号 Spinner 绑定到 channel(KeyValue.value 即 passagewayId)
|
||||
channel.value = bean.passagewayId
|
||||
|
||||
// 抑制重复自动查询(避免回调把已填数据再次刷掉)
|
||||
lastQueriedCarId = bean.carId
|
||||
lastQueriedUld = bean.uld
|
||||
lastQueriedFlight = "${bean.fdate}-${bean.fno}"
|
||||
|
||||
// confirmClick 需要 usingUldData,列表项本身就是当前正在使用的记录
|
||||
usingUldData = bean
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,34 +229,47 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
|
||||
/**
|
||||
* 加载通道号列表
|
||||
* @param checkedValue 编辑模式下需要选中的 passagewayId;为空则按返回顺序展示
|
||||
*/
|
||||
private fun loadPassagewayList() {
|
||||
private fun loadPassagewayList(checkedValue: String?) {
|
||||
launchCollect({
|
||||
NetApply.api.getDictList("GJPASSAGEWAY")
|
||||
}) {
|
||||
onSuccess = {
|
||||
passagewayList.value = (it.data ?: emptyList()).map { b -> b.toKeyValue() }
|
||||
val list = (it.data ?: emptyList()).map { b -> b.toKeyValue() }
|
||||
passagewayList.value = reorderChecked(list, checkedValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载探板收口列表
|
||||
* @param checkedValue 编辑模式下需要选中的 plClose 值;为空则按返回顺序展示
|
||||
*/
|
||||
private fun loadPlCloseList() {
|
||||
private fun loadPlCloseList(checkedValue: String?) {
|
||||
launchCollect({
|
||||
NetApply.api.getDictList("PICLOSE")
|
||||
}) {
|
||||
onSuccess = {
|
||||
// 将 DictIdValueBean 转换为 KeyValue
|
||||
// 显示和提交都使用 value 字段
|
||||
plCloseList.value = (it.data ?: emptyList()).map { b ->
|
||||
val list = (it.data ?: emptyList()).map { b ->
|
||||
KeyValue(b.value, b.value)
|
||||
}
|
||||
plCloseList.value = reorderChecked(list, checkedValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 若 checkedValue 命中列表中某项,则把该项移到首位(PadDataLayoutNew SPINNER 默认显示首项)
|
||||
*/
|
||||
private fun reorderChecked(list: List<KeyValue>, checkedValue: String?): List<KeyValue> {
|
||||
if (checkedValue.isNullOrEmpty()) return list
|
||||
val matched = list.firstOrNull { it.value == checkedValue } ?: return list
|
||||
return listOf(matched) + list.filter { it !== matched }
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算重量字段
|
||||
* 装机重 = 总重 - 架子车自重
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.BluetoothDialogModel
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.PrinterUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import dev.utils.common.DateUtils
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
|
||||
@@ -28,7 +29,14 @@ class GjcBoxWeighingViewModel : BasePageViewModel() {
|
||||
// 搜索条件
|
||||
val flightDate = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期
|
||||
val flightNo = MutableLiveData("") // 航班号
|
||||
val dest = MutableLiveData("") // 目的站
|
||||
val wtStatus = MutableLiveData("") // 过磅状态(""=全部 / "0"=未过磅 / "1"=已过磅)
|
||||
val wtStatusList = MutableLiveData( // 过磅状态选项
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("未过磅", "0"),
|
||||
KeyValue("已过磅", "1")
|
||||
)
|
||||
)
|
||||
val carId = MutableLiveData("") // 架子车号
|
||||
val uld = MutableLiveData("") // ULD编号
|
||||
|
||||
@@ -111,7 +119,7 @@ class GjcBoxWeighingViewModel : BasePageViewModel() {
|
||||
"pageSize" to pageModel.limit,
|
||||
"fdate" to flightDate.value!!.ifEmpty { null },
|
||||
"fno" to flightNo.value!!.ifEmpty { null },
|
||||
"fdest" to dest.value!!.ifEmpty { null },
|
||||
"wtStatus" to wtStatus.value!!.ifEmpty { null },
|
||||
"carId" to carId.value!!.ifEmpty { null },
|
||||
"uld" to uld.value!!.ifEmpty { null },
|
||||
).toRequestBody()
|
||||
@@ -120,7 +128,7 @@ class GjcBoxWeighingViewModel : BasePageViewModel() {
|
||||
val totalParams = mapOf(
|
||||
"fdate" to flightDate.value!!.ifEmpty { null },
|
||||
"fno" to flightNo.value!!.ifEmpty { null },
|
||||
"fdest" to dest.value!!.ifEmpty { null },
|
||||
"wtStatus" to wtStatus.value!!.ifEmpty { null },
|
||||
"carId" to carId.value!!.ifEmpty { null },
|
||||
"uld" to uld.value!!.ifEmpty { null },
|
||||
).toRequestBody()
|
||||
|
||||
@@ -118,7 +118,7 @@ class GjcInspectionViewModel : BasePageViewModel() {
|
||||
NetApply.api.getGjcInspectionList(listParams)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
pageModel.handleListBean(it) { updateCheckAllStatus() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,15 +55,15 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
||||
|
||||
// 全选状态
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
init {
|
||||
// 监听全选状态,自动更新所有列表项
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcWeighingBean> ?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
fun onItemCheckChanged() {
|
||||
updateCheckAllStatus()
|
||||
}
|
||||
|
||||
fun updateCheckAllStatus() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcWeighingBean> ?: return
|
||||
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 方法区
|
||||
@@ -210,7 +210,7 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
||||
NetApply.api.getGjcWeighingList(listParams)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
pageModel.handleListBean(it) { updateCheckAllStatus() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,15 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
// ========== 全选状态 ==========
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
fun onItemCheckChanged() {
|
||||
updateCheckAllStatus()
|
||||
}
|
||||
|
||||
fun updateCheckAllStatus() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
|
||||
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
|
||||
}
|
||||
|
||||
// ========== 全局展开状态 ==========
|
||||
/**
|
||||
* 全局展开状态
|
||||
@@ -51,15 +60,6 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
*/
|
||||
val isAllExpanded = MutableLiveData(false)
|
||||
|
||||
init {
|
||||
// 监听全选状态,自动更新所有列表项
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 适配器配置 ==========
|
||||
val itemViewHolder = IntExpArriveViewHolder::class.java
|
||||
val itemLayoutId = R.layout.item_int_exp_arrive
|
||||
@@ -95,12 +95,8 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
val shouldExpand = !isAllExpanded.value!!
|
||||
isAllExpanded.value = shouldExpand
|
||||
|
||||
// 更新所有列表项的 showMore 状态
|
||||
list.forEach { bean ->
|
||||
// 只有当有子列表时才设置展开状态
|
||||
if (!bean.haWbList.isNullOrEmpty()) {
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
|
||||
// 刷新列表UI
|
||||
@@ -206,6 +202,14 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
// 校验申报状态:只有申报状态为 01 的记录才能删除申报
|
||||
if (selectedMaWbList.any { it.declareStatus != "01" } ||
|
||||
selectedHaWbList.any { it.arrivalStatus != "01" }
|
||||
) {
|
||||
showToast("只能删除申报状态为01的运单")
|
||||
return
|
||||
}
|
||||
|
||||
// 从接口获取删除原因列表
|
||||
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
|
||||
onSuccess = { result ->
|
||||
@@ -312,7 +316,7 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
// 获取列表 (带Loading)
|
||||
launchLoadingCollect({ NetApply.api.getIntExpArriveList(listParams) }) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
pageModel.handleListBean(it) { updateCheckAllStatus() }
|
||||
// 数据加载完成后,重置全局展开状态为收起
|
||||
isAllExpanded.value = false
|
||||
}
|
||||
|
||||
@@ -456,6 +456,33 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新查询 ULD 信息,仅回填最新的 useId 与 ULD 状态。
|
||||
*
|
||||
* 用途:以"新增"形式进入页面、对全新 ULD 首次装货时,服务端在首票成功后才生成
|
||||
* 该 ULD 的 use 记录(useId)。装货/卸货接口返回值(GjcWarehouse)不含 useId,
|
||||
* 若不回填,后续票仍以 useId=null 提交,会被服务端当作新的 use 处理,
|
||||
* 导致无法继续往同一 ULD 组装多票。此处在每次操作成功后回填最新 useId,
|
||||
* 保证多票组装提交到同一 ULD use 记录。
|
||||
*
|
||||
* 不在此处刷新航班/组装信息列表,避免与 loadAssembledList 的航班兜底逻辑相互覆盖。
|
||||
*/
|
||||
private fun reloadUldUseId(uldNo: String) {
|
||||
if (uldNo.isEmpty()) return
|
||||
launchCollect({ NetApply.api.getUldWithConsumeWeight(uldNo) }) {
|
||||
onSuccess = { result ->
|
||||
val uldBean = result.data
|
||||
if (uldBean != null) {
|
||||
// 仅回填 useId(用于后续装货/卸货提交到同一 ULD use 记录),
|
||||
// 不改动 ULD 状态/耗材重量/航班等其它字段,避免影响表单现有逻辑。
|
||||
uldInfo.value = uldInfo.value?.apply {
|
||||
useId = uldBean.useId
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 卸货按钮点击
|
||||
*/
|
||||
@@ -589,6 +616,10 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
// 3. 【修改】区分 wbInfo 构建
|
||||
val wbInfo: Map<String, Any?>
|
||||
|
||||
// 记录本次操作运单的航班信息(用于操作成功后刷新组装信息列表)
|
||||
var operationFno = ""
|
||||
var operationFdate = ""
|
||||
|
||||
if (isLoad) {
|
||||
// 装货:从运单列表获取
|
||||
val currentWaybillList = waybillList.value
|
||||
@@ -615,6 +646,9 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
selectedWaybill.weight.toDoubleOrNull()
|
||||
}
|
||||
|
||||
operationFno = selectedWaybill.fno
|
||||
operationFdate = selectedWaybill.fdate
|
||||
|
||||
wbInfo = mapOf(
|
||||
"wbNo" to selectedWaybill.waybillNo,
|
||||
"pc" to waybillPc,
|
||||
@@ -631,6 +665,9 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
operationFno = assembleWaybill.fno
|
||||
operationFdate = assembleWaybill.fdate
|
||||
|
||||
wbInfo = mapOf(
|
||||
"wbNo" to assembleWaybill.waybillNo,
|
||||
"pc" to assembleWaybill.pieces.toLongOrNull(), // 运单件数
|
||||
@@ -665,7 +702,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
}) {
|
||||
onSuccess = { result ->
|
||||
// 接口成功后才显示成功提示并刷新列表
|
||||
handleOperationSuccess(operationName, isLoad, uldNo, assembleCount, assembleWeight)
|
||||
handleOperationSuccess(operationName, isLoad, uldNo, operationFno, operationFdate)
|
||||
}
|
||||
onFailed = { code, message ->
|
||||
showToast("${operationName}失败: $message")
|
||||
@@ -680,8 +717,8 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
operationName: String,
|
||||
isLoad: Boolean,
|
||||
uldNo: String,
|
||||
assembleCount: String,
|
||||
assembleWeight: String
|
||||
operationFno: String,
|
||||
operationFdate: String
|
||||
) {
|
||||
showToast("${operationName}成功")
|
||||
|
||||
@@ -693,6 +730,32 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
// 清空表单(在刷新数据前清空,避免刷新时的状态冲突)
|
||||
clearForm()
|
||||
|
||||
// 回填最新 useId(关键,用于后续装货/卸货提交到同一 ULD use 记录):
|
||||
// - 装货:以"新增"形式进入、对全新 ULD 首票装货时,服务端在首票成功后才生成
|
||||
// 该 ULD 的 use 记录,而接口返回值不含 useId,不回填则后续票以 useId=null 提交、
|
||||
// 被当作新 use 处理,无法继续多票。仅在本地 useId 尚未生成(为 0)时回填,
|
||||
// "修改"模式及已过磅 ULD 本就带 useId,保持原逻辑不变。
|
||||
// - 卸货:从组装信息列表选票卸货,同一 ULD 因 lastQueriedUldNo 防抖不会重新查询 ULD,
|
||||
// useId 会停留在卸首票前的陈旧值,故卸货成功后无条件重拉,保证可连续卸多票。
|
||||
if (isLoad) {
|
||||
if ((uldInfo.value?.useId ?: 0L) == 0L) {
|
||||
reloadUldUseId(uldNo)
|
||||
}
|
||||
} else {
|
||||
reloadUldUseId(uldNo)
|
||||
}
|
||||
|
||||
// 添加形式(全新 ULD)时航班可能未从 ULD 查询接口获取,导致组装信息列表查不出;
|
||||
// 仅在航班为空时用本次操作运单的航班信息兜底补全,ULD 已带航班时保持原值不变。
|
||||
if (assembleFlightNo.value.isNullOrEmpty() || assembleFlightDate.value.isNullOrEmpty()) {
|
||||
if (operationFno.isNotEmpty() && operationFdate.isNotEmpty()) {
|
||||
assembleFlightNo.value = operationFno
|
||||
// 与 ULD 查询保持一致,只取年月日(去掉时间部分)
|
||||
assembleFlightDate.value =
|
||||
if (operationFdate.contains(" ")) operationFdate.split(" ")[0] else operationFdate
|
||||
}
|
||||
}
|
||||
|
||||
// 清除防抖标记,强制刷新组装信息列表
|
||||
lastQueriedAssembledParams = ""
|
||||
loadAssembledList()
|
||||
@@ -1059,6 +1122,11 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
this.uldNo = uldNo
|
||||
}
|
||||
|
||||
// 将 ULD 编号填充到左上角 ULD 列表筛选框,使组装信息列表只查询该 ULD。
|
||||
// loadAssembledList() 会读取 uldSearchText 作为 uld 查询参数,因此只显示这一个 ULD 的组装信息。
|
||||
// 用户可手动清空该筛选框后重新查询,即可查看该航班的全部组装信息。
|
||||
uldSearchText.value = uldNo
|
||||
|
||||
// 更新防抖标记,确保查询能触发
|
||||
lastQueriedUldNo = ""
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.dialog.IntExpLoadDeleteDialogModel
|
||||
import com.lukouguoji.gjc.dialog.IntExpLoadResetDialogModel
|
||||
import com.lukouguoji.gjc.holder.IntExpLoadViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.GjcCheckInPage
|
||||
@@ -16,6 +17,7 @@ import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
@@ -33,6 +35,77 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
||||
val flightDate = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期
|
||||
val flightNo = MutableLiveData("") // 航班号
|
||||
val waybillNo = MutableLiveData("") // 运单号
|
||||
val depPort = MutableLiveData("") // 始发站(下拉选择)
|
||||
val depPortList = MutableLiveData<List<KeyValue>>(emptyList()) // 始发站下拉列表(始发港 + 经停港)
|
||||
val destPort = MutableLiveData("") // 目的站(航班查询自动填充,不可编辑)
|
||||
|
||||
// ========== 航班级联查询 ==========
|
||||
private var lastQueriedFlight = "" // 避免重复查询
|
||||
|
||||
/**
|
||||
* 航班日期输入完成回调
|
||||
*/
|
||||
fun onFlightDateInputComplete() {
|
||||
lastQueriedFlight = ""
|
||||
queryFlightIfReady()
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班号输入完成回调
|
||||
*/
|
||||
fun onFlightNoInputComplete() {
|
||||
queryFlightIfReady()
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班日期 + 航班号 均有值时,查询航班并填充始发站/目的站
|
||||
* 参考「电报生成」(/flt/intFlight):始发站下拉(始发港+经停港),目的站自动填充且只读
|
||||
*/
|
||||
private fun queryFlightIfReady() {
|
||||
val fdate = flightDate.value
|
||||
val fno = flightNo.value
|
||||
if (fdate.isNullOrEmpty() || fno.isNullOrEmpty()) return
|
||||
|
||||
val key = "$fdate-$fno"
|
||||
if (key == lastQueriedFlight) return
|
||||
lastQueriedFlight = key
|
||||
|
||||
launchCollect({
|
||||
NetApply.api.getGjFlightBean(
|
||||
mapOf(
|
||||
"fdate" to fdate,
|
||||
"fno" to fno,
|
||||
"ieFlag" to "E", // 出港
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
if (it.verifySuccess() && it.data != null) {
|
||||
val flight = it.data!!
|
||||
// 目的站:航班查询返回,自动填充
|
||||
destPort.value = flight.fdest.noNull()
|
||||
// 始发站下拉:始发港 + 经停港(可逗号分隔多个)
|
||||
val list = mutableListOf(KeyValue(flight.fdep.noNull(), flight.fdep.noNull()))
|
||||
flight.jtz.split(",").forEach { stop ->
|
||||
val s = stop.trim()
|
||||
if (s.isNotEmpty()) list.add(KeyValue(s, s))
|
||||
}
|
||||
depPortList.value = list
|
||||
depPort.value = flight.fdep.noNull()
|
||||
} else {
|
||||
depPortList.value = emptyList()
|
||||
depPort.value = ""
|
||||
destPort.value = ""
|
||||
}
|
||||
}
|
||||
|
||||
onFailed = { _, _ ->
|
||||
depPortList.value = emptyList()
|
||||
depPort.value = ""
|
||||
destPort.value = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 统计信息 ==========
|
||||
val totalCount = MutableLiveData("0") // 合计票数
|
||||
@@ -42,13 +115,13 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
||||
// ========== 全选状态 ==========
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
init {
|
||||
// 监听全选状态,自动更新所有列表项
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcExportLoad> ?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
fun onItemCheckChanged() {
|
||||
updateCheckAllStatus()
|
||||
}
|
||||
|
||||
fun updateCheckAllStatus() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcExportLoad> ?: return
|
||||
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
|
||||
}
|
||||
|
||||
// ========== 适配器配置 ==========
|
||||
@@ -84,7 +157,7 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态重置 (批量操作)
|
||||
* 状态重置 (批量操作) — 弹框选状态后调接口
|
||||
*/
|
||||
fun resetDeclare() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcExportLoad> ?: return
|
||||
@@ -95,18 +168,26 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
val param = GjcDeclareParam(loadList = selectedItems)
|
||||
val requestData = param.toRequestBody()
|
||||
val dialog = IntExpLoadResetDialogModel { dialogModel ->
|
||||
val params = mutableMapOf<String, Any?>(
|
||||
"loadList" to selectedItems
|
||||
)
|
||||
if (dialogModel.resetStatusCode != null) {
|
||||
params["restStatus"] = dialogModel.resetStatusCode
|
||||
}
|
||||
val requestData = params.toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.resetDeclare(requestData) }) {
|
||||
onSuccess = {
|
||||
showToast("状态重置成功")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
launchLoadingCollect({ NetApply.api.resetDeclare(requestData) }) {
|
||||
onSuccess = {
|
||||
showToast("状态重置成功")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
refresh()
|
||||
}
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,6 +228,12 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
// 校验申报状态:只有装载申报状态为 01 的记录才能删除申报
|
||||
if (selectedItems.any { it.loadStatus != "01" }) {
|
||||
showToast("只能删除申报状态为01的运单")
|
||||
return
|
||||
}
|
||||
|
||||
// 从接口获取删除原因列表
|
||||
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
|
||||
onSuccess = { result ->
|
||||
@@ -190,6 +277,8 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
||||
fdate = flightDate.value?.ifEmpty { null },
|
||||
fno = flightNo.value?.ifEmpty { null },
|
||||
wbNo = waybillNo.value?.ifEmpty { null },
|
||||
dep = depPort.value?.ifEmpty { null },
|
||||
dest = destPort.value?.ifEmpty { null },
|
||||
pageNum = pageModel.page,
|
||||
pageSize = pageModel.limit
|
||||
)
|
||||
@@ -201,12 +290,14 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
||||
val totalParams = GjcCheckInPage(
|
||||
fdate = flightDate.value?.ifEmpty { null },
|
||||
fno = flightNo.value?.ifEmpty { null },
|
||||
wbNo = waybillNo.value?.ifEmpty { null }
|
||||
wbNo = waybillNo.value?.ifEmpty { null },
|
||||
dep = depPort.value?.ifEmpty { null },
|
||||
dest = destPort.value?.ifEmpty { null }
|
||||
).toRequestBody()
|
||||
|
||||
// 获取列表 (带Loading)
|
||||
launchLoadingCollect({ NetApply.api.getIntExpLoadList(listParams) }) {
|
||||
onSuccess = { pageModel.handleListBean(it) }
|
||||
onSuccess = { pageModel.handleListBean(it) { updateCheckAllStatus() } }
|
||||
}
|
||||
|
||||
// 获取统计信息 (后台请求,不阻塞列表)
|
||||
|
||||
@@ -165,7 +165,9 @@ class IntExpMoveViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
|
||||
// 获取列表(显示loading)
|
||||
launchLoadingCollect({ NetApply.api.getIntExpMoveList(listParams) }) {
|
||||
onSuccess = { pageModel.handleListBean(it) }
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it) { updateCheckAllStatus() }
|
||||
}
|
||||
}
|
||||
|
||||
// 获取统计(后台调用)
|
||||
|
||||
@@ -39,15 +39,15 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
|
||||
|
||||
// ========== 全选状态 ==========
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
init {
|
||||
// 监听全选状态,自动更新所有列表项
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcUldUseBean> ?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
fun onItemCheckChanged() {
|
||||
updateCheckAllStatus()
|
||||
}
|
||||
|
||||
fun updateCheckAllStatus() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcUldUseBean> ?: return
|
||||
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
|
||||
}
|
||||
|
||||
// ========== 适配器配置 ==========
|
||||
val itemViewHolder = IntExpOutHandoverViewHolder::class.java
|
||||
@@ -182,7 +182,7 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
|
||||
|
||||
// 获取列表 (带Loading)
|
||||
launchLoadingCollect({ NetApply.api.getIntExpOutHandoverList(listParams) }) {
|
||||
onSuccess = { pageModel.handleListBean(it) }
|
||||
onSuccess = { pageModel.handleListBean(it) { updateCheckAllStatus() } }
|
||||
}
|
||||
|
||||
// 获取统计信息 (后台请求)
|
||||
|
||||
@@ -43,6 +43,15 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
// ========== 全选状态 ==========
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
fun onItemCheckChanged() {
|
||||
updateCheckAllStatus()
|
||||
}
|
||||
|
||||
fun updateCheckAllStatus() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
|
||||
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
|
||||
}
|
||||
|
||||
// ========== 全局展开状态 ==========
|
||||
/**
|
||||
* 全局展开状态
|
||||
@@ -59,13 +68,6 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
KeyValue("异常", "1")
|
||||
)
|
||||
|
||||
// 监听全选状态,自动更新所有列表项
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list =
|
||||
pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 适配器配置 ==========
|
||||
@@ -322,7 +324,7 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
launchLoadingCollect({ NetApply.api.getIntExpStorageUseList(listParams) }) {
|
||||
onSuccess = { result ->
|
||||
// 手动处理 PageInfo 数据
|
||||
pageModel.handleDataList(result.list)
|
||||
pageModel.handleDataList(result.list) { updateCheckAllStatus() }
|
||||
pageModel.haveMore.postValue((result.pages) > pageModel.page)
|
||||
// 数据加载完成后,重置全局展开状态为收起
|
||||
isAllExpanded.value = false
|
||||
|
||||
@@ -44,6 +44,15 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
||||
// ========== 全选状态 ==========
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
fun onItemCheckChanged() {
|
||||
updateCheckAllStatus()
|
||||
}
|
||||
|
||||
fun updateCheckAllStatus() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
|
||||
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
|
||||
}
|
||||
|
||||
// ========== 全局展开状态 ==========
|
||||
/**
|
||||
* 全局展开状态
|
||||
@@ -52,15 +61,6 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
||||
*/
|
||||
val isAllExpanded = MutableLiveData(false)
|
||||
|
||||
init {
|
||||
// 监听全选状态,自动更新所有列表项
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 适配器配置 ==========
|
||||
val itemViewHolder = IntExpTallyViewHolder::class.java
|
||||
val itemLayoutId = R.layout.item_int_exp_tally
|
||||
@@ -96,12 +96,8 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
||||
val shouldExpand = !isAllExpanded.value!!
|
||||
isAllExpanded.value = shouldExpand
|
||||
|
||||
// 更新所有列表项的 showMore 状态
|
||||
list.forEach { bean ->
|
||||
// 只有当有子列表时才设置展开状态
|
||||
if (!bean.haWbList.isNullOrEmpty()) {
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
|
||||
// 刷新列表UI
|
||||
@@ -206,6 +202,14 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
// 校验申报状态:只有未申报(状态为空)的记录才能理货申报
|
||||
if (selectedMaWbList.any { !it.declareStatus.isNullOrEmpty() } ||
|
||||
selectedHaWbList.any { !it.tallyStatus.isNullOrEmpty() }
|
||||
) {
|
||||
showToast("只有未申报的运单才能理货申报")
|
||||
return
|
||||
}
|
||||
|
||||
// 构建请求参数(区分主单和分单)
|
||||
val params = mutableMapOf<String, Any?>()
|
||||
if (selectedMaWbList.isNotEmpty()) {
|
||||
@@ -253,6 +257,14 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
// 校验申报状态:只有申报状态为 01 的记录才能删除申报
|
||||
if (selectedMaWbList.any { it.declareStatus != "01" } ||
|
||||
selectedHaWbList.any { it.tallyStatus != "01" }
|
||||
) {
|
||||
showToast("只能删除申报状态为01的运单")
|
||||
return
|
||||
}
|
||||
|
||||
// 从接口获取删除原因列表
|
||||
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
|
||||
onSuccess = { result ->
|
||||
@@ -316,7 +328,7 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
||||
// 获取列表 (带Loading)
|
||||
launchLoadingCollect({ NetApply.api.getIntExpTallyList(listParams) }) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
pageModel.handleListBean(it) { updateCheckAllStatus() }
|
||||
// 数据加载完成后,重置全局展开状态为收起
|
||||
isAllExpanded.value = false
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 5.9 KiB |
BIN
module_gjc/src/main/res/drawable-mdpi/gjj_jgqz.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -138,10 +138,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -49,14 +49,15 @@
|
||||
value="@={viewModel.flightNo}"
|
||||
setUpperCaseAlphanumeric="@{true}" />
|
||||
|
||||
<!-- 目的站 -->
|
||||
<!-- 过磅状态 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入目的站"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.dest}" />
|
||||
hint='@{"请选择过磅状态"}'
|
||||
list="@{viewModel.wtStatusList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.wtStatus}" />
|
||||
|
||||
<!-- 架子车号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
|
||||
@@ -148,10 +148,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:onClick="@{viewModel::checkAllClick}"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
@@ -149,9 +149,10 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -151,10 +151,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:background="@color/color_f2"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp">
|
||||
@@ -214,6 +214,12 @@
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 表头与列表项分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/line" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_waybill_list"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择航班日期"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
setRefreshCallBack="@{viewModel::onFlightDateInputComplete}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.flightDate}" />
|
||||
|
||||
@@ -46,10 +47,31 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入航班号"}'
|
||||
setRefreshCallBack="@{viewModel::onFlightNoInputComplete}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}"
|
||||
setUpperCaseAlphanumeric="@{true}" />
|
||||
|
||||
<!-- 始发站(下拉选择:始发港 + 经停港) -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"始发站"}'
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
list="@{viewModel.depPortList}"
|
||||
value="@={viewModel.depPort}" />
|
||||
|
||||
<!-- 目的站(航班查询自动填充,不可编辑) -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
hint='@{"目的站"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.destPort}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
@@ -71,10 +93,10 @@
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="24dp">
|
||||
android:paddingHorizontal="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
@@ -128,10 +150,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -152,10 +152,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 统计信息 -->
|
||||
|
||||
@@ -130,10 +130,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -162,10 +162,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -152,10 +152,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
setIVCheckAllImage="@{viewModel.isAllChecked}"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="500dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -28,33 +28,26 @@
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 航班信息显示 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text='@{"航班:" + model.flightInfo}'
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 分配人下拉选择 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_marginHorizontal="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="分配人:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="240dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
list="@{model.assembleCompanyList}"
|
||||
value="@={model.allocator}" />
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -130,7 +130,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onConfirmClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -79,7 +79,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onSaveClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -79,7 +79,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onSaveClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -130,7 +130,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onConfirmClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
87
module_gjc/src/main/res/layout/dialog_int_exp_load_reset.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?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.search.layout.SearchLayoutType"/>
|
||||
|
||||
<variable
|
||||
name="model"
|
||||
type="com.lukouguoji.gjc.dialog.IntExpLoadResetDialogModel" />
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/bg_primary_radius_top_10"
|
||||
android:gravity="center"
|
||||
android:text="状态重置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 表单内容 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 重置状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="重置状态:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
hint='@{"请选择重置状态"}'
|
||||
list="@{model.resetStatusList}"
|
||||
value="@={model.selectedResetStatus}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.dismiss()}"
|
||||
android:text="取消" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onSaveClick()}"
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -79,7 +79,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onSaveClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -78,7 +78,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onSaveClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -130,7 +130,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onConfirmClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="600dp"
|
||||
android:layout_width="480dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog_f2_radius_10"
|
||||
android:gravity="center_horizontal"
|
||||
@@ -79,7 +79,7 @@
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()->model.onSaveClick()}"
|
||||
android:text="保存" />
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -18,14 +18,19 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_white_radius_bottom_8"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="8dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 表头 (浅灰色背景) -->
|
||||
<!-- tab 与表头分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line" />
|
||||
|
||||
<!-- 表头 (白色背景) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/color_f2"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp">
|
||||
@@ -91,6 +96,12 @@
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 表头与内容分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line" />
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_storage_list"
|
||||
|
||||
@@ -18,14 +18,19 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_white_radius_bottom_8"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="8dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 表头 (深绿色背景) -->
|
||||
<!-- tab 与表头分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line" />
|
||||
|
||||
<!-- 表头 (白色背景) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/color_f2"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp">
|
||||
@@ -111,6 +116,12 @@
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 表头与内容分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line" />
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_warehouse_list"
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:src="@mipmap/gjc_check_icon" />
|
||||
android:src="@drawable/img_check_all_unchecked" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -9,16 +9,26 @@
|
||||
type="com.lukouguoji.module_base.bean.GjcUldUseBean" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||
android:id="@+id/swipe_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 飞机图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
@@ -290,5 +300,23 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/img_pda_right" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 侧滑菜单区域 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_detail"
|
||||
style="@style/tv_item_action"
|
||||
android:background="@color/colorPrimary"
|
||||
android:text="详情" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
@@ -94,7 +94,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -140,7 +140,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0.7"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -217,7 +217,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -272,7 +272,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="0.7"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 左侧图标 -->
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
|
||||
@@ -15,12 +15,17 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@{position % 2 == 0 ? @color/white : @color/color_f2}"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="40dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="8dp">
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="40dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 序号 -->
|
||||
<TextView
|
||||
@@ -82,5 +87,13 @@
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 内容分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
@@ -15,12 +15,17 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@{position % 2 == 0 ? @color/white : @color/color_f2}"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="40dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="8dp">
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="40dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 序号 -->
|
||||
<TextView
|
||||
@@ -102,5 +107,13 @@
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 内容分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/line" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="6dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
loadImage="@{bean.checked ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@{bean.checkIn.equals(`2`) ? @drawable/bg_item_green : @drawable/bg_item}"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 飞机图标 (根据checked状态切换图片) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 飞机图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -33,313 +33,315 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:gravity="center_vertical">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
android:src="@drawable/img_plane" />
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="0.5px"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<!-- 运单信息区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_weight="0.8"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行:运单号、状态、代理、件数、重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 运单号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="运单号:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.wbNo}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 状态 -->
|
||||
<!-- 运单信息区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 第一行:运单号、状态、代理、件数、重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="状态:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 运单号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{4}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单号:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.wbNo}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="状态:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.declareStatus}"
|
||||
android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/text_blue : @color/text_normal)}"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="代理:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:text="@{bean.agentName}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="件数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.pc)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{4}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="重量:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf((int)bean.weight)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行:航程、计重状态、运抵状态、运单类型、分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.declareStatus}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航程 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{4}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航程:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.range}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 计重状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="计重状态:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.checkInText}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运抵状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运抵状态:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.arriveFlagText}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运单类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单类型:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.awbName}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{4}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="分单数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.haWbNumber)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 代理 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="代理:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.agentName}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="件数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.pc)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="重量:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf((int)bean.weight)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行:航程、计重状态、运抵状态、运单类型、分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航程 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="航程:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.range}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 计重状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="计重状态:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.checkInText}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运抵状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="运抵状态:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.arriveFlagText}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运单类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="运单类型:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.awbName}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 分单数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="分单数:"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.haWbNumber)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 展开按钮 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:padding="4dp"
|
||||
android:src="@mipmap/img_down"
|
||||
visible="@{bean.haWbList != null && !bean.haWbList.empty}" />
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -353,13 +355,26 @@
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- 暂无数据提示 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingVertical="15dp"
|
||||
android:text="暂无分单数据"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 表头 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -464,9 +479,10 @@
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/c999999" />
|
||||
android:background="@color/sub_list_divider" />
|
||||
|
||||
<!-- 子列表 RecyclerView -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/c999999" />
|
||||
android:background="@color/sub_list_divider" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||