fix(gjc): 出港运抵卡片无分单也显示「查看分单 0」,分单明细补空态
- 手机卡片「查看分单」按钮始终显示,分单数为空时按 0 显示 - 无分单的运单可进入分单明细页,补「暂无分单」空态,避免整页空白 Refs: 禅道 Bug #631 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="com.lukouguoji.gjc.viewModel.IntExpArriveSubOrderViewModel" />
|
type="com.lukouguoji.gjc.viewModel.IntExpArriveSubOrderViewModel" />
|
||||||
@@ -60,12 +62,16 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- ==================== 列表 ==================== -->
|
<!-- ==================== 列表 + 空态 ==================== -->
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv"
|
android:id="@+id/rv"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
android:paddingTop="4dp"
|
android:paddingTop="4dp"
|
||||||
@@ -76,6 +82,33 @@
|
|||||||
tools:itemCount="3"
|
tools:itemCount="3"
|
||||||
tools:listitem="@layout/item_int_exp_arrive_sub_order" />
|
tools:listitem="@layout/item_int_exp_arrive_sub_order" />
|
||||||
|
|
||||||
|
<!-- 空态(Bug #631:无分单的运单也可进入本页) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="@{viewModel.displayList.empty ? View.VISIBLE : View.GONE}">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:src="@drawable/ic_phone_clipboard"
|
||||||
|
android:tint="@color/phone_text_hint" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="暂无分单"
|
||||||
|
android:textColor="@color/phone_text_hint"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<!-- ==================== 底部操作条 ==================== -->
|
<!-- ==================== 底部操作条 ==================== -->
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneBottomBar
|
<com.lukouguoji.module_base.ui.weight.phone.PhoneBottomBar
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -213,7 +213,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 查看分单(无分单数据时不显示) -->
|
<!-- 查看分单(Bug #631:无分单也显示,数量为 0) -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
@@ -221,10 +221,9 @@
|
|||||||
android:background="@drawable/bg_phone_btn_weak"
|
android:background="@drawable/bg_phone_btn_weak"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:onClick="@{()-> activity.openSubOrder(bean)}"
|
android:onClick="@{()-> activity.openSubOrder(bean)}"
|
||||||
android:text='@{"查看分单 " + bean.haWbNumber}'
|
android:text='@{"查看分单 " + (bean.haWbNumber == null ? 0 : bean.haWbNumber)}'
|
||||||
android:textColor="@color/phone_primary"
|
android:textColor="@color/phone_primary"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="@{bean.haWbNumber != null && bean.haWbNumber > 0 ? View.VISIBLE : View.GONE}"
|
|
||||||
tools:text="查看分单 3" />
|
tools:text="查看分单 3" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|||||||
Reference in New Issue
Block a user