feat: opt 开始组装 tree
This commit is contained in:
@@ -249,6 +249,7 @@
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/uldNoInput"
|
||||
enable="@{!viewModel.isUldNoLocked}"
|
||||
required="@{false}"
|
||||
setRefreshCallBack="@{viewModel::onUldNoInputComplete}"
|
||||
title='@{"ULD编号:"}'
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<import type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
||||
@@ -23,45 +25,89 @@
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="6dp">
|
||||
|
||||
<!-- 序号圆圈 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/bg_circle_gray"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:text="@{String.valueOf(position + 1)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="13sp"
|
||||
android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}"
|
||||
tools:text="1" />
|
||||
|
||||
<!-- ULD编号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
<!-- ========== 一级ULD行 ========== -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.uldNo}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="14sp" />
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{bean.itemType == AssembleInfoBean.ItemType.ULD_HEADER ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<!-- 重量信息 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 序号圆圈 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_circle_gray"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:text="@{String.valueOf(bean.uldIndex)}"
|
||||
android:textColor="@color/c333333"
|
||||
android:textSize="13sp"
|
||||
android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}"
|
||||
tools:text="1" />
|
||||
|
||||
<!-- ULD编号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.uldNo}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 件数/重量 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text='@{String.valueOf(bean.totalPieces) + "/" + String.format("%.1f", bean.totalWeight) + "kg"}'
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 展开/折叠箭头 -->
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:rotation="@{bean.isExpanded.get() ? 90f : 0f}"
|
||||
android:src="@drawable/img_pda_right" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ========== 二级运单行 ========== -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@{bean.weightInfo}"
|
||||
android:textColor="@{bean.isOrange ? @color/text_orange : @color/colorPrimary}"
|
||||
android:textSize="14sp" />
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{bean.itemType == AssembleInfoBean.ItemType.WAYBILL_DETAIL ? View.VISIBLE : View.GONE}">
|
||||
|
||||
<!-- 缩进占位 -->
|
||||
<Space
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.wbNo}"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<!-- 件数/重量 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="28dp"
|
||||
android:text='@{String.valueOf(bean.waybillPieces) + "/" + String.format("%.1f", bean.waybillWeight) + "kg"}'
|
||||
android:textColor="#e89e42"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 箭头图标 -->
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/img_pda_right"
|
||||
android:visibility="@{bean.hasArrow ? View.VISIBLE : View.GONE}" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user