Compare commits
4 Commits
c77c6a817b
...
9ff3bbbefc
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ff3bbbefc | |||
| c826db8718 | |||
| 0427020bc1 | |||
| 8c689d9d65 |
@@ -147,7 +147,8 @@
|
||||
"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)"
|
||||
"Bash(sed -n '212,240p' module_gjj/src/main/java/com/lukouguoji/gjj/viewModel/IntImpManifestViewModel.kt)",
|
||||
"mcp__plugin_claude-mem_mcp-search__search"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
@@ -7,6 +7,10 @@ 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
|
||||
@@ -29,7 +33,24 @@ class GjcBoxWeighingViewHolder(view: View) :
|
||||
|
||||
// 整行点击跳转到表单页(带数据回填)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 侧滑“详情”按钮点击跳转到只读详情页
|
||||
|
||||
@@ -24,20 +24,17 @@ class IntExpArriveViewHolder(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()
|
||||
}
|
||||
|
||||
// ========== 展开按钮点击事件 ==========
|
||||
// 展开按钮点击事件
|
||||
binding.ivShow.setOnClickListener {
|
||||
bean.showMore.set(!bean.showMore.get())
|
||||
}
|
||||
|
||||
// ========== 初始化子列表 RecyclerView ==========
|
||||
// 初始化子列表 RecyclerView
|
||||
setCommonAdapter(
|
||||
binding.rvSub,
|
||||
IntExpArriveSubViewHolder::class.java,
|
||||
@@ -45,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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,20 +24,17 @@ class IntExpTallyViewHolder(view: View) :
|
||||
|
||||
// 图标点击切换选择状态(主单和分单独立,互不干扰)
|
||||
binding.ivIcon.setOnClickListener {
|
||||
// 只切换主单自己的选择状态,不同步到分单
|
||||
bean.checked.set(!bean.checked.get())
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
|
||||
|
||||
// 刷新UI
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
|
||||
// ========== 新增:展开按钮点击事件 ==========
|
||||
// 展开按钮点击事件
|
||||
binding.ivShow.setOnClickListener {
|
||||
bean.showMore.set(!bean.showMore.get())
|
||||
}
|
||||
|
||||
// ========== 新增:初始化子列表 RecyclerView ==========
|
||||
// 初始化子列表 RecyclerView
|
||||
setCommonAdapter(
|
||||
binding.rvSub,
|
||||
IntExpTallySubViewHolder::class.java,
|
||||
@@ -45,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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,13 +95,9 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
||||
val shouldExpand = !isAllExpanded.value!!
|
||||
isAllExpanded.value = shouldExpand
|
||||
|
||||
// 更新所有列表项的 showMore 状态
|
||||
list.forEach { bean ->
|
||||
// 只有当有子列表时才设置展开状态
|
||||
if (!bean.haWbList.isNullOrEmpty()) {
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新列表UI
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
|
||||
@@ -96,13 +96,9 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
||||
val shouldExpand = !isAllExpanded.value!!
|
||||
isAllExpanded.value = shouldExpand
|
||||
|
||||
// 更新所有列表项的 showMore 状态
|
||||
list.forEach { bean ->
|
||||
// 只有当有子列表时才设置展开状态
|
||||
if (!bean.haWbList.isNullOrEmpty()) {
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新列表UI
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 飞机图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
@@ -335,11 +336,11 @@
|
||||
<!-- 展开按钮 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
visible="@{bean.haWbList != null && !bean.haWbList.empty}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -354,8 +355,21 @@
|
||||
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"
|
||||
@@ -465,6 +479,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/sub_list_divider" />
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
@@ -338,10 +339,11 @@
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:rotation="@{bean.showMore.get() ? 180f : 0f}"
|
||||
android:scaleType="centerInside"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
@@ -305,9 +306,10 @@
|
||||
android:id="@+id/iv_show"
|
||||
visible="@{bean.storageUseList != null && !bean.storageUseList.empty}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- 白色卡片主要内容区域 -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_white_radius_8" android:orientation="vertical">
|
||||
<!-- 主要内容区域 -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" android:padding="10dp">
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" android:paddingVertical="20dp" android:paddingHorizontal="10dp">
|
||||
<!-- 选中图标 -->
|
||||
<ImageView android:id="@+id/iv_icon" android:layout_width="40dp" android:layout_height="40dp" android:layout_marginTop="0.5px" android:layout_marginEnd="10dp" loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" android:src="@drawable/img_plane"/>
|
||||
<!-- 数据展示区域 -->
|
||||
@@ -76,17 +76,28 @@
|
||||
<!-- 展开/折叠按钮 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
visible="@{bean.haWbList != null && !bean.haWbList.empty}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
</LinearLayout>
|
||||
<!-- 子订单列表容器(在白色卡片外面) -->
|
||||
<LinearLayout visible="@{bean.showMore}" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:background="#e3f6e0" android:orientation="vertical" android:visibility="gone">
|
||||
<!-- 暂无数据提示 -->
|
||||
<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:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginVertical="10dp" android:paddingHorizontal="10dp" android:orientation="horizontal">
|
||||
<LinearLayout android:id="@+id/ll_header" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginVertical="10dp" android:paddingHorizontal="10dp" android:orientation="horizontal">
|
||||
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.5" android:gravity="center" android:text="选项" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
||||
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" android:gravity="center" android:text="分单号" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
||||
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:gravity="center" android:text="件数" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
||||
@@ -99,6 +110,7 @@
|
||||
<TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.9" android:gravity="center" android:text="删除费率" android:textColor="@color/text_normal" android:textSize="14sp" android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/sub_list_divider"/>
|
||||
|
||||
@@ -47,7 +47,23 @@ class IntArrAirManifestViewHolder(view: View) :
|
||||
R.layout.item_int_arr_air_manifest_sub
|
||||
)
|
||||
|
||||
val subList = bean.haWbList ?: emptyList()
|
||||
binding.rvSub.tag = bean
|
||||
binding.rvSub.refresh(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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,5 +45,20 @@ class IntImpStorageUseViewHolder(view: View) :
|
||||
val storageUseList = bean.storageUseList ?: emptyList()
|
||||
binding.rvSub.tag = bean
|
||||
binding.rvSub.refresh(storageUseList)
|
||||
updateSubListVisibility(storageUseList.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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,10 +90,8 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
|
||||
isAllExpanded.value = shouldExpand
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjAirManifest> ?: return
|
||||
list.forEach { bean ->
|
||||
if (!bean.haWbList.isNullOrEmpty()) {
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
}
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
|
||||
@@ -103,10 +103,8 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
||||
isAllExpanded.value = shouldExpand
|
||||
|
||||
list.forEach { bean ->
|
||||
if (!bean.storageUseList.isNullOrEmpty()) {
|
||||
bean.showMore.set(shouldExpand)
|
||||
}
|
||||
}
|
||||
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
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}"
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
@@ -266,9 +267,10 @@
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@@ -23,8 +23,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}"
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
@@ -313,11 +314,11 @@
|
||||
<!-- 展开/折叠按钮(卡片内部底部) -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
visible="@{bean.haWbList != null && !bean.haWbList.empty}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -332,8 +333,21 @@
|
||||
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"
|
||||
@@ -443,6 +457,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/sub_list_divider" />
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 左侧选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp"
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
@@ -316,9 +317,10 @@
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
<!-- 左侧图标 -->
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
@@ -304,11 +305,11 @@
|
||||
<!-- 展开/折叠按钮 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
visible="@{bean.storageUseList != null && !bean.storageUseList.empty}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -323,8 +324,21 @@
|
||||
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"
|
||||
@@ -394,6 +408,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/sub_list_divider" />
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:paddingVertical="20dp"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
|
||||
<ImageView
|
||||
@@ -326,9 +327,10 @@
|
||||
<ImageView
|
||||
android:id="@+id/iv_show"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_height="20dp"
|
||||
android:paddingVertical="2.5dp"
|
||||
android:layout_marginTop="-20dp"
|
||||
android:scaleType="center"
|
||||
android:src="@mipmap/img_down" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="vertical"
|
||||
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}"
|
||||
|
||||
Reference in New Issue
Block a user