114 lines
4.4 KiB
XML
114 lines
4.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<data>
|
|
|
|
<import type="android.view.View" />
|
|
|
|
<import type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
|
|
|
<variable
|
|
name="bean"
|
|
type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
|
|
|
<variable
|
|
name="position"
|
|
type="Integer" />
|
|
</data>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="8dp"
|
|
android:paddingVertical="6dp">
|
|
|
|
<!-- ========== 一级ULD行 ========== -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
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"
|
|
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: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>
|
|
|
|
</LinearLayout>
|
|
</layout>
|